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_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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // Calls GetProperties method. | 59 // Calls GetProperties method. |
60 // |callback| is called after the method call succeeds. | 60 // |callback| is called after the method call succeeds. |
61 virtual void GetProperties(const dbus::ObjectPath& service_path, | 61 virtual void GetProperties(const dbus::ObjectPath& service_path, |
62 const DictionaryValueCallback& callback) = 0; | 62 const DictionaryValueCallback& callback) = 0; |
63 | 63 |
64 // Calls SetProperty method. | 64 // Calls SetProperty method. |
65 // |callback| is called after the method call succeeds. | 65 // |callback| is called after the method call succeeds. |
66 virtual void SetProperty(const dbus::ObjectPath& service_path, | 66 virtual void SetProperty(const dbus::ObjectPath& service_path, |
67 const std::string& name, | 67 const std::string& name, |
68 const base::Value& value, | 68 const base::Value& value, |
69 const VoidDBusMethodCallback& callback) = 0; | 69 const base::Closure& callback, |
| 70 const ErrorCallback& error_callback) = 0; |
70 | 71 |
71 // Calls ClearProperty method. | 72 // Calls ClearProperty method. |
72 // |callback| is called after the method call succeeds. | 73 // |callback| is called after the method call succeeds. |
73 virtual void ClearProperty(const dbus::ObjectPath& service_path, | 74 virtual void ClearProperty(const dbus::ObjectPath& service_path, |
74 const std::string& name, | 75 const std::string& name, |
75 const VoidDBusMethodCallback& callback) = 0; | 76 const base::Closure& callback, |
| 77 const ErrorCallback& error_callback) = 0; |
76 | 78 |
77 // Calls Connect method. | 79 // Calls Connect method. |
78 // |callback| is called after the method call succeeds. | 80 // |callback| is called after the method call succeeds. |
79 virtual void Connect(const dbus::ObjectPath& service_path, | 81 virtual void Connect(const dbus::ObjectPath& service_path, |
80 const base::Closure& callback, | 82 const base::Closure& callback, |
81 const ErrorCallback& error_callback) = 0; | 83 const ErrorCallback& error_callback) = 0; |
82 | 84 |
83 // Calls Disconnect method. | 85 // Calls Disconnect method. |
84 // |callback| is called after the method call succeeds. | 86 // |callback| is called after the method call succeeds. |
85 virtual void Disconnect(const dbus::ObjectPath& service_path, | 87 virtual void Disconnect(const dbus::ObjectPath& service_path, |
86 const VoidDBusMethodCallback& callback) = 0; | 88 const base::Closure& callback, |
| 89 const ErrorCallback& error_callback) = 0; |
87 | 90 |
88 // Calls Remove method. | 91 // Calls Remove method. |
89 // |callback| is called after the method call succeeds. | 92 // |callback| is called after the method call succeeds. |
90 virtual void Remove(const dbus::ObjectPath& service_path, | 93 virtual void Remove(const dbus::ObjectPath& service_path, |
91 const VoidDBusMethodCallback& callback) = 0; | 94 const base::Closure& callback, |
| 95 const ErrorCallback& error_callback) = 0; |
92 | 96 |
93 // Calls ActivateCellularModem method. | 97 // Calls ActivateCellularModem method. |
94 // |callback| is called after the method call succeeds. | 98 // |callback| is called after the method call succeeds. |
95 virtual void ActivateCellularModem( | 99 virtual void ActivateCellularModem( |
96 const dbus::ObjectPath& service_path, | 100 const dbus::ObjectPath& service_path, |
97 const std::string& carrier, | 101 const std::string& carrier, |
98 const VoidDBusMethodCallback& callback) = 0; | 102 const base::Closure& callback, |
| 103 const ErrorCallback& error_callback) = 0; |
99 | 104 |
100 // DEPRECATED DO NOT USE: Calls ActivateCellularModem method and blocks until | 105 // DEPRECATED DO NOT USE: Calls ActivateCellularModem method and blocks until |
101 // the method call finishes. | 106 // the method call finishes. |
102 // | 107 // |
103 // TODO(hashimoto): Refactor CrosActivateCellularModem and remove this method. | 108 // TODO(hashimoto): Refactor CrosActivateCellularModem and remove this method. |
104 // crosbug.com/29902 | 109 // crosbug.com/29902 |
105 virtual bool CallActivateCellularModemAndBlock( | 110 virtual bool CallActivateCellularModemAndBlock( |
106 const dbus::ObjectPath& service_path, | 111 const dbus::ObjectPath& service_path, |
107 const std::string& carrier) = 0; | 112 const std::string& carrier) = 0; |
108 | 113 |
109 protected: | 114 protected: |
110 // Create() should be used instead. | 115 // Create() should be used instead. |
111 ShillServiceClient(); | 116 ShillServiceClient(); |
112 | 117 |
113 private: | 118 private: |
114 DISALLOW_COPY_AND_ASSIGN(ShillServiceClient); | 119 DISALLOW_COPY_AND_ASSIGN(ShillServiceClient); |
115 }; | 120 }; |
116 | 121 |
117 } // namespace chromeos | 122 } // namespace chromeos |
118 | 123 |
119 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ | 124 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ |
OLD | NEW |