Marlin MS3 URL handling module.
More...
|
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...
|
|
Marlin MS3 URL handling module.
A WSB_Ms3Client object provides an interface to acquire MS3 rights from an MS3 server.
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
-
- Returns
- WSB_SUCCESS or MS3_ERROR_INVALID_URL.
Creates a WSB_Ms3Client object.
- Parameters
-
client | Address of a WSB_Ms3Client pointer that will be set to refer to the WSB_Ms3Client object created. |
Destroys a WSB_Ms3Client object.
- Parameters
-
client | The WSB_Ms3Client object to be destroyed. |
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
-
client | The WSB_Ms3Client object. |
url | The URL of an MS3 SAS or MS3 SAD. |
sas | Address of a WSB_Ms3Sas pointer that will be set to refer to the WSB_Ms3Sas object returned. |
http_result_code | Address of an HTTP result code that will be set to the value returned by the MS3 server. |
content_url | Address of a SHI_Data pointer that will be set to refer to the 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
-
client | The WSB_Ms3Client object. |
sad | Address of the SAD document. |
sad_size | Size of the SAD document, in bytes. |
sas | Address of a WSB_Ms3Sas pointer that will be set to refer to the WSB_Ms3Sas object returned. |
http_result_code | Address of an HTTP result code that will be set to the value returned by the MS3 server. |
content_url | Address of a SHI_Data pointer that will be set to refer to the content URL. |
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
-
client | the ms3 client object |
state | WSB_TRUE to accept certs with hostname mistmaches. WSB_FALSE to reject them. |
Configures the MS3 client to accept or reject self-signed certificates from the MS3 server.
Used for testing.
- Parameters
-
client | The WSB_Ms3Client object. |
state | WSB_TRUE to accept self-signed certificates, WSB_FALSE to reject them. |