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/. */
13 DBusError::DBusError() {
14 dbus_error_init(&libdbusError_);
17 DBusError::~DBusError() {
18 dbus_error_free(&libdbusError_);
21 DBusError::operator bool() const {
22 return dbus_error_is_set(&libdbusError_);
25 void DBusError::clear() {
26 dbus_error_free(&libdbusError_);
29 std::string DBusError::getName() const {
32 return std::string(libdbusError_.name);
35 std::string DBusError::getMessage() const {
38 return std::string(libdbusError_.message);
42 } // namespace CommonAPI