view cinst/nss-secitemlist.h @ 1306:845048d4a69f

(issue159) Use user specific appdata directory for nss list with simple rights. Using the ProgramData folder with resticted access rights failed in case the process was not elevated.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 13 Oct 2014 12:31:37 +0200
parents 82fab0c689bf
children
line wrap: on
line source
/* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
 * Software engineering by Intevation GmbH
 *
 * This file is Free Software under the GNU GPL (v>=2)
 * and comes with ABSOLUTELY NO WARRANTY!
 * See LICENSE.txt for details.
 */
#ifndef NSS_SECITEMLIST_H
#define NSS_SECITEMLIST_H

/**
 * @file
 * @brief Functions to handle lists of NSS SECItem-s.
 */

#include <seccomon.h>
#include "strhelp.h"

/**
 * @struct seciteml
 * @brief simple linked list sturcture. */
struct seciteml {
  /*@{*/
  SECItem *item;/**< Pointer to the held item*/
  struct seciteml *next;/**< Pointer to the next part of the list*/
  /*@}*/
};

/**
 * @brief Type for SECItem lists
 */
typedef struct seciteml seciteml_t;

/**
 * @brief Prepend a new SECItem to list
 *
 * The data will be copied.
 * @param[in,out] list pointer to the list to which the item will be added.
 * @param[in] item the SECItem to add to the list.
 */
void seciteml_push (seciteml_t **list, SECItem *item);

/**
 * @brief Remove and return first SECItem from list
 *
 * @param[in,out] list pointer to the list to which the item will be added.
 * @returns the removed item, or NULL if list is empty.
 * The caller shoud free this item after use.
 */
SECItem *seciteml_pop (seciteml_t **list);

/**
 * @brief Free a secitem list
 *
 * Frees a secitem list
 *
 * @param[in,out] list pointer to the list which should be freed. set to NULL
 */
void seciteml_free (seciteml_t **list);


#endif

http://wald.intevation.org/projects/trustbridge/