Previous | Next |
Used to specify which events trigger a call from the server.
Syntax
HRESULT GetHandledEvents(
DWORD cMaxHandledEvents,
DWORD *pcHandledEvents,
NSS_EVENT_TYPE *rgHandledEvents
);
Parameters
[in] cMaxHandledEvents
Specifies the maximum number of different handled events.
[out] pcHandledEvent
Specifies the number of events in the rgHandledEvent parameter.
[out] rgHandledEvent
Specifies the list of events that trigger a call from the server to the INSSEventNotification::OnEvent method. The following values are supported for this parameter.
Event type | Description |
NSSE_CONNECT | Client connected. |
NSSE_DISCONNECT | Client disconnected. |
NSSE_OPEN | Title was opened. |
NSSE_CLOSE | Title was closed. |
NSSE_PLAY | Streaming of title was started. |
NSSE_STOP | Streaming of title was stopped. |
Return Values
This method must return S_OK upon successful completion, or an HRESULT error code.
Remarks
Memory for the events specified by the rgAuthorizedEvents is allocated and freed by the server.
The following code illustrates a skeletal implementation of the INSSEventNotification::GetHandledEvents method:
HRESULT
CEventNotification::GetHandledEvents(
DWORD cMaxHandledEvents,
DWORD __RPC_FAR *pcHandledEvents,
NSS_EVENT_TYPE __RPC_FAR *rgHandledEvents )
{
if ( ( NULL == pcHandledEvents )
|| ( NULL == pcHandledEvents )
|| ( cMaxHandledEvents < 9 ) ) {
return( E_INVALIDARG );
}
*pcHandledEvents = 6;
rgHandledEvents[0] = NSSE_CONNECT;
rgHandledEvents[1] = NSSE_DISCONNECT;
rgHandledEvents[2] = NSSE_OPEN;
rgHandledEvents[3] = NSSE_CLOSE;
rgHandledEvents[4] = NSSE_PLAY;
rgHandledEvents[5] = NSSE_STOP;
return( S_OK );
}
See Also
INSSEventNotification::OnEvent
Previous | Next |