sntl_licensing_attr_add_object
Library Information
>This API belongs to the Sentinel RMS licensing library.
>The corresponding header is licensing.h.
Description
Adds an attribute object containing the {key, value} pair in another attribute object. The attributes are set in key-value format.
Syntax
SNTL_DECLARE(sntl_status_t) sntl_licensing_attr_add_object (sntl_licensing_attr_t *attr,
const char *key,
sntl_licensing_attr_t *value);
Argument | Description |
---|---|
attr [in] |
Pointer to the attribute object (created using sntl_licensing_attr_new), where another attribute object is to be added. |
key [in] |
The key for the attribute object to be added. For example, SNTL_ATTR_CONFIG_SCP_PRODUCT_KEY_LIST is the key for adding the Product object. |
value [in] |
The value set for the corresponding key. For example, pAttrProductKey1 value can be specified for SNTL_ATTR_CONFIG_SCP_PRODUCT_KEY_LIST key. |
Attributes
# | Attribute for... | Key and Description | ||||
---|---|---|---|---|---|---|
1 | Customer List |
>Attribute Key - SNTL_ATTR_CONFIG_SCP_CUSTOMER_LIST >This attribute is used to add a customer object in the configure object. >This customer object contains the customer id, which is defined using sntl_licensing_attr_set API.
|
||||
2 | Product Key List |
>Attribute Key - SNTL_ATTR_CONFIG_SCP_PRODUCT_KEY_LIST >This attribute is used to add product object in the customer object. >This product object contains the Product key id and product variant attributes (listed below), which is defined using sntl_licensing_attr_set API.
NOTE After configuring this attribute, ensure to add it in the customer list attribute. |
Returns
The status code SNTL_SUCCESS is returned, if successful. Otherwise, it will return one of the following errors codes:
Error/Status Code | Description |
---|---|
SNTL_INVALID_ATTR_KEY | The attribute key is invalid. |
SNTL_INVALID_ATTR_VALUE | The attribute key value is invalid. |