aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasey Dahlin <sadmac@google.com>2016-02-05 11:24:02 -0800
committerCasey Dahlin <sadmac@google.com>2016-02-08 11:17:28 -0800
commit33d72c00523c6e738fc545db55de59b6fae13bd3 (patch)
tree3ca8f51514c3b67a5a18eb1c3d3118d055414ed2
parentd6197ec257b6ae5233e99f775cfeb2f368bb9391 (diff)
downloadwebservd-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.mk1
-rw-r--r--libwebserv/binder_server.cc32
2 files changed, 33 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index 999d6b4..3b1d8ec 100644
--- a/Android.mk
+++ b/Android.mk
@@ -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