Wasabi ExpressPlay SDK for Desktop Systems  1.10
Functions
WSB_RightsEnabler Class

Wasabi license retrieval and consumption. More...

Functions

WSB_EXPORT WSB_Result WSB_RightsEnabler_Create (WSB_RightsEnabler_EventListener listener, WSB_RightsEnabler **rights_enabler)
 Creates an instance of a WSB_RightsEnabler object. More...
 
WSB_EXPORT WSB_Result WSB_RightsEnabler_SetOptions (WSB_RightsEnabler *rights_enabler, WSB_UInt32 option_flags)
 Sets the options flags (WSB_RIGHTSENABLER_OPTION_FLAG*). More...
 
WSB_EXPORT WSB_Result WSB_RightsEnabler_EnableMediaFile (WSB_RightsEnabler *rights_enabler, WSB_MediaFile *file, const char **content_ids, WSB_Cardinal content_ids_count, const void *license_data, WSB_Size license_data_size)
 Tries all available avenues to obtain a working license for the content with the specified content IDs. More...
 
WSB_EXPORT WSB_Result WSB_RightsEnabler_EnableContentId (WSB_RightsEnabler *rights_enabler, const char *content_id, const char *sla_url, const void *license_data, WSB_Size license_data_size)
 Tries all available avenues to obtain a working license for the content with the specified content ID. More...
 
WSB_EXPORT WSB_Result WSB_RightsEnabler_Destroy (WSB_RightsEnabler *rights_enabler)
 Releases an instance of a WSB_RightsEnabler object. More...
 

Detailed Description

Wasabi license retrieval and consumption.

See Also
WSB_PlaybackEnabler

Function Documentation

WSB_EXPORT WSB_Result WSB_RightsEnabler_Create ( WSB_RightsEnabler_EventListener  listener,
WSB_RightsEnabler **  rights_enabler 
)

Creates an instance of a WSB_RightsEnabler object.

Parameters
listenerAn object that will receive various notification events during a WSB_RightsEnabler_EnableMediaFile or WSB_RightsEnabler_EnableContentId call.
rights_enablerAddress of a WSB_RightsEnabler pointer that will be set to refer to the WSB_RightsEnabler object created.
WSB_EXPORT WSB_Result WSB_RightsEnabler_Destroy ( WSB_RightsEnabler rights_enabler)

Releases an instance of a WSB_RightsEnabler object.

Parameters
rights_enablerThe WSB_RightsEnabler to release.
WSB_EXPORT WSB_Result WSB_RightsEnabler_EnableContentId ( WSB_RightsEnabler rights_enabler,
const char *  content_id,
const char *  sla_url,
const void *  license_data,
WSB_Size  license_data_size 
)

Tries all available avenues to obtain a working license for the content with the specified content ID.

This method essentially performs the same actions as WSB_RightsEnabler_EnableMediaFile to find a license, except that in this case, there is no WSB_MediaFile, so no media file-related actions are performed.

This method is useful, for example, for situations where the content ID changes during streaming. It is also useful in situations where a license grants access to content in a media file whose format is not Marlin-defined, enabling an application to use this method to find such a license and subsequently use the Wasabi Key Manager to obtain the content key(s) from the license.

This method will first check the passed-in license (if any), then any license found in the License Store that references the specified content ID. Next, if a subscription has expired, this method will attempt link renewals (e.g., in case the subscription can be automatically renewed). Finally, this method will try to obtain a license through silent license acquisition, using the specified SLA URL(if any), and then check that license and try link renewal.

For every license found, the license data and result of a license evaluation are returned in a WSB_RIGHTSENABLER_EVENT_TYPE_LICENSE event to the listener. The listener may choose to continue the search for a license, by returning WSB_RIGHTSENABLER_CONTINUE_SEARCH or to halt the search by returning WSB_RIGHTSENABLER_HALT_SEARCH. Typically, a caller will halt the search upon receiving a working license.

Parameters
rights_enablerThe WSB_RightsEnabler object.
content_idContent ID.
sla_urlOptional silent license acquisition URL.
license_dataAn optional license obtained externally.
license_data_sizeSize of license_data, in bytes.
Returns
This method returns WSB_SUCCESS if a valid license (validated with the WSB_Config_ValidateActionResult method) was found. Otherwise, it returns WSB_ERROR_DRM_DENY_RIGHTS.
WSB_EXPORT WSB_Result WSB_RightsEnabler_EnableMediaFile ( WSB_RightsEnabler rights_enabler,
WSB_MediaFile file,
const char **  content_ids,
WSB_Cardinal  content_ids_count,
const void *  license_data,
WSB_Size  license_data_size 
)

Tries all available avenues to obtain a working license for the content with the specified content IDs.

This method will first check the passed-in license (if any), then any license found in the passed-in media file (if any), then any license found in the License Store. Next, if a subscription has expired, this method will attempt link renewals (e.g., in case the subscription can be automatically renewed). Finally, this method will try to obtain a license through silent license acquisition and then check that license and try link renewal. For every license found, the license data and result of a license evaluation are returned in a WSB_RIGHTSENABLER_EVENT_TYPE_LICENSE event to the listener. The listener may choose to continue the search for a license, by returning WSB_RIGHTSENABLER_CONTINUE_SEARCH or to halt the search by returning WSB_RIGHTSENABLER_HALT_SEARCH. Typically, a caller will halt the search upon receiving a working license.

Parameters
rights_enablerThe WSB_RightsEnabler object.
fileThe media file in which the content resides. This may be NULL.
content_idsArray of content IDs.
content_ids_countNumber of content IDs in content_ids.
license_dataAn optional license obtained externally.
license_data_sizeSize of license_data, in bytes.
Returns
This method returns WSB_SUCCESS if a valid license (validated with the WSB_Config_ValidateActionResult method) was found. Otherwise, it returns WSB_ERROR_DRM_DENY_RIGHTS.
WSB_EXPORT WSB_Result WSB_RightsEnabler_SetOptions ( WSB_RightsEnabler rights_enabler,
WSB_UInt32  option_flags 
)

Sets the options flags (WSB_RIGHTSENABLER_OPTION_FLAG*).

By default, all flags are off.

Parameters
rights_enablerThe WSB_RightsEnabler object.
option_flagsThe option flags.