| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMEOS_DBUS_SHILL_CLIENT_HELPER_H_ | 5 #ifndef CHROMEOS_DBUS_SHILL_CLIENT_HELPER_H_ |
| 6 #define CHROMEOS_DBUS_SHILL_CLIENT_HELPER_H_ | 6 #define CHROMEOS_DBUS_SHILL_CLIENT_HELPER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 void MonitorPropertyChanged(const std::string& interface_name); | 70 void MonitorPropertyChanged(const std::string& interface_name); |
| 71 | 71 |
| 72 // Calls a method without results. | 72 // Calls a method without results. |
| 73 void CallVoidMethod(dbus::MethodCall* method_call, | 73 void CallVoidMethod(dbus::MethodCall* method_call, |
| 74 const VoidDBusMethodCallback& callback); | 74 const VoidDBusMethodCallback& callback); |
| 75 | 75 |
| 76 // Calls a method with an object path result. | 76 // Calls a method with an object path result. |
| 77 void CallObjectPathMethod(dbus::MethodCall* method_call, | 77 void CallObjectPathMethod(dbus::MethodCall* method_call, |
| 78 const ObjectPathDBusMethodCallback& callback); | 78 const ObjectPathDBusMethodCallback& callback); |
| 79 | 79 |
| 80 // Calls a method with an object path result where there is an error callback. |
| 81 void CallObjectPathMethodWithErrorCallback( |
| 82 dbus::MethodCall* method_call, |
| 83 const ObjectPathCallback& callback, |
| 84 const ErrorCallback& error_callback); |
| 85 |
| 80 // Calls a method with a dictionary value result. | 86 // Calls a method with a dictionary value result. |
| 81 void CallDictionaryValueMethod(dbus::MethodCall* method_call, | 87 void CallDictionaryValueMethod(dbus::MethodCall* method_call, |
| 82 const DictionaryValueCallback& callback); | 88 const DictionaryValueCallback& callback); |
| 83 | 89 |
| 84 // Calls a method without results with error callback. | 90 // Calls a method without results with error callback. |
| 85 void CallVoidMethodWithErrorCallback(dbus::MethodCall* method_call, | 91 void CallVoidMethodWithErrorCallback(dbus::MethodCall* method_call, |
| 86 const base::Closure& callback, | 92 const base::Closure& callback, |
| 87 const ErrorCallback& error_callback); | 93 const ErrorCallback& error_callback); |
| 88 | 94 |
| 89 // Calls a method with a dictionary value result with error callback. | 95 // Calls a method with a dictionary value result with error callback. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 119 void OnPropertyChanged(dbus::Signal* signal); | 125 void OnPropertyChanged(dbus::Signal* signal); |
| 120 | 126 |
| 121 // Handles responses for methods without results. | 127 // Handles responses for methods without results. |
| 122 void OnVoidMethod(const VoidDBusMethodCallback& callback, | 128 void OnVoidMethod(const VoidDBusMethodCallback& callback, |
| 123 dbus::Response* response); | 129 dbus::Response* response); |
| 124 | 130 |
| 125 // Handles responses for methods with ObjectPath results. | 131 // Handles responses for methods with ObjectPath results. |
| 126 void OnObjectPathMethod(const ObjectPathDBusMethodCallback& callback, | 132 void OnObjectPathMethod(const ObjectPathDBusMethodCallback& callback, |
| 127 dbus::Response* response); | 133 dbus::Response* response); |
| 128 | 134 |
| 135 // Handles responses for methods with ObjectPath results. |
| 136 void OnObjectPathMethodWithoutStatus( |
| 137 const ObjectPathCallback& callback, |
| 138 const ErrorCallback& error_callback, |
| 139 dbus::Response* response); |
| 140 |
| 129 // Handles responses for methods with DictionaryValue results. | 141 // Handles responses for methods with DictionaryValue results. |
| 130 void OnDictionaryValueMethod(const DictionaryValueCallback& callback, | 142 void OnDictionaryValueMethod(const DictionaryValueCallback& callback, |
| 131 dbus::Response* response); | 143 dbus::Response* response); |
| 132 | 144 |
| 133 // Handles responses for methods without results. | 145 // Handles responses for methods without results. |
| 134 // Used by CallVoidMethodWithErrorCallback(). | 146 // Used by CallVoidMethodWithErrorCallback(). |
| 135 void OnVoidMethodWithErrorCallback(const base::Closure& callback, | 147 void OnVoidMethodWithErrorCallback(const base::Closure& callback, |
| 136 dbus::Response* response); | 148 dbus::Response* response); |
| 137 | 149 |
| 138 // Handles responses for methods with DictionaryValue results. | 150 // Handles responses for methods with DictionaryValue results. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 154 // Note: This should remain the last member so it'll be destroyed and | 166 // Note: This should remain the last member so it'll be destroyed and |
| 155 // invalidate its weak pointers before any other members are destroyed. | 167 // invalidate its weak pointers before any other members are destroyed. |
| 156 base::WeakPtrFactory<ShillClientHelper> weak_ptr_factory_; | 168 base::WeakPtrFactory<ShillClientHelper> weak_ptr_factory_; |
| 157 | 169 |
| 158 DISALLOW_COPY_AND_ASSIGN(ShillClientHelper); | 170 DISALLOW_COPY_AND_ASSIGN(ShillClientHelper); |
| 159 }; | 171 }; |
| 160 | 172 |
| 161 } // namespace chromeos | 173 } // namespace chromeos |
| 162 | 174 |
| 163 #endif // CHROMEOS_DBUS_SHILL_CLIENT_HELPER_H_ | 175 #endif // CHROMEOS_DBUS_SHILL_CLIENT_HELPER_H_ |
| OLD | NEW |