OpenDOF Project
DOFOperation DOFObject_BeginSession ( DOFObject  obj,
const DOFInterface  interface,
const DOFInterfaceID  sessionType,
DOFOperationControl  config,
uint32  timeout,
const DOFObjectSessionCallback  callback,
void *  context 
)

Start an asynchronous request to open a Session on an object.

The system will allow up to the specified timeout to establish a new Session for the given Interface on the given Object. Operation completion or failure is reported through the specified callback. As with any DOFOperation, this operation can be extended or cancelled.

Resource Management:
This function allocates resources that must later be freed by calling DOFOperation_Destroy.
Note
Attempting to open a session upon an existing session (where the given Object already represents a session) is not supported.
Parameters
objThe object on which to request the Session. This should not be NULL.
interfaceThe Interface on which to request the Session. This should not be NULL.
sessionTypeThe Session primary Interface ID (a DOFInterfaceID). This interface should be provided on the session (possibly in addition to others), and defines the purpose and contract for the session. This should not be NULL.
configConfiguration options for the request operation (NULL for default configuration).
timeoutThe maximum duration for the asynchronous operation, in milliseconds (specifies the duration of the session). The timeout begins after the operation has been processed and sent to appropriate connections.
callbackThe callback through which the completion or failure notification will be received. This may be null to ignore notification of the received session. The session can be retrieved by calling DOFOperationSession_WaitSession.
contextApplication context data associated with the asynchronous operation.
Returns
A representation of the operation, or NULL if
  • an invalid parameter is detected; or
  • insufficient resources exist to create the operation; or
  • obj already represents a session.
core-c-dof-oal Version 7.1.5 Build 0
2017-01-25