Implementing Cancel Lease, Resume Lease, and Force Sync
Cancel Lease
Declare Variables/Constants
#define CONTACT_SERVER "no-net"
sntl_licensing_attr_t *pAttrAppContext = NULL;
sntl_licensing_app_context_t *pAppContext = NULL;
char * transferActionCancelLease = "<cancelLease />";
API Calls
To cancel lease, execute the APIs in the specified sequential order only:
sntl_licensing_attr_new(&pAttrAppContext);
sntl_licensing_attr_set(pAttrAppContext, SNTL_ATTR_APPCONTEXT_CONTACT_SERVER, CONTACT_SERVER);
sntl_licensing_app_context_new(0, pAttrAppContext, &pAppContext);
sntl_licensing_transfer(pAppContext,transferActionCancelLease, NULL, NULL, NULL, NULL);
Resume Lease
Declare Variables/Constants
#define CONTACT_SERVER "no-net"
sntl_licensing_attr_t *pAttrAppContext = NULL;
sntl_licensing_app_context_t *pAppContext = NULL;
char * transferActionResumeLease = "<resumeLease />";
API Calls
To resume lease, execute the APIs in the specified sequential order only:
sntl_licensing_attr_new(&pAttrAppContext);
sntl_licensing_attr_set(pAttrAppContext, SNTL_ATTR_APPCONTEXT_CONTACT_SERVER, CONTACT_SERVER);
sntl_licensing_app_context_new(0, pAttrAppContext, &pAppContext);
sntl_licensing_transfer(pAppContext, transferActionResumeLease, NULL, NULL, NULL, NULL);
Force Sync Lease
Declare Variables/Constants
#define CONTACT_SERVER "no-net"
sntl_licensing_attr_t *pAttrAppContext = NULL;
sntl_licensing_app_context_t *pAppContext = NULL;
char *pcTransferActionSync = "<sync />";
API Calls
To enforce sync, execute the APIs in the specified sequential order only:
sntl_licensing_attr_new(&pAttrAppContext);
sntl_licensing_attr_set(pAttrAppContext, SNTL_ATTR_APPCONTEXT_CONTACT_SERVER, CONTACT_SERVER);
sntl_licensing_app_context_new(0, pAttrAppContext, &pAppContext);
sntl_licensing_transfer(pAppContext, pcTransferActionSync, NULL, NULL, NULL, NULL);