DBus-1-TQt 1.0
Loading...
Searching...
No Matches
tqdbusconnection.h
Go to the documentation of this file.
1/* qdbusconnection.h TQT_DBusConnection object
2 *
3 * Copyright (C) 2005 Harald Fernengel <harry@kdevelop.org>
4 * Copyright (C) 2005-2007 Kevin Krammer <kevin.krammer@gmx.at>
5 *
6 * Licensed under the Academic Free License version 2.1
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
21 * USA.
22 *
23 */
24
25#ifndef TQDBUSCONNECTION_H
26#define TQDBUSCONNECTION_H
27
122#include "tqdbusmacros.h"
123#include <tqstring.h>
124
126class TQT_DBusError;
127class TQT_DBusMessage;
129class TQObject;
130
172{
173public:
178 {
185
197
198 // TODO find out about ActivationBus purpose
199 ActivationBus
200 };
201
212
224 TQT_DBusConnection(const TQString &name);
225
235
244
256 TQT_DBusConnection &operator=(const TQT_DBusConnection &other);
257
265 bool isConnected() const;
266
275 TQT_DBusError lastError() const;
276
283 {
288 NoReplace = 0,
289
295 AllowReplace = 1,
296
302 ReplaceExisting = 2
303 };
304
336 bool requestName(const TQString &name, int modeFlags = NoReplace);
337
348 TQString uniqueName() const;
349
370 bool send(const TQT_DBusMessage &message) const;
371
392 TQT_DBusMessage sendWithReply(const TQT_DBusMessage &message, TQT_DBusError *error = 0) const;
393
420 int sendWithAsyncReply(const TQT_DBusMessage &message, TQObject *receiver,
421 const char *slot) const;
422
428 void flush() const;
429
441 void dispatch() const;
442
454 void scheduleDispatch() const;
455
499 bool connect(TQObject* object, const char* slot);
500
511 bool disconnect(TQObject* object, const char* slot);
512
538 bool registerObject(const TQString& path, TQT_DBusObjectBase* object);
539
553 void unregisterObject(const TQString &path);
554
568 static TQT_DBusConnection sessionBus();
569
583 static TQT_DBusConnection systemBus();
584
618 static TQT_DBusConnection addConnection(BusType type,
619 const TQString &name = default_connection_name);
620
639 static TQT_DBusConnection addConnection(const TQString &address,
640 const TQString &name = default_connection_name);
641
642 // TODO check why this doesn't close the D-Bus connection
652 static void closeConnection(const TQString &name = default_connection_name);
653
657 static const char *default_connection_name;
658
659private:
661};
662
663#endif
Provides access to a specific D-Bus bus.
TQT_DBusConnectionPrivate * d
static const char * default_connection_name
NameRequestMode
Flags for controlling the behavior name collision handling.
Class for transporting D-Bus errors.
Definition tqdbuserror.h:41
A message converts and transports data over D-Bus.
Base interface for D-Bus service objects.
#define TQDBUS_EXPORT