PGSLIC.lib
3.0
|
The PGSLIC API header. More...
#include <cstddef>
Go to the source code of this file.
Enumerations | |
enum | LicenseStatus { LICENSE_OK , LICENSE_WARNING , LICENSE_ERROR , LICENSE_EXPIRED , LICENSE_STALE } |
Functions | |
PGSLIC_API LicenseStatus | checkLicense (const char *licPath, const char *pwd, const char *key, const char *appName, const char *appInfo="", const char *cxnOpts="") |
PGSLIC_API LicenseStatus | release (const char *pwd) |
PGSLIC_API const char * | getAppName () |
PGSLIC_API const char * | getExpiryDate () |
PGSLIC_API int | isPerpetual () |
PGSLIC_API int | getDaysUntilExpiry () |
PGSLIC_API const char * | getClientName () |
PGSLIC_API const char * | getSettings () |
PGSLIC_API const char * | getSetting (const char *settingName) |
PGSLIC_API const char * | getLastError () |
PGSLIC_API int | getStaleTime () |
The PGSLIC API header.
enum LicenseStatus |
The return code returned by the checkLicense and release functions indicating success or one of five error types.
PGSLIC_API LicenseStatus checkLicense | ( | const char * | licPath, |
const char * | pwd, | ||
const char * | key, | ||
const char * | appName, | ||
const char * | appInfo = "" , |
||
const char * | cxnOpts = "" |
||
) |
Verifies that the current machine and/or user is licensed to run the application. The checkLicense function can be called multiple times by the licensed applicaiton. It will check to see if it has a valid license in memory. If not it will look for a license file in the specified path and check that the file contains a valid license. If not it will request a valid license from the Nuvovis cloud service and cache the license in a file and in memory. If the license is a Live license it will become stale after a number of minutes.
licPath | The path of a writable directory where license files are cached. |
pwd | Your development password provided to you by Nuvovis. |
key | The license key stored in Salesforce and sent to the end user to be stored by the application. |
appName | The name of the calling application. |
appInfo | An optional information string e.g. application version to be viewed in Salesforce. Must be alphanumerics, underscores, spaces, dots and dashes only. |
cxnOpts | Connection options string. A list of '&' separated name=value pairs. e.g. PXSP=10.0.0.113:3128&PXAT=BASIC&PXUN=fred&PXPW=password |
The following option names are supported:
URL - Nuvovis cloud URL or offline switch PXSP - Proxy server and port PXUN - Proxy server username PXPW - Proxy server password PXAT - Proxy server authentication type HAUP - HTTP username and password HAAT - HTTP authentication type
To switch to offline mode on a machine without internet access use URL=Offline.
Authentication type values for either proxy or HTTP authentication must be one of the following:
NONE - No authentication BASIC - Basic authentication DIGEST - Digest authentication NEGOTIATE - GSS-Negotiate authentication NTLM - NTLM authentication DIGEST_IE - Digest authentication with IE flavour NTLM_WB - NTLM authentication delegated to winbind helper ANY - All types set (uses most secure available) ANY_SAFE - All types except Basic
PGSLIC_API const char* getAppName | ( | ) |
Returns the name of your application which you have branded using the license settings defined in salesforce. Prevents license mixups if you license more than one software product.
PGSLIC_API const char* getClientName | ( | ) |
Returns the name of the client to whom you have granted the software license.
PGSLIC_API int getDaysUntilExpiry | ( | ) |
Returns the number of days until the license expires.
PGSLIC_API const char* getExpiryDate | ( | ) |
Returns the license expiry date in the form YYYY-MM-DD (month and day can be 1 character e.g. 2000-1-31).
PGSLIC_API const char* getLastError | ( | ) |
Returns the last error message produced by a call to the PGSLIC API.
PGSLIC_API const char* getSetting | ( | const char * | settingName | ) |
Returns the value of an individual setting. For example if the settings string is "MaxLimit=500" getSetting("MaxLimit") will return "500".
settingName | The name of the setting whos value is requested. |
PGSLIC_API const char* getSettings | ( | ) |
Returns the full license application settings string as specified by the license adminitrator in Salesforce.com.
PGSLIC_API int getStaleTime | ( | ) |
Gets the number of seconds since the live license was last refreshed from the cloud.
PGSLIC_API int isPerpetual | ( | ) |
Returns the perpetual license flag.
PGSLIC_API LicenseStatus release | ( | const char * | pwd | ) |
Releases the license acquired and verified by a prior call to checkLicense. The license is released back to the licensing cloud service and is then available for re-use on another machine. The license must be marked as Live for release to be used.
pwd | Your development password provided to you by Nuvovis. |