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

Last change on this file since 243 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 5.8 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4** Contact: Qt Software Information ([email protected])
5**
6** This file is part of the QtDBus module of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial Usage
10** Licensees holding valid Qt Commercial licenses may use this file in
11** accordance with the Qt Commercial License Agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and Nokia.
14**
15** GNU Lesser General Public License Usage
16** Alternatively, this file may be used under the terms of the GNU Lesser
17** General Public License version 2.1 as published by the Free Software
18** Foundation and appearing in the file LICENSE.LGPL included in the
19** packaging of this file. Please review the following information to
20** ensure the GNU Lesser General Public License version 2.1 requirements
21** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
22**
23** In addition, as a special exception, Nokia gives you certain
24** additional rights. These rights are described in the Nokia Qt LGPL
25** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
26** 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 are unsure which license is appropriate for your use, please
37** contact the sales department 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
54QT_BEGIN_HEADER
55
56QT_BEGIN_NAMESPACE
57
58QT_MODULE(DBus)
59
60class QDBusError;
61class QDBusPendingCall;
62
63class QDBusAbstractInterfacePrivate;
64class QDBUS_EXPORT QDBusAbstractInterface: public QObject
65{
66 Q_OBJECT
67
68public:
69 virtual ~QDBusAbstractInterface();
70 bool isValid() const;
71
72 QDBusConnection connection() const;
73
74 QString service() const;
75 QString path() const;
76 QString interface() const;
77
78 QDBusError lastError() const;
79
80 QDBusMessage call(const QString &method,
81 const QVariant &arg1 = QVariant(),
82 const QVariant &arg2 = QVariant(),
83 const QVariant &arg3 = QVariant(),
84 const QVariant &arg4 = QVariant(),
85 const QVariant &arg5 = QVariant(),
86 const QVariant &arg6 = QVariant(),
87 const QVariant &arg7 = QVariant(),
88 const QVariant &arg8 = QVariant());
89
90 QDBusMessage call(QDBus::CallMode mode,
91 const QString &method,
92 const QVariant &arg1 = QVariant(),
93 const QVariant &arg2 = QVariant(),
94 const QVariant &arg3 = QVariant(),
95 const QVariant &arg4 = QVariant(),
96 const QVariant &arg5 = QVariant(),
97 const QVariant &arg6 = QVariant(),
98 const QVariant &arg7 = QVariant(),
99 const QVariant &arg8 = QVariant());
100
101 QDBusMessage callWithArgumentList(QDBus::CallMode mode,
102 const QString &method,
103 const QList<QVariant> &args);
104
105 bool callWithCallback(const QString &method,
106 const QList<QVariant> &args,
107 QObject *receiver, const char *member, const char *errorSlot);
108 bool callWithCallback(const QString &method,
109 const QList<QVariant> &args,
110 QObject *receiver, const char *member);
111
112 QDBusPendingCall asyncCall(const QString &method,
113 const QVariant &arg1 = QVariant(),
114 const QVariant &arg2 = QVariant(),
115 const QVariant &arg3 = QVariant(),
116 const QVariant &arg4 = QVariant(),
117 const QVariant &arg5 = QVariant(),
118 const QVariant &arg6 = QVariant(),
119 const QVariant &arg7 = QVariant(),
120 const QVariant &arg8 = QVariant());
121 QDBusPendingCall asyncCallWithArgumentList(const QString &method,
122 const QList<QVariant> &args);
123
124protected:
125 QDBusAbstractInterface(const QString &service, const QString &path, const char *interface,
126 const QDBusConnection &connection, QObject *parent);
127 QDBusAbstractInterface(QDBusAbstractInterfacePrivate &, QObject *parent);
128
129 void connectNotify(const char *signal);
130 void disconnectNotify(const char *signal);
131 QVariant internalPropGet(const char *propname) const;
132 void internalPropSet(const char *propname, const QVariant &value);
133 QDBusMessage internalConstCall(QDBus::CallMode mode,
134 const QString &method,
135 const QList<QVariant> &args = QList<QVariant>()) const;
136
137private:
138 Q_DECLARE_PRIVATE(QDBusAbstractInterface)
139 Q_PRIVATE_SLOT(d_func(), void _q_serviceOwnerChanged(QString,QString,QString))
140};
141
142QT_END_NAMESPACE
143
144QT_END_HEADER
145
146#endif
Note: See TracBrowser for help on using the repository browser.