| 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" |
| 11 #include "base/callback.h" | |
| 12 #include "chromeos/chromeos_export.h" | 11 #include "chromeos/chromeos_export.h" |
| 13 #include "chromeos/dbus/dbus_client_implementation_type.h" | 12 #include "chromeos/dbus/dbus_client_implementation_type.h" |
| 13 #include "chromeos/dbus/dbus_method_call_status.h" |
| 14 #include "chromeos/dbus/shill_client_helper.h" | 14 #include "chromeos/dbus/shill_client_helper.h" |
| 15 | 15 |
| 16 namespace dbus { | 16 namespace dbus { |
| 17 | 17 |
| 18 class Bus; | 18 class Bus; |
| 19 class ObjectPath; |
| 19 | 20 |
| 20 } // namespace dbus | 21 } // namespace dbus |
| 21 | 22 |
| 22 namespace chromeos { | 23 namespace chromeos { |
| 23 | 24 |
| 24 class ShillPropertyChangedObserver; | 25 class ShillPropertyChangedObserver; |
| 25 | 26 |
| 26 // ShillManagerClient is used to communicate with the Shill Manager | 27 // ShillManagerClient is used to communicate with the Shill Manager |
| 27 // service. All methods should be called from the origin thread which | 28 // service. All methods should be called from the origin thread which |
| 28 // initializes the DBusThreadManager instance. | 29 // initializes the DBusThreadManager instance. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 52 virtual void RemoveTechnology(const std::string& type) = 0; | 53 virtual void RemoveTechnology(const std::string& type) = 0; |
| 53 virtual void SetTechnologyInitializing(const std::string& type, | 54 virtual void SetTechnologyInitializing(const std::string& type, |
| 54 bool initializing) = 0; | 55 bool initializing) = 0; |
| 55 virtual void AddGeoNetwork(const std::string& technology, | 56 virtual void AddGeoNetwork(const std::string& technology, |
| 56 const base::DictionaryValue& network) = 0; | 57 const base::DictionaryValue& network) = 0; |
| 57 | 58 |
| 58 // Used to reset all properties; does not notify observers. | 59 // Used to reset all properties; does not notify observers. |
| 59 virtual void ClearProperties() = 0; | 60 virtual void ClearProperties() = 0; |
| 60 | 61 |
| 61 protected: | 62 protected: |
| 62 ~TestInterface() {} | 63 virtual ~TestInterface() {} |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 virtual ~ShillManagerClient(); | 66 virtual ~ShillManagerClient(); |
| 66 | 67 |
| 67 // Factory function, creates a new instance which is owned by the caller. | 68 // Factory function, creates a new instance which is owned by the caller. |
| 68 // For normal usage, access the singleton via DBusThreadManager::Get(). | 69 // For normal usage, access the singleton via DBusThreadManager::Get(). |
| 69 static ShillManagerClient* Create(DBusClientImplementationType type, | 70 static ShillManagerClient* Create(DBusClientImplementationType type, |
| 70 dbus::Bus* bus); | 71 dbus::Bus* bus); |
| 71 | 72 |
| 72 // Adds a property changed |observer|. | 73 // Adds a property changed |observer|. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 virtual void DisableTechnology(const std::string& type, | 119 virtual void DisableTechnology(const std::string& type, |
| 119 const base::Closure& callback, | 120 const base::Closure& callback, |
| 120 const ErrorCallback& error_callback) = 0; | 121 const ErrorCallback& error_callback) = 0; |
| 121 | 122 |
| 122 // Calls ConfigureService method. | 123 // Calls ConfigureService method. |
| 123 // |callback| is called after the method call succeeds. | 124 // |callback| is called after the method call succeeds. |
| 124 virtual void ConfigureService(const base::DictionaryValue& properties, | 125 virtual void ConfigureService(const base::DictionaryValue& properties, |
| 125 const ObjectPathCallback& callback, | 126 const ObjectPathCallback& callback, |
| 126 const ErrorCallback& error_callback) = 0; | 127 const ErrorCallback& error_callback) = 0; |
| 127 | 128 |
| 129 // Calls ConfigureServiceForProfile method. |
| 130 // |callback| is called with the created service if the method call succeeds. |
| 131 virtual void ConfigureServiceForProfile( |
| 132 const dbus::ObjectPath& profile_path, |
| 133 const base::DictionaryValue& properties, |
| 134 const ObjectPathCallback& callback, |
| 135 const ErrorCallback& error_callback) = 0; |
| 136 |
| 128 // Calls GetService method. | 137 // Calls GetService method. |
| 129 // |callback| is called after the method call succeeds. | 138 // |callback| is called after the method call succeeds. |
| 130 virtual void GetService(const base::DictionaryValue& properties, | 139 virtual void GetService(const base::DictionaryValue& properties, |
| 131 const ObjectPathCallback& callback, | 140 const ObjectPathCallback& callback, |
| 132 const ErrorCallback& error_callback) = 0; | 141 const ErrorCallback& error_callback) = 0; |
| 133 | 142 |
| 134 // Verify that the given data corresponds to a trusted device, and return true | 143 // Verify that the given data corresponds to a trusted device, and return true |
| 135 // to the callback if it is. | 144 // to the callback if it is. |
| 136 virtual void VerifyDestination(const std::string& certificate, | 145 virtual void VerifyDestination(const std::string& certificate, |
| 137 const std::string& public_key, | 146 const std::string& public_key, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 // Create() should be used instead. | 189 // Create() should be used instead. |
| 181 ShillManagerClient(); | 190 ShillManagerClient(); |
| 182 | 191 |
| 183 private: | 192 private: |
| 184 DISALLOW_COPY_AND_ASSIGN(ShillManagerClient); | 193 DISALLOW_COPY_AND_ASSIGN(ShillManagerClient); |
| 185 }; | 194 }; |
| 186 | 195 |
| 187 } // namespace chromeos | 196 } // namespace chromeos |
| 188 | 197 |
| 189 #endif // CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_H_ | 198 #endif // CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_H_ |
| OLD | NEW |