| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 void MonitorPropertyChanged(const std::string& interface_name); | 72 void MonitorPropertyChanged(const std::string& interface_name); |
| 73 | 73 |
| 74 // Calls a method without results. | 74 // Calls a method without results. |
| 75 void CallVoidMethod(dbus::MethodCall* method_call, | 75 void CallVoidMethod(dbus::MethodCall* method_call, |
| 76 const VoidDBusMethodCallback& callback); | 76 const VoidDBusMethodCallback& callback); |
| 77 | 77 |
| 78 // Calls a method with an object path result. | 78 // Calls a method with an object path result. |
| 79 void CallObjectPathMethod(dbus::MethodCall* method_call, | 79 void CallObjectPathMethod(dbus::MethodCall* method_call, |
| 80 const ObjectPathDBusMethodCallback& callback); | 80 const ObjectPathDBusMethodCallback& callback); |
| 81 | 81 |
| 82 // Calls a method with an object path result where there is an error callback. |
| 83 void CallObjectPathMethodWithErrorCallback( |
| 84 dbus::MethodCall* method_call, |
| 85 const ObjectPathCallback& callback, |
| 86 const ErrorCallback& error_callback); |
| 87 |
| 82 // Calls a method with a dictionary value result. | 88 // Calls a method with a dictionary value result. |
| 83 void CallDictionaryValueMethod(dbus::MethodCall* method_call, | 89 void CallDictionaryValueMethod(dbus::MethodCall* method_call, |
| 84 const DictionaryValueCallback& callback); | 90 const DictionaryValueCallback& callback); |
| 85 | 91 |
| 86 // Calls a method without results with error callback. | 92 // Calls a method without results with error callback. |
| 87 void CallVoidMethodWithErrorCallback(dbus::MethodCall* method_call, | 93 void CallVoidMethodWithErrorCallback(dbus::MethodCall* method_call, |
| 88 const base::Closure& callback, | 94 const base::Closure& callback, |
| 89 const ErrorCallback& error_callback); | 95 const ErrorCallback& error_callback); |
| 90 | 96 |
| 91 // Calls a method with a dictionary value result with error callback. | 97 // Calls a method with a dictionary value result with error callback. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 121 void OnPropertyChanged(dbus::Signal* signal); | 127 void OnPropertyChanged(dbus::Signal* signal); |
| 122 | 128 |
| 123 // Handles responses for methods without results. | 129 // Handles responses for methods without results. |
| 124 void OnVoidMethod(const VoidDBusMethodCallback& callback, | 130 void OnVoidMethod(const VoidDBusMethodCallback& callback, |
| 125 dbus::Response* response); | 131 dbus::Response* response); |
| 126 | 132 |
| 127 // Handles responses for methods with ObjectPath results. | 133 // Handles responses for methods with ObjectPath results. |
| 128 void OnObjectPathMethod(const ObjectPathDBusMethodCallback& callback, | 134 void OnObjectPathMethod(const ObjectPathDBusMethodCallback& callback, |
| 129 dbus::Response* response); | 135 dbus::Response* response); |
| 130 | 136 |
| 137 // Handles responses for methods with ObjectPath results. |
| 138 void OnObjectPathMethodWithoutStatus( |
| 139 const ObjectPathCallback& callback, |
| 140 const ErrorCallback& error_callback, |
| 141 dbus::Response* response); |
| 142 |
| 131 // Handles responses for methods with DictionaryValue results. | 143 // Handles responses for methods with DictionaryValue results. |
| 132 void OnDictionaryValueMethod(const DictionaryValueCallback& callback, | 144 void OnDictionaryValueMethod(const DictionaryValueCallback& callback, |
| 133 dbus::Response* response); | 145 dbus::Response* response); |
| 134 | 146 |
| 135 // Handles responses for methods without results. | 147 // Handles responses for methods without results. |
| 136 // Used by CallVoidMethodWithErrorCallback(). | 148 // Used by CallVoidMethodWithErrorCallback(). |
| 137 void OnVoidMethodWithErrorCallback(const base::Closure& callback, | 149 void OnVoidMethodWithErrorCallback(const base::Closure& callback, |
| 138 dbus::Response* response); | 150 dbus::Response* response); |
| 139 | 151 |
| 140 // Handles responses for methods with DictionaryValue results. | 152 // Handles responses for methods with DictionaryValue results. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 157 // Note: This should remain the last member so it'll be destroyed and | 169 // Note: This should remain the last member so it'll be destroyed and |
| 158 // invalidate its weak pointers before any other members are destroyed. | 170 // invalidate its weak pointers before any other members are destroyed. |
| 159 base::WeakPtrFactory<ShillClientHelper> weak_ptr_factory_; | 171 base::WeakPtrFactory<ShillClientHelper> weak_ptr_factory_; |
| 160 | 172 |
| 161 DISALLOW_COPY_AND_ASSIGN(ShillClientHelper); | 173 DISALLOW_COPY_AND_ASSIGN(ShillClientHelper); |
| 162 }; | 174 }; |
| 163 | 175 |
| 164 } // namespace chromeos | 176 } // namespace chromeos |
| 165 | 177 |
| 166 #endif // CHROMEOS_DBUS_SHILL_CLIENT_HELPER_H_ | 178 #endif // CHROMEOS_DBUS_SHILL_CLIENT_HELPER_H_ |
| OLD | NEW |