![]() |
Zentitle SDK and Library
|
Files | |
file | cnsa.py |
Nalpeiron V10 Nalpeiron library licensing (NSA) functions. | |
Functions | |
def | cnsa.NSADefineFunctions (libHandle) |
Define the Analytics library (NSA) functions from the C library. More... | |
def | cnsa.pyNSAAppStart (username, nsaClientData, transID) |
Records startup of your application. More... | |
def | cnsa.pyNSAAppStop (username, nsaClientData, transID) |
Records the shutdown of your application. More... | |
def | cnsa.pyNSAException (username, exceptionCode, description, nsaClientData, transID) |
Records an error of type exceptionCode by username with details in description. More... | |
def | cnsa.pyNSAFeatureStart (username, featureCode, nsaClientData, transID) |
Records the start of a feature specified by featureCode and used by username. More... | |
def | cnsa.pyNSAFeatureStop (username, featureCode, nsaClientData, transID) |
Records the end of use of a feature specified by featureCode and used by username. More... | |
def | cnsa.pyNSAGetComputerID () |
Gets the computer ID of the current system. More... | |
def | cnsa.pyNSAGetHostName () |
Gets the name of the SOAP server the library contacts for licensing information. More... | |
def | cnsa.pyNSACheckCache () |
Retrieves the current cache file size in bytes. More... | |
def | cnsa.pyNSAGetPrivacy () |
Checks the current privacy setting. More... | |
def | cnsa.pyNSAGetStats () |
Returns status information from the NSA library. More... | |
def | cnsa.pyNSAGetVersion () |
Gets the version of the NSA library being accessed. More... | |
def | cnsa.pyNSALogin (username, nsaClientData, transID) |
Records login of username. More... | |
def | cnsa.pyNSALogout (username, nsaClientData, transID) |
Records logout of username. More... | |
def | cnsa.pyNSASendCache (username, transID) |
If a cache file of analytics data exists on the end user's system send it to Nalpeiron. More... | |
def | cnsa.pyNSASetPrivacy (privacySetting) |
Sets the library's privacy setting to nsaPriv. More... | |
def | cnsa.pyNSASysInfo (username, applang, version, edition, build, licenseStatus, nsaClientData, transID) |
Sends information about the end user's system to Nalpeiron. More... | |
def | cnsa.pyNSATestConnection2 (nsaClientData, transID) |
Tests the network connection to Nalpeiron. More... | |
def | cnsa.pyNSAValidateLibrary (custID, prodID) |
Verifies that the shared library you are accessing is the library you stamped at Nalpeiron's website. More... | |
def cnsa.NSADefineFunctions | ( | libHandle | ) |
Define the Analytics library (NSA) functions from the C library.
libHandle | a library handle as returned by cytpes.cdll.LoadLibrary |
def cnsa.pyNSAAppStart | ( | username, | |
nsaClientData, | |||
transID | |||
) |
Records startup of your application.
username | a NULL terminated, UTF-8 encoded username that will be passed to the Nalpeiron server or daemon with your call. |
nsaClientData | a NULL terminated, UTF-8 encoded XML fragment containing whatever data you would like to pass to the Nalpeiron server or daemon with your call. |
transID | transID allows a series of transactions to be grouped together with a transaction ID. To retrieve a transaction ID from any function, set transID = 0 and call the function. Upon return, transID will be set with a random number that will be passed to the Nalpeiron server to identify the transaction. Send this value into any functions that are to be grouped together. This is particularly useful for function pairs such as NSALogin/NSALogout, NSAAppStart/NSAAppStop, NSAFeatureStart/NSAFeatureEnd, etc. If you do not wish to use the transaction ID a NULL pointer will disable it. |
def cnsa.pyNSAAppStop | ( | username, | |
nsaClientData, | |||
transID | |||
) |
Records the shutdown of your application.
username | a NULL terminated, UTF-8 encoded username that will be passed to the Nalpeiron server or daemon with your call. |
nsaClientData | a NULL terminated, UTF-8 encoded XML fragment containing whatever data you would like to pass to the Nalpeiron server or daemon with your call. |
transID | transID allows a series of transactions to be grouped together with a transaction ID. To retrieve a transaction ID from any function, set transID = 0 and call the function. Upon return, transID will be set with a random number that will be passed to the Nalpeiron server to identify the transaction. Send this value into any functions that are to be grouped together. This is particularly useful for function pairs such as NSALogin/NSALogout, NSAAppStart/NSAAppStop, NSAFeatureStart/NSAFeatureEnd, etc. If you do not wish to use the transaction ID a NULL pointer will disable it. |
def cnsa.pyNSACheckCache | ( | ) |
Retrieves the current cache file size in bytes.
def cnsa.pyNSAException | ( | username, | |
exceptionCode, | |||
description, | |||
nsaClientData, | |||
transID | |||
) |
Records an error of type exceptionCode by username with details in description.
username | a NULL terminated, UTF-8 encoded username that will be passed to the Nalpeiron server or daemon with your call. |
exceptionCode | a NULL terminated, UTF-8 encoded string that will be passed to the Nalpeiron server or daemon with your call. |
description | a NULL terminated, UTF-8 encoded string that will be passed to the Nalpeiron server or daemon with your call. |
nsaClientData | a NULL terminated, UTF-8 encoded XML fragment containing whatever data you would like to pass to the Nalpeiron server or daemon with your call. |
transID | transID allows a series of transactions to be grouped together with a transaction ID. To retrieve a transaction ID from any function, set transID = 0 and call the function. Upon return, transID will be set with a random number that will be passed to the Nalpeiron server to identify the transaction. Send this value into any functions that are to be grouped together. This is particularly useful for function pairs such as NSALogin/NSALogout, NSAAppStart/NSAAppStop, NSAFeatureStart/NSAFeatureEnd, etc. If you do not wish to use the transaction ID a NULL pointer will disable it. |
def cnsa.pyNSAFeatureStart | ( | username, | |
featureCode, | |||
nsaClientData, | |||
transID | |||
) |
Records the start of a feature specified by featureCode and used by username.
featureCode | a NULL terminated, UTF-8 encoded string containing the five (5) character feature code of the feature to be checked out. |
username | a NULL terminated, UTF-8 encoded username that will be passed to the Nalpeiron server or daemon with your call. |
nsaClientData | a NULL terminated, UTF-8 encoded XML fragment containing whatever data you would like to pass to the Nalpeiron server or daemon with your call. |
transID | transID allows a series of transactions to be grouped together with a transaction ID. To retrieve a transaction ID from any function, set transID = 0 and call the function. Upon return, transID will be set with a random number that will be passed to the Nalpeiron server to identify the transaction. Send this value into any functions that are to be grouped together. This is particularly useful for function pairs such as NSALogin/NSALogout, NSAAppStart/NSAAppStop, NSAFeatureStart/NSAFeatureEnd, etc. If you do not wish to use the transaction ID a NULL pointer will disable it. |
def cnsa.pyNSAFeatureStop | ( | username, | |
featureCode, | |||
nsaClientData, | |||
transID | |||
) |
Records the end of use of a feature specified by featureCode and used by username.
username | a NULL terminated, UTF-8 encoded username that will be passed to the Nalpeiron server or daemon with your call. |
featureCode | a NULL terminated, UTF-8 encoded string containing the five (5) character feature code of the feature to be checked out. |
nsaClientData | a NULL terminated, UTF-8 encoded XML fragment containing whatever data you would like to pass to the Nalpeiron server or daemon with your call. |
transID | transID allows a series of transactions to be grouped together with a transaction ID. To retrieve a transaction ID from any function, set transID = 0 and call the function. Upon return, transID will be set with a random number that will be passed to the Nalpeiron server to identify the transaction. Send this value into any functions that are to be grouped together. This is particularly useful for function pairs such as NSALogin/NSALogout, NSAAppStart/NSAAppStop, NSAFeatureStart/NSAFeatureEnd, etc. If you do not wish to use the transaction ID a NULL pointer will disable it. |
def cnsa.pyNSAGetComputerID | ( | ) |
Gets the computer ID of the current system.
def cnsa.pyNSAGetHostName | ( | ) |
Gets the name of the SOAP server the library contacts for licensing information.
def cnsa.pyNSAGetPrivacy | ( | ) |
Checks the current privacy setting.
If privacy is unset, the privacy setting used by the library will be the one stamped into it.
def cnsa.pyNSAGetStats | ( | ) |
Returns status information from the NSA library.
<?xml version="1.0" encoding="UTF-8"?> <NSA Current Statistics> <OfflineMode>0</OfflineMode> <LocationInfo>1</LocationInfo> <Cache Thread> <Max Cache Que Len>25</Max Cache Que Len> <Current Cache Que Len>0</Current Cache Que Len> <Cache writes>1</Cache writes> <Cache fails>0</Cache fails> </Cache Thread> <Soap Pool> <Min Soap Threads>10</Min Soap Threads> <Max Soap Threads>10</Max Soap Threads> <Queued Jobs>0</Queued Jobs> <Running Jobs>0</Running Jobs> <Finished Jobs>145</Finished Jobs> </Soap Pool> </NSA Current Statistics>
def cnsa.pyNSAGetVersion | ( | ) |
Gets the version of the NSA library being accessed.
def cnsa.pyNSALogin | ( | username, | |
nsaClientData, | |||
transID | |||
) |
Records login of username.
username | a NULL terminated, UTF-8 encoded username that will be passed to the Nalpeiron server or daemon with your call. |
nsaClientData | a NULL terminated, UTF-8 encoded XML fragment containing whatever data you would like to pass to the Nalpeiron server or daemon with your call. |
transID | transID allows a series of transactions to be grouped together with a transaction ID. To retrieve a transaction ID from any function, set transID = 0 and call the function. Upon return, transID will be set with a random number that will be passed to the Nalpeiron server to identify the transaction. Send this value into any functions that are to be grouped together. This is particularly useful for function pairs such as NSALogin/NSALogout, NSAAppStart/NSAAppStop, NSAFeatureStart/NSAFeatureEnd, etc. If you do not wish to use the transaction ID a NULL pointer will disable it. |
def cnsa.pyNSALogout | ( | username, | |
nsaClientData, | |||
transID | |||
) |
Records logout of username.
username | a NULL terminated, UTF-8 encoded username that will be passed to the Nalpeiron server or daemon with your call. |
nsaClientData | a NULL terminated, UTF-8 encoded XML fragment containing whatever data you would like to pass to the Nalpeiron server or daemon with your call. |
transID | transID allows a series of transactions to be grouped together with a transaction ID. To retrieve a transaction ID from any function, set transID = 0 and call the function. Upon return, transID will be set with a random number that will be passed to the Nalpeiron server to identify the transaction. Send this value into any functions that are to be grouped together. This is particularly useful for function pairs such as NSALogin/NSALogout, NSAAppStart/NSAAppStop, NSAFeatureStart/NSAFeatureEnd, etc. If you do not wish to use the transaction ID a NULL pointer will disable it. |
def cnsa.pyNSASendCache | ( | username, | |
transID | |||
) |
If a cache file of analytics data exists on the end user's system send it to Nalpeiron.
Cache files are created when a system is offline or has been placed in offline mode.
username | a NULL terminated, UTF-8 encoded username that will be passed to the Nalpeiron server or daemon with your call. |
transID | transID allows a series of transactions to be grouped together with a transaction ID. To retrieve a transaction ID from any function, set transID = 0 and call the function. Upon return, transID will be set with a random number that will be passed to the Nalpeiron server to identify the transaction. Send this value into any functions that are to be grouped together. This is particularly useful for function pairs such as NSALogin/NSALogout, NSAAppStart/NSAAppStop, NSAFeatureStart/NSAFeatureEnd, etc. If you do not wish to use the transaction ID a NULL pointer will disable it. |
def cnsa.pyNSASetPrivacy | ( | privacySetting | ) |
Sets the library's privacy setting to nsaPriv.
privacySetting | privacy value for the library. Possible values for setting are 0 "no privacy" or 1 "privacy enabled". |
def cnsa.pyNSASysInfo | ( | username, | |
applang, | |||
version, | |||
edition, | |||
build, | |||
licenseStatus, | |||
nsaClientData, | |||
transID | |||
) |
Sends information about the end user's system to Nalpeiron.
In addtion to the parameters the function will send the following information
date date and time username username as passed into NSASysInfo productid your product ID customerid your customer ID computerid the end user's computer ID NSA version version number of the NSA Library location countryid- Two character country code country country name region state, territory, region as appropriate city city zipcode zipcode as appropriate operatingsystem OS (Linux, Windows, OSX, etc) bitage 32 or 64 screenresx screen width screenresy screen heigth proc processor information cores number of processors or cores memory amount of memory in Meg. oslanguage default OS language applanguage passed in app language productstatus passed in License Status profile type of system(laptop or desktop)
username | a NULL terminated, UTF-8 encoded username that will be passed to the Nalpeiron server or daemon with your call. |
applang | a NULL terminated, UTF-8 encoded string that will be passed to the Nalpeiron server or daemon with your call. |
version | a NULL terminated, UTF-8 encoded string that will be passed to the Nalpeiron server or daemon with your call. |
edition | a NULL terminated, UTF-8 encoded string that will be passed to the Nalpeiron server or daemon with your call. |
build | a NULL terminated, UTF-8 encoded string that will be passed to the Nalpeiron server or daemon with your call. |
licenseStatus | a NULL terminated, UTF-8 encoded string that will be passed to the Nalpeiron server or daemon with your call. |
nsaClientData | a NULL terminated, UTF-8 encoded XML fragment containing whatever data you would like to pass to the Nalpeiron server or daemon with your call. |
transID | transID allows a series of transactions to be grouped together with a transaction ID. To retrieve a transaction ID from any function, set transID = 0 and call the function. Upon return, transID will be set with a random number that will be passed to the Nalpeiron server to identify the transaction. Send this value into any functions that are to be grouped together. This is particularly useful for function pairs such as NSALogin/NSALogout, NSAAppStart/NSAAppStop, NSAFeatureStart/NSAFeatureEnd, etc. If you do not wish to use the transaction ID a NULL pointer will disable it. |
def cnsa.pyNSATestConnection2 | ( | nsaClientData, | |
transID | |||
) |
Tests the network connection to Nalpeiron.
nsaClientData | a NULL terminated, UTF-8 encoded XML fragment containing whatever data you would like to pass to the Nalpeiron server or daemon with your call. |
transID | transID allows a series of transactions to be grouped together with a transaction ID. To retrieve a transaction ID from any function, set transID = 0 and call the function. Upon return, transID will be set with a random number that will be passed to the Nalpeiron server to identify the transaction. Send this value into any functions that are to be grouped together. This is particularly useful for function pairs such as NSALogin/NSALogout, NSAAppStart/NSAAppStop, NSAFeatureStart/NSAFeatureEnd, etc. If you do not wish to use the transaction ID a NULL pointer will disable it. |
def cnsa.pyNSAValidateLibrary | ( | custID, | |
prodID | |||
) |
Verifies that the shared library you are accessing is the library you stamped at Nalpeiron's website.
It does this by checking the customerID and productID sent in against the stamped values. Any negative return value, even if it is not a known error code, is cause to consider the library invalid.
custID | a unsigned 32 bit integer containing your Nalpeiron customer ID. NOTE the library uses ONLY the last 5 non-zero digits of your full customer ID. That is, if your customer ID is 12340005678 then the customer ID used in conjuction with the library would be 5678. |
prodID | a unsigned 32 bit integer containing your Nalpeiron product ID. NOTE the library uses ONLY the last 5 non-zero digits of your full product ID. That is, if your customer ID is 12340005678 then the product ID used in conjuction with the library would be 5678. |