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/dbus_adaptor.cc b/dbus_adaptor.cc
index 5d71d95..34868e8 100644
--- a/dbus_adaptor.cc
+++ b/dbus_adaptor.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -104,6 +104,12 @@
       (*out)[it.Key()] = Int32ToVariant(it.Value(&e));
   }
   {
+    ReadablePropertyConstIterator<KeyValueStore> it =
+        store.GetKeyValueStorePropertiesIter();
+    for ( ; !it.AtEnd(); it.Advance())
+      (*out)[it.Key()] = KeyValueStoreToVariant(it.Value(&e));
+  }
+  {
     ReadablePropertyConstIterator<string> it = store.GetStringPropertiesIter();
     for ( ; !it.AtEnd(); it.Advance())
       (*out)[it.Key()] = StringToVariant(it.Value(&e));
@@ -262,11 +268,13 @@
 }
 
 // static
-::DBus::Variant DBusAdaptor::StrIntPairToVariant(const StrIntPair &value) {
+::DBus::Variant DBusAdaptor::KeyValueStoreToVariant(
+    const KeyValueStore &value) {
   ::DBus::Variant v;
   ::DBus::MessageIter writer = v.writer();
-  writer << value.string_property();
-  writer << value.uint_property();
+  writer << value.string_properties();
+  writer << value.bool_properties();
+  writer << value.uint_properties();
   return v;
 }