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

Side by Side Diff: chromeos/dbus/shill_client_helper.h

Issue 11367048: This is the first pass at making GetIPConfigs asynchronous. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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
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 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 23 matching lines...) Expand all
34 class Signal; 34 class Signal;
35 35
36 } // namespace dbus 36 } // namespace dbus
37 37
38 namespace chromeos { 38 namespace chromeos {
39 39
40 // A class to help implement Shill clients. 40 // A class to help implement Shill clients.
41 class ShillClientHelper { 41 class ShillClientHelper {
42 public: 42 public:
43 // A callback to handle PropertyChanged signals. 43 // A callback to handle PropertyChanged signals.
44 typedef base::Callback<void(const std::string& name, 44 typedef base::Callback<void(
45 const base::Value& value)> PropertyChangedHandler; 45 const std::string& name,
46 scoped_ptr<base::Value> value)> PropertyChangedHandler;
46 47
47 // A callback to handle responses for methods with DictionaryValue results. 48 // A callback to handle responses for methods with DictionaryValue results.
48 typedef base::Callback<void( 49 typedef base::Callback<void(
49 DBusMethodCallStatus call_status, 50 DBusMethodCallStatus call_status,
50 const base::DictionaryValue& result)> DictionaryValueCallback; 51 scoped_ptr<base::DictionaryValue> result)> DictionaryValueCallback;
51 52
52 // A callback to handle responses for methods with DictionaryValue results. 53 // A callback to handle responses for methods with DictionaryValue results.
53 // This is used by CallDictionaryValueMethodWithErrorCallback. 54 // This is used by CallDictionaryValueMethodWithErrorCallback.
54 typedef base::Callback<void(const base::DictionaryValue& result 55 typedef base::Callback<void(scoped_ptr<base::DictionaryValue> result
55 )> DictionaryValueCallbackWithoutStatus; 56 )> DictionaryValueCallbackWithoutStatus;
56 57
57 // A callback to handle errors for method call. 58 // A callback to handle errors for method call.
58 typedef base::Callback<void(const std::string& error_name, 59 typedef base::Callback<void(const std::string& error_name,
59 const std::string& error_message)> ErrorCallback; 60 const std::string& error_message)> ErrorCallback;
60 61
61 ShillClientHelper(dbus::Bus* bus, dbus::ObjectProxy* proxy); 62 ShillClientHelper(dbus::Bus* bus, dbus::ObjectProxy* proxy);
62 63
63 virtual ~ShillClientHelper(); 64 virtual ~ShillClientHelper();
64 65
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // Note: This should remain the last member so it'll be destroyed and 170 // Note: This should remain the last member so it'll be destroyed and
170 // invalidate its weak pointers before any other members are destroyed. 171 // invalidate its weak pointers before any other members are destroyed.
171 base::WeakPtrFactory<ShillClientHelper> weak_ptr_factory_; 172 base::WeakPtrFactory<ShillClientHelper> weak_ptr_factory_;
172 173
173 DISALLOW_COPY_AND_ASSIGN(ShillClientHelper); 174 DISALLOW_COPY_AND_ASSIGN(ShillClientHelper);
174 }; 175 };
175 176
176 } // namespace chromeos 177 } // namespace chromeos
177 178
178 #endif // CHROMEOS_DBUS_SHILL_CLIENT_HELPER_H_ 179 #endif // CHROMEOS_DBUS_SHILL_CLIENT_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698