shill: Remove PropertyStoreInspector

Remove PropertyStoreInspector, and move its methods internal to
PropertyStore.  Service will soon need to inspect individual
properties, so it is time to move the inspection code out of
unit-test only code.

BUG=chromium-os:34525
TEST=Unit tests

Change-Id: I48fb7e459d2fca631a231700ee3050161b1df79b
Reviewed-on: https://gerrit.chromium.org/gerrit/41540
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/property_store.h b/property_store.h
index 829dcc4..56ade72 100644
--- a/property_store.h
+++ b/property_store.h
@@ -25,6 +25,37 @@
 
   virtual bool Contains(const std::string& property) const;
 
+  // Methods to allow the getting of properties stored in the referenced
+  // |store_| by name. Upon success, these methods return true and return the
+  // property value in |value|. Upon failure, they return false and
+  // leave |value| untouched.
+  bool GetBoolProperty(const std::string &name, bool *value,
+                       Error *error) const;
+  bool GetInt16Property(const std::string &name, int16 *value,
+                        Error *error) const;
+  bool GetInt32Property(const std::string &name, int32 *value,
+                        Error *error) const;
+  bool GetKeyValueStoreProperty(const std::string &name, KeyValueStore *value,
+                                Error *error) const;
+  bool GetStringProperty(const std::string &name, std::string *value,
+                         Error *error) const;
+  bool GetStringmapProperty(const std::string &name, Stringmap *values,
+                            Error *error) const;
+  bool GetStringmapsProperty(const std::string &name, Stringmaps *values,
+                             Error *error) const;
+  bool GetStringsProperty(const std::string &name, Strings *values,
+                          Error *error) const;
+  bool GetUint8Property(const std::string &name, uint8 *value,
+                        Error *error) const;
+  bool GetUint16Property(const std::string &name, uint16 *value,
+                         Error *error) const;
+  bool GetUint32Property(const std::string &name, uint32 *value,
+                         Error *error) const;
+  bool GetUint64Property(const std::string &name, uint64 *value,
+                         Error *error) const;
+  bool GetRpcIdentifierProperty(const std::string &name, RpcIdentifier *value,
+                                Error *error) const;
+
   // Methods to allow the setting, by name, of properties stored in this object.
   // The property names are declared in chromeos/dbus/service_constants.h,
   // so that they may be shared with libcros.
@@ -90,11 +121,6 @@
   // Otherwrise, |error| is unchanged, and the method returns true.
   virtual bool ClearProperty(const std::string &name, Error *error);
 
-  // We do not provide methods for reading individual properties,
-  // because we don't need them to implement the flimflam API. (The flimflam
-  // API only allows fetching all properties at once -- not individual
-  // properties.)
-
   // Accessors for iterators over property maps. Useful for dumping all
   // properties.
   ReadablePropertyConstIterator<bool> GetBoolPropertiesIter() const;
@@ -182,6 +208,15 @@
 
  private:
   template <class V>
+  bool GetProperty(
+      const std::string &name,
+      V *value,
+      Error *error,
+      const std::map< std::string, std::tr1::shared_ptr<
+          AccessorInterface<V> > > &collection,
+      const std::string &value_type_english) const;
+
+  template <class V>
   bool SetProperty(
       const std::string &name,
       const V &value,