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_MANAGER_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_H_ |
6 #define CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_H_ | 6 #define CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
185 const base::DictionaryValue& properties, | 185 const base::DictionaryValue& properties, |
186 const ObjectPathCallback& callback, | 186 const ObjectPathCallback& callback, |
187 const ErrorCallback& error_callback) = 0; | 187 const ErrorCallback& error_callback) = 0; |
188 | 188 |
189 // Calls GetService method. | 189 // Calls GetService method. |
190 // |callback| is called after the method call succeeds. | 190 // |callback| is called after the method call succeeds. |
191 virtual void GetService(const base::DictionaryValue& properties, | 191 virtual void GetService(const base::DictionaryValue& properties, |
192 const ObjectPathCallback& callback, | 192 const ObjectPathCallback& callback, |
193 const ErrorCallback& error_callback) = 0; | 193 const ErrorCallback& error_callback) = 0; |
194 | 194 |
195 // Verify that the given data corresponds to a trusted device, and return true | 195 // Verifies that the given data corresponds to a trusted device, and returns |
196 // to the callback if it is. | 196 // true to the callback if it is. |
197 virtual void VerifyDestination(const VerificationProperties& properties, | 197 virtual void VerifyDestination(const VerificationProperties& properties, |
198 const BooleanCallback& callback, | 198 const BooleanCallback& callback, |
199 const ErrorCallback& error_callback) = 0; | 199 const ErrorCallback& error_callback) = 0; |
200 | 200 |
201 // Verify that the given data corresponds to a trusted device, and if it is, | 201 // Verifies that the given data corresponds to a trusted device, and if it is, |
202 // return the encrypted credentials for connecting to the network represented | 202 // returns the encrypted credentials for connecting to the network represented |
203 // by the given |service_path|, encrypted using the |public_key| for the | 203 // by the given |service_path|, encrypted using the |public_key| for the |
204 // trusted device. If the device is not trusted, return the empty string. | 204 // trusted device. If the device is not trusted, returns the empty string. |
205 virtual void VerifyAndEncryptCredentials( | 205 virtual void VerifyAndEncryptCredentials( |
206 const VerificationProperties& properties, | 206 const VerificationProperties& properties, |
207 const std::string& service_path, | 207 const std::string& service_path, |
208 const StringCallback& callback, | 208 const StringCallback& callback, |
209 const ErrorCallback& error_callback) = 0; | 209 const ErrorCallback& error_callback) = 0; |
210 | 210 |
211 // Verify that the given data corresponds to a trusted device, and return the | 211 // Verifies that the given data corresponds to a trusted device, and returns |
212 // |data| encrypted using the |public_key| for the trusted device. If the | 212 // the |data| encrypted using the |public_key| for the trusted device. If the |
213 // device is not trusted, return the empty string. | 213 // device is not trusted, returns the empty string. |
214 virtual void VerifyAndEncryptData(const VerificationProperties& properties, | 214 virtual void VerifyAndEncryptData(const VerificationProperties& properties, |
215 const std::string& data, | 215 const std::string& data, |
216 const StringCallback& callback, | 216 const StringCallback& callback, |
217 const ErrorCallback& error_callback) = 0; | 217 const ErrorCallback& error_callback) = 0; |
218 | 218 |
219 // For each technology present, connect to the "best" service available. | 219 // For each technology present, connects to the "best" service available. |
220 // Called once the user is logged in and certificates are loaded. | 220 // Called once the user is logged in and certificates are loaded. |
221 virtual void ConnectToBestServices(const base::Closure& callback, | 221 virtual void ConnectToBestServices(const base::Closure& callback, |
222 const ErrorCallback& error_callback) = 0; | 222 const ErrorCallback& error_callback) = 0; |
223 | 223 |
224 // Requests that shill program the NIC so that packets incoming on | |
225 // |ip_connection| wake up the CPU. | |
226 virtual void AddWakeOnPacketConnection( | |
227 const std::string& ip_connection, | |
Daniel Erat
2014/07/22 20:32:01
this should use net/base/ip_endpoint.h instead of
| |
228 const base::Closure& callback, | |
229 const ErrorCallback& error_callback) = 0; | |
230 | |
231 // Removes a request to wake up on packets coming on |ip_connection|. | |
232 virtual void RemoveWakeOnPacketConnection( | |
233 const std::string& ip_connection, | |
234 const base::Closure& callback, | |
235 const ErrorCallback& error_callback) = 0; | |
236 | |
237 // Clears all requests to wake up on packets. | |
238 virtual void RemoveAllWakeOnPacketConnections( | |
239 const base::Closure& callback, | |
240 const ErrorCallback& error_callback) = 0; | |
241 | |
224 // Returns an interface for testing (stub only), or returns NULL. | 242 // Returns an interface for testing (stub only), or returns NULL. |
225 virtual TestInterface* GetTestInterface() = 0; | 243 virtual TestInterface* GetTestInterface() = 0; |
226 | 244 |
227 protected: | 245 protected: |
228 friend class ShillManagerClientTest; | 246 friend class ShillManagerClientTest; |
229 | 247 |
230 // Create() should be used instead. | 248 // Create() should be used instead. |
231 ShillManagerClient(); | 249 ShillManagerClient(); |
232 | 250 |
233 private: | 251 private: |
234 DISALLOW_COPY_AND_ASSIGN(ShillManagerClient); | 252 DISALLOW_COPY_AND_ASSIGN(ShillManagerClient); |
235 }; | 253 }; |
236 | 254 |
237 } // namespace chromeos | 255 } // namespace chromeos |
238 | 256 |
239 #endif // CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_H_ | 257 #endif // CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_H_ |
OLD | NEW |