sntl_licensing_attr_add_object Supported in Lease modeSupported in Connected (Cloud LM) mode

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 Supported in Lease mode Supported in Connected (Cloud LM) mode

>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.

Customer Id

>Attribute Key - SNTL_ATTR_CONFIG_SCP_CUSTOMERID

>This is a mandatory attribute that determines the specific customer whose product/line item is to be fetched from the entitlements.

2 Product Key List Supported in Lease modeSupported in Connected (Cloud LM) mode

>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.

Product Key id

>Attribute Key - SNTL_ATTR_CONFIG_SCP_PKID

>This is a mandatory attribute that determines the specific product/line item to be fetched from the entitlements.

NOTE   If you don't set this attribute, it would fetch all the products/line items available in an entitlement for the specified customer.

Product Variant

>Attribute Key - SNTL_ATTR_CONFIG_SCP_PRODUCT_VARIANT

>This attribute defines the product variant corresponding to a product/line item to be fetched from the entitlements.

NOTE   You can set this attribute only if product key id is defined.

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.