Configuring SCP Using Unified API

Declare Variables/Constants

Declare Variables / Constants
#define PKID1 ""
#define PKID1_VARIANT ""
#define PKID2 ""
#define PKID2_VARIANT ""
#define YPS_ADDRESS  ""
#define FRIENDLY_NAME  "" 
#define CUSTOMER_ID ""

sntl_licensing_attr_t *pAttrProductKey1 = NULL;
sntl_licensing_attr_t *pAttrProductKey2 = NULL;
sntl_licensing_attr_t *pAttrCustomer = NULL;
sntl_licensing_attr_t *pAttrConfigure = NULL;

API Calls

To configure SCP using Unified API, execute the APIs in the specified sequential order only:

# API Call Sequence APIs
1 Create multiple objects
2 Enable Unified API to configure SCP
sntl_licensing_attr_set(pAttrConfigure, SNTL_ATTR_CONFIG_SCP_USE_CONFIG_FILE, SNTL_ATTR_NO);

NOTE   SNTL_ATTR_CONFIG_SCP_USE_CONFIG_FILE is the key attribute that determines the SCP configuration setting. By default, this attribute is set to YES; specifying to configure SCP using the configuration file. If you wish to use the RMS API instead of the configuration file, modify the attribute value to NO.

3 Set YPS Address in configure object
sntl_licensing_attr_set(pAttrConfigure, SNTL_ATTR_CONFIG_SCP_YPS_ADDRESS, YPS_ADDRESS);
4 Set Fingerprint friendly name in configure object
5 Set customer ID in customer object
sntl_licensing_attr_set(pAttrCustomer, SNTL_ATTR_CONFIG_SCP_CUSTOMERID, CUSTOMER_ID );
6 Set attributes for Product object 1
sntl_licensing_attr_set(pAttrProductKey1, SNTL_ATTR_CONFIG_SCP_PKID, PKID1);
sntl_licensing_attr_set(pAttrProductKey1, SNTL_ATTR_CONFIG_SCP_PRODUCT_VARIANT, PKID1_VARIANT);
7 Set attributes for Product object 2
sntl_licensing_attr_set(pAttrProductKey2, SNTL_ATTR_CONFIG_SCP_PKID, PKID2);                        
sntl_licensing_attr_set(pAttrProductKey2, SNTL_ATTR_CONFIG_SCP_PRODUCT_VARIANT, PKID2_VARIANT);
8 Add the products object to the customer object
sntl_licensing_attr_add_object(pAttrCustomer, SNTL_ATTR_CONFIG_SCP_PRODUCT_KEY_LIST,  pAttrProductKey1);                     
sntl_licensing_attr_add_object(pAttrCustomer, SNTL_ATTR_CONFIG_SCP_PRODUCT_KEY_LIST,  pAttrProductKey2);
9 Add the customer object to the configure object
sntl_licensing_attr_add_object(pAttrConfigure, SNTL_ATTR_CONFIG_SCP_CUSTOMER_LIST,  pAttrCustomer);
10 Pass this configure object to configure API

NOTE   The ApplicationContext creation and other licensing API should be implemented after the configure API. Also, it is mandatory to set customer, YPS address, and Fingerprint Friendly name fields to successfully configure SCP using Unified API.