source: trunk/src/dbus/qdbusabstractinterface.h@ 1023

Last change on this file since 1023 was 846, checked in by Dmitry A. Kuminov, 14 years ago

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

File size: 6.1 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4** All rights reserved.
5** Contact: Nokia Corporation ([email protected])
6**
7** This file is part of the QtDBus module of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:LGPL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and Nokia.
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** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you have questions regarding the use of this file, please contact
37** Nokia at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42#ifndef QDBUSABSTRACTINTERFACE_H
43#define QDBUSABSTRACTINTERFACE_H
44
45#include <QtCore/qstring.h>
46#include <QtCore/qvariant.h>
47#include <QtCore/qlist.h>
48#include <QtCore/qobject.h>
49
50#include <QtDBus/qdbusmessage.h>
51#include <QtDBus/qdbusextratypes.h>
52#include <QtDBus/qdbusconnection.h>
53
54#ifndef QT_NO_DBUS
55
56QT_BEGIN_HEADER
57
58QT_BEGIN_NAMESPACE
59
60QT_MODULE(DBus)
61
62class QDBusError;
63class QDBusPendingCall;
64
65class QDBusAbstractInterfacePrivate;
66
67class Q_DBUS_EXPORT QDBusAbstractInterfaceBase: public QObject
68{
69public:
70 int qt_metacall(QMetaObject::Call, int, void**);
71protected:
72 QDBusAbstractInterfaceBase(QDBusAbstractInterfacePrivate &dd, QObject *parent);
73private:
74 Q_DECLARE_PRIVATE(QDBusAbstractInterface)
75};
76
77class Q_DBUS_EXPORT QDBusAbstractInterface:
78#ifdef Q_QDOC
79 public QObject
80#else
81 public QDBusAbstractInterfaceBase
82#endif
83{
84 Q_OBJECT
85
86public:
87 virtual ~QDBusAbstractInterface();
88 bool isValid() const;
89
90 QDBusConnection connection() const;
91
92 QString service() const;
93 QString path() const;
94 QString interface() const;
95
96 QDBusError lastError() const;
97
98 QDBusMessage call(const QString &method,
99 const QVariant &arg1 = QVariant(),
100 const QVariant &arg2 = QVariant(),
101 const QVariant &arg3 = QVariant(),
102 const QVariant &arg4 = QVariant(),
103 const QVariant &arg5 = QVariant(),
104 const QVariant &arg6 = QVariant(),
105 const QVariant &arg7 = QVariant(),
106 const QVariant &arg8 = QVariant());
107
108 QDBusMessage call(QDBus::CallMode mode,
109 const QString &method,
110 const QVariant &arg1 = QVariant(),
111 const QVariant &arg2 = QVariant(),
112 const QVariant &arg3 = QVariant(),
113 const QVariant &arg4 = QVariant(),
114 const QVariant &arg5 = QVariant(),
115 const QVariant &arg6 = QVariant(),
116 const QVariant &arg7 = QVariant(),
117 const QVariant &arg8 = QVariant());
118
119 QDBusMessage callWithArgumentList(QDBus::CallMode mode,
120 const QString &method,
121 const QList<QVariant> &args);
122
123 bool callWithCallback(const QString &method,
124 const QList<QVariant> &args,
125 QObject *receiver, const char *member, const char *errorSlot);
126 bool callWithCallback(const QString &method,
127 const QList<QVariant> &args,
128 QObject *receiver, const char *member);
129
130 QDBusPendingCall asyncCall(const QString &method,
131 const QVariant &arg1 = QVariant(),
132 const QVariant &arg2 = QVariant(),
133 const QVariant &arg3 = QVariant(),
134 const QVariant &arg4 = QVariant(),
135 const QVariant &arg5 = QVariant(),
136 const QVariant &arg6 = QVariant(),
137 const QVariant &arg7 = QVariant(),
138 const QVariant &arg8 = QVariant());
139 QDBusPendingCall asyncCallWithArgumentList(const QString &method,
140 const QList<QVariant> &args);
141
142protected:
143 QDBusAbstractInterface(const QString &service, const QString &path, const char *interface,
144 const QDBusConnection &connection, QObject *parent);
145 QDBusAbstractInterface(QDBusAbstractInterfacePrivate &, QObject *parent);
146
147 void connectNotify(const char *signal);
148 void disconnectNotify(const char *signal);
149 QVariant internalPropGet(const char *propname) const;
150 void internalPropSet(const char *propname, const QVariant &value);
151 QDBusMessage internalConstCall(QDBus::CallMode mode,
152 const QString &method,
153 const QList<QVariant> &args = QList<QVariant>()) const;
154
155private:
156 Q_DECLARE_PRIVATE(QDBusAbstractInterface)
157 Q_PRIVATE_SLOT(d_func(), void _q_serviceOwnerChanged(QString,QString,QString))
158};
159
160QT_END_NAMESPACE
161
162QT_END_HEADER
163
164#endif // QT_NO_DBUS
165#endif
Note: See TracBrowser for help on using the repository browser.