summaryrefslogtreecommitdiff
path: root/profile.h
diff options
context:
space:
mode:
authorPaul Stewart <pstew@chromium.org>2012-01-26 22:51:33 -0800
committerGerrit <chrome-bot@google.com>2012-01-27 16:47:03 -0800
commit7522551440b9a287bccf2d95a42357d04ab79814 (patch)
treeba594a6e30b179665bb95fc04f19255c5ac1caf5 /profile.h
parentb5790058b625a16e87a0ef1f9a0631f33f00701c (diff)
downloadshill-7522551440b9a287bccf2d95a42357d04ab79814.tar.gz
shill: Implement DeleteEntry Profile method
Implement the DeleteEntry DBus method call, which removes a Profile entry as well as detaching any connected services from the profile data. As a bonus change, modify Manager to consolidate finding a Profile that is suitable for a Service which does not have one. BUG=chromium-os:25542 TEST=New unit tests Change-Id: I6a954a41ab2d1b49f6432858e2263a63b5af21f1 Reviewed-on: https://gerrit.chromium.org/gerrit/14944 Reviewed-by: mukesh agrawal <quiche@chromium.org> Commit-Ready: Paul Stewart <pstew@chromium.org> Tested-by: Paul Stewart <pstew@chromium.org>
Diffstat (limited to 'profile.h')
-rw-r--r--profile.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/profile.h b/profile.h
index cf0b1996..2df6cf63 100644
--- a/profile.h
+++ b/profile.h
@@ -91,6 +91,10 @@ class Profile : public base::RefCounted<Profile> {
// return false.
virtual bool ConfigureDevice(const DeviceRefPtr &device);
+ // Remove a named entry from the profile. This includes detaching
+ // any service that uses this profile entry.
+ virtual void DeleteEntry(const std::string &entry_name, Error *error);
+
// Return whether |service| can configure itself from the profile.
bool ContainsService(const ServiceConstRefPtr &service);
@@ -125,6 +129,7 @@ class Profile : public base::RefCounted<Profile> {
private:
friend class ProfileAdaptorInterface;
+ FRIEND_TEST(ProfileTest, DeleteEntry);
FRIEND_TEST(ProfileTest, GetStoragePath);
FRIEND_TEST(ProfileTest, IsValidIdentifierToken);