Wasabi ExpressPlay SDK for Desktop Systems  1.23.0
Macros | Functions
WSB_Runtime Class

The Wasabi SDK initialization and termination. More...

Macros

#define WSB_PROPERTY_NAME_MS3_ACCEPT_SELF_SIGNED_CERTS   "WASABI_MS3_ACCEPT_SELF_SIGNED_CERTS"
 Wasabi property. More...
 
#define WSB_PROPERTY_NAME_MS3_ACCEPT_HOSTNAME_MISMATCH   "WASABI_MS3_ACCEPT_HOSTNAME_MISMATCH"
 Wasabi property. More...
 
#define WSB_PROPERTY_NAME_STORAGE_DIRECTORY   "WASABI_PROPERTY_STORAGE_DIRECTORY"
 Wasabi property. More...
 
#define WSB_PROPERTY_NAME_PROXY_DASH_CONTENT_LENGTH   "WASABI_PROPERTY_PROXY_DASH_CONTENT_LENGTH"
 Wasabi property. More...
 
#define WSB_PROPERTY_NAME_ROOTED_OK   "WASABI_PROPERTY_ROOTED_OK"
 Wasabi property. More...
 
#define WSB_PROPERTY_NAME_KEY_SPACE   "WASABI_PROPERTY_KEY_SPACE"
 Wasabi property. More...
 
#define WSB_PROPERTY_KEY_SPACE_TEST   "TEST-KEYS"
 
#define WSB_PROPERTY_KEY_SPACE_PRODUCTION   "PRODUCTION-KEYS"
 
#define WSB_PROPERTY_NAME_NEMO_DEVICE_ID   "WASABI_PROPERTY_NEMO_DEVICE_ID"
 Wasabi property. More...
 
#define WSB_PROPERTY_NAME_PERSONALITY_NODE_ID   "WASABI_PROPERTY_PERSONALITY_NODE_ID"
 Wasabi property. More...
 
#define WSB_PROPERTY_NAME_TLS_SESSION_TICKET_LIFETIME   "WASABI_PROPERTY_TLS_SESSION_TICKET_LIFETIME"
 Wasabi property. More...
 
#define WSB_PROPERTY_NAME_TLS_VERSION_MINOR_HIGH   "WSB_PROPERTY_NAME_TLS_VERSION_MINOR_HIGH"
 Wasabi property. More...
 
#define WSB_PROPERTY_NAME_TLS_VERSION_MINOR_LOW   "WSB_PROPERTY_NAME_TLS_VERSION_MINOR_LOW"
 Wasabi property. More...
 
#define WSB_PROPERTY_NAME_TLS_SESSION_ID_LIFETIME   "WSB_PROPERTY_NAME_TLS_SESSION_ID_LIFETIME"
 Wasabi property. More...
 
#define WSB_PROPERTY_NAME_DEVICE_MANUFACTURER_ID   "WSB_PROPERTY_NAME_DEVICE_MANUFACTURER_ID"
 Wasabi property, only supported in ExpressPlay CA device. More...
 
#define WSB_PROPERTY_NAME_SHORT_DEVICE_ID   "WSB_PROPERTY_NAME_SHORT_DEVICE_ID"
 Wasabi property, only supported in ExpressPlay CA device. More...
 

Functions

WSB_EXPORT WSB_Result WSB_Runtime_InitializeEx (const char *db_name_param)
 Initializes the SDK for an application. More...
 
WSB_EXPORT WSB_Result WSB_Runtime_Initialize ()
 Initializes the SDK for an application, with the default DRM database name parameter selected during run-time configuration. More...
 
WSB_EXPORT WSB_Boolean WSB_Runtime_IsInitialized ()
 Checks to see whether WSB_Runtime_Initialize has already been called successfully. More...
 
WSB_EXPORT WSB_Result WSB_Runtime_Terminate ()
 Terminates the SDK. More...
 
WSB_EXPORT WSB_Boolean WSB_Runtime_IsPersonalized ()
 Check whether the runtime has been personalized. More...
 
WSB_EXPORT WSB_Result WSB_Runtime_Personalize (const char *token, WSB_Size token_length)
 Perform personalization. More...
 
WSB_EXPORT WSB_Result WSB_Runtime_ProcessServiceToken (const char *token, WSB_Size token_length)
 Process Marlin service token synchronously. More...
 
WSB_EXPORT WSB_Result WSB_Runtime_CheckLicense (const char *content_id)
 Check for a valid playback license. More...
 
WSB_EXPORT WSB_Result WSB_Runtime_GetProperty (const char *name, SHI_DataType type, SHI_Data **value)
 Query a Wasabi property value. More...
 
WSB_EXPORT WSB_Result WSB_Runtime_SetProperty (const char *name, SHI_DataType type, const SHI_DataValue *value)
 Assign a Wasabi property value. More...
 
WSB_EXPORT WSB_Result WSB_Runtime_VolatileStore (const char *content_type, const void *data, WSB_Size data_size, char *url_buffer, WSB_Size *url_buffer_size)
 Store a data object into Volatile Store returning a new special URL string that can be passed as media URL to Playlist Proxy. More...
 

Detailed Description

The Wasabi SDK initialization and termination.

Macro Definition Documentation

◆ WSB_PROPERTY_KEY_SPACE_PRODUCTION

#define WSB_PROPERTY_KEY_SPACE_PRODUCTION   "PRODUCTION-KEYS"

◆ WSB_PROPERTY_KEY_SPACE_TEST

#define WSB_PROPERTY_KEY_SPACE_TEST   "TEST-KEYS"

◆ WSB_PROPERTY_NAME_DEVICE_MANUFACTURER_ID

#define WSB_PROPERTY_NAME_DEVICE_MANUFACTURER_ID   "WSB_PROPERTY_NAME_DEVICE_MANUFACTURER_ID"

Wasabi property, only supported in ExpressPlay CA device.

Use of this property in other devices than ExpressPlay CA deployment will be unknown.

The manufacturer name which is derived from Octopus ID available only after runtime has been initialized and personalized. Application should NOT be setting this property.

Type: SHI_DATA_TYPE_STRING

Since
1.23

◆ WSB_PROPERTY_NAME_KEY_SPACE

#define WSB_PROPERTY_NAME_KEY_SPACE   "WASABI_PROPERTY_KEY_SPACE"

Wasabi property.

The key space run-time is configured with. See WSB_PROPERTY_KEY_SPACE_* macros for possible values. (Application should not be setting this property.)

Type: SHI_DATA_TYPE_STRING

Since
1.11

◆ WSB_PROPERTY_NAME_MS3_ACCEPT_HOSTNAME_MISMATCH

#define WSB_PROPERTY_NAME_MS3_ACCEPT_HOSTNAME_MISMATCH   "WASABI_MS3_ACCEPT_HOSTNAME_MISMATCH"

Wasabi property.

Allow host mismatch in certificates in MS3 server interaction. Type: SHI_DATA_TYPE_BOOLEAN

Since
1.8

◆ WSB_PROPERTY_NAME_MS3_ACCEPT_SELF_SIGNED_CERTS

#define WSB_PROPERTY_NAME_MS3_ACCEPT_SELF_SIGNED_CERTS   "WASABI_MS3_ACCEPT_SELF_SIGNED_CERTS"

Wasabi property.

Allow self signed certificates in MS3 server interaction. Type: SHI_DATA_TYPE_BOOLEAN

Since
1.8

◆ WSB_PROPERTY_NAME_NEMO_DEVICE_ID

#define WSB_PROPERTY_NAME_NEMO_DEVICE_ID   "WASABI_PROPERTY_NEMO_DEVICE_ID"

Wasabi property.

The Nemo Node or Device ID Available only after runtime has been initialized and personalized (Application should NOT be setting this property.) Type: SHI_DATA_TYPE_STRING

Since
1.11

◆ WSB_PROPERTY_NAME_PERSONALITY_NODE_ID

#define WSB_PROPERTY_NAME_PERSONALITY_NODE_ID   "WASABI_PROPERTY_PERSONALITY_NODE_ID"

Wasabi property.

The Personality Node ID or Octopus ID Available only after runtime has been initialized and personalized (Application should NOT be setting this property.) Type: SHI_DATA_TYPE_STRING

Since
1.11

◆ WSB_PROPERTY_NAME_PROXY_DASH_CONTENT_LENGTH

#define WSB_PROPERTY_NAME_PROXY_DASH_CONTENT_LENGTH   "WASABI_PROPERTY_PROXY_DASH_CONTENT_LENGTH"

Wasabi property.

ContentLength computation for DASH media in Playlist Proxy.

When false (by default), HTTP response from Playlist Proxy does not include the ContentLength header. When set to true, Playlist Proxy generates ContentLength, but that may affect Android's bandwidth measurement algorithm resulting in the media player always attempting to play the highest quality representation, even when the available bandwidth may not have the capacity for it.

Type: SHI_DATA_TYPE_BOOLEAN

Since
1.8.1

◆ WSB_PROPERTY_NAME_ROOTED_OK

#define WSB_PROPERTY_NAME_ROOTED_OK   "WASABI_PROPERTY_ROOTED_OK"

Wasabi property.

When set to true, Wasabi run-time will execute on root'ed Android devices. Otherwise, when set to false (also by default), Wasabi won't function on a root'ed device. (Expressplay Android only)

Type: SHI_DATA_TYPE_BOOLEAN

Since
1.9

◆ WSB_PROPERTY_NAME_SHORT_DEVICE_ID

#define WSB_PROPERTY_NAME_SHORT_DEVICE_ID   "WSB_PROPERTY_NAME_SHORT_DEVICE_ID"

Wasabi property, only supported in ExpressPlay CA device.

Use of this property in other devices than ExpressPlay CA deployment will be unknown.

The short device id which is derived from Octopus ID available only after runtime has been initialized and personalized. Application should NOT be setting this property.

Type: SHI_DATA_TYPE_STRING

Since
1.23

◆ WSB_PROPERTY_NAME_STORAGE_DIRECTORY

#define WSB_PROPERTY_NAME_STORAGE_DIRECTORY   "WASABI_PROPERTY_STORAGE_DIRECTORY"

Wasabi property.

DRM storage directory. Type: SHI_DATA_TYPE_STRING

Since
1.8

◆ WSB_PROPERTY_NAME_TLS_SESSION_ID_LIFETIME

#define WSB_PROPERTY_NAME_TLS_SESSION_ID_LIFETIME   "WSB_PROPERTY_NAME_TLS_SESSION_ID_LIFETIME"

Wasabi property.

Value enabling and setting the maximum lifetime (in seconds) for the TLS resumption via session id (statefull resumption). A value greater than 86400 will be automatically truncated to 86400.

Default: 0 (Session Id resumption is disabled) Min: 0 Max: 86400 (24 hours)

Type: SHI_DATA_TYPE_INTEGER

Since
1.19

◆ WSB_PROPERTY_NAME_TLS_SESSION_TICKET_LIFETIME

#define WSB_PROPERTY_NAME_TLS_SESSION_TICKET_LIFETIME   "WASABI_PROPERTY_TLS_SESSION_TICKET_LIFETIME"

Wasabi property.

The default TLS Session Ticket lifetime.

The actual lifetime will also depend on the server ticket_lifetime_hint received from the server in a NewSessionTicket.

Type: SHI_DATA_TYPE_INTEGER

Since
1.15

◆ WSB_PROPERTY_NAME_TLS_VERSION_MINOR_HIGH

#define WSB_PROPERTY_NAME_TLS_VERSION_MINOR_HIGH   "WSB_PROPERTY_NAME_TLS_VERSION_MINOR_HIGH"

Wasabi property.

Highest TLS minor version supported. This is the preferred version first proposed to the server in the client hello handshake message.

If the value set is higher than the highest version supported by the SDK, the effective version will be the highest version supported by the code.

Example for TLS 1.2 use 2 TLS 1.0 use 0.

Default: 0 (1.0) Max: 2 Min: 0

Type: SHI_DATA_TYPE_INTEGER

Since
1.19

◆ WSB_PROPERTY_NAME_TLS_VERSION_MINOR_LOW

#define WSB_PROPERTY_NAME_TLS_VERSION_MINOR_LOW   "WSB_PROPERTY_NAME_TLS_VERSION_MINOR_LOW"

Wasabi property.

Lowest TLS minor version supported. This is the lowest TLS minor version to be negotiated with the server. If the server replies with a server hello handshake message with a version lower than this version the TLS handshake will stop there.

At TLS initialization time, if the value set is higher than the value set for the WSB_PROPERTY_NAME_TLS_VERSION_MINOR_HIGH, this version will be changed to the value set for WSB_PROPERTY_NAME_TLS_VERSION_MINOR_HIGH. Example: if high = 2 and low = 999, then low will be adjusted to 2 (high) upon TLS init.

Example for TLS 1.2 use 2 TLS 1.0 use 0.

Default: 0 (1.0) Max: 2 Min: 0

Type: SHI_DATA_TYPE_INTEGER

Since
1.19

Function Documentation

◆ WSB_Runtime_CheckLicense()

WSB_EXPORT WSB_Result WSB_Runtime_CheckLicense ( const char *  content_id)

Check for a valid playback license.

If there is a license in the License Store associated with the content ID 'content_id' and if it actually grants playback, the call returns with WSB_SUCCESS. Otherwise, an error code indicates a valid playback license not to be available in the License Store.

NOTE: This is a convenience method providing a simple license checking API. A more comprehensive API for examining licenses is available through the direct use of SHI_Engine, SHI_License, SHI_Action and WSB_LicenseStore module APIs.

Since
1.10

◆ WSB_Runtime_GetProperty()

WSB_EXPORT WSB_Result WSB_Runtime_GetProperty ( const char *  name,
SHI_DataType  type,
SHI_Data **  value 
)

Query a Wasabi property value.

Only a set of built-in properties can be queried, otherwise an error is returned. See WSB_PROPERTY_NAME_* macros for the set of built-in properties' names and types.

Parameters
nameproperty name, both name and type must match a built-in property
typeproperty type, both name and type must match a built-in property
valuereturned property; must be release through SHI_Data_Release
Since
1.8

◆ WSB_Runtime_Initialize()

WSB_EXPORT WSB_Result WSB_Runtime_Initialize ( )

Initializes the SDK for an application, with the default DRM database name parameter selected during run-time configuration.

This call is equivalent to WSB_Runtime_InitializeEx(NULL).

See also
WSB_Runtime_InitializeEx

◆ WSB_Runtime_InitializeEx()

WSB_EXPORT WSB_Result WSB_Runtime_InitializeEx ( const char *  db_name_param)

Initializes the SDK for an application.

This function must be called once for each application that will use the SDK. It must be called before any other function or method of the SDK.

Parameters
db_name_parampointer to the DRM database name parameter. If non-null, this string becomes part of the DRM file name. Additional prefix and suffix strings may be added by the Wasabi run-time. An application can ensure unique DRM database by selecting a unique db_name_param.
Since
1.7

◆ WSB_Runtime_IsInitialized()

WSB_EXPORT WSB_Boolean WSB_Runtime_IsInitialized ( )

Checks to see whether WSB_Runtime_Initialize has already been called successfully.

Returns
WSB_TRUE if WSB_Runtime_Initialize was already successfully executed.

◆ WSB_Runtime_IsPersonalized()

WSB_EXPORT WSB_Boolean WSB_Runtime_IsPersonalized ( )

Check whether the runtime has been personalized.

Since
1.6

◆ WSB_Runtime_Personalize()

WSB_EXPORT WSB_Result WSB_Runtime_Personalize ( const char *  token,
WSB_Size  token_length 
)

Perform personalization.

If 'token' is NULL, default Sushi bootstrap configuration personalization token is assumed.

Parameters
tokenan optional personalization token XML string, can be NULL.
token_lengthlength of the 'token' string, 0 if token is NULL. Returns WSB_ERROR_INVALID_STATE if already personalized.
Since
1.6

◆ WSB_Runtime_ProcessServiceToken()

WSB_EXPORT WSB_Result WSB_Runtime_ProcessServiceToken ( const char *  token,
WSB_Size  token_length 
)

Process Marlin service token synchronously.

Store the Marlin Broadband license into the License Store, if any.

NOTE: This is a convenience method providing a simple token processing API. A more comprehensive API for the control over token processing and License Store is defined by SHI_Engine module and WSB_LicenseStore module.

Parameters
tokena required Marlin XML token as a UTF8 string
token_lengthlength of the 'token' string in bytes.
Since
1.7

◆ WSB_Runtime_SetProperty()

WSB_EXPORT WSB_Result WSB_Runtime_SetProperty ( const char *  name,
SHI_DataType  type,
const SHI_DataValue value 
)

Assign a Wasabi property value.

Only properties from a built-in set can be assigned value, otherwise an error is returned. See WSB_PROPERTY_NAME_* macros for the set of built-in properties' names and types.

Parameters
nameproperty name, both name and type must match a built-in property
typeproperty type, both name and type must match a built-in property
valuenew value to assign
Since
1.8

◆ WSB_Runtime_Terminate()

WSB_EXPORT WSB_Result WSB_Runtime_Terminate ( )

Terminates the SDK.

This function must be called after an application is done using the SDK. No other function or method of the SDK may be called after this function returns.

◆ WSB_Runtime_VolatileStore()

WSB_EXPORT WSB_Result WSB_Runtime_VolatileStore ( const char *  content_type,
const void *  data,
WSB_Size  data_size,
char *  url_buffer,
WSB_Size url_buffer_size 
)

Store a data object into Volatile Store returning a new special URL string that can be passed as media URL to Playlist Proxy.

The returned URL has a special scheme understood only by Playlist Proxy.

Volatile Store accommodates only one object at any time.

The storage can be freed by calling the function with the data argument set to NULL. The storage is also released when the Runtime is terminated.

Parameters
content_typeUTF8 string specifying the content type (mime type, e.g. application/vnd.apple.mpegurl) of the data to be stored.
datapointer to the memory buffer containing data to be stored. Can be NULL to remove any previously stored data.
data_sizelength in bytes of the buffer pointed to by the data parameter (ignored if data is NULL).
url_bufferpointer to a buffer where the new URL referencing the stored data is returned. Can be set to NULL to query the length of the returned URL in bytes (including the terminating 0).
url_buffer_sizepointer to where the length in bytes of the url_buffer is passed in, and where the actual number of bytes filled in is stored on success. The stored string includes the terminating 0.
Returns
WSB_SUCCESS on success, WSB_ERROR_NOT_ENOUGH_SPACE if the url_buffer_size is set too low for the output URL, or other error codes on failure.
Since
1.19