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_IPCONFIG_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_SHILL_IPCONFIG_CLIENT_H_ |
6 #define CHROMEOS_DBUS_SHILL_IPCONFIG_CLIENT_H_ | 6 #define CHROMEOS_DBUS_SHILL_IPCONFIG_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 18 matching lines...) Expand all Loading... | |
29 | 29 |
30 namespace chromeos { | 30 namespace chromeos { |
31 | 31 |
32 // ShillIPConfigClient is used to communicate with the Shill IPConfig | 32 // ShillIPConfigClient is used to communicate with the Shill IPConfig |
33 // service. All methods should be called from the origin thread which | 33 // service. All methods should be called from the origin thread which |
34 // initializes the DBusThreadManager instance. | 34 // initializes the DBusThreadManager instance. |
35 class CHROMEOS_EXPORT ShillIPConfigClient { | 35 class CHROMEOS_EXPORT ShillIPConfigClient { |
36 public: | 36 public: |
37 typedef ShillClientHelper::PropertyChangedHandler PropertyChangedHandler; | 37 typedef ShillClientHelper::PropertyChangedHandler PropertyChangedHandler; |
38 typedef ShillClientHelper::DictionaryValueCallback DictionaryValueCallback; | 38 typedef ShillClientHelper::DictionaryValueCallback DictionaryValueCallback; |
39 typedef ShillClientHelper::PropertyChangedObserver PropertyChangedObserver; | |
39 virtual ~ShillIPConfigClient(); | 40 virtual ~ShillIPConfigClient(); |
40 | 41 |
41 // Factory function, creates a new instance which is owned by the caller. | 42 // Factory function, creates a new instance which is owned by the caller. |
42 // For normal usage, access the singleton via DBusThreadManager::Get(). | 43 // For normal usage, access the singleton via DBusThreadManager::Get(). |
43 static ShillIPConfigClient* Create(DBusClientImplementationType type, | 44 static ShillIPConfigClient* Create(DBusClientImplementationType type, |
44 dbus::Bus* bus); | 45 dbus::Bus* bus); |
45 | 46 |
46 // Sets PropertyChanged signal handler. | 47 virtual void AddPropertyChangedObserver( |
hashimoto
2012/09/21 11:52:01
Please add method comments.
Greg Spencer (Chromium)
2012/09/21 22:03:47
Done.
| |
47 virtual void SetPropertyChangedHandler( | |
48 const dbus::ObjectPath& ipconfig_path, | 48 const dbus::ObjectPath& ipconfig_path, |
49 const PropertyChangedHandler& handler) = 0; | 49 PropertyChangedObserver* observer) = 0; |
50 | 50 |
51 // Resets PropertyChanged signal handler. | 51 virtual void RemovePropertyChangedObserver( |
52 virtual void ResetPropertyChangedHandler( | 52 const dbus::ObjectPath& ipconfig_path, |
53 const dbus::ObjectPath& ipconfig_path) = 0; | 53 PropertyChangedObserver* observer) = 0; |
54 | 54 |
55 // Refreshes the active IP configuration after service property changes and | 55 // Refreshes the active IP configuration after service property changes and |
56 // renews the DHCP lease, if any. | 56 // renews the DHCP lease, if any. |
57 virtual void Refresh(const dbus::ObjectPath& ipconfig_path, | 57 virtual void Refresh(const dbus::ObjectPath& ipconfig_path, |
58 const VoidDBusMethodCallback& callback) = 0; | 58 const VoidDBusMethodCallback& callback) = 0; |
59 | 59 |
60 // Calls GetProperties method. | 60 // Calls GetProperties method. |
61 // |callback| is called after the method call succeeds. | 61 // |callback| is called after the method call succeeds. |
62 virtual void GetProperties(const dbus::ObjectPath& ipconfig_path, | 62 virtual void GetProperties(const dbus::ObjectPath& ipconfig_path, |
63 const DictionaryValueCallback& callback) = 0; | 63 const DictionaryValueCallback& callback) = 0; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 // Create() should be used instead. | 100 // Create() should be used instead. |
101 ShillIPConfigClient(); | 101 ShillIPConfigClient(); |
102 | 102 |
103 private: | 103 private: |
104 DISALLOW_COPY_AND_ASSIGN(ShillIPConfigClient); | 104 DISALLOW_COPY_AND_ASSIGN(ShillIPConfigClient); |
105 }; | 105 }; |
106 | 106 |
107 } // namespace chromeos | 107 } // namespace chromeos |
108 | 108 |
109 #endif // CHROMEOS_DBUS_SHILL_IPCONFIG_CLIENT_H_ | 109 #endif // CHROMEOS_DBUS_SHILL_IPCONFIG_CLIENT_H_ |
OLD | NEW |