Qt Accessibility Client

dbusconnection.h
1 /*
2  Copyright 2012 Frederik Gladhorn <[email protected]>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) version 3, or any
8  later version accepted by the membership of KDE e.V. (or its
9  successor approved by the membership of KDE e.V.), which shall
10  act as a proxy defined in Section 6 of version 3 of the license.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public
18  License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef DBUSCONNECTION_H
22 #define DBUSCONNECTION_H
23 
24 #include <QtCore/QString>
25 #include <QtCore/QObject>
26 #include <QtDBus/QDBusConnection>
27 #include <QtDBus/QDBusPendingCallWatcher>
28 
29 namespace QAccessibleClient {
30 
31 
36 class DBusConnection : public QObject
37 {
38  Q_OBJECT
39 public:
49 
61  bool isFetchingConnection() const;
62 
73 
74  enum Status {
75  Disconnected,
76  ConnectionError,
77  Connected
78  };
79 
92  Status status() const;
93 
94 Q_SIGNALS:
95 
103  void connectionFetched();
104 
105 private Q_SLOTS:
106  void initFinished();
107 
108 private:
109  void init();
110 
111  QDBusConnection m_connection;
112  mutable Status m_status;
113  QDBusPendingCallWatcher *m_initWatcher;
114 };
115 }
116 
117 #endif // DBUSCONNECTION_H
Connection to the a11y dbus bus.
QDBusConnection connection() const
Returns the accessibility dbus connection.
Q_SIGNALSQ_SIGNALS
bool isFetchingConnection() const
Returns true if the connection is not ready yet.
Q_OBJECTQ_OBJECT
Status status() const
Returns the state the connection is in.
Q_SLOTSQ_SLOTS
void connectionFetched()
Emitted when the connection was fetched.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Nov 26 2020 23:02:43 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.