Wasabi ExpressPlay SDK for Embedded Systems  1.10
Functions
WsbConfigActionResultValidator.h File Reference

Wasabi Action Result Validator. More...

#include "WsbTypes.h"
#include "Sushi.h"

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...
 

Detailed Description

Wasabi Action Result Validator.

Function Documentation

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.

Parameters
action_resultThe SHI_ActionResult object.
performSet 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_nameName of the action (e.g. SHI_ACTION_PLAY).
action_parametersAction parameters if any (can be NULL).
Returns
WSB_SUCCESS if the action result validates successfully, WSB_ERROR_DRM_DENY_RIGHTS if the action is not granted, WSB_ERROR_DRM_LICENSE_UNSUPPORTED if the action result contains mandatory callbacks or obligations that are not handled by the application. WSB_ERROR_DRM_BAD_LICENSE_FORMAT if an error occured during the parsing of SHI_ActionResult parsing, WSB_ERROR_INVALID_PARAMETERS if the action_result or action_name is NULL.