1 /* vi: set et sw=4 ts=4 cino=t0,(0: */
2 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
4 * This file is part of gsignond
6 * Copyright (C) 2012-2013 Intel Corporation.
8 * Contact: Alexander Kanavin <alex.kanavin@gmail.com>
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
26 #ifndef __GSIGNOND_DICTIONARY_H__
27 #define __GSIGNOND_DICTIONARY_H__
30 #include <glib-object.h>
34 #define GSIGNOND_TYPE_DICTIONARY (G_TYPE_HASH_TABLE)
36 #define GSIGNOND_DICTIONARY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
37 GSIGNOND_TYPE_DICTIONARY, \
39 #define GSIGNOND_IS_DICTIONARY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\
40 GSIGNOND_TYPE_DICTIONARY))
42 typedef GHashTable GSignondDictionary;
45 gsignond_dictionary_new (void);
48 gsignond_dictionary_ref (GSignondDictionary *dict);
51 gsignond_dictionary_unref (GSignondDictionary *dict);
54 gsignond_dictionary_copy (GSignondDictionary *other);
57 gsignond_dictionary_new_from_variant (GVariant *variant);
60 gsignond_dictionary_to_variant (GSignondDictionary *dict);
63 gsignond_dictionary_to_variant_builder (GSignondDictionary *dict);
66 gsignond_dictionary_get (GSignondDictionary *dict, const gchar *key);
69 gsignond_dictionary_set (GSignondDictionary *dict,
70 const gchar *key, GVariant *value);
73 gsignond_dictionary_get_boolean (GSignondDictionary *dict, const gchar *key,
77 gsignond_dictionary_set_boolean (GSignondDictionary *dict, const gchar *key,
81 gsignond_dictionary_get_int32 (GSignondDictionary *dict, const gchar *key,
85 gsignond_dictionary_set_int32 (GSignondDictionary *dict, const gchar *key,
89 gsignond_dictionary_get_uint32 (GSignondDictionary *dict, const gchar *key,
93 gsignond_dictionary_set_uint32 (GSignondDictionary *dict, const gchar *key,
97 gsignond_dictionary_get_int64 (GSignondDictionary *dict, const gchar *key,
101 gsignond_dictionary_set_int64 (GSignondDictionary *dict, const gchar *key,
105 gsignond_dictionary_get_uint64 (GSignondDictionary *dict, const gchar *key,
109 gsignond_dictionary_set_uint64 (GSignondDictionary *dict, const gchar *key,
113 gsignond_dictionary_get_string (GSignondDictionary *dict, const gchar *key);
116 gsignond_dictionary_set_string (GSignondDictionary *dict, const gchar *key,
120 gsignond_dictionary_remove (GSignondDictionary *dict, const gchar *key);
123 gsignond_dictionary_contains (GSignondDictionary *dict, const gchar *key);
127 #endif /* __GSIGNOND_DICTIONARY_H__ */