| 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_PROFILE_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_H_ | 6 #define CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 public: | 38 public: |
| 39 typedef ShillClientHelper::PropertyChangedHandler PropertyChangedHandler; | 39 typedef ShillClientHelper::PropertyChangedHandler PropertyChangedHandler; |
| 40 typedef ShillClientHelper::DictionaryValueCallbackWithoutStatus | 40 typedef ShillClientHelper::DictionaryValueCallbackWithoutStatus |
| 41 DictionaryValueCallbackWithoutStatus; | 41 DictionaryValueCallbackWithoutStatus; |
| 42 typedef ShillClientHelper::ErrorCallback ErrorCallback; | 42 typedef ShillClientHelper::ErrorCallback ErrorCallback; |
| 43 | 43 |
| 44 // Interface for setting up services for testing. Accessed through | 44 // Interface for setting up services for testing. Accessed through |
| 45 // GetTestInterface(), only implemented in the stub implementation. | 45 // GetTestInterface(), only implemented in the stub implementation. |
| 46 class TestInterface { | 46 class TestInterface { |
| 47 public: | 47 public: |
| 48 virtual void AddProfile(const std::string& profile_path) = 0; | 48 // Does not modify the profiles list in the ShillManagerClientStub and |
| 49 // doesn't send any notifications. |
| 50 virtual void AddProfile(const std::string& profile_path, |
| 51 const std::string& userhash) = 0; |
| 49 virtual void AddEntry(const std::string& profile_path, | 52 virtual void AddEntry(const std::string& profile_path, |
| 50 const std::string& entry_path, | 53 const std::string& entry_path, |
| 51 const base::DictionaryValue& properties) = 0; | 54 const base::DictionaryValue& properties) = 0; |
| 52 virtual bool AddService(const std::string& service_path) = 0; | 55 virtual bool AddService(const std::string& service_path) = 0; |
| 53 | 56 |
| 54 protected: | 57 protected: |
| 55 virtual ~TestInterface() {} | 58 virtual ~TestInterface() {} |
| 56 }; | 59 }; |
| 57 | 60 |
| 58 virtual ~ShillProfileClient(); | 61 virtual ~ShillProfileClient(); |
| 59 | 62 |
| 60 // Factory function, creates a new instance which is owned by the caller. | 63 // Factory function, creates a new instance which is owned by the caller. |
| 61 // For normal usage, access the singleton via DBusThreadManager::Get(). | 64 // For normal usage, access the singleton via DBusThreadManager::Get(). |
| 62 static ShillProfileClient* Create(DBusClientImplementationType type, | 65 static ShillProfileClient* Create(DBusClientImplementationType type, |
| 63 dbus::Bus* bus); | 66 dbus::Bus* bus); |
| 64 | 67 |
| 65 // Adds a property changed |observer| for the profile at |profile_path|. | 68 // Adds a property changed |observer| for the profile at |profile_path|. |
| 66 virtual void AddPropertyChangedObserver( | 69 virtual void AddPropertyChangedObserver( |
| 67 const dbus::ObjectPath& profile_path, | 70 const dbus::ObjectPath& profile_path, |
| 68 ShillPropertyChangedObserver* observer) = 0; | 71 ShillPropertyChangedObserver* observer) = 0; |
| 69 | 72 |
| 70 // Removes a property changed |observer| for the profile at |profile_path|. | 73 // Removes a property changed |observer| for the profile at |profile_path|. |
| 71 virtual void RemovePropertyChangedObserver( | 74 virtual void RemovePropertyChangedObserver( |
| 72 const dbus::ObjectPath& profile_path, | 75 const dbus::ObjectPath& profile_path, |
| 73 ShillPropertyChangedObserver* observer) = 0; | 76 ShillPropertyChangedObserver* observer) = 0; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 100 // Create() should be used instead. | 103 // Create() should be used instead. |
| 101 ShillProfileClient(); | 104 ShillProfileClient(); |
| 102 | 105 |
| 103 private: | 106 private: |
| 104 DISALLOW_COPY_AND_ASSIGN(ShillProfileClient); | 107 DISALLOW_COPY_AND_ASSIGN(ShillProfileClient); |
| 105 }; | 108 }; |
| 106 | 109 |
| 107 } // namespace chromeos | 110 } // namespace chromeos |
| 108 | 111 |
| 109 #endif // CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_H_ | 112 #endif // CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_H_ |
| OLD | NEW |