|
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
-
obj | The object on which to request the Session. This should not be NULL. |
interface | The Interface on which to request the Session. This should not be NULL. |
sessionType | The 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. |
config | Configuration options for the request operation (NULL for default configuration). |
timeout | The 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. |
callback | The 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. |
context | Application 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.
|