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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 | 51 |
52 // Adds an entry to the profile only. |entry_path| corresponds to a | 52 // Adds an entry to the profile only. |entry_path| corresponds to a |
53 // 'service_path' and a corresponding entry will be added to | 53 // 'service_path' and a corresponding entry will be added to |
54 // ShillManagerClient ServiceCompleteList. No checking or updating of | 54 // ShillManagerClient ServiceCompleteList. No checking or updating of |
55 // ShillServiceClient is performed. | 55 // ShillServiceClient is performed. |
56 virtual void AddEntry(const std::string& profile_path, | 56 virtual void AddEntry(const std::string& profile_path, |
57 const std::string& entry_path, | 57 const std::string& entry_path, |
58 const base::DictionaryValue& properties) = 0; | 58 const base::DictionaryValue& properties) = 0; |
59 | 59 |
60 // Adds a service to the profile, copying properties from the | 60 // Adds a service to the profile, copying properties from the |
61 // ShillServiceClient entry (which must be present). Also sets the Profile | 61 // ShillServiceClient entry. Returns false if no Service entry exists or |
62 // property of the service in ShillServiceClient. | 62 // if a Profile entry already exists. Also sets the Profile property of |
63 // the service in ShillServiceClient. | |
63 virtual bool AddService(const std::string& profile_path, | 64 virtual bool AddService(const std::string& profile_path, |
64 const std::string& service_path) = 0; | 65 const std::string& service_path) = 0; |
65 | 66 |
67 // Updates an existing profile service entry. Returns false if no entry | |
pneubeck (no reviews)
2014/05/14 08:12:17
unclear what 'Updates' means.
stevenjb
2014/05/14 17:08:10
Done.
| |
68 // exists. | |
69 virtual bool UpdateService(const std::string& profile_path, | |
70 const std::string& service_path) = 0; | |
71 | |
66 // Sets |profiles| to the current list of profile paths. | 72 // Sets |profiles| to the current list of profile paths. |
67 virtual void GetProfilePaths(std::vector<std::string>* profiles) = 0; | 73 virtual void GetProfilePaths(std::vector<std::string>* profiles) = 0; |
68 | 74 |
75 // Sets |properties| to the entry for |service_path|, sets |profile_path| | |
76 // to the path of the profile with the entry, and returns true if the | |
77 // service exists in any profile. | |
78 virtual bool GetService(const std::string& service_path, | |
79 std::string* profile_path, | |
80 base::DictionaryValue* properties) = 0; | |
81 | |
82 // Remove all profile entries. | |
83 virtual void ClearProfiles() = 0; | |
84 | |
69 protected: | 85 protected: |
70 virtual ~TestInterface() {} | 86 virtual ~TestInterface() {} |
71 }; | 87 }; |
72 | 88 |
73 virtual ~ShillProfileClient(); | 89 virtual ~ShillProfileClient(); |
74 | 90 |
75 // Factory function, creates a new instance which is owned by the caller. | 91 // Factory function, creates a new instance which is owned by the caller. |
76 // For normal usage, access the singleton via DBusThreadManager::Get(). | 92 // For normal usage, access the singleton via DBusThreadManager::Get(). |
77 static ShillProfileClient* Create(); | 93 static ShillProfileClient* Create(); |
78 | 94 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 // Create() should be used instead. | 135 // Create() should be used instead. |
120 ShillProfileClient(); | 136 ShillProfileClient(); |
121 | 137 |
122 private: | 138 private: |
123 DISALLOW_COPY_AND_ASSIGN(ShillProfileClient); | 139 DISALLOW_COPY_AND_ASSIGN(ShillProfileClient); |
124 }; | 140 }; |
125 | 141 |
126 } // namespace chromeos | 142 } // namespace chromeos |
127 | 143 |
128 #endif // CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_H_ | 144 #endif // CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_H_ |
OLD | NEW |