Callback for a Provider when a session is requested.
This callback must decide whether or not to accept the new session. The Provider may choose to not allow the session by throwing an exception on the request (see DOFRequest_Throw). The request will remain valid until the SessionComplete callback is called. If the application chooses not to supply a SessionComplete callback, then the session request must be accepted or rejected synchronously inside this callback. If the application initially accepts the session, the application can terminate it (as long as the request remains valid) by calling DOFRequest_Throw.
Typically, an application creates a new Session DOFObject (based on the given sessionID) and starts one or more Provide Operations on it.
This callback may be NULL if the application does not implement the capability to open a Session (any attempt to open a session will cause a generic exception response).
- Parameters
-
self | The callback object. This will never be NULL. |
operation | The Provide Operation. This will never be NULL. |
object | The provider Object on which a Session is requested. This will never be NULL. |
interfaceID | The Interface ID of the specific provider on which a session is being requested. This will never be NULL. |
sessionID | The Session ID (a DOFObjectID). This uniquely identifies the session, and includes a Session Attribute chosen by the requestor. A DOFObject can be created directly from this ID to provide interfaces on the session. This will never be NULL. |
sessionType | The requested Session type (a DOFInterfaceID), defining the purpose and contract for the session. This interface is typically provided on the session (possibly in addition to others), but no specific behavior is required. This will never be NULL. |
request | A representation of the requestor. This will never be NULL. |
- Note
- The request must be accepted by calling DOFRequestSession_Return, or rejected via DOFRequest_Throw. All parameters to this callback remain valid and may be referenced by the application until either the end of the callback or the SessionComplete callback is called, whichever is LATER.