| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/dbus/qdbusvirtualobject.cpp |
| Source code | Switch to Preprocessed file |
| Line | Source | Count |
|---|---|---|
| 1 | /**************************************************************************** | - |
| 2 | ** | - |
| 3 | ** Copyright (C) 2015 The Qt Company Ltd. | - |
| 4 | ** Contact: http://www.qt.io/licensing/ | - |
| 5 | ** | - |
| 6 | ** This file is part of the QtDBus module of the Qt Toolkit. | - |
| 7 | ** | - |
| 8 | ** $QT_BEGIN_LICENSE:LGPL21$ | - |
| 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 http://www.qt.io/terms-conditions. For further | - |
| 15 | ** information use the contact form at http://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 2.1 or version 3 as published by the Free | - |
| 20 | ** Software Foundation and appearing in the file LICENSE.LGPLv21 and | - |
| 21 | ** LICENSE.LGPLv3 included in the packaging of this file. Please review the | - |
| 22 | ** following information to ensure the GNU Lesser General Public License | - |
| 23 | ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and | - |
| 24 | ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | - |
| 25 | ** | - |
| 26 | ** As a special exception, The Qt Company gives you certain additional | - |
| 27 | ** rights. These rights are described in The Qt Company LGPL Exception | - |
| 28 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | - |
| 29 | ** | - |
| 30 | ** $QT_END_LICENSE$ | - |
| 31 | ** | - |
| 32 | ****************************************************************************/ | - |
| 33 | - | |
| 34 | #include "qdbusvirtualobject.h" | - |
| 35 | - | |
| 36 | #ifndef QT_NO_DBUS | - |
| 37 | - | |
| 38 | QT_BEGIN_NAMESPACE | - |
| 39 | - | |
| 40 | /*! | - |
| 41 | Constructs a QDBusVirtualObject with \a parent. | - |
| 42 | */ | - |
| 43 | QDBusVirtualObject::QDBusVirtualObject(QObject *parent) : | - |
| 44 | QObject(parent) | - |
| 45 | { | - |
| 46 | } executed 24 times by 4 tests: end of blockExecuted by:
| 24 |
| 47 | - | |
| 48 | /*! | - |
| 49 | Destroys the object, deleting all of its child objects. | - |
| 50 | */ | - |
| 51 | QDBusVirtualObject::~QDBusVirtualObject() | - |
| 52 | { | - |
| 53 | } | - |
| 54 | - | |
| 55 | QT_END_NAMESPACE | - |
| 56 | - | |
| 57 | - | |
| 58 | /*! | - |
| 59 | \class QDBusVirtualObject | - |
| 60 | \inmodule QtDBus | - |
| 61 | \since 5.1 | - |
| 62 | - | |
| 63 | \brief The QDBusVirtualObject class is used to handle several DBus paths with one class. | - |
| 64 | */ | - |
| 65 | - | |
| 66 | /*! | - |
| 67 | \fn bool QDBusVirtualObject::handleMessage(const QDBusMessage &message, const QDBusConnection &connection) = 0 | - |
| 68 | - | |
| 69 | This function needs to handle all messages to the path of the | - |
| 70 | virtual object, when the SubPath option is specified. | - |
| 71 | The service, path, interface and methos are all part of the \a message. | - |
| 72 | Parameter \a connection is the connection handle. | - |
| 73 | Must return \c true when the message is handled, otherwise \c false (will generate dbus error message). | - |
| 74 | */ | - |
| 75 | - | |
| 76 | - | |
| 77 | /*! | - |
| 78 | \fn QString QDBusVirtualObject::introspect(const QString &path) const | - |
| 79 | - | |
| 80 | This function needs to handle the introspection of the | - |
| 81 | virtual object on \a path. It must return xml of the form: | - |
| 82 | - | |
| 83 | \code | - |
| 84 | <interface name="org.qtproject.QtDBus.MyObject" > | - |
| 85 | <property access="readwrite" type="i" name="prop1" /> | - |
| 86 | </interface> | - |
| 87 | \endcode | - |
| 88 | - | |
| 89 | If you pass the SubPath option, this introspection has to include all child nodes. | - |
| 90 | Otherwise QDBus handles the introspection of the child nodes. | - |
| 91 | */ | - |
| 92 | - | |
| 93 | #endif // QT_NO_DBUS | - |
| Source code | Switch to Preprocessed file |