The INSSEventAuthorization::GetAuthorizedEvents method is used to specify which events must be authorized before they can be performed.
Syntax
HRESULT GetAuthorizedEvents (
DWORD cMaxAuthorizedEvents,
DWORD *pcAuthorizedEvents,
NSS_EVENT_TYPE *rgAuthorizedEvents
);
Parameters
[in] cMaxAuthorizedEvents
Indicates the maximum number of events that can be specified for authorization.
[out] pcAuthorizedEvents
Specifies the number of authorization events being set by the component.
[out] rgAuthorizedEvents
Specifies the list of events requiring authorization. Each event specified by this parameter triggers a call from the server to the component’s INSSEventAuthorization::AuthorizeEvent method. Values supported for this parameter include:
Event Type | Description |
NSSE_CONNECT | Client requests a connection. |
NSSE_OPEN | Request to open a title. |
NSSE_PLAY | Request to start streaming title. |
NSSE_SKIP_AUTHENTICATION | Require user authentication. |
Return Values
This method should return S_OK upon successful completion, or an HRESULT error value.
Remarks
Memory for the events specified by rgAuthorizedEvents is allocated and freed by the server.
The following code illustrates a skeleton implementation of the INSSEventAuthorization::GetAuthorizedEvents method.
HRESULT
CEventHandler::GetAuthorizedEvents(
DWORD cMaxAuthorizedEvents,
DWORD __RPC_FAR *pcAuthorizedEvents,
NSS_EVENT_TYPE __RPC_FAR *rgAuthorizedEvents )
{
if ( ( NULL == rgAuthorizedEvents )
|| ( NULL == pcAuthorizedEvents )
|| ( cMaxAuthorizedEvents < 3 ) )
{
return( E_INVALIDARG );
}
*pcAuthorizedEvents = 3;
rgAuthorizedEvents[0] = NSSE_CONNECT;
rgAuthorizedEvents[1] = NSSE_OPEN;
rgAuthorizedEvents[2] = NSSE_PLAY;
return(S_OK);
};
See Also
INSSEventAuthorizationCallback::OnEventAuthorized , NSS_EVENT_TYPE
© 1996-1998 Microsoft Corporation. All rights reserved.