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):
sys_init_capability(C, O):
The unary predicate initializes and enlists the capability C. The binary predicate additionally recognizes the following init options:.
prompt(B):
B is prompt (true or false), default value is false.
sys_finit_capability(C):
The predicate removes the capability C.
sys_current_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:
family_descr(D):
D is the localized family description.
product_descr(D):
D is the localized product description.
language_descr(D):
D is the localized language description.
platform_descr(D):
D is the localized platform description.
needs_act(B):
B is the need for activation (true or false).
act_status(S):
S is the activation status.
license_descr(D):
D is the localized license description.
expiration_date(T):
T is the expiration date.
bundle_dir(P):
P is the path of the bundle storage.
image_icon(I):
I is the image icon.
big_image_icon(I):
I is the big image icon.
help_docs(H):
H is the list of localized document titles and their URLs.
shop_url(U):
U is the URL of the license provider.
sys_notrace(B):
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.

sys_check_license(C):
The predicate updates the license status of the capability C. Throws an exception if license status is not OK.
sys_check_licenses:
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:

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

Comments