Capability Plug-Ins

Capabilities bundle a set of predicate definitions. Capabilities are also able to bundle special built-ins and various properties. Further capabilities define a product description. The programming interface of capabilities is currently not in the public domain. But capabilities itself might be placed on the market by parties that will have access to this programming interface.

Capabilities that need activation can only be added with a valid activation. Activations can be performed over the internet via the predicate sys_activate_capability/2. If internet access is not available an install ID can be retrieved via sys_calc_install_id/2. This install ID can be sent to the supplier by E-mail, surface mail, phone etc.. who will in turn return a license text. This license text can then be deposited via the predicate sys_reg_license_text/2.

A capability can then be added via the predicate sys_init_capability/1. Capabilities can also be removed at any time via the predicate sys_fini_capability/1. It is recommended to remove unused capabilities, since a capability migh have spawn a thread which is shutdown by the removal. The currently tracked capabilities can be retrieved via the predicate sys_current_capability/1.

The license for a capability might expire or be tempered with. To validate it the predicate sys_check_license/1 can be called. Calling the predicate only makes sense if the application cannot wait for when the system automatically validates the license. The predicate sys_check_licenses/0 allows updating the knowledge base status. The predicate assumes that the licenses of the enlisted capabilities have already been validated. 

The following capability plug-in predicates are provided:

sys_activate_capability(C, H):
The predicate activates the capability C by the license key H.
sys_calc_install_id(C, I):
The predicate calculates the install ID for the capability C and unifies it with I.
sys_reg_license_text(C, T):
The predicate registers the license text T for the capability C in the user preferences.
sys_reged_license_text(C, T):
The predicate returns the registeres license text in T for the capability C in the user preferences.
sys_init_capability(C, O):
The unary predicate initializes and enlists the capability C. The binary predicate additionally recognizes the following init options:.
B is prompt (true or false), default value is false.
The predicate removes the capability C.
The predicate succeeds with the currently initialized capabilities C.
sys_capability_property(C, P):
The predicate succeeds with all the properties of the capability C that unify with P. The following capability properties are supported:
D is the localized family description.
D is the localized product description.
D is the localized language description.
D is the localized platform description.
B is the need for activation (true or false).
S is the activation status.
D is the localized license description.
T is the expiration date.
P is the path of the bundle storage.
I is the image icon.
I is the big image icon.
H is the list of localized document titles and their URLs.
U is the URL of the license provider.
B is the no trace flag (true or false).

The properties act_status/1, license_descr/1 and expiration_data/1 are only available when the capability has been successful enlisted. The expiration_date/1 is given in milliseconds since January 1, 1970 GMT. An undefined expiration_date/1 is returned as the value 0.

The predicate updates the license status of the capability C. Throws an exception if license status is not OK.
The predicate updates the knowledge base status. Throws an exception if the knowledge base status is not OK.

The following Prolog flags for capability plug-ins are provided:

The value is a license error type. The value indicates the activation status of the predefined and enlisted capabilities. The value cannot be changed.