1 // Copyright 2012 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef DBUS_SCOPED_DBUS_ERROR_H_
6 #define DBUS_SCOPED_DBUS_ERROR_H_
10 #include "dbus/dbus_export.h"
14 // Utility class to ensure that DBusError is freed.
15 class CHROME_DBUS_EXPORT ScopedDBusError {
17 // Do not inline methods that call dbus_error_xxx() functions.
18 // See http://crbug.com/416628
22 DBusError* get() { return &error_; }
24 const char* name() { return error_.name; }
25 const char* message() { return error_.message; }
33 #endif // DBUS_SCOPED_DBUS_ERROR_H_