summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/shill_client_helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromeos/dbus/shill_client_helper.h')
-rw-r--r--chromeos/dbus/shill_client_helper.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/chromeos/dbus/shill_client_helper.h b/chromeos/dbus/shill_client_helper.h
index 8782d90..1ad3b86 100644
--- a/chromeos/dbus/shill_client_helper.h
+++ b/chromeos/dbus/shill_client_helper.h
@@ -11,6 +11,7 @@
#include "base/callback.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
+#include "base/values.h"
#include "chromeos/dbus/blocking_method_caller.h"
#include "chromeos/dbus/dbus_method_call_status.h"
#include "chromeos/dbus/shill_property_changed_observer.h"
@@ -51,8 +52,11 @@ class ShillClientHelper {
// A callback to handle responses for methods with DictionaryValue results.
// This is used by CallDictionaryValueMethodWithErrorCallback.
- typedef base::Callback<void(const base::DictionaryValue& result
- )> DictionaryValueCallbackWithoutStatus;
+ typedef base::Callback<void(const base::DictionaryValue& result)>
+ DictionaryValueCallbackWithoutStatus;
+
+ // A callback to handle responses of methods returning a ListValue.
+ typedef base::Callback<void(const base::ListValue& result)> ListValueCallback;
// A callback to handle errors for method call.
typedef base::Callback<void(const std::string& error_name,
@@ -100,6 +104,12 @@ class ShillClientHelper {
const DictionaryValueCallbackWithoutStatus& callback,
const ErrorCallback& error_callback);
+ // Calls a method with a boolean array result with error callback.
+ void CallListValueMethodWithErrorCallback(
+ dbus::MethodCall* method_call,
+ const ListValueCallback& callback,
+ const ErrorCallback& error_callback);
+
// DEPRECATED DO NOT USE: Calls a method without results.
bool CallVoidMethodAndBlock(dbus::MethodCall* method_call);
@@ -156,6 +166,13 @@ class ShillClientHelper {
const ErrorCallback& error_callback,
dbus::Response* response);
+ // Handles responses for methods with Boolean array results.
+ // Used by CallBooleanArrayMethodWithErrorCallback().
+ void OnListValueMethodWithErrorCallback(
+ const ListValueCallback& callback,
+ const ErrorCallback& error_callback,
+ dbus::Response* response);
+
// Handles errors for method calls.
void OnError(const ErrorCallback& error_callback,
dbus::ErrorResponse* response);