Share via


Internal Events

banner art

Previous Next

Internal Events

You can use event notices to respond to changes in the state of the server. You can obtain event notices internally by using either the IWMSEventNotificationPlugin interface or the IWMSEventAuthorizationPlugin interface. You can use the WMS WMI Event Handler plug-in included with Windows Media Services to obtain an event notice externally. For more information, see External Events.

To retrieve event notices internally, you must use one of the event notification and authorization plug-ins included with Windows Media Services, or create your own. An event notification plug-in indicates the event notices that it must receive by implementing the GetHandledEvents method on the IWMSEventNotificationPlugin interface. An authorization plug-in indicates the event notices that it must receive by implementing the GetAuthorizedEvents method on the IWMSEventAuthorizationPlugin interface.

When a registered event occurs, the server calls either the OnEvent method on the IWMSEventNotificationPlugin interface or the AuthorizeEvent method on the IWMSEventAuthorizationPlugin interface and fills a WMS_EVENT structure to identify the type of event that occurred. The server also fills in a command context, user context, and presentation context.

The WMS_EVENT structure contains a WMS_EVENT_TYPE enumeration type.

struct WMS_EVENT
{
    long Version;
    enum WMS_EVENT_TYPE Type;
    long hr;
};

The following table identifies the internal event notices that can be sent by the server. The value column lists the numeric value associated with each event. You must supply the numeric value when you use Visual Basic Scripting Edition (VBScript). The notification event and authorization event columns indicate whether a notification plug-in or an authorization plug-in can subscribe to the event. Authorization events that are associated with read/write access require that an authentication plug-in be enabled before authorization can occur. This is indicated in the table by the "Authentication required" column. The event notices in the following table are members of the WMS_EVENT_TYPE enumeration type.

Event Value Notification event Authorization event Authentication required
WMS_EVENT_UNKNOWN_EVENT 0 Yes No n/a
WMS_EVENT_CONNECT 1 Yes Yes No
WMS_EVENT_DISCONNECT 2 Yes No n/a
WMS_EVENT_BEGIN_USER_SESSION 3 Yes Yes No
WMS_EVENT_END_USER_SESSION 4 Yes No n/a
WMS_EVENT_LOGICAL_URL_TRANSFORM 5 No Yes No
WMS_EVENT_PHYSICAL_URL_TRANSFORM 6 No Yes No
WMS_EVENT_DESCRIBE 7 Yes Yes Yes
WMS_EVENT_OPEN 8 Yes Yes Yes
WMS_EVENT_SELECT_STREAMS 9 Yes Yes Yes
WMS_EVENT_INITIALIZE_PLAYLIST 10 No Yes No
WMS_EVENT_PLAY 11 Yes Yes Yes
WMS_EVENT_PAUSE 12 Yes No n/a
WMS_EVENT_STOP 13 Yes No n/a
WMS_EVENT_CLOSE 14 Yes No n/a
WMS_EVENT_SET_PARAMETER 15 Yes No n/a
WMS_EVENT_GET_PARAMETER 16 Yes Yes Yes
WMS_EVENT_VALIDATE_PUSH_DISTRIBUTION 17 Yes Yes Yes
WMS_EVENT_CREATE_DISTRIBUTION_DATA_PATH 18 Yes No n/a
WMS_EVENT_DESTROY_DISTRIBUTION_DATA_PATH 19 Yes No n/a
WMS_EVENT_LOG 20 Yes No n/a
WMS_EVENT_SERVER 21 Yes No n/a
WMS_EVENT_PUBLISHING_POINT 22 Yes No n/a
WMS_EVENT_LIMIT_CHANGE 23 Yes No n/a
WMS_EVENT_LIMIT_HIT 24 Yes No n/a
WMS_EVENT_PLUGIN 25 Yes No n/a
WMS_EVENT_PLAYLIST 26 Yes No n/a
WMS_EVENT_CACHE 27 Yes No n/a
WMS_EVENT_REMOTE_CACHE_OPEN 28 Yes No n/a
WMS_EVENT_REMOTE_CACHE_CLOSE 29 Yes No n/a
WMS_EVENT_REMOTE_CACHE_LOG 30 Yes No n/a

See Also (General)

See Also (Visual Basic .NET)

See Also (C#)

See Also (C++)

Previous Next