summaryrefslogtreecommitdiff
path: root/profile.h
diff options
context:
space:
mode:
authorPaul Stewart <pstew@chromium.org>2012-01-27 08:34:47 -0800
committerGerrit <chrome-bot@google.com>2012-02-03 07:25:00 -0800
commit0756db95c9d39d6e6aa9a754e54b441eff46ff34 (patch)
tree39316f6c483a41245c0f000de9972638a73cc110 /profile.h
parent9f32d197feae49a42ceca12606bc61fe22b59065 (diff)
downloadshill-0756db95c9d39d6e6aa9a754e54b441eff46ff34.tar.gz
shill: Implement GetEntry on Profile
Implement "GetEntry" on profile_dbus_adaptor. This change adds the ability to look up a Service in the Manager by its StorageIdentifier and then to return its properties to the caller. If the Service does not exist in the manager, we have to read directly out of the Profile's store and build a DBus property dict out of its contents. This is a pretty gross method, and I've already created a bug to remove this as soon as we can diverge from the flimflam Profile API. crosbug.com/25813 BUG=chromium-os:25542 TEST=New unit tests + Manual: chrome://settings/internet now lists both visible and unavailable networks under "Remembered Networks" and clikcing on "Forget Network" purges the network from the profile. Change-Id: Ib2f0ab772e40a1f615206a7b985be446fc7facde Reviewed-on: https://gerrit.chromium.org/gerrit/15200 Commit-Ready: Paul Stewart <pstew@chromium.org> Reviewed-by: Paul Stewart <pstew@chromium.org> Tested-by: Paul Stewart <pstew@chromium.org>
Diffstat (limited to 'profile.h')
-rw-r--r--profile.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/profile.h b/profile.h
index 2df6cf63..70ba8a60 100644
--- a/profile.h
+++ b/profile.h
@@ -95,6 +95,10 @@ class Profile : public base::RefCounted<Profile> {
// any service that uses this profile entry.
virtual void DeleteEntry(const std::string &entry_name, Error *error);
+ // Return a service configured from the given profile entry.
+ virtual ServiceRefPtr GetServiceFromEntry(const std::string &entry_name,
+ Error *error);
+
// Return whether |service| can configure itself from the profile.
bool ContainsService(const ServiceConstRefPtr &service);
@@ -113,6 +117,10 @@ class Profile : public base::RefCounted<Profile> {
// Returns whether |name| matches this Profile's |name_|.
virtual bool MatchesIdentifier(const Identifier &name) const;
+ // Returns a read-only copy of the backing storage of the profile.
+ // TODO(pstew): Needed by ProfileDBusPropertyExporter crosbug.com/25813
+ const StoreInterface *GetConstStorage() const { return storage_.get(); }
+
protected:
// Protected getters
Manager *manager() const { return manager_; }