Add manifest and fix packaging
[profile/ivi/libgsignon-glib.git] / libgsignon-glib / signon-utils.h
1 /* vi: set et sw=4 ts=4 cino=t0,(0: */
2 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 /*
4  * This file is part of libgsignon-glib
5  *
6  * Copyright (C) 2009-2010 Nokia Corporation.
7  * Copyright (C) 2012 Canonical Ltd.
8  * Copyright (C) 2014 Intel Corporation.
9  *
10  * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public License
14  * version 2.1 as published by the Free Software Foundation.
15  *
16  * This library is distributed in the hope that it will be useful, but
17  * WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with this library; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24  * 02110-1301 USA
25  */
26 #ifndef _SIGNON_UTILS_H_
27 #define _SIGNON_UTILS_H_
28
29 #include <glib-object.h>
30
31 #define SIGNON_IS_NOT_CANCELLED(error) \
32         (error == NULL || \
33         error->domain != G_IO_ERROR || \
34         error->code != G_IO_ERROR_CANCELLED)
35
36 G_GNUC_INTERNAL
37 GValue *signon_gvalue_new (GType type);
38 G_GNUC_INTERNAL
39 void signon_gvalue_free (gpointer val);
40
41 G_GNUC_INTERNAL
42 GHashTable *signon_hash_table_from_variant (GVariant *variant);
43 G_GNUC_INTERNAL
44 GVariant *signon_hash_table_to_variant (GHashTable *hash_table);
45
46 #endif //_SIGNON_UTILS_H_