Wasabi ExpressPlay SDK for Embedded Systems  1.23.0
Typedefs | Functions
SHI_Action Class

Wasabi Action APIs module. More...

Typedefs

typedef struct SHI_Action SHI_Action
 A SHI_Action object represents an action that can be performed on the content item represented by a license. More...
 

Functions

SHI_PUBLIC_API void * SHI_Action_GetInterface (SHI_Action *self, SHI_InterfaceId iface_id)
 Obtains a pointer to a SHI_Action object with a different interface. More...
 
SHI_PUBLIC_API SHI_Result SHI_Action_Destroy (SHI_Action *self)
 Destroys this action object. More...
 
SHI_PUBLIC_API SHI_Result SHI_Action_Describe (SHI_Action *self, SHI_LicenseInfo **description)
 Gets a description for this action. More...
 
SHI_PUBLIC_API SHI_Result SHI_Action_Check (SHI_Action *self, SHI_ActionResult **result)
 Checks whether this action would be granted or denied if SHI_ActionPerform were called, without actually calling the method and thereby triggering potential side effects. More...
 
SHI_PUBLIC_API SHI_Result SHI_Action_Perform (SHI_Action *self, SHI_ActionResult **result)
 Determines whether this action is allowed by its license. More...
 
SHI_PUBLIC_API SHI_Result SHI_Action_Callback (SHI_Action *self, SHI_UInt32 callback_handle, const void *arguments, SHI_ActionResult **result)
 Invokes a callback on this action. More...
 
SHI_PUBLIC_API SHI_Result SHI_Action_LogMeteringEvent (SHI_Action *self, SHI_ActionMeteringEventType type, const void *parameters)
 Logs a playback metering event. More...
 

Detailed Description

Wasabi Action APIs module.

Typedef Documentation

◆ SHI_Action

typedef struct SHI_Action SHI_Action

A SHI_Action object represents an action that can be performed on the content item represented by a license.

Function Documentation

◆ SHI_Action_Callback()

SHI_PUBLIC_API SHI_Result SHI_Action_Callback ( SHI_Action self,
SHI_UInt32  callback_handle,
const void *  arguments,
SHI_ActionResult **  result 
)

Invokes a callback on this action.

An application calls this method when the condition specified in a SHI_ActionCallback occurs. If the callback is RESET (that is, the SHI_ACTION_CALLBACK_IS_RESET flag is set), this method cancels all pending callback requests and active obligations, and returns a new SHI_ActionResult object that supersedes any previous action result for this action. In this case, the previous SHI_ActionResult must no longer be used. It and its associated obligations and callbacks must be released. The SHI_ActionResult object returned by this method (if any) must be released before this action object is destroyed.

Parameters
selfThe SHI_Action whose callback should be invoked.
callback_handleThe callback handle from the SHI_ActionCallback.
argumentsPointer to a data structure (e.g. SHI_ActionOnTimeCallbackParameters) containing input arguments for the callback. If the type for the callback does not require input arguments, a NULL pointer must be passed.
resultAddress of a SHI_ActionResult pointer that will be set to refer to a SHI_ActionResult object containing the results of the call. If the SHI_ACTION_CALLBACK_IS_RESET flag is not set for the callback, no SHI_ActionResult object will be returned. Thus, in this case, you can pass NULL for the result parameter. If you don't, SHI_Action_Callback sets *result to NULL.

◆ SHI_Action_Check()

SHI_PUBLIC_API SHI_Result SHI_Action_Check ( SHI_Action self,
SHI_ActionResult **  result 
)

Checks whether this action would be granted or denied if SHI_ActionPerform were called, without actually calling the method and thereby triggering potential side effects.

The SHI_ActionResult object returned must be released before this action object is destroyed.

Parameters
selfThe SHI_Action for which the check is performed.
resultAddress of a SHI_ActionResult pointer that will be set to refer to a SHI_ActionResult object containing the results of the call.

◆ SHI_Action_Describe()

SHI_PUBLIC_API SHI_Result SHI_Action_Describe ( SHI_Action self,
SHI_LicenseInfo **  description 
)

Gets a description for this action.

The SHI_LicenseInfo object returned must be released before this action object is destroyed. If no description is available for this license, this method returns SHI_ERROR_NOT_AVAILABLE.

Parameters
selfThe SHI_Action whose description is obtained.
descriptionAddress of a SHI_LicenseInfo pointer that will be set to refer to a SHI_LicenseInfo object containing the description of the action.

◆ SHI_Action_Destroy()

SHI_PUBLIC_API SHI_Result SHI_Action_Destroy ( SHI_Action self)

Destroys this action object.

The object can no longer be used after this method returns. All objects obtained from method calls to this object must be released or destroyed before this object is destroyed.

Parameters
selfThe SHI_Action to destroy.

◆ SHI_Action_GetInterface()

SHI_PUBLIC_API void* SHI_Action_GetInterface ( SHI_Action self,
SHI_InterfaceId  iface_id 
)

Obtains a pointer to a SHI_Action object with a different interface.

This method returns NULL if the object does not implement the requested interface.

Parameters
selfThe SHI_Action whose interface will be returned.
iface_idThe ID of the interface that is requested.
Returns
A pointer to the requested interface, or NULL if the object does not implement it.

◆ SHI_Action_LogMeteringEvent()

SHI_PUBLIC_API SHI_Result SHI_Action_LogMeteringEvent ( SHI_Action self,
SHI_ActionMeteringEventType  type,
const void *  parameters 
)

Logs a playback metering event.

This call is only valid for SHI_Action objects created with the name SHI_ACTION_PLAY.

Parameters
selfThe SHI_Action for which a metering event is logged.
typeThe type of metering event to log.
parametersPointer to parameters for the event. For events that do not require parameters, such as SHI_ACTION_METERING_START and SHI_ACTION_METERING_STOP, this must be NULL. For events that require parameters, each such event type specifies what type of data structure this must point to.

◆ SHI_Action_Perform()

SHI_PUBLIC_API SHI_Result SHI_Action_Perform ( SHI_Action self,
SHI_ActionResult **  result 
)

Determines whether this action is allowed by its license.

This method must be called before the application can make use of the content keys. The SHI_ActionResult object returned must be released before this action object is destroyed. Note: A SHI_Result of SHI_SUCCESS does not mean that the action is allowed. The SHI_ActionResult returned by this method must be consulted to determine that.

Parameters
selfThe SHI_Action to be checked.
resultAddress of a SHI_ActionResult pointer that will be set to refer to a SHI_ActionResult object containing the results of the call.