RSA Security logo

RSA BSAFE Cert-C
API Reference

LIST_OBJ_ENTRY_HANDLER Reference

Stores application-defined data.

An application can use the LIST_OBJ_ENTRY_HANDLER structure to store any kind of application-defined data in a LIST_OBJ, even though Cert-C does not know the type of data structure the application requires. The application must set up the AllocAndCopy and Destructor callback functions to handle the type of data structure that it is using. These callback functions must recognize the type of data structure in value without being informed by the Cert-C function that passes the value to the callback. An application can use the AllocAndCopy feature to insert application-defined values into a list object.

Data Fields
AllocAndCopy Allocates and copies the information given in value, then sets the pointer to the duplication in newValue. A successful operation returns zero 0; a failed operation returns the E_ALLOC error. If data is not valid, then no memory is allocated and the E_DATA error should be returned. This function is used by C_AddListObjectEntry() and C_InsertListObjectEntry() to add list object values into an existing list.

    newValue This is an output field containing the new copy of value that is returned by the AllocAndCopy function.
    value This is an input field containing list-object entry information that is used by the AllocAndCopy function.
Destructor Deallocates the value that was allocated by the AllocAndCopy callback, freeing all memory associated with it. If value is (POINTER)NULL_PTR, then Destructor performs no operation. Destructor is used with the C_DestroyListObject() and C_DeleteListObjectEntry() functions when a list-object value is deleted from an extension.

#include <certlist.h>

00079 typedef struct LIST_OBJ_ENTRY_HANDLER {
00080   int (*AllocAndCopy) (
00081     POINTER *newValue,          /* (out) new copy of value */
00082     POINTER  value);            /* value to be copied */
00083   VALUE_DESTRUCTOR Destructor;
00084 } LIST_OBJ_ENTRY_HANDLER;

The documentation for this struct was generated from the following file:


RSA BSAFE® Cert-C 2.7 API Reference