| 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_FLIMFLAM_MANAGER_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_FLIMFLAM_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" | 11 #include "base/callback.h" |
| 12 #include "chromeos/chromeos_export.h" | 12 #include "chromeos/chromeos_export.h" |
| 13 #include "chromeos/dbus/dbus_client_implementation_type.h" | 13 #include "chromeos/dbus/dbus_client_implementation_type.h" |
| 14 #include "chromeos/dbus/flimflam_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 | 19 |
| 20 } // namespace dbus | 20 } // namespace dbus |
| 21 | 21 |
| 22 namespace chromeos { | 22 namespace chromeos { |
| 23 | 23 |
| 24 // FlimflamManagerClient is used to communicate with the Flimflam Manager | 24 // ShillManagerClient is used to communicate with the Shill Manager |
| 25 // service. All methods should be called from the origin thread which | 25 // service. All methods should be called from the origin thread which |
| 26 // initializes the DBusThreadManager instance. | 26 // initializes the DBusThreadManager instance. |
| 27 class CHROMEOS_EXPORT FlimflamManagerClient { | 27 class CHROMEOS_EXPORT ShillManagerClient { |
| 28 public: | 28 public: |
| 29 typedef FlimflamClientHelper::PropertyChangedHandler PropertyChangedHandler; | 29 typedef ShillClientHelper::PropertyChangedHandler PropertyChangedHandler; |
| 30 typedef FlimflamClientHelper::DictionaryValueCallback DictionaryValueCallback; | 30 typedef ShillClientHelper::DictionaryValueCallback DictionaryValueCallback; |
| 31 | 31 |
| 32 virtual ~FlimflamManagerClient(); | 32 virtual ~ShillManagerClient(); |
| 33 | 33 |
| 34 // Factory function, creates a new instance which is owned by the caller. | 34 // Factory function, creates a new instance which is owned by the caller. |
| 35 // For normal usage, access the singleton via DBusThreadManager::Get(). | 35 // For normal usage, access the singleton via DBusThreadManager::Get(). |
| 36 static FlimflamManagerClient* Create(DBusClientImplementationType type, | 36 static ShillManagerClient* Create(DBusClientImplementationType type, |
| 37 dbus::Bus* bus); | 37 dbus::Bus* bus); |
| 38 | 38 |
| 39 // Sets PropertyChanged signal handler. | 39 // Sets PropertyChanged signal handler. |
| 40 virtual void SetPropertyChangedHandler( | 40 virtual void SetPropertyChangedHandler( |
| 41 const PropertyChangedHandler& handler) = 0; | 41 const PropertyChangedHandler& handler) = 0; |
| 42 | 42 |
| 43 // Resets PropertyChanged signal handler. | 43 // Resets PropertyChanged signal handler. |
| 44 virtual void ResetPropertyChangedHandler() = 0; | 44 virtual void ResetPropertyChangedHandler() = 0; |
| 45 | 45 |
| 46 // Calls GetProperties method. | 46 // Calls GetProperties method. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 virtual void ConfigureService(const base::DictionaryValue& properties, | 81 virtual void ConfigureService(const base::DictionaryValue& properties, |
| 82 const VoidDBusMethodCallback& callback) = 0; | 82 const VoidDBusMethodCallback& callback) = 0; |
| 83 | 83 |
| 84 // Calls GetService method. | 84 // Calls GetService method. |
| 85 // |callback| is called after the method call succeeds. | 85 // |callback| is called after the method call succeeds. |
| 86 virtual void GetService(const base::DictionaryValue& properties, | 86 virtual void GetService(const base::DictionaryValue& properties, |
| 87 const ObjectPathDBusMethodCallback& callback) = 0; | 87 const ObjectPathDBusMethodCallback& callback) = 0; |
| 88 | 88 |
| 89 protected: | 89 protected: |
| 90 // Create() should be used instead. | 90 // Create() should be used instead. |
| 91 FlimflamManagerClient(); | 91 ShillManagerClient(); |
| 92 | 92 |
| 93 private: | 93 private: |
| 94 DISALLOW_COPY_AND_ASSIGN(FlimflamManagerClient); | 94 DISALLOW_COPY_AND_ASSIGN(ShillManagerClient); |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 } // namespace chromeos | 97 } // namespace chromeos |
| 98 | 98 |
| 99 #endif // CHROMEOS_DBUS_FLIMFLAM_MANAGER_CLIENT_H_ | 99 #endif // CHROMEOS_DBUS_SHILL_MANAGER_CLIENT_H_ |
| OLD | NEW |