DRM License Checker API: Using the DRM License Checker API

The DRM License checker API enables a client application check for the existence of the necessary rights. It allows decryption of the installed data files to be used further during runtime.

Checking license

The CheckLicense method is used to check if the license is valid. This function performs a license check by decrypting a data file and returning the decrypted contents of the data file. A license check can only succeed if the Rights object associated with the calling application exists and sufficient rights are present. If the license check fails, an error is returned.

The decrypted data is used by the calling application in a non-trivial way to further increase security. A simple check whether the CheckLicense method completed successfully is not enough. Ideally, the contents of the data file are a crucial element of the calling application, such as artwork or control data for the application execution.

The following code example elaborates the usage of the DRM License Checker API:

CDRMLicenseChecker* licenseChecker; ... if ( licenseChecker->CheckLicense( dataFile, data ) == KErrNone ) { InitializeGame(data); delete data; } else { // cause severe error } ...

Error handling

All the functions use return values as error code indicators. In addition, the leave mechanism of Symbian OS is used. Errors are indicated by values other than KErrNone. All leave situations are fatal. If a function leaves, the interface object needs to be deallocated. No recovery is possible.

Memory overhead

The DRM License Checker API does not consume memory significantly other than for creating the required objects.

Extensions to the API

No extensions are possible to the DRM License Checker API.

Limitations of the API

The basic functionality of this API cannot be limited.


Copyright © Nokia Corporation 2001-2008
Back to top