author | Eckhart Koeppen <eckhart.koppen@nokia.com> |
Thu, 08 Apr 2010 14:19:33 +0300 | |
branch | RCL_3 |
changeset 7 | 3f74d0d4af4c |
parent 4 | 3b1da2848fc7 |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************************** |
2 |
** |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3 |
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 4 |
** All rights reserved. |
5 |
** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 |
** |
|
7 |
** This file is part of the QtDBus module of the Qt Toolkit. |
|
8 |
** |
|
9 |
** $QT_BEGIN_LICENSE:LGPL$ |
|
10 |
** No Commercial Usage |
|
11 |
** This file contains pre-release code and may not be distributed. |
|
12 |
** You may use this file in accordance with the terms and conditions |
|
13 |
** contained in the Technology Preview License Agreement accompanying |
|
14 |
** this package. |
|
15 |
** |
|
16 |
** GNU Lesser General Public License Usage |
|
17 |
** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 |
** General Public License version 2.1 as published by the Free Software |
|
19 |
** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 |
** packaging of this file. Please review the following information to |
|
21 |
** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 |
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 |
** |
|
24 |
** In addition, as a special exception, Nokia gives you certain additional |
|
25 |
** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 |
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 |
** |
|
28 |
** If you have questions regarding the use of this file, please contact |
|
29 |
** Nokia at qt-info@nokia.com. |
|
30 |
** |
|
31 |
** |
|
32 |
** |
|
33 |
** |
|
34 |
** |
|
35 |
** |
|
36 |
** |
|
37 |
** |
|
38 |
** $QT_END_LICENSE$ |
|
39 |
** |
|
40 |
****************************************************************************/ |
|
41 |
||
42 |
#include "qdbusextratypes.h" |
|
43 |
#include "qdbusutil_p.h" |
|
44 |
||
45 |
QT_BEGIN_NAMESPACE |
|
46 |
||
47 |
void QDBusObjectPath::check() |
|
48 |
{ |
|
49 |
if (!QDBusUtil::isValidObjectPath(*this)) { |
|
50 |
qWarning("QDBusObjectPath: invalid path \"%s\"", qPrintable(*this)); |
|
51 |
clear(); |
|
52 |
} |
|
53 |
} |
|
54 |
||
55 |
void QDBusSignature::check() |
|
56 |
{ |
|
57 |
if (!QDBusUtil::isValidSignature(*this)) { |
|
58 |
qWarning("QDBusSignature: invalid signature \"%s\"", qPrintable(*this)); |
|
59 |
clear(); |
|
60 |
} |
|
61 |
} |
|
62 |
||
63 |
/*! |
|
64 |
\class QDBusVariant |
|
65 |
\inmodule QtDBus |
|
66 |
\since 4.2 |
|
67 |
||
68 |
\brief The QDBusVariant class enables the programmer to identify |
|
69 |
the variant type provided by the D-Bus typesystem. |
|
70 |
||
71 |
A D-Bus function that takes an integer, a D-Bus variant and a string as parameters |
|
72 |
can be called with the following argument list (see QDBusMessage::setArguments()): |
|
73 |
||
74 |
\snippet doc/src/snippets/qdbusextratypes/qdbusextratypes.cpp 0 |
|
75 |
||
76 |
When a D-Bus function returns a D-Bus variant, it can be retrieved as follows: |
|
77 |
||
78 |
\snippet doc/src/snippets/qdbusextratypes/qdbusextratypes.cpp 1 |
|
79 |
||
80 |
The QVariant within a QDBusVariant is required to distinguish between a normal |
|
81 |
D-Bus value and a value within a D-Bus variant. |
|
82 |
||
83 |
\sa {The QtDBus type system} |
|
84 |
*/ |
|
85 |
||
86 |
/*! |
|
87 |
\fn QDBusVariant::QDBusVariant() |
|
88 |
||
89 |
Constructs a new D-Bus variant. |
|
90 |
*/ |
|
91 |
||
92 |
/*! |
|
93 |
\fn QDBusVariant::QDBusVariant(const QVariant &variant) |
|
94 |
||
95 |
Constructs a new D-Bus variant from the given Qt \a variant. |
|
96 |
||
97 |
\sa setVariant() |
|
98 |
*/ |
|
99 |
||
100 |
/*! |
|
101 |
\fn QVariant QDBusVariant::variant() const |
|
102 |
||
103 |
Returns this D-Bus variant as a QVariant object. |
|
104 |
||
105 |
\sa setVariant() |
|
106 |
*/ |
|
107 |
||
108 |
/*! |
|
109 |
\fn void QDBusVariant::setVariant(const QVariant &variant) |
|
110 |
||
111 |
Assigns the value of the given Qt \a variant to this D-Bus variant. |
|
112 |
||
113 |
\sa variant() |
|
114 |
*/ |
|
115 |
||
116 |
/*! |
|
117 |
\class QDBusObjectPath |
|
118 |
\inmodule QtDBus |
|
119 |
\since 4.2 |
|
120 |
||
121 |
\brief The QDBusObjectPath class enables the programmer to |
|
122 |
identify the OBJECT_PATH type provided by the D-Bus typesystem. |
|
123 |
||
124 |
\sa {The QtDBus type system} |
|
125 |
*/ |
|
126 |
||
127 |
/*! |
|
128 |
\fn QDBusObjectPath::QDBusObjectPath() |
|
129 |
||
130 |
Constructs a new object path. |
|
131 |
*/ |
|
132 |
||
133 |
/*! |
|
134 |
\fn QDBusObjectPath::QDBusObjectPath(const char *path) |
|
135 |
||
136 |
Constructs a new object path from the given \a path. |
|
137 |
||
138 |
\sa setPath() |
|
139 |
*/ |
|
140 |
||
141 |
/*! |
|
142 |
\fn QDBusObjectPath::QDBusObjectPath(const QLatin1String &path) |
|
143 |
||
144 |
Constructs a new object path from the given \a path. |
|
145 |
*/ |
|
146 |
||
147 |
/*! |
|
148 |
\fn QDBusObjectPath::QDBusObjectPath(const QString &path) |
|
149 |
||
150 |
Constructs a new object path from the given \a path. |
|
151 |
*/ |
|
152 |
||
153 |
/*! |
|
154 |
\fn QString QDBusObjectPath::path() const |
|
155 |
||
156 |
Returns this object path. |
|
157 |
||
158 |
\sa setPath() |
|
159 |
*/ |
|
160 |
||
161 |
/*! |
|
162 |
\fn void QDBusObjectPath::setPath(const QString &path) |
|
163 |
||
164 |
Assigns the value of the given \a path to this object path. |
|
165 |
||
166 |
\sa path() |
|
167 |
*/ |
|
168 |
||
169 |
/*! |
|
170 |
\fn QDBusObjectPath &QDBusObjectPath::operator=(const QDBusObjectPath &path) |
|
171 |
||
172 |
Assigns the value of the given \a path to this object path. |
|
173 |
||
174 |
\sa setPath() |
|
175 |
*/ |
|
176 |
||
177 |
||
178 |
/*! |
|
179 |
\class QDBusSignature |
|
180 |
\inmodule QtDBus |
|
181 |
\since 4.2 |
|
182 |
||
183 |
\brief The QDBusSignature class enables the programmer to |
|
184 |
identify the SIGNATURE type provided by the D-Bus typesystem. |
|
185 |
||
186 |
\sa {The QtDBus type system} |
|
187 |
*/ |
|
188 |
||
189 |
/*! |
|
190 |
\fn QDBusSignature::QDBusSignature() |
|
191 |
||
192 |
Constructs a new signature. |
|
193 |
||
194 |
\sa setSignature() |
|
195 |
*/ |
|
196 |
||
197 |
/*! |
|
198 |
\fn QDBusSignature::QDBusSignature(const char *signature) |
|
199 |
||
200 |
Constructs a new signature from the given \a signature. |
|
201 |
*/ |
|
202 |
||
203 |
/*! |
|
204 |
\fn QDBusSignature::QDBusSignature(const QLatin1String &signature) |
|
205 |
||
206 |
Constructs a new signature from the given \a signature. |
|
207 |
*/ |
|
208 |
||
209 |
/*! |
|
210 |
\fn QDBusSignature::QDBusSignature(const QString &signature) |
|
211 |
||
212 |
Constructs a new signature from the given \a signature. |
|
213 |
*/ |
|
214 |
||
215 |
/*! |
|
216 |
\fn QString QDBusSignature::signature() const |
|
217 |
||
218 |
Returns this signature. |
|
219 |
||
220 |
\sa setSignature() |
|
221 |
*/ |
|
222 |
||
223 |
/*! |
|
224 |
\fn void QDBusSignature::setSignature(const QString &signature) |
|
225 |
||
226 |
Assigns the value of the given \a signature to this signature. |
|
227 |
\sa signature() |
|
228 |
*/ |
|
229 |
||
230 |
/*! |
|
231 |
\fn QDBusSignature &QDBusSignature::operator=(const QDBusSignature &signature) |
|
232 |
||
233 |
Assigns the value of the given \a signature to this signature. |
|
234 |
||
235 |
\sa setSignature() |
|
236 |
*/ |
|
237 |
||
238 |
QT_END_NAMESPACE |
|
239 |