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 libsignon-glib
6 * Copyright (C) 2009-2010 Nokia Corporation.
7 * Copyright (C) 2012 Canonical Ltd.
9 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public License
13 * version 2.1 as published by the Free Software Foundation.
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
25 #ifndef _SIGNON_UTILS_H_
26 #define _SIGNON_UTILS_H_
28 #include <glib-object.h>
30 #define SIGNON_RETURN_IF_CANCELLED(error) \
31 if (error != NULL && \
32 error->domain == G_IO_ERROR && \
33 error->code == G_IO_ERROR_CANCELLED) \
35 g_error_free (error); \
40 GValue *signon_gvalue_new (GType type);
42 void signon_gvalue_free (gpointer val);
45 GHashTable *signon_hash_table_from_variant (GVariant *variant);
47 GVariant *signon_hash_table_to_variant (const GHashTable *hash_table);
49 #endif //_SIGNON_UTILS_H_