shill: Implement write-only properties
Certain properties (e.g. WIFI Passphrase) are write only and must
not be returned when Service.GetProperties() is called over D-Bus.
This CL implements WriteOnlyProperties, a write-only analog of the
read-only ConstProperties.
Also add a ReadablePropertyConstIterator which only returns the
readable properties. Switch over DBus adaptor and PropertyStore
to use that.
BUG=chromium-os:21196
TEST=Added 2 new unittests.
Change-Id: I52815cc395650e0b49e1acac8d4954deeebcee5d
Reviewed-on: https://gerrit.chromium.org/gerrit/11402
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
diff --git a/profile.cc b/profile.cc
index 7ba3aef..f922d39 100644
--- a/profile.cc
+++ b/profile.cc
@@ -202,11 +202,11 @@
return true;
}
-vector<string> Profile::EnumerateAvailableServices() {
- return manager_->EnumerateAvailableServices();
+vector<string> Profile::EnumerateAvailableServices(Error *error) {
+ return manager_->EnumerateAvailableServices(error);
}
-vector<string> Profile::EnumerateEntries() {
+vector<string> Profile::EnumerateEntries(Error */*error*/) {
// TODO(someone): Determine if we care about this wasteful copying; consider
// making GetGroups return a vector.
set<string> groups(storage_->GetGroups());
@@ -215,7 +215,7 @@
void Profile::HelpRegisterDerivedStrings(
const string &name,
- Strings(Profile::*get)(void),
+ Strings(Profile::*get)(Error *),
void(Profile::*set)(const Strings&, Error *)) {
store_.RegisterDerivedStrings(
name,