2006-02-13 John (J5) Palmieri <johnp@redhat.com>
[platform/upstream/dbus.git] / qt / qdbuserror.h
1 /* qdbuserror.h QDBusError object
2  *
3  * Copyright (C) 2005 Harald Fernengel <harry@kdevelop.org>
4  *
5  * Licensed under the Academic Free License version 2.1
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program 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
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20  *
21  */
22
23 #ifndef QDBUSERROR_H
24 #define QDBUSERROR_H
25
26 #include "dbus/qdbus.h"
27 #include <QtCore/qstring.h>
28
29 struct DBusError;
30
31 class QDBUS_EXPORT QDBusError
32 {
33 public:
34     QDBusError(const DBusError *error = 0);
35
36     inline QString name() const { return nm; }
37     inline QString message() const { return msg; }
38     inline bool isValid() const { return !nm.isNull() && !msg.isNull(); }
39
40 private:
41     QString nm, msg;
42 };
43
44 #ifndef QT_NO_DEBUG
45 QDebug operator<<(QDebug, const QDBusError &);
46 #endif
47
48 #endif