shill: Add SIMLockEnabled to the SIM lock status properties and emit changes.

This patch replaces the StrIntPair class with the more generic KeyValueStore and
updates cellular's SIMLockStatus property to include the enabled key/value pair.

BUG=chromium-os:25850
TEST=unit tests

Change-Id: I2662cb468807e3afa04c3699e323f31282e1a50e
Reviewed-on: https://gerrit.chromium.org/gerrit/15325
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>
diff --git a/property_store.h b/property_store.h
index 602d2ef..461cb7f 100644
--- a/property_store.h
+++ b/property_store.h
@@ -78,10 +78,11 @@
   ReadablePropertyConstIterator<bool> GetBoolPropertiesIter() const;
   ReadablePropertyConstIterator<int16> GetInt16PropertiesIter() const;
   ReadablePropertyConstIterator<int32> GetInt32PropertiesIter() const;
+  ReadablePropertyConstIterator<KeyValueStore> GetKeyValueStorePropertiesIter(
+      ) const;
   ReadablePropertyConstIterator<std::string> GetStringPropertiesIter() const;
   ReadablePropertyConstIterator<Stringmap> GetStringmapPropertiesIter() const;
   ReadablePropertyConstIterator<Stringmaps> GetStringmapsPropertiesIter() const;
-  ReadablePropertyConstIterator<StrIntPair> GetStrIntPairPropertiesIter() const;
   ReadablePropertyConstIterator<Strings> GetStringsPropertiesIter() const;
   ReadablePropertyConstIterator<uint8> GetUint8PropertiesIter() const;
   ReadablePropertyConstIterator<uint16> GetUint16PropertiesIter() const;
@@ -119,14 +120,14 @@
                            const BoolAccessor &accessor);
   void RegisterDerivedInt32(const std::string &name,
                             const Int32Accessor &accessor);
+  void RegisterDerivedKeyValueStore(const std::string &name,
+                                    const KeyValueStoreAccessor &accessor);
   void RegisterDerivedString(const std::string &name,
                              const StringAccessor &accessor);
   void RegisterDerivedStringmaps(const std::string &name,
                                  const StringmapsAccessor &accessor);
   void RegisterDerivedStrings(const std::string &name,
                               const StringsAccessor &accessor);
-  void RegisterDerivedStrIntPair(const std::string &name,
-                                 const StrIntPairAccessor &accessor);
   void RegisterDerivedUint16(const std::string &name,
                              const Uint16Accessor &accessor);
 
@@ -144,11 +145,11 @@
   std::map<std::string, BoolAccessor> bool_properties_;
   std::map<std::string, Int16Accessor> int16_properties_;
   std::map<std::string, Int32Accessor> int32_properties_;
+  std::map<std::string, KeyValueStoreAccessor> key_value_store_properties_;
   std::map<std::string, StringAccessor> string_properties_;
   std::map<std::string, StringmapAccessor> stringmap_properties_;
   std::map<std::string, StringmapsAccessor> stringmaps_properties_;
   std::map<std::string, StringsAccessor> strings_properties_;
-  std::map<std::string, StrIntPairAccessor> strintpair_properties_;
   std::map<std::string, Uint8Accessor> uint8_properties_;
   std::map<std::string, Uint16Accessor> uint16_properties_;
   std::map<std::string, Uint32Accessor> uint32_properties_;