DBus-1-TQt 1.0
tqdbusvariant.h
Go to the documentation of this file.
1/* qdbusvariant.h DBUS variant struct
2 *
3 * Copyright (C) 2005 Harald Fernengel <harry@kdevelop.org>
4 *
5 * Licensed under the Academic Free License version 2.1
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program 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
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
20 * USA.
21 *
22 */
23
24#ifndef TQDBUSVARIANT_H
25#define TQDBUSVARIANT_H
26
27#include "tqdbusmacros.h"
28#include "tqdbusdata.h"
29
30#include <tqstring.h>
31
57{
58public:
63
70 {
71 signature = other.signature;
72 value = other.value;
73 }
74
83 inline bool operator==(const TQT_DBusVariant& other) const
84 {
85 if (&other == this) return true;
86
87 return signature == other.signature && value == other.value;
88 }
89
98 inline bool operator!=(const TQT_DBusVariant& other) const
99 {
100 if (&other == this) return false;
101
102 return signature != other.signature || value != other.value;
103 }
104
105public:
111 TQString signature;
112
117};
118
119#endif
120
Class for accurately representing D-Bus data types.
Definition: tqdbusdata.h:59
Data type for representing a D-Bus variant.
Definition: tqdbusvariant.h:57
TQT_DBusData value
The D-Bus data type to transport as a variant.
TQString signature
The D-Bus data signature of the data contained in value.
TQT_DBusVariant()
Creates an empty variant object.
Definition: tqdbusvariant.h:62
bool operator==(const TQT_DBusVariant &other) const
Checks if the given other variant is equal to this one.
Definition: tqdbusvariant.h:83
bool operator!=(const TQT_DBusVariant &other) const
Checks if the given other variant is not equal to this one.
Definition: tqdbusvariant.h:98
TQT_DBusVariant(const TQT_DBusVariant &other)
Copies the given other variant object.
Definition: tqdbusvariant.h:69
#define TQDBUS_EXPORT
Definition: tqdbusmacros.h:29