| 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_SERVICE_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_FLIMFLAM_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" |
| 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 base { | 16 namespace base { |
| 17 | 17 |
| 18 class Value; | 18 class Value; |
| 19 class DictionaryValue; | 19 class DictionaryValue; |
| 20 | 20 |
| 21 } // namespace base | 21 } // namespace base |
| 22 | 22 |
| 23 namespace dbus { | 23 namespace dbus { |
| 24 | 24 |
| 25 class Bus; | 25 class Bus; |
| 26 class ObjectPath; | 26 class ObjectPath; |
| 27 | 27 |
| 28 } // namespace dbus | 28 } // namespace dbus |
| 29 | 29 |
| 30 namespace chromeos { | 30 namespace chromeos { |
| 31 | 31 |
| 32 // FlimflamServiceClient is used to communicate with the Flimflam Service | 32 // ShillServiceClient is used to communicate with the Shill Service |
| 33 // service. | 33 // service. |
| 34 // All methods should be called from the origin thread which initializes the | 34 // All methods should be called from the origin thread which initializes the |
| 35 // DBusThreadManager instance. | 35 // DBusThreadManager instance. |
| 36 class CHROMEOS_EXPORT FlimflamServiceClient { | 36 class CHROMEOS_EXPORT ShillServiceClient { |
| 37 public: | 37 public: |
| 38 typedef FlimflamClientHelper::PropertyChangedHandler PropertyChangedHandler; | 38 typedef ShillClientHelper::PropertyChangedHandler PropertyChangedHandler; |
| 39 typedef FlimflamClientHelper::DictionaryValueCallback DictionaryValueCallback; | 39 typedef ShillClientHelper::DictionaryValueCallback DictionaryValueCallback; |
| 40 typedef FlimflamClientHelper::ErrorCallback ErrorCallback; | 40 typedef ShillClientHelper::ErrorCallback ErrorCallback; |
| 41 | 41 |
| 42 virtual ~FlimflamServiceClient(); | 42 virtual ~ShillServiceClient(); |
| 43 | 43 |
| 44 // Factory function, creates a new instance which is owned by the caller. | 44 // Factory function, creates a new instance which is owned by the caller. |
| 45 // For normal usage, access the singleton via DBusThreadManager::Get(). | 45 // For normal usage, access the singleton via DBusThreadManager::Get(). |
| 46 static FlimflamServiceClient* Create(DBusClientImplementationType type, | 46 static ShillServiceClient* Create(DBusClientImplementationType type, |
| 47 dbus::Bus* bus); | 47 dbus::Bus* bus); |
| 48 | 48 |
| 49 // Sets PropertyChanged signal handler. | 49 // Sets PropertyChanged signal handler. |
| 50 virtual void SetPropertyChangedHandler( | 50 virtual void SetPropertyChangedHandler( |
| 51 const dbus::ObjectPath& service_path, | 51 const dbus::ObjectPath& service_path, |
| 52 const PropertyChangedHandler& handler) = 0; | 52 const PropertyChangedHandler& handler) = 0; |
| 53 | 53 |
| 54 // Resets PropertyChanged signal handler. | 54 // Resets PropertyChanged signal handler. |
| 55 virtual void ResetPropertyChangedHandler( | 55 virtual void ResetPropertyChangedHandler( |
| 56 const dbus::ObjectPath& service_path) = 0; | 56 const dbus::ObjectPath& service_path) = 0; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 // the method call finishes. | 100 // the method call finishes. |
| 101 // | 101 // |
| 102 // TODO(hashimoto): Refactor CrosActivateCellularModem and remove this method. | 102 // TODO(hashimoto): Refactor CrosActivateCellularModem and remove this method. |
| 103 // crosbug.com/29902 | 103 // crosbug.com/29902 |
| 104 virtual bool CallActivateCellularModemAndBlock( | 104 virtual bool CallActivateCellularModemAndBlock( |
| 105 const dbus::ObjectPath& service_path, | 105 const dbus::ObjectPath& service_path, |
| 106 const std::string& carrier) = 0; | 106 const std::string& carrier) = 0; |
| 107 | 107 |
| 108 protected: | 108 protected: |
| 109 // Create() should be used instead. | 109 // Create() should be used instead. |
| 110 FlimflamServiceClient(); | 110 ShillServiceClient(); |
| 111 | 111 |
| 112 private: | 112 private: |
| 113 DISALLOW_COPY_AND_ASSIGN(FlimflamServiceClient); | 113 DISALLOW_COPY_AND_ASSIGN(ShillServiceClient); |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 } // namespace chromeos | 116 } // namespace chromeos |
| 117 | 117 |
| 118 #endif // CHROMEOS_DBUS_FLIMFLAM_SERVICE_CLIENT_H_ | 118 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_H_ |
| OLD | NEW |