diff options
author | Casey Dahlin <sadmac@google.com> | 2016-02-05 11:24:02 -0800 |
---|---|---|
committer | Casey Dahlin <sadmac@google.com> | 2016-02-08 11:17:28 -0800 |
commit | 33d72c00523c6e738fc545db55de59b6fae13bd3 (patch) | |
tree | 3ca8f51514c3b67a5a18eb1c3d3118d055414ed2 | |
parent | d6197ec257b6ae5233e99f775cfeb2f368bb9391 (diff) | |
download | webservd-33d72c00523c6e738fc545db55de59b6fae13bd3.tar.gz |
Stub out missing methods for libwebserv BinderServer
Change-Id: Iaceae5075d8996925b2f6c703581d38fd4da0e09
Test: Build now completes successfully with binder enabled
Bug: 27047010
-rw-r--r-- | Android.mk | 1 | ||||
-rw-r--r-- | libwebserv/binder_server.cc | 32 |
2 files changed, 33 insertions, 0 deletions
@@ -62,6 +62,7 @@ define webservd_common_libraries libbrillo-binder \ libcutils \ libutils \ + libbinderwrapper \ libbinder endif diff --git a/libwebserv/binder_server.cc b/libwebserv/binder_server.cc index 758e10a..58fa531 100644 --- a/libwebserv/binder_server.cc +++ b/libwebserv/binder_server.cc @@ -17,6 +17,7 @@ #include <utils/String16.h> #include "libwebserv/binder_constants.h" +#include "libwebserv/protocol_handler.h" #include <string> #include <vector> @@ -99,4 +100,35 @@ bool BinderServer::BuildLocalState(android::sp<android::IBinder> server) { return true; } +ProtocolHandler* BinderServer::GetDefaultHttpHandler() { + return GetProtocolHandler(ProtocolHandler::kHttp); +} + +ProtocolHandler* BinderServer::GetDefaultHttpsHandler() { + return GetProtocolHandler(ProtocolHandler::kHttps); +} + +ProtocolHandler* BinderServer::GetProtocolHandler(const string& /*name*/) { + // TODO(sadmac) Once BuildLocalState populates the map of protocol handlers, + // use it to return a result here. + return nullptr; +} + +bool BinderServer::IsConnected() const { + return remote_server_.get() != nullptr; +} + +void BinderServer::OnProtocolHandlerConnected( + const base::Callback<void(ProtocolHandler*)>& /*callback*/) { +} + +void BinderServer::OnProtocolHandlerDisconnected( + const base::Callback<void(ProtocolHandler*)>& /*callback*/) { + +} + +base::TimeDelta BinderServer::GetDefaultRequestTimeout() const { + return base::TimeDelta(); // = 0 +} + } // namespace libwebserv |