DRM License Checker API
Changes in DRM License Checker API documentation
Changes in DRM License Checker API
Purpose
DRM License Checker API allows usage rights enforcement for native applications.
It consists of functions for checking usage rights.
Clients of the DRM License Checker API are protected applications.
Classification and release information
DRM License Checker API is an SDK API.
Emulator support
This API is fully supported in the WINS/WINSCW emulator environment.
API description
The DRM License Checker API is intended for application protection. It
provides a single method with which the application can check if its license
is valid or not. It can be categorized as a library API and its type is a
method call interface.
Use cases
The only use case for DRM License Checker API is to check if the license
of the application is valid or not. This is done by decrypting some critical
data file and if the decryption is successful the license is also valid.
API class structure
Figure
DRM License Checker class diagram
shows the class diagram
of 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
}
...
Related APIs
Error handling
All the functions use return values as error code indicators. In addition,
the leave mechanism of Symbian platform 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.
Related APIs
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.