|
virtual signed int | AcceptConnection (void **s, signed int port, void *params, signed int *bLocalConnection)=0 |
|
virtual signed int | AskInterface (const BGUID *piid, struct IRoot **ppr)=0 |
|
virtual signed int | ConnectToServer (void **s, char *host, signed int port, signed int *bLocalConnection)=0 |
|
virtual signed int | CreateClientStream (void *s, ILogger *pLogger, ISimpleStream **pp)=0 |
|
virtual signed int | CreateClientStreamEx (void *s, ILogger *pLogger, ISimpleStream **pp, signed int bLocalConnection)=0 |
|
virtual signed int | CreateServerStream (void *s, ISimpleStream **pp)=0 |
|
virtual signed int | CreateServerStreamEx (void *s, ISimpleStream **pp, signed int bLocalConnection)=0 |
|
virtual signed int | CreateSession (signed int SessionType, IHdrcSession **pp)=0 |
|
virtual signed int | DecRef ()=0 |
|
virtual signed int | GetSession (signed int Num, IHdrcSession **pps)=0 |
|
virtual signed int | GetSessionNum (signed int *Num)=0 |
|
virtual signed int | GetStream (ENUM_STREAM_CATEGORY Category, ISimpleStream **ppv)=0 |
|
virtual signed int | GetTraceOptions (ENUM_TRACE_OPTIONS *)=0 |
|
virtual signed int | IncRef ()=0 |
|
virtual signed int | Init ()=0 |
|
virtual signed int | RemoveSession (IHdrcSession *pS)=0 |
|
virtual signed int | SetDatasetLoadFunc (ENUM_LOAD_FUNC loadtype, loadfunc *func)=0 |
|
virtual signed int | SetSegmentFunc (ENUM_SEGMENT_FUNC segmenttype, segmentfunc *func)=0 |
|
virtual signed int | SetStream (ENUM_STREAM_CATEGORY Category, ISimpleStream *pv)=0 |
|
virtual signed int | SetTraceOptions (ENUM_TRACE_OPTIONS e)=0 |
|
virtual signed int | Term ()=0 |
|
virtual signed int | WaitForAllSessions ()=0 |
|
template<class T > |
signed int | AskInterface (T **pp) |
|
Object implementing IHdrcServer is responsible for maintaining a number of Sessions
virtual signed int IHdrcServer::AcceptConnection |
( |
void ** |
s, |
|
|
signed int |
port, |
|
|
void * |
params, |
|
|
signed int * |
bLocalConnection |
|
) |
| |
|
pure virtual |
Tells the server library to call the transfer plugin's AcceptConnection() function. If the transfer plugin in question does not implement ConnectToServer, then a listening socket will be created on the specified port and this function will return when a connection has been established.
- Parameters
-
s | This will get the address of a structure that describes the connection to the client. If the transfer plugin being used does not implement AcceptConnection, this will get the address of a SOCKET pointer. Otherwise, what is returned here is up to the implementor of the transfer plugin. |
port | This is the port that this function should use to listen for a connection. For user written transfer plugins that don't have the concept of a port, they can simply ignore this parameter. |
params | This is an optional structure that can be used to pass parameters to the transfer plugin. In the case of the Fovia server application, this will be the address of a SOCKET_STREAM_PARAMS that contains the relevant information for connection. Note that the Fovia server application only works with transfer plugins that use SOCKET_STREAM_PARAMS. If you wish to use another method, the server must be implemented by the user of the API. |
bLocalConnection | If the connected client is local to this machine, *bLocalConnection will get H_TRUE. Otherwise, *bLocalConnection will get H_FALSE. |
virtual signed int IHdrcServer::AskInterface |
( |
const BGUID * |
piid, |
|
|
struct IRoot ** |
ppr |
|
) |
| |
|
pure virtual |
ask object for another interface
Implements IRoot.
virtual signed int IHdrcServer::ConnectToServer |
( |
void ** |
s, |
|
|
char * |
host, |
|
|
signed int |
port, |
|
|
signed int * |
bLocalConnection |
|
) |
| |
|
pure virtual |
Tells the server library to call the transfer plugin's ConnectToServer() function. Note that this is called internally by the client API's server context when you call ConnectEx() or Connect(). If the transfer plugin in question does not implement ConnectToServer, then a socket will be used to connect to the server.
- Parameters
-
s | This should be filled with the information about the connection to the server. If the plugin that is being used does not implement ConnectToServer, then this will get a the address of a SOCKET pointer. Otherwise, the plugin implementation is free to put any information about the connection here. |
host | The host parameter as it was passed into the server context's Connect() or ConnectEx() function. |
port | The port parameter as it was passed into the server context's Connect() or ConnectEx() function. |
bLocalConnection | Ihis variable will recieve H_TRUE if the connection is to the local machine and H_FALSE if it is not. |
virtual signed int IHdrcServer::CreateClientStreamEx |
( |
void * |
s, |
|
|
ILogger * |
pLogger, |
|
|
ISimpleStream ** |
pp, |
|
|
signed int |
bLocalConnection |
|
) |
| |
|
pure virtual |
Tells the server library to call the transfer plugin's CreateClientStreamEx() function. Note that this is called internally by the client API's server context when you call ConnectEx() or Connect().
- Parameters
-
s | This is the information about the connection to the server. If the current transfer plugin does not implement ConnectToServer(), then this parameter can be treated as a SOCKET. If ConnectToServer() is implemented, this is the pointer that is returned in the s parameter to ConnectToServer(). |
pLogger | This is the ILogger interface passed into the server context's Connect() or ConnectEx() functions. |
pp | This will receive the address of the ISimpleStream pointer that will be used in all communcation with the server. |
bLocalConnection | If H_TRUE, then the local streaming plugin specified in hdrcopt.ini will be called. If H_FALSE, then the remote streaming plugin will be used. If hdrcopt.ini is not preset, hdrclocalstr is the local streaming plugin and hdrcsockstr is the remote streaming plugin. |
virtual signed int IHdrcServer::CreateServerStream |
( |
void * |
s, |
|
|
ISimpleStream ** |
pp |
|
) |
| |
|
pure virtual |
Deprecated. Use CreateServerStreamEx and specify whether it is a local or remote connection.
virtual signed int IHdrcServer::CreateServerStreamEx |
( |
void * |
s, |
|
|
ISimpleStream ** |
pp, |
|
|
signed int |
bLocalConnection |
|
) |
| |
|
pure virtual |
CreateServerStreamEx is responsible of loading ISimpleStream class object from a plugin dll. For details on plugin dlls, please look up at writing custom plugin dll documentation.
If there is no custom plugin dll specified, this function loads the default dll which is responsible for making communication over standard sockets.
Example:
SOCKET s = socket(....
piServer->CreateServerStream(&s,&piStream);
- Parameters
-
s | This is the information about the connection to the server. If the current transfer plugin does not implement ConnectToServer(), then this parameter can be treated as a SOCKET. If ConnectToServer() is implemented, this is the pointer that is returned in the s parameter to ConnectToServer(). |
pp | This will receive the address of the ISimpleStream pointer that will be used in all communcation with the server. |
bLocalConnection | If H_TRUE, then the local streaming plugin specified in hdrcopt.ini will be called. If H_FALSE, then the remote streaming plugin will be used. If hdrcopt.ini is not preset, hdrclocalstr is the local streaming plugin and hdrcsockstr is the remote streaming plugin. |
virtual signed int IHdrcServer::CreateSession |
( |
signed int |
SessionType, |
|
|
IHdrcSession ** |
pp |
|
) |
| |
|
pure virtual |
This function creates session object and returns pointer back. The session object is responsible for maintaing session of a particular cleint. All the requests of the clinet for Fovia's renndering engine are passed through session object. Without session object, no cleint can connect and cannot request for any type of service from the server. Example:
hr = piServer->Init();
{
hr = piServer->CreateSession(0,&piSession);
}
...
- Parameters
-
SessionType | for now this session must be set to zero. |
pp | is a pointer to a IHdrcSession interface pointer (pointer to a pointer **). |
virtual signed int IHdrcServer::DecRef |
( |
| ) |
|
|
pure virtual |
decrements the reference count for the object
Implements IRoot.
virtual signed int IHdrcServer::GetSession |
( |
signed int |
Num, |
|
|
IHdrcSession ** |
pps |
|
) |
| |
|
pure virtual |
This function returns the session object corrosponding to the session number/count passed. Example:
h_int32 cnt = 2;
piServer->GetSession(cnt,&piSession);
- Parameters
-
Num | is an integer. |
pps | is a pointer to a IHdrcSession interface pointer (pointer to a pointer **) |
virtual signed int IHdrcServer::GetSessionNum |
( |
signed int * |
Num | ) |
|
|
pure virtual |
This function returns the number of sessions running, or in words, it returns the number of clients connected
Example:
h_int32 cnt;
piServer->GetSessionNum(&cnt);
- Parameters
-
Num | is a pointer to an integer. |
This function allows to get back the stream of specified catagory. It allows the following type of streams
SC_IN In
SC_OUT Out
SC_INOUT In/Out (Both)
Example:
- Parameters
-
Category | is of enumeration type BCOM_THIS_ ENUM_STREAM_CATEGORY. |
ppv | is a pointer to a pointer of type ISimpleStream interface. |
virtual signed int IHdrcServer::IncRef |
( |
| ) |
|
|
pure virtual |
increments the reference count for the object
Implements IRoot.
virtual signed int IHdrcServer::Init |
( |
| ) |
|
|
pure virtual |
This is the entry point into the Server API interface. After the factory method call hdrcCreateServer() This is the first call for internal initialization. Example:
virtual signed int IHdrcServer::RemoveSession |
( |
IHdrcSession * |
pS | ) |
|
|
pure virtual |
This function removes the session object. The session object is responsible for maintaing session of a particular cleint. All the requests of the clinet for Fovia's rendering engine are passed through session object. Without session object, client cannot connect.
Example:
hr = piServer->RemoveSession(piSession);
- Parameters
-
virtual signed int IHdrcServer::SetDatasetLoadFunc |
( |
ENUM_LOAD_FUNC |
loadtype, |
|
|
loadfunc * |
func |
|
) |
| |
|
pure virtual |
Sets a custom dataset loading function.
- Parameters
-
loadtype | An interger value cast to the ENUM_LOAD_FUNC type. This value is used to identify the function when called from a client application. |
func | A function pointer to the custom loading function implmentation. This function must conform to the loadfunc prototype. |
virtual signed int IHdrcServer::SetSegmentFunc |
( |
ENUM_SEGMENT_FUNC |
segmenttype, |
|
|
segmentfunc * |
func |
|
) |
| |
|
pure virtual |
Sets a custom segmentation or data analysis function.
- Parameters
-
loadtype | An interger value cast to the ENUM_SEGMENT_FUNC type. This value is used to identify the function when called from a client application. |
func | A function pointer to the custom segmentation or analysis function implmentation. This function must conform to the segmentfunc prototype. |
This function allows different type of streams to be directed to the given ISimpleStream object It allows the following type of streams
SC_IN In
SC_OUT Out
SC_INOUT In/Out (Both)
Example:
- Parameters
-
Category | is of enumeration type BCOM_THIS_ ENUM_STREAM_CATEGORY. |
pv | is a pointer to a ISimpleStream interface |
virtual signed int IHdrcServer::SetTraceOptions |
( |
ENUM_TRACE_OPTIONS |
e | ) |
|
|
pure virtual |
virtual signed int IHdrcServer::Term |
( |
| ) |
|
|
pure virtual |
This called is needed to cleanup the server instance allocated data structure. It is highly recommended to for graceful termination. Example:
hr = piServer->Init();
...
hr = piServer->Term();
virtual signed int IHdrcServer::WaitForAllSessions |
( |
| ) |
|
|
pure virtual |
This called is needed to wait on all the sessions to be closed before the server is allowed to terminate. This call is blocking and will return once all the sessions are terminated and related data is released. Before calling Term(), the Server API client must call WaitForAllSessions() to makes sure that there is no session and its related data. If WaitForAllSessions() is called called before application exists, there might not be a graceful exit. If this API is used in a Windows Service, please do not forget to call this function before exit.