DRM License Checker API Specification


1 Overview

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.

API categorypublic
API typec++
Existed sinceLegacy S60 2.6
API librariesDRMLicenseChecker.lib

1.1 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.

1.1.1 Emulator support

This API is fully supported in the WINS/WINSCW emulator environment.

1.2 Changes

DRM License Checker API is an SDK API and available from S60 release 2.6 onwards.

1.3 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 a critical data file and if the decryption is successful, the license is valid.

1.4 Class Structure

Summary of API classes and header files
CDRMLicenseChecker /epoc32/include/mw/DRMLicenseChecker.h

The following class diagram shows the DRM License Checker API.

DRM License Checker class diagram
DRM License Checker class diagram

2 Using The 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.

2.1 Checking license

The CheckLicense method is used to check if the license is valid for an application. 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 )
	delete data;
	// cause severe error

2.2 Error handling

All the functions use return values as error code indicators. In addition, the leave mechanism of the 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. Recovery is not possible.

2.3 Memory and Performance Considerations

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

2.4 Extensions to the API

No extensions are possible to the DRM License Checker API.

2.5 Limitations of the API

The basic functionality of this API cannot be limited.