Initial import to Git
[profile/ivi/common-api-dbus-runtime.git] / CommonAPI-DBus / src / CommonAPI / DBus / DBusError.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 #ifndef COMMONAPI_DBUS_DBUS_ERROR_H_
5 #define COMMONAPI_DBUS_DBUS_ERROR_H_
6
7 #include <string>
8 #include <dbus/dbus.h>
9
10 namespace CommonAPI {
11 namespace DBus {
12
13 class DBusConnection;
14
15
16 class DBusError {
17  public:
18         DBusError();
19         ~DBusError();
20
21         operator bool() const;
22
23         void clear();
24
25         std::string getName() const;
26         std::string getMessage() const;
27
28  private:
29         ::DBusError libdbusError_;
30
31         friend class DBusConnection;
32 };
33
34 } // namespace DBus
35 } // namespace CommonAPI
36
37 #endif // COMMONAPI_DBUS_DBUS_ERROR_H_