[shill] Enable objects to query an opaque RPC-system ID from Adaptors

This is needed for some properties.  For example Service has a property called Device, which is expected
to return a (in the current impl) a DBus path for the associated Device object.

BUG=chromium-os:16343
TEST=unit tests

Change-Id: I8bd32ab483331efabbfee05dbdeba045c7cb20da
Reviewed-on: http://gerrit.chromium.org/gerrit/3417
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
diff --git a/device_unittest.cc b/device_unittest.cc
index 24a28eb..87eb627 100644
--- a/device_unittest.cc
+++ b/device_unittest.cc
@@ -16,6 +16,7 @@
 #include "shill/dbus_adaptor.h"
 #include "shill/dhcp_provider.h"
 #include "shill/manager.h"
+#include "shill/mock_adaptors.h"
 #include "shill/mock_control.h"
 #include "shill/mock_device.h"
 #include "shill/mock_glib.h"
@@ -75,6 +76,13 @@
     EXPECT_EQ(props[flimflam::kNameProperty].reader().get_string(),
               string(kDeviceName));
   }
+  {
+    ::DBus::Error dbus_error;
+    DBusAdaptor::GetProperties(device_.get(), &props, &dbus_error);
+    ASSERT_FALSE(props.find(flimflam::kDBusObjectProperty) == props.end());
+    EXPECT_EQ(props[flimflam::kDBusObjectProperty].reader().get_string(),
+              string(DeviceMockAdaptor::kRpcId));
+  }
 }
 
 TEST_F(DeviceTest, Dispatch) {