DxDrmManager Class Reference

DxDrmManager supplies an interface to perform DRM (Digital Rights Management) operations. More...

#import <DxDrmManager.h>

+ Inheritance diagram for DxDrmManager:

Instance Methods

(DxDrmManagerStatus) - executeInitiatorWithFile:
 Execute a PlayReady initiator file. More...
 
(DxDrmManagerStatus) - executeInitiatorWithFile:error:
 Execute a PlayReady initiator file. More...
 
(DxDrmManagerStatus) - executeInitiatorWithData:
 Execute a PlayReady initiator file. More...
 
(DxDrmManagerStatus) - executeInitiatorWithData:error:
 Execute a PlayReady initiator file. More...
 
(DxDrmManagerStatus) - executeInitiatorWithURL:
 Execute a PlayReady initiator file. More...
 
(DxDrmManagerStatus) - executeInitiatorWithURL:error:
 Execute a PlayReady initiator file. More...
 
(DxDrmManagerStatus) - verifyRightsForFile:
 This funtion verifies if the file specified by filename has valid rights. More...
 
(DxDrmManagerStatus) - personalizationVerify
 Verifies that the personalization process of the assets that were stored with the specified tag was completed successfully and these assets can be successfully used by the PlayReady DRM scheme. More...
 
(DxDrmManagerStatus) - performPersonalizationWithSessionID:withServerURL:withAppVersion:
 Starts the personalization process. More...
 
(DxDrmManagerStatus) - performPersonalizationWithServerURL:withAppVersion:withPublicData:withPrivateData:
 Starts the personalization process for active Drm Scheme. More...
 
(DxDrmManagerStatus) - deleteRightsForFile:
 Deletes all the rights objects of a specific file from the Secure Storage. More...
 
(DxDrmManagerStatus) - acquireRightsForFile:withCustomData:withRightsUrl:
 Acquire the rights for the specified DRM file. More...
 
(DxDrmManagerStatus) - acquireRightsForFile:withCustomData:withRightsUrl:error:
 Acquire the rights for the specified DRM file. More...
 
(NSArray *) - getRightObjectsForFile:result:
 Returns an array of rights objects describing the available rights for a file. More...
 
(BOOL) - isDrmContent:result:
 Checks if a file is a DRM protected file. More...
 
(BOOL) - verifySecClockSet
 Verifies whether the secure clock is set. More...
 
(DxDrmManagerStatus) - performSecClockSet
 Sets the secure clock required for normal operation of DRM operations. More...
 
(DxDrmManagerStatus) - setCookies:
 Once setCookies is called every "acquireRights" or "executeInitiator" will attach a cookie header to the HTTP request which contains the cookies. More...
 
(void) - setConfigurationParams:withValue:
 Option to configure SDK parameters. More...
 
(DxDrmManagerStatus) - setConfigurationString:withValue:
 Option to configure SDK parameters. More...
 
(NSString *) - getDrmVersion
 Returns a string representation of the SecurePlayer version. More...
 
(NSString *) - getDeviceId
 Returns a string representation of the Device ID. More...
 
(IDxChallenge *) - generatePersonalizationChallengeWithSessionID:withAppVersion:result:
 Generates a personalization challenge. More...
 
(IDxChallenge *) - generatePersonalizationChallengeWithAppVersion:withPublicData:withPrivateData:result:
 Generates a personalization challenge for active Drm Scheme. More...
 
(IDxChallenge *) - generateChallengeFromInitiator:result:
 Generates a challenge from a PlayReady Initiator file. More...
 
(IDxChallenge *) - generateLicenseChallengeFromContent:withCustomData:result:
 Generates a License Acquisition challenge from a content. More...
 
(IDxChallenge *) - generateLicenseChallengeFromDrmHeader:result:
 Generates a License Acquisition challenge from a PlayReady header. More...
 
(IDxChallenge *) - generateSecClockChallengeResult:
 Generates a Set Secure Clock challenge. More...
 
(DxDrmManagerStatus) - DEBUG_deletePersonalization
 Deletes from the application secure storage all the assets of the PlayReady scheme that were stored. More...
 
(DxDrmManagerStatus) - DEBUG_deletePlayReadyStore
 Deletes PlayReady Store - deleting licenses and domains of the client from the PlayReady server. More...
 
(void) - DEBUG_setLocalPersonalization:
 Set the DrmManager to work with local personalization for debug purposes. More...
 

Class Methods

(DxDrmManager *) + sharedManager
 Instantiator method to supply Signleton object of DxDrmManager. More...
 
(DxDrmManager *) + sharedManager:
 Instantiator method to supply Signleton object of DxDrmManager. More...
 
(BOOL) + DEBUG_setLoggingLevel:withLogFile:useStdOutLogs:withDisabledModules:
 Sets the DRM logging level. More...
 

Properties

bool bDeletePersonalizationUponStartup
 
bool bDeletePlayReadyStoreUponStartup
 

Detailed Description

DxDrmManager supplies an interface to perform DRM (Digital Rights Management) operations.

This includes license acquisition, rights verification and managing licenses.

DxDrmManager is a signleton object using the instantiator sharedManager method to supply it. The device must be personalized in order for any DRM operation to work.

Method Documentation

- (DxDrmManagerStatus) acquireRightsForFile: (NSString *)  filename
withCustomData: (NSString *)  dataOrNil
withRightsUrl: (NSString *)  urlOrNil 

Acquire the rights for the specified DRM file.

Parameters
[in]filename- Full path to the content file.
[in]dataOrNil- Custom data for customer internal usage.
[in]urlOrNil- Url to a Rights Server to be used only for this operation.
Returns
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_SECURE_STORAGE_IS_CORRUPTED - The secure storage is used and found to be corrupted.
  • DX_MANAGER_ERROR_BAD_ARGUMENTS - in case filename parameter is nil.
  • DX_MANAGER_ERROR_COMMUNICATION_FAILURE - The server didn't respond or there was a network problem.
- (DxDrmManagerStatus) acquireRightsForFile: (NSString *)  filename
withCustomData: (NSString *)  dataOrNil
withRightsUrl: (NSString *)  urlOrNil
error: (NSError **)  drmError 

Acquire the rights for the specified DRM file.

Parameters
[in]filename- Full path to the content file.
[in]dataOrNil- Custom data for customer internal usage.
[in]urlOrNil- Url to a Rights Server to be used only for this operation.
[out]drmErrorIf DRM operation fails and the server returns a SOAP error then the SOAP error will be propagated via this output parameter. In case there is no SOAP error the output parameter will not be changed by this function. This parameter should be inspected if the return value is a other than DX_MANAGER_SUCCESS.
Warning
The drmError* will be allocated only if drmError (NSError**) is a valid pointer and not nil. The memory is allocated to the auto release pool. Calls to this function should be wrapped with an NSAutoreleasePool.
If the drmError output parameter is nil then the SOAP error (if exists) will obviously not be propagated to the application layer.
Note
The drmError output parameter is an NSError object that contains the SOAP error data. The error is specifically located in the userInfo NSDictionary container. The container maintains three keys: SOAP_ERROR_CUSTOM_DATA, SOAP_ERROR_REDIRECT_URL and SOAP_ERROR_BODY.
Returns
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_SECURE_STORAGE_IS_CORRUPTED - The secure storage is used and found to be corrupted.
  • DX_MANAGER_ERROR_BAD_ARGUMENTS - in case filename parameter is nil.
  • DX_MANAGER_ERROR_COMMUNICATION_FAILURE - The server didn't respond or there was a network problem.
- (DxDrmManagerStatus) DEBUG_deletePersonalization

Deletes from the application secure storage all the assets of the PlayReady scheme that were stored.

Returns
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_NOT_INITIALIZED - The DRM Client has not been initialized.
  • DX_MANAGER_ERROR_SECURE_STORAGE_IS_CORRUPTED - Secure storage is found to be corrupted.
  • DX_MANAGER_ERROR_IPC_FAILURE - Communication with other DRM agent component could not be established.
Note
This function is used for debug purposes only.
- (DxDrmManagerStatus) DEBUG_deletePlayReadyStore

Deletes PlayReady Store - deleting licenses and domains of the client from the PlayReady server.

Returns
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_NOT_INITIALIZED - The DRM Client has not been initialized.
  • DX_MANAGER_ERROR_SECURE_STORAGE_IS_CORRUPTED - Secure storage is found to be corrupted.
  • DX_MANAGER_ERROR_IPC_FAILURE - Communication with other DRM agent component could not be established.
Note
This function is used for debug purposes only.
- (void) DEBUG_setLocalPersonalization: (BOOL)  enable

Set the DrmManager to work with local personalization for debug purposes.

Parameters
[in]enable- To work with local personalizations set to true; else false.
Note
This method should be used for debuging purposes, specifically when there is no active personalization server available.
+ (BOOL) DEBUG_setLoggingLevel: (NSString *)  loggingLevel
withLogFile: (NSString *)  logFile
useStdOutLogs: (BOOL)  stdoutLogs
withDisabledModules: (NSString *)  disabledModules 

Sets the DRM logging level.

This method MUST be called before initializing a DxDrmManager instance.

Warning
Calling this method after the instance method was called will have no effect.
Parameters
[in]logFile- full path to a file which the log will be printed to.
[in]stdoutLogs- Determines if logs should be printed to the standard output.
[in]loggingLevel- The maximum log level to print. 10 will print errors only, 30 will print errors & warnings, 40 will also include info messages, 50 will also include debug messages and 60 will also include verbose messages.
[in]disabledModules- deprecated since 3.8.0.1
Returns
True is setLoggingLevel is successful; else False.
Note
This method should be used for debuging purposes.
- (DxDrmManagerStatus) deleteRightsForFile: (NSString *)  filename

Deletes all the rights objects of a specific file from the Secure Storage.

Parameters
[in]filename- full path to the content file.
Returns
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_SECURE_STORAGE_IS_CORRUPTED - The secure storage is used and found to be corrupted.
  • DX_MANAGER_ERROR_BAD_ARGUMENTS - If filename is nil.
- (DxDrmManagerStatus) executeInitiatorWithData: (NSData *)  data

Execute a PlayReady initiator file.

Initiators may be used for license acquisition, join/leave domain and metering. A combined initiator can contain one or more of the above.

Parameters
[in]dataThe data containing the initiator buffer
Returns
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_MIME_TYPE_NOT_RECOGNIZED - The MIME type is not recognized as DRM object MIME type.
  • DX_MANAGER_ERROR_INVALID_FORMAT - THe DRM object's format does not match the provided MIME type.
  • DX_MANAGER_ERROR_FILE_ACCESS_ERROR - sourceFileName does not exist or could not be opened or read or destFileName (if provided) cannot be opened for write.
  • DX_MANAGER_ERROR_SECURE_STORAGE_IS_CORRUPTED - The secure storage is used and found to be corrupted.
  • DX_MANAGER_ERROR_OPERATION_FAILED - The Initator execution has failed.
  • DX_MANAGER_ERROR_NOT_INITIALIZED - The DRM Client has not been initialized.
  • DX_MANAGER_ERROR_BAD_ARGUMENTS - If data paremeter is nil.
  • DX_MANAGER_ERROR_COMMUNICATION_FAILURE - The server didn't respond or there was a network problem.
- (DxDrmManagerStatus) executeInitiatorWithData: (NSData *)  data
error: (NSError **)  drmError 

Execute a PlayReady initiator file.

Initiators may be used for license acquisition, join/leave domain and metering. A combined initiator can contain one or more of the above.

Parameters
[in]dataThe data containing the initiator buffer
[out]drmErrorIf DRM operation fails and the server returns a SOAP error then the SOAP error will be propagated via this output parameter. In case there is no SOAP error the output parameter will not be changed by this function. This parameter should be inspected if the return value is a other than DX_MANAGER_SUCCESS.
Warning
The drmError* will be allocated only if drmError (NSError**) is a valid pointer and not nil. The memory is allocated to the auto release pool. Calls to this function should be wrapped with an NSAutoreleasePool.
If the drmError output parameter is nil then the SOAP error (if exists) will obviously not be propagated to the application layer.
Note
The drmError output parameter is an NSError object that contains the SOAP error data. The error is specifically located in the userInfo NSDictionary container. The container maintains three keys: SOAP_ERROR_CUSTOM_DATA, SOAP_ERROR_REDIRECT_URL and SOAP_ERROR_BODY.
Returns
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_MIME_TYPE_NOT_RECOGNIZED - The MIME type is not recognized as DRM object MIME type.
  • DX_MANAGER_ERROR_INVALID_FORMAT - THe DRM object's format does not match the provided MIME type.
  • DX_MANAGER_ERROR_FILE_ACCESS_ERROR - sourceFileName does not exist or could not be opened or read or destFileName (if provided) cannot be opened for write.
  • DX_MANAGER_ERROR_SECURE_STORAGE_IS_CORRUPTED - The secure storage is used and found to be corrupted.
  • DX_MANAGER_ERROR_OPERATION_FAILED - The Initator execution has failed.
  • DX_MANAGER_ERROR_NOT_INITIALIZED - The DRM Client has not been initialized.
  • DX_MANAGER_ERROR_BAD_ARGUMENTS - If data paremeter is nil.
  • DX_MANAGER_ERROR_COMMUNICATION_FAILURE - The server didn't respond or there was a network problem.
- (DxDrmManagerStatus) executeInitiatorWithFile: (NSString *)  filename

Execute a PlayReady initiator file.

Initiators may be used for license acquisition, join/leave domain and metering. A combined initiator can contain one or more of the above.

Parameters
[in]filenameThe initiator's filename
Returns
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_MIME_TYPE_NOT_RECOGNIZED - The MIME type is not recognized as DRM object MIME type.
  • DX_MANAGER_ERROR_INVALID_FORMAT - THe DRM object's format does not match the provided MIME type.
  • DX_MANAGER_ERROR_FILE_ACCESS_ERROR - sourceFileName does not exist or could not be opened or read or destFileName (if provided) cannot be opened for write.
  • DX_MANAGER_ERROR_SECURE_STORAGE_IS_CORRUPTED - The secure storage is used and found to be corrupted.
  • DX_MANAGER_ERROR_OPERATION_FAILED - The Initator execution has failed.
  • DX_MANAGER_ERROR_NOT_INITIALIZED - The DRM Client has not been initialized.
  • DX_MANAGER_ERROR_COMMUNICATION_FAILURE - The server didn't respond or there was a network problem.
- (DxDrmManagerStatus) executeInitiatorWithFile: (NSString *)  filename
error: (NSError **)  drmError 

Execute a PlayReady initiator file.

Initiators may be used for license acquisition, join/leave domain and metering. A combined initiator can contain one or more of the above.

Parameters
[in]filenameThe initiator's filename
[out]drmErrorIf DRM operation fails and the server returns a SOAP error then the SOAP error will be propagated via this output parameter. In case there is no SOAP error the output parameter will not be changed by this function. This parameter should be inspected if the return value is a other than DX_MANAGER_SUCCESS.
Warning
The drmError* will be allocated only if drmError (NSError**) is a valid pointer and not nil. The memory is allocated to the auto release pool. Calls to this function should be wrapped with an NSAutoreleasePool.
If the drmError output parameter is nil then the SOAP error (if exists) will obviously not be propagated to the application layer.
Note
The drmError output parameter is an NSError object that contains the SOAP error data. The error is specifically located in the userInfo NSDictionary container. The container maintains three keys: SOAP_ERROR_CUSTOM_DATA, SOAP_ERROR_REDIRECT_URL and SOAP_ERROR_BODY.
Returns
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_MIME_TYPE_NOT_RECOGNIZED - The MIME type is not recognized as DRM object MIME type.
  • DX_MANAGER_ERROR_INVALID_FORMAT - THe DRM object's format does not match the provided MIME type.
  • DX_MANAGER_ERROR_FILE_ACCESS_ERROR - sourceFileName does not exist or could not be opened or read or destFileName (if provided) cannot be opened for write.
  • DX_MANAGER_ERROR_SECURE_STORAGE_IS_CORRUPTED - The secure storage is used and found to be corrupted.
  • DX_MANAGER_ERROR_OPERATION_FAILED - The Initator execution has failed.
  • DX_MANAGER_ERROR_NOT_INITIALIZED - The DRM Client has not been initialized.
  • DX_MANAGER_ERROR_COMMUNICATION_FAILURE - The server didn't respond or there was a network problem.
- (DxDrmManagerStatus) executeInitiatorWithURL: (NSURL *)  url

Execute a PlayReady initiator file.

Initiators may be used for license acquisition, join/leave domain and metering. A combined initiator can contain one or more of the above.

Parameters
[in]urlThe initiator's URL
Returns
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_MIME_TYPE_NOT_RECOGNIZED - The MIME type is not recognized as DRM object MIME type.
  • DX_MANAGER_ERROR_INVALID_FORMAT - THe DRM object's format does not match the provided MIME type.
  • DX_MANAGER_ERROR_FILE_ACCESS_ERROR - sourceFileName does not exist or could not be opened or read or destFileName (if provided) cannot be opened for write.
  • DX_MANAGER_ERROR_SECURE_STORAGE_IS_CORRUPTED - The secure storage is used and found to be corrupted.
  • DX_MANAGER_ERROR_OPERATION_FAILED - The Initator execution has failed.
  • DX_MANAGER_ERROR_NOT_INITIALIZED - The DRM Client has not been initialized.
  • DX_MANAGER_ERROR_BAD_ARGUMENTS - If url paremeter is nil.
  • DX_MANAGER_ERROR_COMMUNICATION_FAILURE - The server didn't respond or there was a network problem.
- (DxDrmManagerStatus) executeInitiatorWithURL: (NSURL *)  url
error: (NSError **)  drmError 

Execute a PlayReady initiator file.

Initiators may be used for license acquisition, join/leave domain and metering. A combined initiator can contain one or more of the above.

Parameters
[in]urlThe initiator's URL
[out]drmErrorIf DRM operation fails and the server returns a SOAP error then the SOAP error will be propagated via this output parameter. In case there is no SOAP error the output parameter will not be changed by this function. This parameter should be inspected if the return value is a other than DX_MANAGER_SUCCESS.
Warning
The drmError* will be allocated only if drmError (NSError**) is a valid pointer and not nil. The memory is allocated to the auto release pool. Calls to this function should be wrapped with an NSAutoreleasePool.
If the drmError output parameter is nil then the SOAP error (if exists) will obviously not be propagated to the application layer.
Note
The drmError output parameter is an NSError object that contains the SOAP error data. The error is specifically located in the userInfo NSDictionary container. The container maintains three keys: SOAP_ERROR_CUSTOM_DATA, SOAP_ERROR_REDIRECT_URL and SOAP_ERROR_BODY.
Returns
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_MIME_TYPE_NOT_RECOGNIZED - The MIME type is not recognized as DRM object MIME type.
  • DX_MANAGER_ERROR_INVALID_FORMAT - THe DRM object's format does not match the provided MIME type.
  • DX_MANAGER_ERROR_FILE_ACCESS_ERROR - sourceFileName does not exist or could not be opened or read or destFileName (if provided) cannot be opened for write.
  • DX_MANAGER_ERROR_SECURE_STORAGE_IS_CORRUPTED - The secure storage is used and found to be corrupted.
  • DX_MANAGER_ERROR_OPERATION_FAILED - The Initator execution has failed.
  • DX_MANAGER_ERROR_NOT_INITIALIZED - The DRM Client has not been initialized.
  • DX_MANAGER_ERROR_BAD_ARGUMENTS - If url paremeter is nil.
  • DX_MANAGER_ERROR_COMMUNICATION_FAILURE - The server didn't respond or there was a network problem.
- (IDxChallenge *) generateChallengeFromInitiator: (NSString *)  initiatorPath
result: (DxDrmManagerStatus *)  checkResultOrNil 

Generates a challenge from a PlayReady Initiator file.

The type of the generated challenge will depend on the type of the initiator.

Parameters
[in]initiatorPathFull path to the local initiator file.
[out]checkResultOrNil- A pointer to an DxDrmManagerStatus or nil(if it should be ignored). The output value of this parameter can be one of the following:
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_BAD_ARGUMENTS - if initiatorPath is nil
Returns
IDxChallenge (autorelease) that represents the generated challenge
- (IDxChallenge *) generateLicenseChallengeFromContent: (NSString *)  contentPath
withCustomData: (NSString *)  customData
result: (DxDrmManagerStatus *)  checkResultOrNil 

Generates a License Acquisition challenge from a content.

Parameters
[in]contentPathFull path to the local content.
[in]customDatato add in the challenge.
[out]checkResultOrNil- A pointer to an DxDrmManagerStatus or nil(if it should be ignored). The output value of this parameter can be one of the following:
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_BAD_ARGUMENTS - if contentPath is nil
Returns
IDxChallenge (autorelease) that represents the generated challenge
- (IDxChallenge *) generateLicenseChallengeFromDrmHeader: (NSString *)  drmHeader
result: (DxDrmManagerStatus *)  checkResultOrNil 

Generates a License Acquisition challenge from a PlayReady header.

Parameters
[in]drmHeaderThe PlayReady header.
[out]checkResultOrNil- A pointer to an DxDrmManagerStatus or nil(if it should be ignored). The output value of this parameter can be one of the following:
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_BAD_ARGUMENTS - if drmHeader is nil
Returns
IDxChallenge (autorelease) that represents the generated challenge
- (IDxChallenge *) generatePersonalizationChallengeWithAppVersion: (NSString *)  appVersion
withPublicData: (NSString *)  publicData
withPrivateData: (NSString *)  privateData
result: (DxDrmManagerStatus *)  checkResult 

Generates a personalization challenge for active Drm Scheme.

The function returns IDxChallenge that enables handling the Personalization server response.

The IdxChallenge is valid as long as the IDxDrmDlc is alive. Terminating the IDxDrmDlc invalidates the IDxChallenge and it will not be able to handle the response correctly. Therefore the IDxDrmDlc must remain in memory until the response from the server is handled.

Generate another personalization challenge also cause the privies one to be invalid.

Do not use the <performPersonalizationWithSessionID>"()" method in parallel of using this challenge method

Parameters
[in]appVersionThe version name of the Application using the DxDrmManager Interface.
[in]publicDataPublic data(if any) to be used on Personalization process.
[in]privateDataPrivate data(if any) to be used on Personalization process.
[out]checkResultOrNil- A pointer to an DxDrmManagerStatus or nil(if it should be ignored). The output value of this parameter can be one of the following:
  • DX_MANAGER_SUCCESS - Operation completed successfully.
Returns
IDxChallenge (autorelease) that represents the generated challenge
- (IDxChallenge *) generatePersonalizationChallengeWithSessionID: (NSString *)  sessionID
withAppVersion: (NSString *)  appVersionOrNil
result: (DxDrmManagerStatus *)  checkResultOrNil 

Generates a personalization challenge.

The function returns IDxChallenge that enables handling the Personalization server response.

The IdxChallenge is valid as long as the IDxDrmDlc is alive. Terminating the IDxDrmDlc invalidates the IDxChallenge and it will not be able to handle the response correctly. Therefore the IDxDrmDlc must remain in memory until the response from the server is handled.

Generate another personalization challenge also cause the privies one to be invalid.

Do not use the <performPersonalizationWithSessionID>"()" method in parallel of using this challenge method

Parameters
[in]appVersionOrNilThe version name of the Application using the DxDrmManager Interface.
[in]sessionIDCustom data that will be passed to the personalization server.
[out]checkResultOrNil- A pointer to an DxDrmManagerStatus or nil(if it should be ignored). The output value of this parameter can be one of the following:
  • DX_MANAGER_SUCCESS - Operation completed successfully.
Returns
IDxChallenge (autorelease) that represents the generated challenge
- (IDxChallenge *) generateSecClockChallengeResult: (DxDrmManagerStatus *)  checkResultOrNil

Generates a Set Secure Clock challenge.

Parameters
[out]checkResultOrNil- A pointer to an DxDrmManagerStatus or nil(if it should be ignored). The output value of this parameter can be one of the following:
  • DX_MANAGER_SUCCESS - Operation completed successfully.
Returns
IDxChallenge (autorelease) that represents the generated challenge
- (NSString *) getDeviceId

Returns a string representation of the Device ID.

Returns
Device ID string.
- (NSString *) getDrmVersion

Returns a string representation of the SecurePlayer version.

Returns
Version string.
- (NSArray *) getRightObjectsForFile: (NSString *)  filename
result: (DxDrmManagerStatus *)  checkResultOrNil 

Returns an array of rights objects describing the available rights for a file.

Parameters
[in]filename- full path to either the content file, the rights info of which is required, or the corresponding initiator.
[out]checkResultOrNil- A pointer to an DxDrmManagerStatus or nil(if it should be ignored). The output value of this parameter can be one of the following:
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_FILE_ACCESS_ERROR - The file does not exist or the file could not be opened or read.
  • DX_MANAGER_ERROR_NOT_INITIALIZED - The DRM Client has not been initialized.
  • DX_MANAGER_ERROR_CONTENT_NOT_RECOGNIZED - if DRM Scheme could not be identified.
  • DX_MANAGER_ERROR_FILE_IS_BEING_DOWNLOADED - If the file is being downloaded and there is not enough data to begin using it.
  • DX_MANAGER_ERROR_BAD_ARGUMENTS - If drmFile or activeRo are nil, or an invalid iterationMode given, or filename parameter is nil.
Returns
An array that consists of DxRightstInfo read-only objects for each right info. Returns nil in case of no rights or error.
Note
In case the function returns nil, the caller should check the value returned in the output parameter checkResultOrNil.
- (BOOL) isDrmContent: (NSString *)  contentFilename
result: (DxDrmManagerStatus *)  checkResultOrNil 

Checks if a file is a DRM protected file.

Parameters
[in]contentFilename- full path to the content file.
[out]checkResultOrNil- A pointer to an DxDrmManagerStatus or nil(if it should be ignored). The output value of this parameter can be one of the following:
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_FILE_ACCESS_ERROR - The file does not exist or the file could not be opened or read.
  • DX_MANAGER_ERROR_NOT_INITIALIZED - The DRM Client has not been initialized.
  • DX_MANAGER_ERROR_BAD_ARGUMENT - If contentFilename is nil.
  • DX_MANAGER_ERROR_CONTENT_NOT_RECOGNIZED - The contentFilename point to a clear (not a DRM) or to an unknown file.
Returns
  • YES - Specified content is a DRM content.
  • NO - In this case the checkResultOrNil should be inspected. If checkResultOrNil is DX_MANAGER_SUCCESS then the content is no DRM, else the function could not verify whether the content is DRM or not.
- (DxDrmManagerStatus) performPersonalizationWithServerURL: (NSString *)  serverURL
withAppVersion: (NSString *)  appVersion
withPublicData: (NSString *)  publicData
withPrivateData: (NSString *)  privateData 

Starts the personalization process for active Drm Scheme.

Parameters
[in]serverURLThe server address.
[in]appVersionThe Customer Application Version Identifier.
[in]publicDataPublic data(if any) to be used on Personalization process.
[in]privateDataPrivate data(if any) to be used on Personalization process.
Returns
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_NOT_INITIALIZED - The DRM Client has not been initialized.
  • DX_MANAGER_ERROR_OPERATION_FAILED - The personalization operation has failed.
  • DX_MANAGER_ERROR_BAD_ARGUMENTS - serverURL is nil.
  • DX_MANAGER_ERROR_COMMUNICATION_FAILURE - The server didn't respond or there was a network problem.
- (DxDrmManagerStatus) performPersonalizationWithSessionID: (NSString *)  sessionID
withServerURL: (NSString *)  serverURL
withAppVersion: (NSString *)  appVersionOrNil 

Starts the personalization process.

Parameters
[in]sessionIDcurrently use pass NULL
[in]serverURLThe server address
[in]appVersionOrNilThe Customer Application Version Identifier
Note
This method can take up to 40 seconds to return.
Returns
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_NOT_INITIALIZED - The DRM Client has not been initialized.
  • DX_MANAGER_ERROR_SECURE_STORAGE_IS_CORRUPTED - Secure storage is found to be corrupted.
  • DX_MANAGER_ERROR_OPERATION_FAILED - The personalization operation has failed.
  • DX_MANAGER_ERROR_BAD_ARGUMENTS - serverURL is nil.
  • DX_MANAGER_ERROR_COMMUNICATION_FAILURE - The server didn't respond or there was a network problem.
- (DxDrmManagerStatus) performSecClockSet

Sets the secure clock required for normal operation of DRM operations.

Returns
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_SECURE_STORAGE_IS_CORRUPTED - Secure storage is found to be corrupted.
  • DX_MANAGER_ERROR_COMMUNICATION_FAILURE - The server didn't respond or there was a network problem.
- (DxDrmManagerStatus) personalizationVerify

Verifies that the personalization process of the assets that were stored with the specified tag was completed successfully and these assets can be successfully used by the PlayReady DRM scheme.

Warning
If this function returns any value other than DX_MANAGER_SUCCESS then the DxDrmManager DRM methods will not work.
Returns
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_SECURE_STORAGE_IS_CORRUPTED - Secure storage is found to be corrupted.
  • DX_MANAGER_ERROR_VERIFICATION_FAILURE - The provisioning was not completed successfully (i.e. assets are missing, asset format is not valid, assets don't match each other)
  • DX_MANAGER_ERROR_NOT_INITIALIZED - The DRM Client has not been initialized.
  • DX_MANAGER_ERROR_BAD_ARGUMENTS - assetTag is null or points to null.
- (void) setConfigurationParams: (DxConfigurationParams)  configParam
withValue: (int)  value 

Option to configure SDK parameters.

Parameters to configure:

  1. DX_DRM_OPERATION_NETWORK_TIMEOUT set the timeout for http requests in DRM operations (in seconds). Default value: 60 seconds. Valid range: 5-300 seconds.
    Parameters
    [in]configParam- the parameter to configure.
    [in]value
- (DxDrmManagerStatus) setConfigurationString: (DxConfigurationParams)  configParam
withValue: (NSString *)  value 

Option to configure SDK parameters.

Parameters to configure:

  1. CSP_VODRM_HEAD_END_URL Configure VoDrm head end url
    Parameters
    [in]configParam- the parameter to configure.
    [in]value
- (DxDrmManagerStatus) setCookies: (NSArray *)  cookies

Once setCookies is called every "acquireRights" or "executeInitiator" will attach a cookie header to the HTTP request which contains the cookies.

To clear the cookies just call setCookies(nil).

The cookies will be seperated by "; " (semi-colon and white-space) The final header will be as follow: "cookie = <COOKIE_DATA_1>; <COOKIE_DATA_2>; <COOKIE_DATA_3>..."

Note
*This function is not thread safe.
Parameters
[in]cookiesThe array of cookies to be sent.
Returns
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_BAD_ARGUMENTS - If one of the members in the cookies array is not an NSString object.
+ (DxDrmManager *) sharedManager

Instantiator method to supply Signleton object of DxDrmManager.

Warning
If the Device is rooted a nil will be returned.
Returns
DxDrmManager signleton object.
+ (DxDrmManager *) sharedManager: (NSError **)  drmError

Instantiator method to supply Signleton object of DxDrmManager.

Warning
If the Device is rooted a nil will be returned and the drmError will be allocated.
The drmError* will be allocated only if drmError (NSError**) is a valid pointer and not nil. The memory is allocated to the auto release pool. Calls to this function should be wrapped with an NSAutoreleasePool.
Returns
DxDrmManager signleton object.
- (DxDrmManagerStatus) verifyRightsForFile: (NSString *)  filename

This funtion verifies if the file specified by filename has valid rights.

Parameters
[in]filename- full path to either the content file, the rights of which should be verified, or the corresponding initiator.
Returns
  • DX_MANAGER_SUCCESS - Operation completed successfully.
  • DX_MANAGER_ERROR_SECURE_STORAGE_IS_CORRUPTED - Secure storage is found to be corrupted.
  • DX_MANAGER_ERROR_NOT_INITIALIZED - The DRM Client has not been initialized.
  • DX_MANAGER_ERROR_FILE_ACCESS_ERROR - The file does not exist or the file could not be opened or read.
  • DX_MANAGER_ERROR_NO_RIGHTS - The file does not have license.
  • DX_MANAGER_ERROR_SECURE_CLOCK_IS_NOT_SET - The secure clock is not set.
  • DX_MANAGER_ERROR_BAD_ARGUMENTS - filename parameter is nil.
- (BOOL) verifySecClockSet

Verifies whether the secure clock is set.

If this function returns false, the secure clock has to be set via API before any other DRM operation.

Returns
YES - if the secure clock is set, NO - otherwise

Property Documentation

- (bool) bDeletePersonalizationUponStartup
readwriteatomic
- (bool) bDeletePlayReadyStoreUponStartup
readwriteatomic

The documentation for this class was generated from the following file: