ServiceRequestedEventArgs class

ServiceRequestedEventArgs class

Contains event data for a MediaProtectionManager object when a service is requested.

Syntax


/* For information about creating or accessing this object, see Remarks. */

Members

The ServiceRequestedEventArgs class has these types of members:

Methods

The ServiceRequestedEventArgs class inherits methods from the Object class (C#/VB/C++).

Properties

The ServiceRequestedEventArgs class has these properties.

PropertyAccess typeDescription

Completion

Read-only

Returns an indication of the completion of the service request.

Request

Read-only

Contains the service request.

 

Remarks

This object is not instantiated directly. It is created by the MediaProtectionManager.ServiceRequested event and is returned as an argument to the ServiceRequestedEventHandler delegate.

Examples

The following example shows how to create a MediaProtectionManager, set the Properties property, and add event listeners for ComponentLoadFailed and ServiceRequested. See the How to use pluggable DRM topic for the full example.



mediaProtectionManager = 
    new Windows.Media.Protection.MediaProtectionManager();

function ServiceRequested(e) {
   logMsg("Got Enabler - system/type: {" + e.request.protectionSystem + "}/{" + e.request.type + "}");
   e.completion.complete(true);
}


function ComponentLoadFailed(e) {
   logMsg(e.information.items.size.toString() + " failed components");
   logMsg("<h2>Components:</h2>");

   //  List the failing components
   for (var i = 0; i < e.information.items.size; i++) {
      logMsg("<h3>" + e.information.items[i].name + "</h3>" +
             "<p>Reasons=0x" + e.information.items[i].reasons.toString(16) +
             "<p>Renewal Id=" + e.information.items[i].renewalId);
   }

   e.completion.complete(false);
}

function RebootNeeded(e) {
   logMsg("Reboot Required");
}

mediaProtectionManager.addEventListener("servicerequested", ServiceRequested, false);
mediaProtectionManager.addEventListener("componentloadfailed", ComponentLoadFailed, false);
mediaProtectionManager.addEventListener("rebootneeded", RebootNeeded, false);
 


Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Media.Protection
Windows::Media::Protection [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Media.Protection
Windows::Media::Protection [C++]

Metadata

Windows.winmd

Attributes

[MarshalingBehavior(Agile)]
[Version(0x06020000)]

See also

Object

 

 

Show:
© 2016 Microsoft