Theater SDK Banner 

Art
[Previous][Next]

INSSEventNotification::GetHandledEvents

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 opened.
NSSE_CLOSE Title closed.
NSSE_PLAY Title started streaming.
NSSE_STOP Title stopped streaming.

Return Values

This method must return S_OK upon successful completion, or an HRESULT error value.

Remarks

Memory for the events specified by the rgAuthorizedEvents parameter 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]



© 1996-1998 Microsoft Corporation. All rights reserved