1 /* json-gvariant.h - JSON GVariant integration
2  *
3  * This file is part of JSON-GLib
4  * Copyright (C) 2007  OpenedHand Ltd.
5  * Copyright (C) 2009  Intel Corp.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
19  *
20  * Author:
21  *   Eduardo Lima Mitev  <elima@igalia.com>
22  */
23 
24 #ifndef __JSON_GVARIANT_H__
25 #define __JSON_GVARIANT_H__
26 
27 #if !defined(__JSON_GLIB_INSIDE__) && !defined(JSON_COMPILATION)
28 #error "Only <json-glib/json-glib.h> can be included directly."
29 #endif
30 
31 #include <json-glib/json-types.h>
32 
33 G_BEGIN_DECLS
34 
35 JSON_AVAILABLE_IN_1_0
36 JsonNode * json_gvariant_serialize        (GVariant *variant);
37 JSON_AVAILABLE_IN_1_0
38 gchar *    json_gvariant_serialize_data   (GVariant *variant,
39                                            gsize    *length);
40 
41 JSON_AVAILABLE_IN_1_0
42 GVariant * json_gvariant_deserialize      (JsonNode     *json_node,
43                                            const gchar  *signature,
44                                            GError      **error);
45 JSON_AVAILABLE_IN_1_0
46 GVariant * json_gvariant_deserialize_data (const gchar  *json,
47                                            gssize        length,
48                                            const gchar  *signature,
49                                            GError      **error);
50 
51 G_END_DECLS
52 
53 #endif /* __JSON_GVARIANT_H__ */
54