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
50
121
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
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 {
289
296
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
393 TQT_DBusMessage sendWithReply(const TQT_DBusMessage &message, TQT_DBusError *error = 0) const;
394
421 int sendWithAsyncReply(const TQT_DBusMessage &message, TQObject *receiver,
422 const char *slot) const;
423
429 void flush() const;
430
442 void dispatch() const;
443
455 void scheduleDispatch() const;
456
500 bool connect(TQObject* object, const char* slot);
501
512 bool disconnect(TQObject* object, const char* slot);
513
539 bool registerObject(const TQString& path, TQT_DBusObjectBase* object);
540
554 void unregisterObject(const TQString &path);
555
569 static TQT_DBusConnection sessionBus();
570
584 static TQT_DBusConnection systemBus();
585
619 static TQT_DBusConnection addConnection(BusType type,
620 const TQString &name = default_connection_name);
621
640 static TQT_DBusConnection addConnection(const TQString &address,
641 const TQString &name = default_connection_name);
642
643 // TODO check why this doesn't close the D-Bus connection
653 static void closeConnection(const TQString &name = default_connection_name);
654
658 static const char *default_connection_name;
659
660private:
662};
663
664#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.
TQT_DBusConnection()
Creates an empty/disconnected connection handle.
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