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.
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:
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.
The DRM License Checker API does not consume memory significantly other than for creating the required objects.
No extensions are possible to the DRM License Checker API.
The basic functionality of this API cannot be limited.