diff options
author | Peter Qiu <zqiu@google.com> | 2015-10-02 19:53:02 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-10-02 19:53:02 +0000 |
commit | 65bbfc5b77106b4027c17623289a74427beffe3f (patch) | |
tree | 23c0058997e4db833d24467249a5d25eb6ae1649 | |
parent | 5451eb69d816320eff8fb66e0058dfd545b31a36 (diff) | |
parent | 786a90630feaa70b81e029edd4f6620e7ab3a211 (diff) | |
download | weaved-65bbfc5b77106b4027c17623289a74427beffe3f.tar.gz |
Merge "Switch over to use ShillClient instead of NetworkClient"
-rw-r--r-- | Android.mk | 27 | ||||
-rw-r--r-- | buffet/manager.cc | 8 | ||||
-rw-r--r-- | buffet/manager.h | 4 | ||||
-rw-r--r-- | buffet/shill_client.cc | 2 |
4 files changed, 14 insertions, 27 deletions
@@ -31,9 +31,11 @@ buffetCommonCppFlags := \ buffetCommonCIncludes := \ $(LOCAL_PATH)/.. \ $(LOCAL_PATH)/dbus-proxies \ + external/cros/system_api \ external/gtest/include \ buffetSharedLibraries := \ + libapmanager-client \ libavahi-common \ libchrome \ libchrome-dbus \ @@ -42,13 +44,10 @@ buffetSharedLibraries := \ libchromeos-http \ libchromeos-stream \ libdbus \ + libshill-client \ libweave \ libwebserv \ -ifdef BRILLO -buffetSharedLibraries += libconnectivity -endif - # buffet-common # ======================================================== include $(CLEAR_VARS) @@ -64,35 +63,23 @@ LOCAL_CLANG := true LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) LOCAL_SRC_FILES := \ + buffet/ap_manager_client.cc \ + buffet/avahi_mdns_client.cc \ buffet/buffet_config.cc \ buffet/dbus_command_dispatcher.cc \ buffet/dbus_command_proxy.cc \ buffet/dbus_conversion.cc \ buffet/dbus_constants.cc \ + buffet/flouride_socket_bluetooth_client.cc \ buffet/http_transport_client.cc \ buffet/manager.cc \ + buffet/shill_client.cc \ buffet/socket_stream.cc \ buffet/webserv_client.cc \ buffet/dbus_bindings/dbus-service-config.json \ buffet/dbus_bindings/com.android.Weave.Command.dbus-xml \ buffet/dbus_bindings/com.android.Weave.Manager.dbus-xml \ -ifdef BRILLO - -LOCAL_SRC_FILES += \ - buffet/avahi_mdns_client.cc \ - buffet/brillo_network_client.cc \ - buffet/flouride_socket_bluetooth_client.cc \ - -else # BRILLO - -LOCAL_SRC_FILES += \ - buffet/stub_bluetooth_client.cc \ - buffet/stub_mdns_client.cc \ - buffet/stub_network_client.cc \ - -endif # BRILLO - include $(BUILD_STATIC_LIBRARY) # buffet diff --git a/buffet/manager.cc b/buffet/manager.cc index 96f9d81..a1032ff 100644 --- a/buffet/manager.cc +++ b/buffet/manager.cc @@ -31,7 +31,7 @@ #include "buffet/dbus_conversion.h" #include "buffet/http_transport_client.h" #include "buffet/mdns_client.h" -#include "buffet/network_client.h" +#include "buffet/shill_client.h" #include "buffet/weave_error_conversion.h" #include "buffet/webserv_client.h" @@ -75,7 +75,7 @@ void Manager::Start(const weave::Device::Options& options, AsyncEventSequencer* sequencer) { task_runner_.reset(new TaskRunner{}); http_client_.reset(new HttpTransportClient); - network_client_ = NetworkClient::CreateInstance(device_whitelist); + shill_client_.reset(new ShillClient{dbus_object_.GetBus(), device_whitelist}); #ifdef BUFFET_USE_WIFI_BOOTSTRAPPING if (!options.disable_privet) { mdns_client_ = MdnsClient::CreateInstance(dbus_object_.GetBus()); @@ -90,8 +90,8 @@ void Manager::Start(const weave::Device::Options& options, base::Bind(&Manager::OnConfigChanged, weak_ptr_factory_.GetWeakPtr())); device_->Start(options, config_.get(), task_runner_.get(), http_client_.get(), - network_client_.get(), mdns_client_.get(), - web_serv_client_.get(), network_client_.get(), + shill_client_.get(), mdns_client_.get(), + web_serv_client_.get(), shill_client_.get(), bluetooth_client_.get()); command_dispatcher_.reset(new DBusCommandDispacher{ diff --git a/buffet/manager.h b/buffet/manager.h index aaf535d..5dd42b0 100644 --- a/buffet/manager.h +++ b/buffet/manager.h @@ -35,7 +35,7 @@ class BuffetConfig; class DBusCommandDispacher; class HttpTransportClient; class MdnsClient; -class NetworkClient; +class ShillClient; class WebServClient; struct BuffetConfigPaths; @@ -126,7 +126,7 @@ class Manager final : public com::android::Weave::ManagerInterface { std::unique_ptr<TaskRunner> task_runner_; std::unique_ptr<BluetoothClient> bluetooth_client_; std::unique_ptr<HttpTransportClient> http_client_; - std::unique_ptr<NetworkClient> network_client_; + std::unique_ptr<ShillClient> shill_client_; std::unique_ptr<MdnsClient> mdns_client_; std::unique_ptr<WebServClient> web_serv_client_; std::unique_ptr<BuffetConfig> config_; diff --git a/buffet/shill_client.cc b/buffet/shill_client.cc index d3a53f5..64f7de3 100644 --- a/buffet/shill_client.cc +++ b/buffet/shill_client.cc @@ -9,8 +9,8 @@ #include <base/message_loop/message_loop.h> #include <base/stl_util.h> #include <chromeos/any.h> -#include <chromeos/dbus/service_constants.h> #include <chromeos/errors/error.h> +#include <dbus/shill/dbus-constants.h> #include <weave/enum_to_string.h> #include "buffet/ap_manager_client.h" |