wilde@242: #ifndef NSS_SECITEMLIST_H wilde@242: #define NSS_SECITEMLIST_H wilde@242: wilde@242: /** wilde@242: * @file wilde@242: * @brief Functions to handle lists of NSS SECItem-s. wilde@242: */ wilde@242: wilde@242: #include wilde@242: #include "strhelp.h" wilde@242: wilde@242: struct seciteml { wilde@242: SECItem *item; wilde@242: struct seciteml *next; wilde@242: }; wilde@242: wilde@242: /** wilde@242: * @brief Type for SECItem lists wilde@242: */ wilde@242: typedef struct seciteml seciteml_t; wilde@242: wilde@242: /** wilde@242: * @brief Prepend a new SECItem to list wilde@242: * wilde@242: * The data will be copied. wilde@242: * @param[inout] list pointer to the list to which the item will be added. wilde@242: * @param[in] item the SECItem to add to the list. wilde@242: */ wilde@242: void seciteml_push (seciteml_t **list, SECItem *item); wilde@242: wilde@242: /** wilde@242: * @brief Remove and return first SECItem from list wilde@242: * wilde@242: * @param[inout] list pointer to the list to which the item will be added. wilde@242: * @retruns the removed item, or NULL if list is empty. wilde@242: * The caller shoud free this item after use. wilde@242: */ wilde@242: SECItem *seciteml_pop (seciteml_t **list); wilde@242: wilde@242: #endif