Previous | Next |
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 being set by the component.
[out] rgAuthorizedEvents
Specifies the list of events that require authorization. Each of these events 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 streaming of a title start. |
NSSE_SKIP_AUTHENTICATION | Client requires user authentication. |
Return Values
This method must return S_OK upon successful completion, or an HRESULT error code.
Remarks
Memory for the events specified by rgAuthorizedEvents 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 |