Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Side by Side Diff: dbus/object_proxy.h

Issue 24557002: dbus: Rewrite ObjectProxy::ConnectToSignal with PostTaskAndReplyWithResult (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | dbus/object_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 DBUS_OBJECT_PROXY_H_ 5 #ifndef DBUS_OBJECT_PROXY_H_
6 #define DBUS_OBJECT_PROXY_H_ 6 #define DBUS_OBJECT_PROXY_H_
7 7
8 #include <dbus/dbus.h> 8 #include <dbus/dbus.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 void RunResponseCallback(ResponseCallback response_callback, 197 void RunResponseCallback(ResponseCallback response_callback,
198 ErrorCallback error_callback, 198 ErrorCallback error_callback,
199 base::TimeTicks start_time, 199 base::TimeTicks start_time,
200 DBusMessage* response_message); 200 DBusMessage* response_message);
201 201
202 // Redirects the function call to OnPendingCallIsComplete(). 202 // Redirects the function call to OnPendingCallIsComplete().
203 static void OnPendingCallIsCompleteThunk(DBusPendingCall* pending_call, 203 static void OnPendingCallIsCompleteThunk(DBusPendingCall* pending_call,
204 void* user_data); 204 void* user_data);
205 205
206 // Helper function for ConnectToSignal(). 206 // Helper function for ConnectToSignal().
207 void ConnectToSignalInternal( 207 bool ConnectToSignalInternal(const std::string& interface_name,
208 const std::string& interface_name, 208 const std::string& signal_name,
209 const std::string& signal_name, 209 SignalCallback signal_callback);
210 SignalCallback signal_callback,
211 OnConnectedCallback on_connected_callback);
212
213 // Called when the object proxy is connected to the signal, or failed.
214 void OnConnected(OnConnectedCallback on_connected_callback,
215 const std::string& interface_name,
216 const std::string& signal_name,
217 bool success);
218 210
219 // Handles the incoming request messages and dispatches to the signal 211 // Handles the incoming request messages and dispatches to the signal
220 // callbacks. 212 // callbacks.
221 DBusHandlerResult HandleMessage(DBusConnection* connection, 213 DBusHandlerResult HandleMessage(DBusConnection* connection,
222 DBusMessage* raw_message); 214 DBusMessage* raw_message);
223 215
224 // Runs the method. Helper function for HandleMessage(). 216 // Runs the method. Helper function for HandleMessage().
225 void RunMethod(base::TimeTicks start_time, 217 void RunMethod(base::TimeTicks start_time,
226 std::vector<SignalCallback> signal_callbacks, 218 std::vector<SignalCallback> signal_callbacks,
227 Signal* signal); 219 Signal* signal);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 274
283 // Known name owner of the well-known bus name represnted by |service_name_|. 275 // Known name owner of the well-known bus name represnted by |service_name_|.
284 std::string service_name_owner_; 276 std::string service_name_owner_;
285 277
286 DISALLOW_COPY_AND_ASSIGN(ObjectProxy); 278 DISALLOW_COPY_AND_ASSIGN(ObjectProxy);
287 }; 279 };
288 280
289 } // namespace dbus 281 } // namespace dbus
290 282
291 #endif // DBUS_OBJECT_PROXY_H_ 283 #endif // DBUS_OBJECT_PROXY_H_
OLDNEW
« no previous file with comments | « no previous file | dbus/object_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698