shill: Implement more of Profile DBus interface

Return a DBus path from Manager.GetActiveProfile().
Implement the "Profiles" property on the manager Manager.
Fix the "Entries" property on the Profile to only report group
identifiers that correspond to technologies (not ipconfig,
devices, etc).
Fix the "Services" Profile property, to only appear as a property
of the active profile.

BUG=chromium-os:25538, chromium-os:23702
TEST=Manual: Running "list-profiles" from the flimflam test suite now
works correctly.

Change-Id: I3120fe54f02662822186ac033fab0b3566449705
Reviewed-on: https://gerrit.chromium.org/gerrit/14904
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/manager.h b/manager.h
index 085abf3..f61d4ce 100644
--- a/manager.h
+++ b/manager.h
@@ -56,7 +56,8 @@
   void Start();
   void Stop();
 
-  const ProfileRefPtr &ActiveProfile();
+  const ProfileRefPtr &ActiveProfile() const;
+  bool IsActiveProfile(const ProfileRefPtr &profile) const;
   bool MoveServiceToProfile(const ServiceRefPtr &to_move,
                             const ProfileRefPtr &destination);
 
@@ -119,13 +120,14 @@
  private:
   friend class ManagerAdaptorInterface;
   friend class ManagerTest;
-  FRIEND_TEST(ManagerTest, DeviceRegistrationAndStart);
-  FRIEND_TEST(ManagerTest, PushPopProfile);
-  FRIEND_TEST(ManagerTest, SortServices);
-  FRIEND_TEST(ManagerTest, SortServicesWithConnection);
   FRIEND_TEST(ManagerTest, AvailableTechnologies);
   FRIEND_TEST(ManagerTest, ConnectedTechnologies);
   FRIEND_TEST(ManagerTest, DefaultTechnology);
+  FRIEND_TEST(ManagerTest, DeviceRegistrationAndStart);
+  FRIEND_TEST(ManagerTest, EnumerateProfiles);
+  FRIEND_TEST(ManagerTest, PushPopProfile);
+  FRIEND_TEST(ManagerTest, SortServices);
+  FRIEND_TEST(ManagerTest, SortServicesWithConnection);
 
   static const char kManagerErrorNoDevice[];
 
@@ -137,9 +139,10 @@
   std::string DefaultTechnology(Error *error);
   std::vector<std::string> EnabledTechnologies(Error *error);
   std::vector<std::string> EnumerateDevices(Error *error);
+  std::vector<std::string> EnumerateProfiles(Error *error);
   // TODO(cmasone): This should be implemented by filtering |services_|.
   std::vector<std::string> EnumerateWatchedServices(Error *error);
-  std::string GetActiveProfileName(Error *error);
+  std::string GetActiveProfileRpcIdentifier(Error *error);
 
   void HelpRegisterDerivedString(
       const std::string &name,