1/***************************************************
2 * Header name: dict.h
3 *
4 * Copyright 200X Gigle Semiconductor as an unpublished work.
5 * All Rights Reserved.
6 *
7 *  The information contained herein is confidential
8 * property of Company. The user, copying, transfer or
9 * disclosure of such information is prohibited except
10 * by express written agreement with Company.
11 *
12 * First written on 03/08/2010 by Toni Homedes i Saun.
13 *
14 ***************************************************/
15/** \file dict.h
16 *
17 * \ingroup dict
18 *
19 * \brief Header file for dict.c
20 *
21 * $Id: dict.h 245438 2011-03-10 01:54:50Z rnuti $
22 **************************************************/
23
24#ifndef _DICT_H_
25#define _DICT_H_
26
27/* FILE-CSTYLED */
28
29/***************************************************
30 *                 Public Defines Section
31 ***************************************************/
32
33/***************************************************
34 *                 Public Constants Section
35 ***************************************************/
36
37/***************************************************
38 *                 Public Typedefs Section
39 ***************************************************/
40
41/***************************************************
42 *                 Public Function Prototypes Section
43 ***************************************************/
44typedef const struct dict_hdl_s { int foo; } *dict_hdl_t;
45typedef const struct dict_iterator_s { int foo; } *dict_iterator_t;
46
47dict_hdl_t DictNew(void);
48void DictFree(dict_hdl_t dict);
49void DictSet(dict_hdl_t dict, const char * const key, const char * const value);
50const char *DictGet(dict_hdl_t dict, const char * const key);
51void DictDelete(dict_hdl_t dict, const char * const key);
52int DictIsEmpty(dict_hdl_t dict);
53void DictDoEmpty(dict_hdl_t dict);
54void DictMap(dict_hdl_t dict, void (*fn)(const char *key, const char *value));
55
56dict_iterator_t DictIteratorNew(dict_hdl_t dict);
57void DictIteratorFree(dict_iterator_t iterator);
58const char *DictIteratorKey(dict_iterator_t iterator);
59int DictIteratorAdvance(dict_iterator_t iterator);
60
61#else
62#error "Header file __FILE__ has already been included!"
63#endif
64