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

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

Issue 10949030: This converts the Shill clients to allow propagation of shill errors (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Review changes Created 8 years, 3 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
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_SERVICE_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_
6 #define CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ 6 #define CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // Calls GetProperties method. 58 // Calls GetProperties method.
59 // |callback| is called after the method call succeeds. 59 // |callback| is called after the method call succeeds.
60 virtual void GetProperties(const dbus::ObjectPath& service_path, 60 virtual void GetProperties(const dbus::ObjectPath& service_path,
61 const DictionaryValueCallback& callback) = 0; 61 const DictionaryValueCallback& callback) = 0;
62 62
63 // Calls SetProperty method. 63 // Calls SetProperty method.
64 // |callback| is called after the method call succeeds. 64 // |callback| is called after the method call succeeds.
65 virtual void SetProperty(const dbus::ObjectPath& service_path, 65 virtual void SetProperty(const dbus::ObjectPath& service_path,
66 const std::string& name, 66 const std::string& name,
67 const base::Value& value, 67 const base::Value& value,
68 const VoidDBusMethodCallback& callback) = 0; 68 const base::Closure& callback,
69 const ErrorCallback& error_callback) = 0;
69 70
70 // Calls ClearProperty method. 71 // Calls ClearProperty method.
71 // |callback| is called after the method call succeeds. 72 // |callback| is called after the method call succeeds.
72 virtual void ClearProperty(const dbus::ObjectPath& service_path, 73 virtual void ClearProperty(const dbus::ObjectPath& service_path,
73 const std::string& name, 74 const std::string& name,
74 const VoidDBusMethodCallback& callback) = 0; 75 const base::Closure& callback,
76 const ErrorCallback& error_callback) = 0;
75 77
76 // Calls Connect method. 78 // Calls Connect method.
77 // |callback| is called after the method call succeeds. 79 // |callback| is called after the method call succeeds.
78 virtual void Connect(const dbus::ObjectPath& service_path, 80 virtual void Connect(const dbus::ObjectPath& service_path,
79 const base::Closure& callback, 81 const base::Closure& callback,
80 const ErrorCallback& error_callback) = 0; 82 const ErrorCallback& error_callback) = 0;
81 83
82 // Calls Disconnect method. 84 // Calls Disconnect method.
83 // |callback| is called after the method call succeeds. 85 // |callback| is called after the method call succeeds.
84 virtual void Disconnect(const dbus::ObjectPath& service_path, 86 virtual void Disconnect(const dbus::ObjectPath& service_path,
85 const VoidDBusMethodCallback& callback) = 0; 87 const base::Closure& callback,
88 const ErrorCallback& error_callback) = 0;
86 89
87 // Calls Remove method. 90 // Calls Remove method.
88 // |callback| is called after the method call succeeds. 91 // |callback| is called after the method call succeeds.
89 virtual void Remove(const dbus::ObjectPath& service_path, 92 virtual void Remove(const dbus::ObjectPath& service_path,
90 const VoidDBusMethodCallback& callback) = 0; 93 const base::Closure& callback,
94 const ErrorCallback& error_callback) = 0;
91 95
92 // Calls ActivateCellularModem method. 96 // Calls ActivateCellularModem method.
93 // |callback| is called after the method call succeeds. 97 // |callback| is called after the method call succeeds.
94 virtual void ActivateCellularModem( 98 virtual void ActivateCellularModem(
95 const dbus::ObjectPath& service_path, 99 const dbus::ObjectPath& service_path,
96 const std::string& carrier, 100 const std::string& carrier,
97 const VoidDBusMethodCallback& callback) = 0; 101 const base::Closure& callback,
102 const ErrorCallback& error_callback) = 0;
98 103
99 // DEPRECATED DO NOT USE: Calls ActivateCellularModem method and blocks until 104 // DEPRECATED DO NOT USE: Calls ActivateCellularModem method and blocks until
100 // the method call finishes. 105 // the method call finishes.
101 // 106 //
102 // TODO(hashimoto): Refactor CrosActivateCellularModem and remove this method. 107 // TODO(hashimoto): Refactor CrosActivateCellularModem and remove this method.
103 // crosbug.com/29902 108 // crosbug.com/29902
104 virtual bool CallActivateCellularModemAndBlock( 109 virtual bool CallActivateCellularModemAndBlock(
105 const dbus::ObjectPath& service_path, 110 const dbus::ObjectPath& service_path,
106 const std::string& carrier) = 0; 111 const std::string& carrier) = 0;
107 112
108 protected: 113 protected:
109 // Create() should be used instead. 114 // Create() should be used instead.
110 ShillServiceClient(); 115 ShillServiceClient();
111 116
112 private: 117 private:
113 DISALLOW_COPY_AND_ASSIGN(ShillServiceClient); 118 DISALLOW_COPY_AND_ASSIGN(ShillServiceClient);
114 }; 119 };
115 120
116 } // namespace chromeos 121 } // namespace chromeos
117 122
118 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ 123 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698