19 #ifndef LIBREPORT_TYPES_H_
20 #define LIBREPORT_TYPES_H_
24 typedef GHashTable map_string_t;
25 #define new_map_string libreport_new_map_string
26 map_string_t *new_map_string(
void);
27 #define free_map_string libreport_free_map_string
28 void free_map_string(map_string_t *ms);
29 #define insert_map_string_item libreport_insert_map_string_item
31 void insert_map_string(map_string_t *ms,
char *key,
char *value)
33 g_hash_table_insert(ms, key, value);
35 #define replace_map_string_item libreport_replace_map_string_item
37 void replace_map_string_item(map_string_t *ms,
char *key,
char *value)
39 g_hash_table_replace(ms, key, value);
41 #define remove_map_string_item libreport_remove_map_string_item
43 void remove_map_string_item(map_string_t *ms,
const char *key)
45 g_hash_table_remove(ms, key);
47 #define get_map_string_item_or_empty libreport_get_map_string_item_or_empty
48 const char *get_map_string_item_or_empty(map_string_t *ms,
const char *key);
49 #define get_map_string_item_or_NULL libreport_get_map_string_item_or_NULL
51 const char *get_map_string_item_or_NULL(map_string_t *ms,
const char *key)
53 return (
const char*)g_hash_table_lookup(ms, key);
56 typedef GHashTableIter map_string_iter_t;
57 #define init_map_string_iter libreport_init_map_string_iter
59 void init_map_string_iter(map_string_iter_t *iter, map_string_t *ms)
61 g_hash_table_iter_init(iter, ms);
63 #define next_map_string_iter libreport_next_map_string_iter
65 int next_map_string_iter(map_string_iter_t *iter,
const char **key,
const char **value)
67 return g_hash_table_iter_next(iter, (gpointer *)key, (gpointer *)value);