1 /* -*- mode: C++; c-file-style: "gnu" -*- */
2 /* message.h: Qt wrapper for DBusMessage
4 * Copyright (C) 2003 Zack Rusin <zack@kde.org>
6 * Licensed under the Academic Free License version 2.1
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef DBUS_QT_MESSAGE_H
24 #define DBUS_QT_MESSAGE_H
28 #include <qstringlist.h>
30 #include "dbus/dbus.h"
40 iterator( const iterator& );
41 iterator( DBusMessage* msg );
44 iterator& operator=( const iterator& );
45 const QVariant& operator*() const;
46 QVariant& operator*();
47 iterator& operator++();
48 iterator operator++(int);
49 bool operator==( const iterator& it );
50 bool operator!=( const iterator& it );
54 QVariant marshallBaseType( DBusMessageIter* i );
60 Message( int messageType );
61 Message( DBusMessage * );//hide this one from the public implementation
62 Message( const QString& service, const QString& path,
63 const QString& interface, const QString& method );
64 Message( const Message& replayingTo );
65 Message( const QString& path, const QString& interface,
66 const QString& name );
67 Message( const Message& replayingTo, const QString& errorName,
68 const QString& errorMessage );
70 Message operator=( const Message& other );
76 void setPath( const QString& );
79 void setInterface( const QString& );
80 QString interface() const;
82 void setMember( const QString& );
83 QString member() const;
85 void setErrorName( const QString& );
86 QString errorName() const;
88 void setDestination( const QString& );
89 QString destination() const;
91 bool setSender( const QString& sender );
92 QString sender() const;
94 QString signature() const;
96 iterator begin() const;
103 Message& operator<<( bool );
104 Message& operator<<( Q_INT8 );
105 Message& operator<<( Q_INT32 );
106 Message& operator<<( Q_UINT32 );
107 Message& operator<<( Q_INT64 );
108 Message& operator<<( Q_UINT64 );
109 Message& operator<<( double );
110 Message& operator<<( const QString& );
111 Message& operator<<( const QVariant& );
112 //Message& operator<<();
113 //Message& operator<<();
114 //Message& operator<<();
115 //Message& operator<<();
116 //Message& operator<<();
117 //Message& operator<<();
118 //Message& operator<<();
121 friend class Connection;
122 DBusMessage* message() const;