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 ObjectPathCallbackWithoutStatus& 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 ObjectPathCallbackWithoutStatus& callback, |
| 138 dbus::Response* response); |
| 139 |
129 // Handles responses for methods with DictionaryValue results. | 140 // Handles responses for methods with DictionaryValue results. |
130 void OnDictionaryValueMethod(const DictionaryValueCallback& callback, | 141 void OnDictionaryValueMethod(const DictionaryValueCallback& callback, |
131 dbus::Response* response); | 142 dbus::Response* response); |
132 | 143 |
133 // Handles responses for methods without results. | 144 // Handles responses for methods without results. |
134 // Used by CallVoidMethodWithErrorCallback(). | 145 // Used by CallVoidMethodWithErrorCallback(). |
135 void OnVoidMethodWithErrorCallback(const base::Closure& callback, | 146 void OnVoidMethodWithErrorCallback(const base::Closure& callback, |
136 dbus::Response* response); | 147 dbus::Response* response); |
137 | 148 |
138 // Handles responses for methods with DictionaryValue results. | 149 // 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 | 165 // Note: This should remain the last member so it'll be destroyed and |
155 // invalidate its weak pointers before any other members are destroyed. | 166 // invalidate its weak pointers before any other members are destroyed. |
156 base::WeakPtrFactory<ShillClientHelper> weak_ptr_factory_; | 167 base::WeakPtrFactory<ShillClientHelper> weak_ptr_factory_; |
157 | 168 |
158 DISALLOW_COPY_AND_ASSIGN(ShillClientHelper); | 169 DISALLOW_COPY_AND_ASSIGN(ShillClientHelper); |
159 }; | 170 }; |
160 | 171 |
161 } // namespace chromeos | 172 } // namespace chromeos |
162 | 173 |
163 #endif // CHROMEOS_DBUS_SHILL_CLIENT_HELPER_H_ | 174 #endif // CHROMEOS_DBUS_SHILL_CLIENT_HELPER_H_ |
OLD | NEW |