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 that are set by the component.
[out] rgAuthorizedEvents
Specifies the list of events that require authorization. Each event specified by this parameter triggers a call from the server to the INSSEventAuthorization::AuthorizeEvent method of the component. The following values are supported for this parameter.
Event type | Description |
NSSE_CONNECT | Client requests a connection. |
NSSE_OPEN | Client requests that a title be opened. |
NSSE_PLAY | Client requests that streaming of a title be started. |
NSSE_SKIP_AUTHENTICATION | Client requires user authentication. |
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 INSSEventAuthorization::GetAuthorizedEvents method:
HRESULT
CEventNotification::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
[Previous][Next]