Skip to content

Commit

Permalink
[android] replace VendorServer with OtDaemonServer
Browse files Browse the repository at this point in the history
To make it easier to update the OtDaemonServer implementation
without making separate changes on both GitHub and AOSP.
  • Loading branch information
wgtdkp committed Aug 14, 2023
1 parent b0bbad3 commit 2e14bf8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 78 deletions.
1 change: 0 additions & 1 deletion src/agent/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ add_executable(otbr-agent
application.cpp
main.cpp
uris.hpp
vendor.hpp
)

target_link_libraries(otbr-agent PRIVATE
Expand Down
8 changes: 4 additions & 4 deletions src/agent/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ Application::Application(const std::string &aInterfaceName,
#if OTBR_ENABLE_DBUS_SERVER && OTBR_ENABLE_BORDER_AGENT
, mDBusAgent(mNcp, mBorderAgent.GetPublisher())
#endif
#if OTBR_ENABLE_VENDOR_SERVER
, mVendorServer(mNcp)
#if OTBR_ENABLE_ANDROID_OTDAEMON_SERVER
, mOtDaemonServer(ndk::SharedRefBase::make<Android::OtDaemonServer>())
#endif
{
OTBR_UNUSED_VARIABLE(aRestListenAddress);
Expand All @@ -103,8 +103,8 @@ void Application::Init(void)
#if OTBR_ENABLE_DBUS_SERVER
mDBusAgent.Init();
#endif
#if OTBR_ENABLE_VENDOR_SERVER
mVendorServer.Init();
#if OTBR_ENABLE_ANDROID_OTDAEMON_SERVER
mOtDaemonServer->InitOrDie(&mNcp);
#endif
}

Expand Down
8 changes: 4 additions & 4 deletions src/agent/application.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
#if OTBR_ENABLE_OPENWRT
#include "openwrt/ubus/otubus.hpp"
#endif
#if OTBR_ENABLE_VENDOR_SERVER
#include "agent/vendor.hpp"
#if OTBR_ENABLE_ANDROID_OTDAEMON_SERVER
#include "android/otdaemon_server.hpp"
#endif
#include "utils/infra_link_selector.hpp"

Expand Down Expand Up @@ -146,8 +146,8 @@ class Application : private NonCopyable
#if OTBR_ENABLE_DBUS_SERVER
DBus::DBusAgent mDBusAgent;
#endif
#if OTBR_ENABLE_VENDOR_SERVER
vendor::VendorServer mVendorServer;
#if OTBR_ENABLE_ANDROID_OTDAEMON_SERVER
std::shared_ptr<Android::OtDaemonServer> mOtDaemonServer;
#endif

static std::atomic_bool sShouldTerminate;
Expand Down
69 changes: 0 additions & 69 deletions src/agent/vendor.hpp

This file was deleted.

0 comments on commit 2e14bf8

Please sign in to comment.