Wasabi ExpressPlay SDK for Embedded Systems
1.10
|
Wasabi Action Result Validator. More...
Go to the source code of this file.
Functions | |
WSB_EXPORT WSB_Result | WSB_Config_ValidateActionResult (SHI_ActionResult *action_result, WSB_Boolean perform, const char *action_name, const void *action_parameters) |
This method should be called between WSB_PlaybackEnabler_PerformPlayAction and WSB_PlaybackEnabler_AcceptActionResult with perform set to WSB_TRUE and action_name set to SHI_ACTION_PLAY. More... | |
Wasabi Action Result Validator.
WSB_EXPORT WSB_Result WSB_Config_ValidateActionResult | ( | SHI_ActionResult * | action_result, |
WSB_Boolean | perform, | ||
const char * | action_name, | ||
const void * | action_parameters | ||
) |
This method should be called between WSB_PlaybackEnabler_PerformPlayAction and WSB_PlaybackEnabler_AcceptActionResult with perform set to WSB_TRUE and action_name set to SHI_ACTION_PLAY.
It is also called in WSB_(Rights|Playback)Enabler_EnableMediaFile method as part of the search for a valid license with perform set to WSB_FALSE and action_name set to SHI_ACTION_PLAY.
The implementation of this method should check the SHI_ActionResult to determine whether the action is granted or not. If it's not granted, the method should return a WSB_ERROR_DRM_DENY_RIGHTS code indicating that the player application should not proceed. If the action is granted, the method should check the SHI_ActionResultfor obligations and callbacks and only return WSB_SUCCESS if the application is prepared to handle all the mandatory obligations and callbacks. The WSB_ActionResultInfo API can be used to help parse the SHI_ActionResult and determine what constraints are present and what the details of those constraints are. If any of these constraints are not supported, a WSB_ERROR_DRM_LICENSE_UNSUPPORTED error code should be returned. If any SHI_ActionResult parsing error occurs, a WSB_ERROR_DRM_BAD_LICENSE_FORMAT should be returned.
There is a default implementation of this method provided in: $WASABI_HOME/Source/Config/Validator/Default/ and a sample of a more complicated validator in: $WASABI_HOME/Source/Config/Validator/Sample/
In most cases, the application writer will need to provide an application- specific version of this method that can interact with the application environment to satisfy any obligations and callbacks.
action_result | The SHI_ActionResult object. |
perform | Set to WSB_FALSE if the action result is the output of SHI_Action_Check call. Set to WSB_TRUE if from a SHI_Action_Perform call. |
action_name | Name of the action (e.g. SHI_ACTION_PLAY). |
action_parameters | Action parameters if any (can be NULL). |