License System

Introduction

Celartem License System is a software license management system which is built into this library. This system limits several faetures of SDKs from abuses. For example, both of PixelLive and Secure DjVu has their own DRM (Digital Rights Management) system and its very important to verify every viewer correctly implements the DRM limitations (such as viewing, printing and exporting) thus we want to license the features only to the applications which are verified to confirm the DRM limitations.
The other reason is to protect against abuse of our software. We greatly appreciate your understanding of our SDK licensing policy.

License namespace

The first thing to know is everything related to license system is in cel_license.h License namespace. So anyway what you have to do first is to do "using namespace" this namespace or you have to add prefix License:: on every call.

License System

LicenseManager is the main interface to access the license system. As you may already know, every sample contains the line of LicenseManager::setLicenseScript. You have to do this before calling the SDK features.

LicenseManager& lm = LicenseManager::getLicenseManager();
lm.setLicenseScript(".....");

A license script identifies the product and its usage of the SDK features. Specifically, a license script defines Product ID, Product Description and Feature Activation Schemata.
Anyway, please note that every program built with the SDK should have its own license script before its deployment/distribution. Without any license script, the program runs under development license and stops working after 2 weeks from the its built time.

Product ID

Product ID is a 128-bit identifier which uniquely identifies a product.

Product Description

Product Description is human-readable string which briefly describes the product.

Feature Activation Schemata

Feature Activation Schemata defines the usage of features. A feature is a function provided by the SDK and Feature enumeration is used to describe them.
Each feature can be activated by one of the following schemata:

Default License Script

By default, the library is initialized with a license script which enables development license for all features. So every feature can be used in 2 weeks after build. This license script is only for the development purpose and you must obtain a license script for your product when you release the product.

Cartridge System

Cartridge system manages all the cartridges installed on a machine and it uses a centerized database. The database is initialized when some of the application firstly access to it and no formal installation, configuration and initialization is needed.

CartridgeManager

CartridgeManager is only the interface to access the cartridge system and you can get the global only one instance by calling CartridgeManager::getCartridgeManager method.

CartridgeManager& cm = CartridgeManager::getCartridgeManager();

Note for initialization on certain UNIX platforms

On certain UNIX systems, because of some security system such as SELinux, the user sometimes need to specify a world-writable path for the database by calling CartridgeManager::setLicenseDbDirectory

Activated Products

Cartridge system manages all the products installed and activated on a machine. You can get the product IDs of these products by calling CartridgeManager::getActivatedProducts method. The method returns an array of product IDs.

CartridgeManager& cm = CartridgeManager::getCartridgeManager();
SimpleArray<String> prodIds;
cm.getActivatedProducts(prodIds);
size_t count = prodIds.getSize();
for(size_t i = 0; i < count; i++)
{
printf("%u, %s\n", i, prodIds[i].c_str());
}

Product Status

If you have a product ID, you can easily get the product status including how many cartridges currently installed on the machine. ProductStatus structure is used to describe the status and the status is obtained by CartridgeManager::getProductStatus method.

String productId = "....";
CartridgeManager& cm = CartridgeManager::getCartridgeManager();
ProductStatus ps;
cm.getProductStatus(ps, productId);

Feature Status

ProductStatus structure contains an array of FeatureInfo structure. A FeatureInfo entry describes activation scheme, remaining cartridges and expiry for the evaluation/subscription cartridge.

Cartridges

A feature cartridge is consumed when the user uses the feature and the remaining cartridges actually means how many times the user can use the feature. count member of FeatureInfo structure is the number of the cartridge. There is also a special cartridge status; unlimited. If count is equal to FeatureInfo::Unlimited, the cartridge is never consumed but it allows the user to use the feature unlimitedly.

Evaluation/Subscription Cartridges

Evaluation/Subscription cartridges are the cartridges with expiry. The cartridges cannot be used after the expiry date-time. There's no actual difference between evaluation cartridges and subscription cartridges. But normally subscription cartridges can extend the expiry but evaluation ones can not.

altCount member of FeatureInfo structure is the number of evaluation/subscription cartridges installed for a feature and the expiry member is the expiry. The evaluation/subscription cartridge also have the unlimited status and if altCount is equal to FeatureInfo::Unlimited, the evaluation/subscription cartridge is never consumed but it allows the user to use the feature unlimitedly until the expiry.

Cartridge Viewer

Cartridge Viewer is a tool to view, install and order cartridges. User can check the cartridge status of each application installed on the machine.

cviewer.png

There is "Order Information" button under cartridge status listbox, which will provide the scrambled information used to issue new cartridges for the machine. The following is a sample of this:

Since this machine currently cannot connect to the online order site, you had better order the cartridge by e-mail. The following information is needed to order your cartridge and you had better copy-n-paste the following information to your order e-mail:
eJzNyjEOwjAMQNFykx7BcRw7ZqY7V8CJLTFAUVskpp6dDTEyorf84Q!D4YxJKUNQ5U4RTM1Ya9OWq0AyV!V6YQ7bw-BSQrh7psBs0bsXqJ4aSiuVk5F2tbyf5va8-X0bp9dj8XUdp37d5mXkHT7wSKikLKjlOxMKgtQs9FcL!O4NBKFZNQ==

The scrambled script contains the following information:

The user sends the information to Cuminas and Cuminas issues a new cartridge script (of the required quantity) according to the script.

And, when the user obtains a new cartridge script from Cuminas, the user can install the cartridge by [File - Install Cartridge].

cviewer_cinstall.png

The code of the cartridge viewer is provided as a sample code and it is placed under samples/cel_baselib/CartridgeViewer_Win.

Requesting/Installing New Cartridges Programmatically

You can also create your own code to request/install new cartridges. The cartridge request script can be obtained by the following code:

LicenseManager& lm = LicenseManager::getLicenseManager();
String reqScript = lm.getStatusString(false, lm.getProductId());

And, for installation, you can use the following code:

CartridgeManager& cm = CartridgeManager::getCartridgeManager();
cm.installCartridge(".....");

Anyway, please note that the codes should be executed after license script initialization.


Cuminas DjVu SDK 3.0.33103
This document is made with doxygen 1.8.5 at Sun Dec 15 2013 19:38:06.
Cuminas Logo