Wasabi ExpressPlay SDK for Embedded Systems  1.10
Typedefs | Functions
WSB_Ms3Client Class

Marlin MS3 URL handling module. More...

Typedefs

typedef struct WSB_Ms3Client WSB_Ms3Client
 A WSB_Ms3Client object provides an interface to acquire MS3 rights from an MS3 server. More...
 

Functions

WSB_EXPORT WSB_Result WSB_Ms3Client_CheckForMs3Url (const char *url)
 Performs a check of the supplied URL and indicates whether the URL is likely an MS3 URL. More...
 
WSB_EXPORT WSB_Result WSB_Ms3Client_Create (WSB_Ms3Client **client)
 Creates a WSB_Ms3Client object. More...
 
WSB_EXPORT WSB_Result WSB_Ms3Client_SetAcceptSelfSignedCerts (WSB_Ms3Client *client, WSB_Boolean state)
 Configures the MS3 client to accept or reject self-signed certificates from the MS3 server. More...
 
WSB_EXPORT WSB_Result WSB_Ms3Client_SetAcceptCertHostnameMismatch (WSB_Ms3Client *client, WSB_Boolean state)
 Configures the MS3 client to accept or reject certificates from the MS3 server whose hostname doesn't match the hostname used to connect to the server. More...
 
WSB_EXPORT WSB_Result WSB_Ms3Client_GetSas (WSB_Ms3Client *client, const char *url, WSB_Ms3Sas **sas, WSB_UInt32 *http_result_code, SHI_Data **content_url)
 Retrieves an MS3 SAS from the MS3 server specified by URL. More...
 
WSB_EXPORT WSB_Result WSB_Ms3Client_GetSasFromSad (WSB_Ms3Client *client, const char *sad, WSB_Size sad_size, WSB_Ms3Sas **sas, WSB_UInt32 *http_result_code, SHI_Data **content_url)
 Retrieves an MS3 SAS from the MS3 server specified by a SAD document. More...
 
WSB_EXPORT WSB_Result WSB_Ms3Client_Destroy (WSB_Ms3Client *client)
 Destroys a WSB_Ms3Client object. More...
 

Detailed Description

Marlin MS3 URL handling module.

Typedef Documentation

typedef struct WSB_Ms3Client WSB_Ms3Client

A WSB_Ms3Client object provides an interface to acquire MS3 rights from an MS3 server.

Function Documentation

WSB_EXPORT WSB_Result WSB_Ms3Client_CheckForMs3Url ( const char *  url)

Performs a check of the supplied URL and indicates whether the URL is likely an MS3 URL.

Specifically, if the URL is an HTTPS URL, this function returns WSB_SUCCESS. If the URL is an HTTP URL, it performs an HTTP HEAD request on the URL and returns WSB_SUCCESS if the MIME type of the resource referred to by the URL is that of an MS3 SAS (application/vnd.marlin.drm.StreamAccessDescriptor). If the URL meets neither one of these conditions, this function returns MS3_ERROR_INVALID_URL.

Parameters
urlA URL to test.
Returns
WSB_SUCCESS or MS3_ERROR_INVALID_URL.
WSB_EXPORT WSB_Result WSB_Ms3Client_Create ( WSB_Ms3Client **  client)

Creates a WSB_Ms3Client object.

Parameters
clientAddress of a WSB_Ms3Client pointer that will be set to refer to the WSB_Ms3Client object created.
WSB_EXPORT WSB_Result WSB_Ms3Client_Destroy ( WSB_Ms3Client client)

Destroys a WSB_Ms3Client object.

Parameters
clientThe WSB_Ms3Client object to be destroyed.
WSB_EXPORT WSB_Result WSB_Ms3Client_GetSas ( WSB_Ms3Client client,
const char *  url,
WSB_Ms3Sas **  sas,
WSB_UInt32 http_result_code,
SHI_Data **  content_url 
)

Retrieves an MS3 SAS from the MS3 server specified by URL.

If the URL specifies an MS3 SAD (rather than an MS3 SAS), the SAD is retrieved, and the SAS URL is extracted from the SAD and the corresponding SAS is retrieved. If the URL is a compound URL or specifies a SAD, the content URL is returned to the caller.

Parameters
clientThe WSB_Ms3Client object.
urlThe URL of an MS3 SAS or MS3 SAD.
sasAddress of a WSB_Ms3Sas pointer that will be set to refer to the WSB_Ms3Sas object returned.
http_result_codeAddress of an HTTP result code that will be set to the value returned by the MS3 server.
content_urlAddress of a SHI_Data pointer that will be set to refer to the content URL.
WSB_EXPORT WSB_Result WSB_Ms3Client_GetSasFromSad ( WSB_Ms3Client client,
const char *  sad,
WSB_Size  sad_size,
WSB_Ms3Sas **  sas,
WSB_UInt32 http_result_code,
SHI_Data **  content_url 
)

Retrieves an MS3 SAS from the MS3 server specified by a SAD document.

The MS3 URL is extracted from the SAD, and used to retrieve the MS3 SAS. The content URL is also extracted from the SAD and returned.

Parameters
clientThe WSB_Ms3Client object.
sadAddress of the SAD document.
sad_sizeSize of the SAD document, in bytes.
sasAddress of a WSB_Ms3Sas pointer that will be set to refer to the WSB_Ms3Sas object returned.
http_result_codeAddress of an HTTP result code that will be set to the value returned by the MS3 server.
content_urlAddress of a SHI_Data pointer that will be set to refer to the content URL.
WSB_EXPORT WSB_Result WSB_Ms3Client_SetAcceptCertHostnameMismatch ( WSB_Ms3Client client,
WSB_Boolean  state 
)

Configures the MS3 client to accept or reject certificates from the MS3 server whose hostname doesn't match the hostname used to connect to the server.

Used for testing.

Parameters
clientthe ms3 client object
stateWSB_TRUE to accept certs with hostname mistmaches. WSB_FALSE to reject them.
WSB_EXPORT WSB_Result WSB_Ms3Client_SetAcceptSelfSignedCerts ( WSB_Ms3Client client,
WSB_Boolean  state 
)

Configures the MS3 client to accept or reject self-signed certificates from the MS3 server.

Used for testing.

Parameters
clientThe WSB_Ms3Client object.
stateWSB_TRUE to accept self-signed certificates, WSB_FALSE to reject them.