Using the Proactive or Reactive Model
Your Windows Store App can provide service requests either proactively or reactively. A proactive service request is one in which you anticipate an expected event. A reactive service request is one in which you respond to an event that has occurred. Your Windows Store app can use a mixture of proactive and reactive service requests.
You can create any service request proactively. However, if it is the first time the app is run and if you create any service request other than an individualization service request, an MSPR_E_NEEDS_INDIVIDUALIZATION error code will be returned. This error code indicates that you haven’t individualized your app yet. In this case, you either need to respond reactively to the individualization error or proactively create an individualization service request that will perform the individualization before creating any other service request.
The reactive model can return:
- IndivServiceRequest
- LAServiceRequest
- DomainJoinServiceRequest
- RevocationServiceRequest
These service requests are delivered through a MediaProtectionManager.ServiceRequested event and your app should take appropriate action when these events occur.
One example of using the proactive or reactive model is licensing. The proactive model can be used for pre-acquisition of licenses; it is typically used to get root licenses for chained license scenarios and is not tied to a media pipeline instance. In this case, you must acquire a persistent license. A proactive model won't work for non-persistent license. A reactive model is initiated by the media pipeline/player and occurs when you first start playing, before content starts playing back; it is the only way to do non-persistent, in-memory licenses.