| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/dbus/qdbusextratypes.cpp |
| Source code | Switch to Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | /**************************************************************************** | - | ||||||
| 2 | ** | - | ||||||
| 3 | ** Copyright (C) 2016 The Qt Company Ltd. | - | ||||||
| 4 | ** Contact: https://www.qt.io/licensing/ | - | ||||||
| 5 | ** | - | ||||||
| 6 | ** This file is part of the QtDBus module of the Qt Toolkit. | - | ||||||
| 7 | ** | - | ||||||
| 8 | ** $QT_BEGIN_LICENSE:LGPL$ | - | ||||||
| 9 | ** Commercial License Usage | - | ||||||
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in | - | ||||||
| 11 | ** accordance with the commercial license agreement provided with the | - | ||||||
| 12 | ** Software or, alternatively, in accordance with the terms contained in | - | ||||||
| 13 | ** a written agreement between you and The Qt Company. For licensing terms | - | ||||||
| 14 | ** and conditions see https://www.qt.io/terms-conditions. For further | - | ||||||
| 15 | ** information use the contact form at https://www.qt.io/contact-us. | - | ||||||
| 16 | ** | - | ||||||
| 17 | ** GNU Lesser General Public License Usage | - | ||||||
| 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - | ||||||
| 19 | ** General Public License version 3 as published by the Free Software | - | ||||||
| 20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the | - | ||||||
| 21 | ** packaging of this file. Please review the following information to | - | ||||||
| 22 | ** ensure the GNU Lesser General Public License version 3 requirements | - | ||||||
| 23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. | - | ||||||
| 24 | ** | - | ||||||
| 25 | ** GNU General Public License Usage | - | ||||||
| 26 | ** Alternatively, this file may be used under the terms of the GNU | - | ||||||
| 27 | ** General Public License version 2.0 or (at your option) the GNU General | - | ||||||
| 28 | ** Public license version 3 or any later version approved by the KDE Free | - | ||||||
| 29 | ** Qt Foundation. The licenses are as published by the Free Software | - | ||||||
| 30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 | - | ||||||
| 31 | ** included in the packaging of this file. Please review the following | - | ||||||
| 32 | ** information to ensure the GNU General Public License requirements will | - | ||||||
| 33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and | - | ||||||
| 34 | ** https://www.gnu.org/licenses/gpl-3.0.html. | - | ||||||
| 35 | ** | - | ||||||
| 36 | ** $QT_END_LICENSE$ | - | ||||||
| 37 | ** | - | ||||||
| 38 | ****************************************************************************/ | - | ||||||
| 39 | - | |||||||
| 40 | #include "qdbusextratypes.h" | - | ||||||
| 41 | #include "qdbusutil_p.h" | - | ||||||
| 42 | - | |||||||
| 43 | #ifndef QT_NO_DBUS | - | ||||||
| 44 | - | |||||||
| 45 | QT_BEGIN_NAMESPACE | - | ||||||
| 46 | - | |||||||
| 47 | void QDBusObjectPath::doCheck() | - | ||||||
| 48 | { | - | ||||||
| 49 | if (!QDBusUtil::isValidObjectPath(m_path)) {
| 5-700 | ||||||
| 50 | qWarning("QDBusObjectPath: invalid path \"%s\"", qPrintable(m_path)); | - | ||||||
| 51 | m_path.clear(); | - | ||||||
| 52 | } executed 5 times by 1 test: end of blockExecuted by:
| 5 | ||||||
| 53 | } executed 705 times by 19 tests: end of blockExecuted by:
| 705 | ||||||
| 54 | - | |||||||
| 55 | void QDBusSignature::doCheck() | - | ||||||
| 56 | { | - | ||||||
| 57 | if (!QDBusUtil::isValidSignature(m_signature)) {
| 5-49 | ||||||
| 58 | qWarning("QDBusSignature: invalid signature \"%s\"", qPrintable(m_signature)); | - | ||||||
| 59 | m_signature.clear(); | - | ||||||
| 60 | } executed 5 times by 1 test: end of blockExecuted by:
| 5 | ||||||
| 61 | } executed 54 times by 3 tests: end of blockExecuted by:
| 54 | ||||||
| 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 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 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 Qt D-Bus 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 Qt D-Bus 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(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 | \class QDBusSignature | - | ||||||
| 171 | \inmodule QtDBus | - | ||||||
| 172 | \since 4.2 | - | ||||||
| 173 | - | |||||||
| 174 | \brief The QDBusSignature class enables the programmer to | - | ||||||
| 175 | identify the SIGNATURE type provided by the D-Bus typesystem. | - | ||||||
| 176 | - | |||||||
| 177 | \sa {The Qt D-Bus Type System} | - | ||||||
| 178 | */ | - | ||||||
| 179 | - | |||||||
| 180 | /*! | - | ||||||
| 181 | \fn QDBusSignature::QDBusSignature() | - | ||||||
| 182 | - | |||||||
| 183 | Constructs a new signature. | - | ||||||
| 184 | - | |||||||
| 185 | \sa setSignature() | - | ||||||
| 186 | */ | - | ||||||
| 187 | - | |||||||
| 188 | /*! | - | ||||||
| 189 | \fn QDBusSignature::QDBusSignature(const char *signature) | - | ||||||
| 190 | - | |||||||
| 191 | Constructs a new signature from the given \a signature. | - | ||||||
| 192 | */ | - | ||||||
| 193 | - | |||||||
| 194 | /*! | - | ||||||
| 195 | \fn QDBusSignature::QDBusSignature(QLatin1String signature) | - | ||||||
| 196 | - | |||||||
| 197 | Constructs a new signature from the given \a signature. | - | ||||||
| 198 | */ | - | ||||||
| 199 | - | |||||||
| 200 | /*! | - | ||||||
| 201 | \fn QDBusSignature::QDBusSignature(const QString &signature) | - | ||||||
| 202 | - | |||||||
| 203 | Constructs a new signature from the given \a signature. | - | ||||||
| 204 | */ | - | ||||||
| 205 | - | |||||||
| 206 | /*! | - | ||||||
| 207 | \fn QString QDBusSignature::signature() const | - | ||||||
| 208 | - | |||||||
| 209 | Returns this signature. | - | ||||||
| 210 | - | |||||||
| 211 | \sa setSignature() | - | ||||||
| 212 | */ | - | ||||||
| 213 | - | |||||||
| 214 | /*! | - | ||||||
| 215 | \fn void QDBusSignature::setSignature(const QString &signature) | - | ||||||
| 216 | - | |||||||
| 217 | Assigns the value of the given \a signature to this signature. | - | ||||||
| 218 | \sa signature() | - | ||||||
| 219 | */ | - | ||||||
| 220 | - | |||||||
| 221 | QT_END_NAMESPACE | - | ||||||
| 222 | - | |||||||
| 223 | #endif // QT_NO_DBUS | - | ||||||
| Source code | Switch to Preprocessed file |