Interface Callback API

The callback functions are called by RMS through the function pointers registered by the developer using the VLScpdIfImpl Struct structure. Developers need to provide the implementation for callback functions before using the custom persistence device feature.

The implementation of the callback API must return a valid CPD error (defined in lscpdif.h). A relevant error enables RMS to understand the error scenario in the developer's implementation. Additionally, developers have the option to send the error/diagnostics information (as a string) to RMS. For more information, see Using the Diagnostic Information.

Given below is the list of API included under this category:

Function

Description

VLScpdInitializeDevice

This developer provides the implementation for initializing the custom persistence device using this API.

VLScpdExitDevice

This callback API is defined by the developer to perform cleanup tasks while disconnecting or closing the custom persistence device.

VLScpdCreateObject

This callback API is defined by the developer for creating and initializing the custom device-specific objects. This callback is called from the initialization library or License Manager that supports CPD mode.

VLScpdWriteRecord

This callback API is defined by the developer for writing the persistence data in key value pairs. The data is stored using the unique combination of key and persistence type.

VLScpdReadRecord

This callback API defines the developer's implementation for reading existing data on the basis of unique combination of key and persistence type.

VLScpdDeleteRecord

This callback API defines the developer's implementation for removing the key and data pair stored in the device.

VLScpdReadNextRecord

This callback API defines the developer's implementation for reading all records of a particular persistence type from a CPD object.