|
list
Synopsis
typedef xmlSecPtr;
struct xmlSecPtrList;
void xmlSecPtrListSetDefaultAllocMode
(xmlSecAllocMode defAllocMode,
size_t defInitialSize);
int xmlSecPtrListInitialize (xmlSecPtrListPtr list,
xmlSecPtrListId id);
void xmlSecPtrListFinalize (xmlSecPtrListPtr list);
xmlSecPtrListPtr xmlSecPtrListCreate (xmlSecPtrListId id);
void xmlSecPtrListDestroy (xmlSecPtrListPtr list);
void xmlSecPtrListEmpty (xmlSecPtrListPtr list);
int xmlSecPtrListCopy (xmlSecPtrListPtr dst,
xmlSecPtrListPtr src);
xmlSecPtrListPtr xmlSecPtrListDuplicate (xmlSecPtrListPtr list);
size_t xmlSecPtrListGetSize (xmlSecPtrListPtr list);
xmlSecPtr xmlSecPtrListGetItem (xmlSecPtrListPtr list,
size_t pos);
int xmlSecPtrListAdd (xmlSecPtrListPtr list,
xmlSecPtr item);
int xmlSecPtrListSet (xmlSecPtrListPtr list,
xmlSecPtr item,
size_t pos);
int xmlSecPtrListRemove (xmlSecPtrListPtr list,
size_t pos);
void xmlSecPtrListDebugDump (xmlSecPtrListPtr list,
FILE *output);
void xmlSecPtrListDebugXmlDump (xmlSecPtrListPtr list,
FILE *output);
#define xmlSecPtrListGetName (list)
#define xmlSecPtrListIsValid (list)
#define xmlSecPtrListCheckId (list, dataId)
#define xmlSecPtrListIdUnknown
xmlSecPtr (*xmlSecPtrDuplicateItemMethod) (xmlSecPtr ptr);
void (*xmlSecPtrDestroyItemMethod) (xmlSecPtr ptr);
void (*xmlSecPtrDebugDumpItemMethod) (xmlSecPtr ptr,
FILE *output);
struct xmlSecPtrListKlass;
#define xmlSecPtrListKlassGetName (klass)
#define xmlSecStringListId
xmlSecPtrListId xmlSecStringListGetKlass (void); |
Details
struct xmlSecPtrList
struct xmlSecPtrList {
xmlSecPtrListId id;
xmlSecPtr* data;
size_t use;
size_t max;
xmlSecAllocMode allocMode;
}; |
The pointers list.
xmlSecPtrListSetDefaultAllocMode ()
void xmlSecPtrListSetDefaultAllocMode
(xmlSecAllocMode defAllocMode,
size_t defInitialSize); |
Sets new default allocation mode and minimal initial list size.
xmlSecPtrListInitialize ()
Initializes the list of given klass. Caller is responsible
for cleaning up by calling xmlSecPtrListFinalize function.
list : |
the pointer to list. |
id : |
the list klass. |
Returns : |
0 on success or a negative value if an error occurs. |
xmlSecPtrListCreate ()
Creates new list object. Caller is responsible for freeing returned list
by calling xmlSecPtrListDestroy function.
id : |
the list klass. |
Returns : |
pointer to newly allocated list or NULL if an error occurs. |
xmlSecPtrListEmpty ()
Remove all items from list (if any).
xmlSecPtrListCopy ()
Copies src list items to dst list using duplicateItem method
of the list klass. If duplicateItem method is NULL then
we jsut copy pointers to items.
dst : |
the pointer to destination list. |
src : |
the pointer to source list. |
Returns : |
0 on success or a negative value if an error occurs. |
xmlSecPtrListDuplicate ()
Creates a new copy of list and all its items.
list : |
the pointer to list. |
Returns : |
pointer to newly allocated list or NULL if an error occurs. |
xmlSecPtrListGetSize ()
Gets list size.
xmlSecPtrListGetItem ()
Gets item from the list.
list : |
the pointer to list. |
pos : |
the item position. |
Returns : |
the list item at position pos or NULL if pos is greater
than the number of items in the list or an error occurs. |
xmlSecPtrListAdd ()
Adds item to the end of the list.
list : |
the pointer to list. |
item : |
the item. |
Returns : |
0 on success or a negative value if an error occurs. |
xmlSecPtrListSet ()
Sets the value of list item at position pos. The old value
is destroyed.
xmlSecPtrListRemove ()
Destroys list item at the position pos and sets it value to NULL.
list : |
the pointer to list. |
pos : |
the position. |
Returns : |
0 on success or a negative value if an error occurs. |
xmlSecPtrListDebugDump ()
Prints debug information about list to the output.
xmlSecPtrListDebugXmlDump ()
Prints debug information about list to the output in XML format.
xmlSecPtrListGetName()
#define xmlSecPtrListGetName(list) |
Macro. Returns lists's name.
xmlSecPtrListIsValid()
#define xmlSecPtrListIsValid(list) |
Macro. Returns 1 if list is not NULL and list->id is not NULL
or 0 otherwise.
xmlSecPtrListCheckId()
#define xmlSecPtrListCheckId(list, dataId) |
Macro. Returns 1 if list is valid and list's id is equal to dataId.
xmlSecPtrListIdUnknown
#define xmlSecPtrListIdUnknown NULL |
The "unknown" id.
xmlSecPtrDuplicateItemMethod ()
xmlSecPtr (*xmlSecPtrDuplicateItemMethod) (xmlSecPtr ptr); |
Duplicates item ptr.
ptr : |
the poinetr to list item. |
Returns : |
pointer to new item copy or NULL if an error occurs. |
xmlSecPtrDestroyItemMethod ()
void (*xmlSecPtrDestroyItemMethod) (xmlSecPtr ptr); |
Destroys list item ptr.
ptr : |
the poinetr to list item. |
xmlSecPtrDebugDumpItemMethod ()
void (*xmlSecPtrDebugDumpItemMethod) (xmlSecPtr ptr,
FILE *output); |
Prints debug information about item to output.
struct xmlSecPtrListKlass
struct xmlSecPtrListKlass {
const xmlChar* name;
xmlSecPtrDuplicateItemMethod duplicateItem;
xmlSecPtrDestroyItemMethod destroyItem;
xmlSecPtrDebugDumpItemMethod debugDumpItem;
xmlSecPtrDebugDumpItemMethod debugXmlDumpItem;
}; |
List klass.
xmlSecPtrListKlassGetName()
#define xmlSecPtrListKlassGetName(klass) |
Macro. Returns the list klass name.
xmlSecStringListId
#define xmlSecStringListId |
Strings list klass.
xmlSecStringListGetKlass ()
xmlSecPtrListId xmlSecStringListGetKlass (void); |
The strins list class.
|
Aleksey Sanin
|
|