DBus-1-TQt  1.0
tqdbusmessage.h
Go to the documentation of this file.
1 /* qdbusmessage.h TQT_DBusMessage 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 TQDBUSMESSAGE_H
26 #define TQDBUSMESSAGE_H
27 
28 #include "tqdbusmacros.h"
29 #include "tqdbusdata.h"
30 
31 #include <tqvaluelist.h>
32 
33 #include <limits.h>
34 
35 class TQT_DBusError;
37 struct DBusMessage;
38 
115 class TQDBUS_EXPORT TQT_DBusMessage: public TQValueList<TQT_DBusData>
116 {
117  friend class TQT_DBusConnection;
118 public:
125  enum
126  {
130  DefaultTimeout = -1,
131 
135  NoTimeout = INT_MAX
136  };
137 
152  {
158 
165 
172 
179 
185  SignalMessage
186  };
187 
196  TQT_DBusMessage();
197 
198 
207  TQT_DBusMessage(const TQT_DBusMessage &other);
208 
215  ~TQT_DBusMessage();
216 
232 
249  static TQT_DBusMessage signal(const TQString &path, const TQString &interface,
250  const TQString &member);
251 
272  static TQT_DBusMessage methodCall(const TQString &service, const TQString &path,
273  const TQString &interface, const TQString &method);
274 
290  static TQT_DBusMessage methodReply(const TQT_DBusMessage &other);
291 
308  static TQT_DBusMessage methodError(const TQT_DBusMessage &other, const TQT_DBusError& error);
309 
327  TQString path() const;
328 
346  TQString interface() const;
347 
365  TQString member() const;
366 
385  TQString sender() const;
386 
398  TQT_DBusError error() const;
399 
405  MessageType type() const;
406 
414  int timeout() const;
415 
436  void setTimeout(int ms);
437 
452  int serialNumber() const;
453 
475  int replySerialNumber() const;
476 
477 //protected:
490  DBusMessage *toDBusMessage() const;
491 
507  static TQT_DBusMessage fromDBusMessage(DBusMessage *dmsg);
508 
509 private:
511 };
512 
513 #endif
514 
Provides access to a specific D-Bus bus.
TQT_DBusConnection & operator=(const TQT_DBusConnection &other)
Creates a shallow copy of the given connection.
Class for transporting D-Bus errors.
Definition: tqdbuserror.h:41
A message converts and transports data over D-Bus.
TQT_DBusMessagePrivate * d
MessageType
D-Bus message types.
#define TQDBUS_EXPORT
Definition: tqdbusmacros.h:29