shill: add FrequencyList property to WiFiServices

The main intended change in this CL is to expose the known frequencies
for a WiFi network via D-Bus properties. This required adding a new
property type (array of uint16).

While there, though, I made some changes to the DBusAdaptor and
PropertyStore unit tests. These changes should make it easier to
identify and update the relevant unit tests when we add new property
types.

Specifically:
- add a GetProperties test to dbus_adaptor_unittest.cc
- add a GetProperty test to property_store_unittest.cc
- make the list of PropertyTypes accessible from outside property_store_unittest
- make the RegisterProperty shims accessible from outside property_store_unittest
- create GetProperty shims, and make them accessible as well

Additional changes:
- remove some unnecessary (as of c++11) whitespace between angle brackets
- make initialization of DBusAdaptorTest fields more uniform, by using
  uniform initialization syntax and initializer lists
- update service-api documentation for WiFi.Frequency

BUG=chromium:248791
TEST=unit tests, manual
CQ-DEPEND=CL:59119

Manual test
-----------
1. chrome://system
2. network-services -> Expand...
3. find GoogleGuest, check that it has at least one entry for
   "WiFi.FrequencyList". e.g., "WiFi.FrequencyList/0: 2414"

Change-Id: Ie3b4d89853e22b7c4e80ad017738223d9753dd7c
Reviewed-on: https://gerrit.chromium.org/gerrit/59149
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
diff --git a/property_store.h b/property_store.h
index 603c040..326cf04 100644
--- a/property_store.h
+++ b/property_store.h
@@ -52,6 +52,8 @@
                         Error *error) const;
   bool GetUint16Property(const std::string &name, uint16 *value,
                          Error *error) const;
+  bool GetUint16sProperty(const std::string &name, Uint16s *value,
+                          Error *error) const;
   bool GetUint32Property(const std::string &name, uint32 *value,
                          Error *error) const;
   bool GetUint64Property(const std::string &name, uint64 *value,
@@ -106,6 +108,10 @@
                                  uint16 value,
                                  Error *error);
 
+  virtual bool SetUint16sProperty(const std::string &name,
+                                  const std::vector<uint16> &value,
+                                  Error *error);
+
   virtual bool SetUint32Property(const std::string &name,
                                  uint32 value,
                                  Error *error);
@@ -149,6 +155,7 @@
   ReadablePropertyConstIterator<Strings> GetStringsPropertiesIter() const;
   ReadablePropertyConstIterator<uint8> GetUint8PropertiesIter() const;
   ReadablePropertyConstIterator<uint16> GetUint16PropertiesIter() const;
+  ReadablePropertyConstIterator<Uint16s> GetUint16sPropertiesIter() const;
   ReadablePropertyConstIterator<uint32> GetUint32PropertiesIter() const;
   ReadablePropertyConstIterator<uint64> GetUint64PropertiesIter() const;
 
@@ -191,7 +198,9 @@
   void RegisterConstUint8(const std::string &name, const uint8 *prop);
   void RegisterWriteOnlyUint8(const std::string &name, uint8 *prop);
   void RegisterUint16(const std::string &name, uint16 *prop);
+  void RegisterUint16s(const std::string &name, Uint16s *prop);
   void RegisterConstUint16(const std::string &name, const uint16 *prop);
+  void RegisterConstUint16s(const std::string &name, const Uint16s *prop);
   void RegisterWriteOnlyUint16(const std::string &name, uint16 *prop);
 
   void RegisterDerivedBool(const std::string &name,
@@ -249,6 +258,7 @@
   std::map<std::string, StringsAccessor> strings_properties_;
   std::map<std::string, Uint8Accessor> uint8_properties_;
   std::map<std::string, Uint16Accessor> uint16_properties_;
+  std::map<std::string, Uint16sAccessor> uint16s_properties_;
   std::map<std::string, Uint32Accessor> uint32_properties_;
   std::map<std::string, Uint64Accessor> uint64_properties_;