Index: dbus/object_proxy.h |
diff --git a/dbus/object_proxy.h b/dbus/object_proxy.h |
index ef453054915786accb66d82268a22506b6a69240..b4ab7ae1c41ee020e46ecbed661f886379604996 100644 |
--- a/dbus/object_proxy.h |
+++ b/dbus/object_proxy.h |
@@ -14,6 +14,7 @@ |
#include "base/callback.h" |
#include "base/memory/ref_counted.h" |
+#include "base/string_piece.h" |
#include "base/time.h" |
namespace dbus { |
@@ -30,11 +31,20 @@ class Signal; |
// object is is alive when callbacks referencing |this| are called. |
class ObjectProxy : public base::RefCountedThreadSafe<ObjectProxy> { |
public: |
- // Client code should use Bus::GetObjectProxy() instead of this |
- // constructor. |
+ // Client code should use Bus::GetObjectProxy() or |
+ // Bus::GetObjectProxyWithOptions() instead of this constructor. |
ObjectProxy(Bus* bus, |
const std::string& service_name, |
- const std::string& object_path); |
+ const std::string& object_path, |
+ int options); |
+ |
+ // Options to be OR-ed together when calling Bus::GetObjectProxyWithOptions(). |
+ // Set the IGNORE_SERVICE_UNKNOWN_ERRORS option to silence logging of |
+ // org.freedesktop.DBus.Error.ServiceUnknown errors. |
+ enum Options { |
+ DEFAULT_OPTIONS = 0, |
+ IGNORE_SERVICE_UNKNOWN_ERRORS = 1 << 0 |
+ }; |
// Special timeout constants. |
// |
@@ -180,6 +190,10 @@ class ObjectProxy : public base::RefCountedThreadSafe<ObjectProxy> { |
DBusMessage* raw_message, |
void* user_data); |
+ // Helper method for logging response errors appropriately. |
+ void LogMethodCallFailure(const base::StringPiece& error_name, |
+ const base::StringPiece& error_message) const; |
+ |
scoped_refptr<Bus> bus_; |
std::string service_name_; |
std::string object_path_; |
@@ -194,6 +208,8 @@ class ObjectProxy : public base::RefCountedThreadSafe<ObjectProxy> { |
std::set<std::string> match_rules_; |
+ const bool ignore_service_unknown_errors_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ObjectProxy); |
}; |