aheinecke@404: /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik aheinecke@404: * Software engineering by Intevation GmbH aheinecke@404: * aheinecke@404: * This file is Free Software under the GNU GPL (v>=2) aheinecke@404: * and comes with ABSOLUTELY NO WARRANTY! aheinecke@404: * See LICENSE.txt for details. aheinecke@404: */ 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