Merge "Revert "system/weaved: Make weaved compile and run on Brillo""
diff --git a/Android.mk b/Android.mk
index eb4e6b0..9db260f 100644
--- a/Android.mk
+++ b/Android.mk
@@ -44,7 +44,6 @@
 	libchromeos-dbus \
 	libchromeos-http \
 	libchromeos-stream \
-	libconnectivity \
 	libdbus \
 	libweave \
 
@@ -69,13 +68,12 @@
 	buffet/dbus_constants.cc \
 	buffet/http_transport_client.cc \
 	buffet/manager.cc \
-	buffet/mdns_client.cc \
-	buffet/network_client.cc \
 
 #	buffet/dbus_bindings/org.chromium.Buffet.Command.xml \
 #	buffet/dbus_bindings/org.chromium.Buffet.Manager.xml \
 #	buffet/ap_manager_client.cc \
 #	buffet/peerd_client.cc \
+#	buffet/shill_client.cc \
 #	buffet/webserv_client.cc \
 
 include $(BUILD_STATIC_LIBRARY)
@@ -84,16 +82,7 @@
 # ========================================================
 include $(CLEAR_VARS)
 LOCAL_MODULE := weaved
-LOCAL_REQUIRED_MODULES := \
-	base_state.defaults.json \
-	base_state.schema.json \
-	gcd.json \
-	org.chromium.Buffet.conf \
-
-ifdef INITRC_TEMPLATE
-LOCAL_REQUIRED_MODULES += init.weaved.rc
-endif
-
+LOCAL_REQUIRED_MODULES := init.weaved.rc
 LOCAL_CPP_EXTENSION := $(buffetCommonCppExtension)
 LOCAL_CFLAGS := $(buffetCommonCFlags)
 LOCAL_CPPFLAGS := $(buffetCommonCppFlags)
@@ -108,17 +97,17 @@
 
 include $(BUILD_EXECUTABLE)
 
-ifdef INITRC_TEMPLATE
 include $(CLEAR_VARS)
 LOCAL_MODULE := init.weaved.rc
 LOCAL_MODULE_CLASS := ETC
 LOCAL_MODULE_PATH := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_INITRCD)
 
+ifdef INITRC_TEMPLATE
 include $(BUILD_SYSTEM)/base_rules.mk
 
-.PHONY: $(LOCAL_BUILT_MODULE)
+weaved_caps :=
 $(LOCAL_BUILT_MODULE): $(INITRC_TEMPLATE)
-	$(call generate-initrc-file,weaved,,)
+	$(call generate-initrc-file,weaved,$(weaved_caps))
 endif
 
 # buffet_testrunner
@@ -154,36 +143,4 @@
 
 include $(BUILD_NATIVE_TEST)
 
-# Config files for /etc/buffet
-# ========================================================
-include $(CLEAR_VARS)
-LOCAL_MODULE := base_state.defaults.json
-LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/buffet
-LOCAL_SRC_FILES := buffet/etc/buffet/base_state.defaults.json
-include $(BUILD_PREBUILT)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := base_state.schema.json
-LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/buffet
-LOCAL_SRC_FILES := buffet/etc/buffet/base_state.schema.json
-include $(BUILD_PREBUILT)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := gcd.json
-LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/buffet
-LOCAL_SRC_FILES := buffet/etc/buffet/gcd.json
-include $(BUILD_PREBUILT)
-
-# DBus config files for /etc/dbus-1
-# ========================================================
-include $(CLEAR_VARS)
-LOCAL_MODULE := org.chromium.Buffet.conf
-LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/dbus-1
-LOCAL_SRC_FILES := buffet/etc/dbus-1/org.chromium.Buffet.conf
-include $(BUILD_PREBUILT)
-
 endif # HOST_OS == linux
diff --git a/buffet/main.cc b/buffet/main.cc
index 5264d57..276e030 100644
--- a/buffet/main.cc
+++ b/buffet/main.cc
@@ -63,7 +63,7 @@
                 "Path to file containing state information.");
   DEFINE_bool(enable_xmpp, true,
               "Connect to GCD via a persistent XMPP connection.");
-  DEFINE_bool(disable_privet, true, "disable Privet protocol");
+  DEFINE_bool(disable_privet, false, "disable Privet protocol");
   DEFINE_bool(enable_ping, false, "enable test HTTP handler at /privet/ping");
   DEFINE_string(device_whitelist, "",
                 "Comma separated list of network interfaces to monitor for "
diff --git a/buffet/manager.cc b/buffet/manager.cc
index 016c25f..f0ebff9 100644
--- a/buffet/manager.cc
+++ b/buffet/manager.cc
@@ -27,8 +27,8 @@
 #include "buffet/dbus_command_dispatcher.h"
 #include "buffet/dbus_conversion.h"
 #include "buffet/http_transport_client.h"
-#include "buffet/mdns_client.h"
-#include "buffet/network_client.h"
+//#include "buffet/peerd_client.h"
+//#include "buffet/shill_client.h"
 //#include "buffet/webserv_client.h"
 
 using chromeos::dbus_utils::AsyncEventSequencer;
@@ -60,15 +60,15 @@
                     const std::set<std::string>& device_whitelist,
                     AsyncEventSequencer* sequencer) {
   http_client_.reset(new HttpTransportClient);
-  network_client_.reset(new NetworkClient/*{device_whitelist}*/);
-  if (!options.disable_privet) {
-    mdns_client_.reset(new MdnsClient);
+//  shill_client_.reset(new ShillClient{dbus_object_.GetBus(), device_whitelist});
+//  if (!options.disable_privet) {
+//    peerd_client_.reset(new PeerdClient{dbus_object_.GetBus()});
 //    web_serv_client_.reset(new WebServClient{dbus_object_.GetBus(), sequencer});
-  }
+//  }
 
   device_ = weave::Device::Create();
-  device_->Start(options, http_client_.get(), network_client_.get(),
-                 nullptr /*mdns_client_.get()*/, nullptr /*web_serv_client_.get()*/);
+  device_->Start(options, http_client_.get(), nullptr /*shill_client_.get()*/,
+                 nullptr /*peerd_client_.get()*/, nullptr /*web_serv_client_.get()*/);
 
   command_dispatcher_.reset(new DBusCommandDispacher{
       dbus_object_.GetObjectManager(), device_->GetCommands()});
diff --git a/buffet/manager.h b/buffet/manager.h
index 8d88a1d..873c24f 100644
--- a/buffet/manager.h
+++ b/buffet/manager.h
@@ -32,8 +32,8 @@
 
 class DBusCommandDispacher;
 class HttpTransportClient;
-class MdnsClient;
-class NetworkClient;
+//class PeerdClient;
+//class ShillClient;
 //class WebServClient;
 
 template<typename... Types>
@@ -120,8 +120,8 @@
   chromeos::dbus_utils::DBusObject dbus_object_;
 
   std::unique_ptr<HttpTransportClient> http_client_;
-  std::unique_ptr<NetworkClient> network_client_;
-  std::unique_ptr<MdnsClient> mdns_client_;
+//  std::unique_ptr<ShillClient> shill_client_;
+//  std::unique_ptr<PeerdClient> peerd_client_;
 //  std::unique_ptr<WebServClient> web_serv_client_;
   std::unique_ptr<weave::Device> device_;
   std::unique_ptr<DBusCommandDispacher> command_dispatcher_;
diff --git a/buffet/mdns_client.cc b/buffet/mdns_client.cc
deleted file mode 100644
index 78d02d3..0000000
--- a/buffet/mdns_client.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "buffet/mdns_client.h"
-
-#include <base/guid.h>
-
-namespace buffet {
-
-MdnsClient::MdnsClient() : device_id_{base::GenerateGUID()} {
-}
-
-MdnsClient::~MdnsClient() {
-}
-
-std::string MdnsClient::GetId() const {
-  return device_id_;
-}
-
-void MdnsClient::PublishService(
-    const std::string& service_name,
-    uint16_t port,
-    const std::map<std::string, std::string>& txt) {
-  // TODO(avakulenko)
-}
-
-void MdnsClient::StopPublishing(const std::string& service_name) {
-  // TODO(avakulenko)
-}
-
-}  // namespace buffet
diff --git a/buffet/mdns_client.h b/buffet/mdns_client.h
deleted file mode 100644
index 98c53a0..0000000
--- a/buffet/mdns_client.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef BUFFET_MDNS_CLIENT_H_
-#define BUFFET_MDNS_CLIENT_H_
-
-#include <map>
-#include <string>
-
-#include <weave/mdns.h>
-
-namespace buffet {
-
-// Publishes privet service on mDns using peerd.
-class MdnsClient : public weave::Mdns {
- public:
-  MdnsClient();
-  ~MdnsClient() override;
-
-  // Mdns implementation.
-  void PublishService(const std::string& service_name,
-                      uint16_t port,
-                      const std::map<std::string, std::string>& txt) override;
-  void StopPublishing(const std::string& service_name) override;
-  std::string GetId() const override;
-
- private:
-  // Cached value of the device ID that we got from peerd.
-  std::string device_id_;
-
-  DISALLOW_COPY_AND_ASSIGN(MdnsClient);
-};
-
-}  // namespace buffet
-
-#endif  // BUFFET_MDNS_CLIENT_H_
diff --git a/buffet/network_client.cc b/buffet/network_client.cc
deleted file mode 100644
index 98e5e42..0000000
--- a/buffet/network_client.cc
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "buffet/network_client.h"
-
-#include <base/message_loop/message_loop.h>
-
-namespace buffet {
-
-namespace {
-const char kErrorCommandFailed[] = "commandFailed";
-const int kConnectionTimeoutSeconds = 30;
-const int kConnectionActivePollSeconds = 3;
-const int kConnectionInactivePollSeconds = 10;
-}  // namespace
-
-NetworkClient::NetworkClient()
-    : state_(weave::NetworkState::kOffline) {}
-
-NetworkClient::~NetworkClient() {}
-
-void NetworkClient::AddOnConnectionChangedCallback(
-    const OnConnectionChangedCallback& listener) {
-  connection_listeners_.push_back(listener);
-}
-
-bool NetworkClient::ConnectToService(const std::string& ssid,
-                                     const std::string& passphrase,
-                                     const base::Closure& on_success,
-                                     chromeos::ErrorPtr* error) {
-  if (!connectivity_client_.ConnectToAccessPoint(ssid, passphrase)) {
-    chromeos::Error::AddTo(error, FROM_HERE, kErrorCommandFailed, "", "");
-    return false;
-  }
-
-  connection_success_closure_ = on_success;
-  state_ = weave::NetworkState::kConnecting;
-
-  connection_timeout_closure_.Reset(
-      base::Bind(&NetworkClient::OnConnectionTimeout, base::Unretained(this)));
-  base::MessageLoop::current()->PostDelayedTask(
-      FROM_HERE,
-      connection_timeout_closure_.callback(),
-      base::TimeDelta::FromSeconds(kConnectionTimeoutSeconds));
-
-  ScheduleNextStatePoll();
-
-  return true;
-}
-
-weave::NetworkState NetworkClient::GetConnectionState() const {
-  return state_;
-}
-
-void NetworkClient::EnableAccessPoint(const std::string& ssid) {
-  connectivity_client_.EnableAccessPoint(ssid);
-  state_ = weave::NetworkState::kOffline;
-}
-
-void NetworkClient::DisableAccessPoint() {
-  connectivity_client_.DisableAccessPoint();
-}
-
-void NetworkClient::OnConnectionTimeout() {
-  state_ = weave::NetworkState::kFailure;
-}
-
-void NetworkClient::ScheduleNextStatePoll() {
-  periodic_connection_state_closure_.Reset(
-      base::Bind(&NetworkClient::UpdateConnectionState,
-                 base::Unretained(this)));
-  int poll_period_seconds;
-  if (state_ == weave::NetworkState::kConnecting) {
-    poll_period_seconds = kConnectionActivePollSeconds;
-  } else {
-    poll_period_seconds = kConnectionInactivePollSeconds;
-  }
-  base::MessageLoop::current()->PostDelayedTask(
-      FROM_HERE,
-      periodic_connection_state_closure_.callback(),
-      base::TimeDelta::FromSeconds(poll_period_seconds));
-}
-
-void NetworkClient::UpdateConnectionState() {
-  bool was_connected = state_ == weave::NetworkState::kConnected;
-  bool is_connected = connectivity_client_.IsConnected();
-
-  if (is_connected) {
-    if (state_ == weave::NetworkState::kConnecting)
-      connection_success_closure_.Run();
-    state_ = weave::NetworkState::kConnected;
-  } else if (state_ == weave::NetworkState::kConnected) {
-    state_ = weave::NetworkState::kOffline;
-  }
-  if (is_connected != was_connected) {
-    for (const auto& listener : connection_listeners_) {
-      listener.Run(is_connected);
-    }
-  }
-  ScheduleNextStatePoll();
-}
-
-}  // namespace buffet
diff --git a/buffet/network_client.h b/buffet/network_client.h
deleted file mode 100644
index 395699b..0000000
--- a/buffet/network_client.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef BUFFET_NETWORK_CLIENT_H_
-#define BUFFET_NETWORK_CLIENT_H_
-
-#include <memory>
-#include <vector>
-
-#include <base/cancelable_callback.h>
-#include <weave/network.h>
-
-#include "connectivity_client.h"
-
-namespace buffet {
-
-class NetworkClient : public weave::Network {
- public:
-  NetworkClient();
-  ~NetworkClient() override;
-
-  // Implements the Network interface.
-  void AddOnConnectionChangedCallback(
-      const OnConnectionChangedCallback& listener) override;
-  bool ConnectToService(const std::string& ssid,
-                        const std::string& passphrase,
-                        const base::Closure& on_success,
-                        chromeos::ErrorPtr* error) override;
-  weave::NetworkState GetConnectionState() const override;
-  void EnableAccessPoint(const std::string& ssid) override;
-  void DisableAccessPoint() override;
-
- private:
-  enum class ConnectionState {
-    kIdle,
-    kInProgress,
-    kConnected,
-    kTimedOut
-  };
-  void OnConnectionTimeout();
-  void ScheduleNextStatePoll();
-  void UpdateConnectionState();
-
-  ConnectivityClient connectivity_client_;
-  std::vector<OnConnectionChangedCallback> connection_listeners_;
-  base::CancelableClosure connection_timeout_closure_;
-  base::CancelableClosure periodic_connection_state_closure_;
-  base::Closure connection_success_closure_;
-  weave::NetworkState state_;
-  bool is_connected_;
-
-  DISALLOW_COPY_AND_ASSIGN(NetworkClient);
-};
-
-}  // namespace buffet
-
-#endif  // BUFFET_NETWORK_CLIENT_H_
-
diff --git a/dbus-proxies/peerd/dbus-proxies.h b/dbus-proxies/peerd/dbus-proxies.h
new file mode 100644
index 0000000..3cf302d
--- /dev/null
+++ b/dbus-proxies/peerd/dbus-proxies.h
@@ -0,0 +1,854 @@
+// Automatic generation of D-Bus interfaces:
+//  - org.chromium.peerd.Manager
+//  - org.chromium.peerd.Peer
+//  - org.chromium.peerd.Service
+#ifndef ____CHROMEOS_DBUS_BINDING___BUILD_LINK_VAR_CACHE_PORTAGE_CHROMEOS_BASE_BUFFET_OUT_DEFAULT_GEN_INCLUDE_PEERD_DBUS_PROXIES_H
+#define ____CHROMEOS_DBUS_BINDING___BUILD_LINK_VAR_CACHE_PORTAGE_CHROMEOS_BASE_BUFFET_OUT_DEFAULT_GEN_INCLUDE_PEERD_DBUS_PROXIES_H
+#include <memory>
+#include <string>
+#include <vector>
+
+#include <base/bind.h>
+#include <base/callback.h>
+#include <base/logging.h>
+#include <base/macros.h>
+#include <base/memory/ref_counted.h>
+#include <chromeos/any.h>
+#include <chromeos/dbus/dbus_method_invoker.h>
+#include <chromeos/dbus/dbus_property.h>
+#include <chromeos/dbus/dbus_signal_handler.h>
+#include <chromeos/errors/error.h>
+#include <chromeos/variant_dictionary.h>
+#include <dbus/bus.h>
+#include <dbus/message.h>
+#include <dbus/object_manager.h>
+#include <dbus/object_path.h>
+#include <dbus/object_proxy.h>
+
+namespace org {
+namespace chromium {
+namespace peerd {
+class ObjectManagerProxy;
+}  // namespace peerd
+}  // namespace chromium
+}  // namespace org
+
+namespace org {
+namespace chromium {
+namespace peerd {
+
+// Abstract interface proxy for org::chromium::peerd::Manager.
+// The Manager is responsible for global state of peerd.  It exposes
+// functionality affecting the entire device such as monitoring and
+// local service advertisements.
+class ManagerProxyInterface {
+ public:
+  virtual ~ManagerProxyInterface() = default;
+
+  virtual bool StartMonitoring(
+      const std::vector<std::string>& in_requested_technologies,
+      const chromeos::VariantDictionary& in_options,
+      std::string* out_monitoring_token,
+      chromeos::ErrorPtr* error,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
+
+  virtual void StartMonitoringAsync(
+      const std::vector<std::string>& in_requested_technologies,
+      const chromeos::VariantDictionary& in_options,
+      const base::Callback<void(const std::string& /*monitoring_token*/)>& success_callback,
+      const base::Callback<void(chromeos::Error*)>& error_callback,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
+
+  virtual bool StopMonitoring(
+      const std::string& in_monitoring_token,
+      chromeos::ErrorPtr* error,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
+
+  virtual void StopMonitoringAsync(
+      const std::string& in_monitoring_token,
+      const base::Callback<void()>& success_callback,
+      const base::Callback<void(chromeos::Error*)>& error_callback,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
+
+  virtual bool ExposeService(
+      const std::string& in_service_id,
+      const std::map<std::string, std::string>& in_service_info,
+      const chromeos::VariantDictionary& in_options,
+      chromeos::ErrorPtr* error,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
+
+  virtual void ExposeServiceAsync(
+      const std::string& in_service_id,
+      const std::map<std::string, std::string>& in_service_info,
+      const chromeos::VariantDictionary& in_options,
+      const base::Callback<void()>& success_callback,
+      const base::Callback<void(chromeos::Error*)>& error_callback,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
+
+  virtual bool RemoveExposedService(
+      const std::string& in_service_id,
+      chromeos::ErrorPtr* error,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
+
+  virtual void RemoveExposedServiceAsync(
+      const std::string& in_service_id,
+      const base::Callback<void()>& success_callback,
+      const base::Callback<void(chromeos::Error*)>& error_callback,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
+
+  virtual bool Ping(
+      std::string* out_message,
+      chromeos::ErrorPtr* error,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
+
+  virtual void PingAsync(
+      const base::Callback<void(const std::string& /*message*/)>& success_callback,
+      const base::Callback<void(chromeos::Error*)>& error_callback,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) = 0;
+
+  static const char* MonitoredTechnologiesName() { return "MonitoredTechnologies"; }
+  virtual const std::vector<std::string>& monitored_technologies() const = 0;
+};
+
+}  // namespace peerd
+}  // namespace chromium
+}  // namespace org
+
+namespace org {
+namespace chromium {
+namespace peerd {
+
+// Interface proxy for org::chromium::peerd::Manager.
+// The Manager is responsible for global state of peerd.  It exposes
+// functionality affecting the entire device such as monitoring and
+// local service advertisements.
+class ManagerProxy final : public ManagerProxyInterface {
+ public:
+  class PropertySet : public dbus::PropertySet {
+   public:
+    PropertySet(dbus::ObjectProxy* object_proxy,
+                const PropertyChangedCallback& callback)
+        : dbus::PropertySet{object_proxy,
+                            "org.chromium.peerd.Manager",
+                            callback} {
+      RegisterProperty(MonitoredTechnologiesName(), &monitored_technologies);
+    }
+
+    chromeos::dbus_utils::Property<std::vector<std::string>> monitored_technologies;
+
+   private:
+    DISALLOW_COPY_AND_ASSIGN(PropertySet);
+  };
+
+  ManagerProxy(
+      const scoped_refptr<dbus::Bus>& bus,
+      PropertySet* property_set) :
+          bus_{bus},
+          property_set_{property_set},
+          dbus_object_proxy_{
+              bus_->GetObjectProxy(service_name_, object_path_)} {
+  }
+
+  ~ManagerProxy() override {
+  }
+
+  void ReleaseObjectProxy(const base::Closure& callback) {
+    bus_->RemoveObjectProxy(service_name_, object_path_, callback);
+  }
+
+  const dbus::ObjectPath& GetObjectPath() const {
+    return object_path_;
+  }
+
+  dbus::ObjectProxy* GetObjectProxy() const { return dbus_object_proxy_; }
+
+  void SetPropertyChangedCallback(
+      const base::Callback<void(ManagerProxy*, const std::string&)>& callback) {
+    on_property_changed_ = callback;
+  }
+
+  const PropertySet* GetProperties() const { return property_set_; }
+  PropertySet* GetProperties() { return property_set_; }
+
+  bool StartMonitoring(
+      const std::vector<std::string>& in_requested_technologies,
+      const chromeos::VariantDictionary& in_options,
+      std::string* out_monitoring_token,
+      chromeos::ErrorPtr* error,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
+    auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+        timeout_ms,
+        dbus_object_proxy_,
+        "org.chromium.peerd.Manager",
+        "StartMonitoring",
+        error,
+        in_requested_technologies,
+        in_options);
+    return response && chromeos::dbus_utils::ExtractMethodCallResults(
+        response.get(), error, out_monitoring_token);
+  }
+
+  void StartMonitoringAsync(
+      const std::vector<std::string>& in_requested_technologies,
+      const chromeos::VariantDictionary& in_options,
+      const base::Callback<void(const std::string& /*monitoring_token*/)>& success_callback,
+      const base::Callback<void(chromeos::Error*)>& error_callback,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
+    chromeos::dbus_utils::CallMethodWithTimeout(
+        timeout_ms,
+        dbus_object_proxy_,
+        "org.chromium.peerd.Manager",
+        "StartMonitoring",
+        success_callback,
+        error_callback,
+        in_requested_technologies,
+        in_options);
+  }
+
+  bool StopMonitoring(
+      const std::string& in_monitoring_token,
+      chromeos::ErrorPtr* error,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
+    auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+        timeout_ms,
+        dbus_object_proxy_,
+        "org.chromium.peerd.Manager",
+        "StopMonitoring",
+        error,
+        in_monitoring_token);
+    return response && chromeos::dbus_utils::ExtractMethodCallResults(
+        response.get(), error);
+  }
+
+  void StopMonitoringAsync(
+      const std::string& in_monitoring_token,
+      const base::Callback<void()>& success_callback,
+      const base::Callback<void(chromeos::Error*)>& error_callback,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
+    chromeos::dbus_utils::CallMethodWithTimeout(
+        timeout_ms,
+        dbus_object_proxy_,
+        "org.chromium.peerd.Manager",
+        "StopMonitoring",
+        success_callback,
+        error_callback,
+        in_monitoring_token);
+  }
+
+  bool ExposeService(
+      const std::string& in_service_id,
+      const std::map<std::string, std::string>& in_service_info,
+      const chromeos::VariantDictionary& in_options,
+      chromeos::ErrorPtr* error,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
+    auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+        timeout_ms,
+        dbus_object_proxy_,
+        "org.chromium.peerd.Manager",
+        "ExposeService",
+        error,
+        in_service_id,
+        in_service_info,
+        in_options);
+    return response && chromeos::dbus_utils::ExtractMethodCallResults(
+        response.get(), error);
+  }
+
+  void ExposeServiceAsync(
+      const std::string& in_service_id,
+      const std::map<std::string, std::string>& in_service_info,
+      const chromeos::VariantDictionary& in_options,
+      const base::Callback<void()>& success_callback,
+      const base::Callback<void(chromeos::Error*)>& error_callback,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
+    chromeos::dbus_utils::CallMethodWithTimeout(
+        timeout_ms,
+        dbus_object_proxy_,
+        "org.chromium.peerd.Manager",
+        "ExposeService",
+        success_callback,
+        error_callback,
+        in_service_id,
+        in_service_info,
+        in_options);
+  }
+
+  bool RemoveExposedService(
+      const std::string& in_service_id,
+      chromeos::ErrorPtr* error,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
+    auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+        timeout_ms,
+        dbus_object_proxy_,
+        "org.chromium.peerd.Manager",
+        "RemoveExposedService",
+        error,
+        in_service_id);
+    return response && chromeos::dbus_utils::ExtractMethodCallResults(
+        response.get(), error);
+  }
+
+  void RemoveExposedServiceAsync(
+      const std::string& in_service_id,
+      const base::Callback<void()>& success_callback,
+      const base::Callback<void(chromeos::Error*)>& error_callback,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
+    chromeos::dbus_utils::CallMethodWithTimeout(
+        timeout_ms,
+        dbus_object_proxy_,
+        "org.chromium.peerd.Manager",
+        "RemoveExposedService",
+        success_callback,
+        error_callback,
+        in_service_id);
+  }
+
+  bool Ping(
+      std::string* out_message,
+      chromeos::ErrorPtr* error,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
+    auto response = chromeos::dbus_utils::CallMethodAndBlockWithTimeout(
+        timeout_ms,
+        dbus_object_proxy_,
+        "org.chromium.peerd.Manager",
+        "Ping",
+        error);
+    return response && chromeos::dbus_utils::ExtractMethodCallResults(
+        response.get(), error, out_message);
+  }
+
+  void PingAsync(
+      const base::Callback<void(const std::string& /*message*/)>& success_callback,
+      const base::Callback<void(chromeos::Error*)>& error_callback,
+      int timeout_ms = dbus::ObjectProxy::TIMEOUT_USE_DEFAULT) override {
+    chromeos::dbus_utils::CallMethodWithTimeout(
+        timeout_ms,
+        dbus_object_proxy_,
+        "org.chromium.peerd.Manager",
+        "Ping",
+        success_callback,
+        error_callback);
+  }
+
+  const std::vector<std::string>& monitored_technologies() const override {
+    return property_set_->monitored_technologies.value();
+  }
+
+ private:
+  void OnPropertyChanged(const std::string& property_name) {
+    if (!on_property_changed_.is_null())
+      on_property_changed_.Run(this, property_name);
+  }
+
+  scoped_refptr<dbus::Bus> bus_;
+  const std::string service_name_{"org.chromium.peerd"};
+  const dbus::ObjectPath object_path_{"/org/chromium/peerd/Manager"};
+  PropertySet* property_set_;
+  base::Callback<void(ManagerProxy*, const std::string&)> on_property_changed_;
+  dbus::ObjectProxy* dbus_object_proxy_;
+
+  friend class org::chromium::peerd::ObjectManagerProxy;
+  DISALLOW_COPY_AND_ASSIGN(ManagerProxy);
+};
+
+}  // namespace peerd
+}  // namespace chromium
+}  // namespace org
+
+namespace org {
+namespace chromium {
+namespace peerd {
+
+// Abstract interface proxy for org::chromium::peerd::Peer.
+// Peers represent remote devices.  In addition to containing a
+// unique identifier or the remote peer, and the time last seen,
+// a peer object may have 0 or more services exposed by that peer.
+// These services may be found at path_to_owning_peer/services/*.
+class PeerProxyInterface {
+ public:
+  virtual ~PeerProxyInterface() = default;
+
+  static const char* UUIDName() { return "UUID"; }
+  virtual const std::string& uuid() const = 0;
+  static const char* LastSeenName() { return "LastSeen"; }
+  virtual uint64_t last_seen() const = 0;
+};
+
+}  // namespace peerd
+}  // namespace chromium
+}  // namespace org
+
+namespace org {
+namespace chromium {
+namespace peerd {
+
+// Interface proxy for org::chromium::peerd::Peer.
+// Peers represent remote devices.  In addition to containing a
+// unique identifier or the remote peer, and the time last seen,
+// a peer object may have 0 or more services exposed by that peer.
+// These services may be found at path_to_owning_peer/services/*.
+class PeerProxy final : public PeerProxyInterface {
+ public:
+  class PropertySet : public dbus::PropertySet {
+   public:
+    PropertySet(dbus::ObjectProxy* object_proxy,
+                const PropertyChangedCallback& callback)
+        : dbus::PropertySet{object_proxy,
+                            "org.chromium.peerd.Peer",
+                            callback} {
+      RegisterProperty(UUIDName(), &uuid);
+      RegisterProperty(LastSeenName(), &last_seen);
+    }
+
+    chromeos::dbus_utils::Property<std::string> uuid;
+    chromeos::dbus_utils::Property<uint64_t> last_seen;
+
+   private:
+    DISALLOW_COPY_AND_ASSIGN(PropertySet);
+  };
+
+  PeerProxy(
+      const scoped_refptr<dbus::Bus>& bus,
+      const dbus::ObjectPath& object_path,
+      PropertySet* property_set) :
+          bus_{bus},
+          object_path_{object_path},
+          property_set_{property_set},
+          dbus_object_proxy_{
+              bus_->GetObjectProxy(service_name_, object_path_)} {
+  }
+
+  ~PeerProxy() override {
+  }
+
+  void ReleaseObjectProxy(const base::Closure& callback) {
+    bus_->RemoveObjectProxy(service_name_, object_path_, callback);
+  }
+
+  const dbus::ObjectPath& GetObjectPath() const {
+    return object_path_;
+  }
+
+  dbus::ObjectProxy* GetObjectProxy() const { return dbus_object_proxy_; }
+
+  void SetPropertyChangedCallback(
+      const base::Callback<void(PeerProxy*, const std::string&)>& callback) {
+    on_property_changed_ = callback;
+  }
+
+  const PropertySet* GetProperties() const { return property_set_; }
+  PropertySet* GetProperties() { return property_set_; }
+
+  const std::string& uuid() const override {
+    return property_set_->uuid.value();
+  }
+
+  uint64_t last_seen() const override {
+    return property_set_->last_seen.value();
+  }
+
+ private:
+  void OnPropertyChanged(const std::string& property_name) {
+    if (!on_property_changed_.is_null())
+      on_property_changed_.Run(this, property_name);
+  }
+
+  scoped_refptr<dbus::Bus> bus_;
+  const std::string service_name_{"org.chromium.peerd"};
+  dbus::ObjectPath object_path_;
+  PropertySet* property_set_;
+  base::Callback<void(PeerProxy*, const std::string&)> on_property_changed_;
+  dbus::ObjectProxy* dbus_object_proxy_;
+
+  friend class org::chromium::peerd::ObjectManagerProxy;
+  DISALLOW_COPY_AND_ASSIGN(PeerProxy);
+};
+
+}  // namespace peerd
+}  // namespace chromium
+}  // namespace org
+
+namespace org {
+namespace chromium {
+namespace peerd {
+
+// Abstract interface proxy for org::chromium::peerd::Service.
+// Service objects represent a service exposed by device.  They have
+// an associated service ID which will be unique per device, and
+// and a map of metadata about a service.  Finally, services contain
+// a list of IP addresses that a given service from a particular peer
+// was discovered over.
+class ServiceProxyInterface {
+ public:
+  virtual ~ServiceProxyInterface() = default;
+
+  static const char* PeerIdName() { return "PeerId"; }
+  virtual const std::string& peer_id() const = 0;
+  static const char* ServiceIdName() { return "ServiceId"; }
+  virtual const std::string& service_id() const = 0;
+  static const char* ServiceInfoName() { return "ServiceInfo"; }
+  virtual const std::map<std::string, std::string>& service_info() const = 0;
+  static const char* IpInfosName() { return "IpInfos"; }
+  virtual const std::vector<std::tuple<std::vector<uint8_t>, uint16_t>>& ip_infos() const = 0;
+};
+
+}  // namespace peerd
+}  // namespace chromium
+}  // namespace org
+
+namespace org {
+namespace chromium {
+namespace peerd {
+
+// Interface proxy for org::chromium::peerd::Service.
+// Service objects represent a service exposed by device.  They have
+// an associated service ID which will be unique per device, and
+// and a map of metadata about a service.  Finally, services contain
+// a list of IP addresses that a given service from a particular peer
+// was discovered over.
+class ServiceProxy final : public ServiceProxyInterface {
+ public:
+  class PropertySet : public dbus::PropertySet {
+   public:
+    PropertySet(dbus::ObjectProxy* object_proxy,
+                const PropertyChangedCallback& callback)
+        : dbus::PropertySet{object_proxy,
+                            "org.chromium.peerd.Service",
+                            callback} {
+      RegisterProperty(PeerIdName(), &peer_id);
+      RegisterProperty(ServiceIdName(), &service_id);
+      RegisterProperty(ServiceInfoName(), &service_info);
+      RegisterProperty(IpInfosName(), &ip_infos);
+    }
+
+    chromeos::dbus_utils::Property<std::string> peer_id;
+    chromeos::dbus_utils::Property<std::string> service_id;
+    chromeos::dbus_utils::Property<std::map<std::string, std::string>> service_info;
+    chromeos::dbus_utils::Property<std::vector<std::tuple<std::vector<uint8_t>, uint16_t>>> ip_infos;
+
+   private:
+    DISALLOW_COPY_AND_ASSIGN(PropertySet);
+  };
+
+  ServiceProxy(
+      const scoped_refptr<dbus::Bus>& bus,
+      const dbus::ObjectPath& object_path,
+      PropertySet* property_set) :
+          bus_{bus},
+          object_path_{object_path},
+          property_set_{property_set},
+          dbus_object_proxy_{
+              bus_->GetObjectProxy(service_name_, object_path_)} {
+  }
+
+  ~ServiceProxy() override {
+  }
+
+  void ReleaseObjectProxy(const base::Closure& callback) {
+    bus_->RemoveObjectProxy(service_name_, object_path_, callback);
+  }
+
+  const dbus::ObjectPath& GetObjectPath() const {
+    return object_path_;
+  }
+
+  dbus::ObjectProxy* GetObjectProxy() const { return dbus_object_proxy_; }
+
+  void SetPropertyChangedCallback(
+      const base::Callback<void(ServiceProxy*, const std::string&)>& callback) {
+    on_property_changed_ = callback;
+  }
+
+  const PropertySet* GetProperties() const { return property_set_; }
+  PropertySet* GetProperties() { return property_set_; }
+
+  const std::string& peer_id() const override {
+    return property_set_->peer_id.value();
+  }
+
+  const std::string& service_id() const override {
+    return property_set_->service_id.value();
+  }
+
+  const std::map<std::string, std::string>& service_info() const override {
+    return property_set_->service_info.value();
+  }
+
+  const std::vector<std::tuple<std::vector<uint8_t>, uint16_t>>& ip_infos() const override {
+    return property_set_->ip_infos.value();
+  }
+
+ private:
+  void OnPropertyChanged(const std::string& property_name) {
+    if (!on_property_changed_.is_null())
+      on_property_changed_.Run(this, property_name);
+  }
+
+  scoped_refptr<dbus::Bus> bus_;
+  const std::string service_name_{"org.chromium.peerd"};
+  dbus::ObjectPath object_path_;
+  PropertySet* property_set_;
+  base::Callback<void(ServiceProxy*, const std::string&)> on_property_changed_;
+  dbus::ObjectProxy* dbus_object_proxy_;
+
+  friend class org::chromium::peerd::ObjectManagerProxy;
+  DISALLOW_COPY_AND_ASSIGN(ServiceProxy);
+};
+
+}  // namespace peerd
+}  // namespace chromium
+}  // namespace org
+
+namespace org {
+namespace chromium {
+namespace peerd {
+
+class ObjectManagerProxy : public dbus::ObjectManager::Interface {
+ public:
+  ObjectManagerProxy(const scoped_refptr<dbus::Bus>& bus)
+      : bus_{bus},
+        dbus_object_manager_{bus->GetObjectManager(
+            "org.chromium.peerd",
+            dbus::ObjectPath{"/org/chromium/peerd"})} {
+    dbus_object_manager_->RegisterInterface("org.chromium.peerd.Manager", this);
+    dbus_object_manager_->RegisterInterface("org.chromium.peerd.Peer", this);
+    dbus_object_manager_->RegisterInterface("org.chromium.peerd.Service", this);
+  }
+
+  ~ObjectManagerProxy() override {
+    dbus_object_manager_->UnregisterInterface("org.chromium.peerd.Manager");
+    dbus_object_manager_->UnregisterInterface("org.chromium.peerd.Peer");
+    dbus_object_manager_->UnregisterInterface("org.chromium.peerd.Service");
+  }
+
+  dbus::ObjectManager* GetObjectManagerProxy() const {
+    return dbus_object_manager_;
+  }
+
+  org::chromium::peerd::ManagerProxy* GetManagerProxy() {
+    if (manager_instances_.empty())
+      return nullptr;
+    return manager_instances_.begin()->second.get();
+  }
+  std::vector<org::chromium::peerd::ManagerProxy*> GetManagerInstances() const {
+    std::vector<org::chromium::peerd::ManagerProxy*> values;
+    values.reserve(manager_instances_.size());
+    for (const auto& pair : manager_instances_)
+      values.push_back(pair.second.get());
+    return values;
+  }
+  void SetManagerAddedCallback(
+      const base::Callback<void(org::chromium::peerd::ManagerProxy*)>& callback) {
+    on_manager_added_ = callback;
+  }
+  void SetManagerRemovedCallback(
+      const base::Callback<void(const dbus::ObjectPath&)>& callback) {
+    on_manager_removed_ = callback;
+  }
+
+  org::chromium::peerd::PeerProxy* GetPeerProxy(
+      const dbus::ObjectPath& object_path) {
+    auto p = peer_instances_.find(object_path);
+    if (p != peer_instances_.end())
+      return p->second.get();
+    return nullptr;
+  }
+  std::vector<org::chromium::peerd::PeerProxy*> GetPeerInstances() const {
+    std::vector<org::chromium::peerd::PeerProxy*> values;
+    values.reserve(peer_instances_.size());
+    for (const auto& pair : peer_instances_)
+      values.push_back(pair.second.get());
+    return values;
+  }
+  void SetPeerAddedCallback(
+      const base::Callback<void(org::chromium::peerd::PeerProxy*)>& callback) {
+    on_peer_added_ = callback;
+  }
+  void SetPeerRemovedCallback(
+      const base::Callback<void(const dbus::ObjectPath&)>& callback) {
+    on_peer_removed_ = callback;
+  }
+
+  org::chromium::peerd::ServiceProxy* GetServiceProxy(
+      const dbus::ObjectPath& object_path) {
+    auto p = service_instances_.find(object_path);
+    if (p != service_instances_.end())
+      return p->second.get();
+    return nullptr;
+  }
+  std::vector<org::chromium::peerd::ServiceProxy*> GetServiceInstances() const {
+    std::vector<org::chromium::peerd::ServiceProxy*> values;
+    values.reserve(service_instances_.size());
+    for (const auto& pair : service_instances_)
+      values.push_back(pair.second.get());
+    return values;
+  }
+  void SetServiceAddedCallback(
+      const base::Callback<void(org::chromium::peerd::ServiceProxy*)>& callback) {
+    on_service_added_ = callback;
+  }
+  void SetServiceRemovedCallback(
+      const base::Callback<void(const dbus::ObjectPath&)>& callback) {
+    on_service_removed_ = callback;
+  }
+
+ private:
+  void OnPropertyChanged(const dbus::ObjectPath& object_path,
+                         const std::string& interface_name,
+                         const std::string& property_name) {
+    if (interface_name == "org.chromium.peerd.Manager") {
+      auto p = manager_instances_.find(object_path);
+      if (p == manager_instances_.end())
+        return;
+      p->second->OnPropertyChanged(property_name);
+      return;
+    }
+    if (interface_name == "org.chromium.peerd.Peer") {
+      auto p = peer_instances_.find(object_path);
+      if (p == peer_instances_.end())
+        return;
+      p->second->OnPropertyChanged(property_name);
+      return;
+    }
+    if (interface_name == "org.chromium.peerd.Service") {
+      auto p = service_instances_.find(object_path);
+      if (p == service_instances_.end())
+        return;
+      p->second->OnPropertyChanged(property_name);
+      return;
+    }
+  }
+
+  void ObjectAdded(
+      const dbus::ObjectPath& object_path,
+      const std::string& interface_name) override {
+    if (interface_name == "org.chromium.peerd.Manager") {
+      auto property_set =
+          static_cast<org::chromium::peerd::ManagerProxy::PropertySet*>(
+              dbus_object_manager_->GetProperties(object_path, interface_name));
+      std::unique_ptr<org::chromium::peerd::ManagerProxy> manager_proxy{
+        new org::chromium::peerd::ManagerProxy{bus_, property_set}
+      };
+      auto p = manager_instances_.emplace(object_path, std::move(manager_proxy));
+      if (!on_manager_added_.is_null())
+        on_manager_added_.Run(p.first->second.get());
+      return;
+    }
+    if (interface_name == "org.chromium.peerd.Peer") {
+      auto property_set =
+          static_cast<org::chromium::peerd::PeerProxy::PropertySet*>(
+              dbus_object_manager_->GetProperties(object_path, interface_name));
+      std::unique_ptr<org::chromium::peerd::PeerProxy> peer_proxy{
+        new org::chromium::peerd::PeerProxy{bus_, object_path, property_set}
+      };
+      auto p = peer_instances_.emplace(object_path, std::move(peer_proxy));
+      if (!on_peer_added_.is_null())
+        on_peer_added_.Run(p.first->second.get());
+      return;
+    }
+    if (interface_name == "org.chromium.peerd.Service") {
+      auto property_set =
+          static_cast<org::chromium::peerd::ServiceProxy::PropertySet*>(
+              dbus_object_manager_->GetProperties(object_path, interface_name));
+      std::unique_ptr<org::chromium::peerd::ServiceProxy> service_proxy{
+        new org::chromium::peerd::ServiceProxy{bus_, object_path, property_set}
+      };
+      auto p = service_instances_.emplace(object_path, std::move(service_proxy));
+      if (!on_service_added_.is_null())
+        on_service_added_.Run(p.first->second.get());
+      return;
+    }
+  }
+
+  void ObjectRemoved(
+      const dbus::ObjectPath& object_path,
+      const std::string& interface_name) override {
+    if (interface_name == "org.chromium.peerd.Manager") {
+      auto p = manager_instances_.find(object_path);
+      if (p != manager_instances_.end()) {
+        if (!on_manager_removed_.is_null())
+          on_manager_removed_.Run(object_path);
+        manager_instances_.erase(p);
+      }
+      return;
+    }
+    if (interface_name == "org.chromium.peerd.Peer") {
+      auto p = peer_instances_.find(object_path);
+      if (p != peer_instances_.end()) {
+        if (!on_peer_removed_.is_null())
+          on_peer_removed_.Run(object_path);
+        peer_instances_.erase(p);
+      }
+      return;
+    }
+    if (interface_name == "org.chromium.peerd.Service") {
+      auto p = service_instances_.find(object_path);
+      if (p != service_instances_.end()) {
+        if (!on_service_removed_.is_null())
+          on_service_removed_.Run(object_path);
+        service_instances_.erase(p);
+      }
+      return;
+    }
+  }
+
+  dbus::PropertySet* CreateProperties(
+      dbus::ObjectProxy* object_proxy,
+      const dbus::ObjectPath& object_path,
+      const std::string& interface_name) override {
+    if (interface_name == "org.chromium.peerd.Manager") {
+      return new org::chromium::peerd::ManagerProxy::PropertySet{
+          object_proxy,
+          base::Bind(&ObjectManagerProxy::OnPropertyChanged,
+                     weak_ptr_factory_.GetWeakPtr(),
+                     object_path,
+                     interface_name)
+      };
+    }
+    if (interface_name == "org.chromium.peerd.Peer") {
+      return new org::chromium::peerd::PeerProxy::PropertySet{
+          object_proxy,
+          base::Bind(&ObjectManagerProxy::OnPropertyChanged,
+                     weak_ptr_factory_.GetWeakPtr(),
+                     object_path,
+                     interface_name)
+      };
+    }
+    if (interface_name == "org.chromium.peerd.Service") {
+      return new org::chromium::peerd::ServiceProxy::PropertySet{
+          object_proxy,
+          base::Bind(&ObjectManagerProxy::OnPropertyChanged,
+                     weak_ptr_factory_.GetWeakPtr(),
+                     object_path,
+                     interface_name)
+      };
+    }
+    LOG(FATAL) << "Creating properties for unsupported interface "
+               << interface_name;
+    return nullptr;
+  }
+
+  scoped_refptr<dbus::Bus> bus_;
+  dbus::ObjectManager* dbus_object_manager_;
+  std::map<dbus::ObjectPath,
+           std::unique_ptr<org::chromium::peerd::ManagerProxy>> manager_instances_;
+  base::Callback<void(org::chromium::peerd::ManagerProxy*)> on_manager_added_;
+  base::Callback<void(const dbus::ObjectPath&)> on_manager_removed_;
+  std::map<dbus::ObjectPath,
+           std::unique_ptr<org::chromium::peerd::PeerProxy>> peer_instances_;
+  base::Callback<void(org::chromium::peerd::PeerProxy*)> on_peer_added_;
+  base::Callback<void(const dbus::ObjectPath&)> on_peer_removed_;
+  std::map<dbus::ObjectPath,
+           std::unique_ptr<org::chromium::peerd::ServiceProxy>> service_instances_;
+  base::Callback<void(org::chromium::peerd::ServiceProxy*)> on_service_added_;
+  base::Callback<void(const dbus::ObjectPath&)> on_service_removed_;
+  base::WeakPtrFactory<ObjectManagerProxy> weak_ptr_factory_{this};
+
+  DISALLOW_COPY_AND_ASSIGN(ObjectManagerProxy);
+};
+
+}  // namespace peerd
+}  // namespace chromium
+}  // namespace org
+
+#endif  // ____CHROMEOS_DBUS_BINDING___BUILD_LINK_VAR_CACHE_PORTAGE_CHROMEOS_BASE_BUFFET_OUT_DEFAULT_GEN_INCLUDE_PEERD_DBUS_PROXIES_H