Configuring Connected (Cloud LM) Mode

Declare Variables/Constants

NOTE   In this use case, we have used sntl_licensing_configure API to configure Connected (Cloud LM) flow in the licensed application.

#define FEATURE_NAME "Addition"
#define CONTACT_SERVER "sntl-cloudlm"
#define HOST_ADDRESS "test_address"
#define REG_TOKEN "test_token"

sntl_licensing_attr_t *pAttrConfigure = NULL;
sntl_licensing_attr_t *pAttrAppContext = NULL;
sntl_licensing_app_context_t *pAppContext = NULL;
sntl_licensing_login_session_t *pLoginSession = NULL;

API Calls

To request a license from RMS Cloud LM, execute the APIs in the specified sequential order only:

sntl_licensing_attr_new(&pAttrConfigure);
sntl_licensing_attr_new(&pAttrAppContext);
sntl_licensing_attr_set(pAttrConfigure, SNTL_ATTR_CONFIG_SCP_USE_CONFIG_FILE, SNTL_ATTR_NO);
sntl_licensing_attr_set(pAttrConfigure, SNTL_ATTR_CONFIG_SCP_TENANT_HOST_ADDRESS, HOST_ADDRESS);
sntl_licensing_attr_set(pAttrConfigure, SNTL_ATTR_CONFIG_SCP_REGISTRATION_TOKEN,REG_TOKEN);
sntl_licensing_configure(pAttrConfigure);
sntl_licensing_attr_set(pAttrAppContext, SNTL_ATTR_APPCONTEXT_CONTACT_SERVER, CONTACT_SERVER);
sntl_licensing_app_context_new(0, pAttrAppContext, &pAppContext);
sntl_licensing_login(pAppContext, FEATURE_NAME, &pLoginSession);

Notes

Refer to the C sample of the Unified API (installed in the Sentinel RMS SDK) for a specific API function, its parameters, and usage.