1
/* * This file is part of Maliit framework *
3
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
6
* Contact: maliit-discuss@lists.maliit.org
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License version 2.1 as published by the Free Software Foundation
11
* and appearing in the file LICENSE.LGPL included in the packaging
15
#ifndef VARIANTMARSHALLING_H
16
#define VARIANTMARSHALLING_H
19
#include <dbus/dbus-glib-lowlevel.h>
20
#include <dbus/dbus-glib.h>
26
* \brief Convert data from GValue into QVariant.
27
* \param[out] dest Variable to get result to.
28
* \param[in] source Original value.
29
* \param[out] error_message Contains error description if original value could not be decoded.
31
bool decodeVariant(QVariant *dest, GValue *source, QString *error_message);
35
* \brief Convert data from GHashTable into QVariantMap.
36
* \param[out] dest Variable to get result to.
37
* \param[in] source Original value.
38
* \param[out] error_message Contains error description if original value could not be decoded.
40
bool decodeVariantMap(QVariantMap *dest, GHashTable *source, QString *error_message);
44
* \brief Convert data from QVariant into GValue.
45
* \param[out] dest Variable to get result to.
46
* \param[in] source Original value.
48
bool encodeVariant(GValue *dest, const QVariant &source);
52
* \brief Convert data from QVariantMap into GHashTable.
53
* \param[in] source Original value.
54
* \return a newly-allocated hash table, or 0 on failure
56
GHashTable *encodeVariantMap(const QVariantMap &source);