aboutsummaryrefslogtreecommitdiff
path: root/src/android/otdaemon_server.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/otdaemon_server.hpp')
-rw-r--r--src/android/otdaemon_server.hpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/android/otdaemon_server.hpp b/src/android/otdaemon_server.hpp
index 9a069ab6..60a35151 100644
--- a/src/android/otdaemon_server.hpp
+++ b/src/android/otdaemon_server.hpp
@@ -34,11 +34,13 @@
#include <vector>
#include <aidl/com/android/server/thread/openthread/BnOtDaemon.h>
+#include <aidl/com/android/server/thread/openthread/INsdPublisher.h>
#include <aidl/com/android/server/thread/openthread/IOtDaemon.h>
#include <openthread/instance.h>
#include <openthread/ip6.h>
#include "agent/vendor.hpp"
+#include "android/mdns_publisher.hpp"
#include "common/mainloop.hpp"
#include "common/time.hpp"
#include "ncp/ncp_openthread.hpp"
@@ -51,6 +53,7 @@ using ScopedFileDescriptor = ::ndk::ScopedFileDescriptor;
using Status = ::ndk::ScopedAStatus;
using aidl::com::android::server::thread::openthread::BnOtDaemon;
using aidl::com::android::server::thread::openthread::BorderRouterConfigurationParcel;
+using aidl::com::android::server::thread::openthread::INsdPublisher;
using aidl::com::android::server::thread::openthread::IOtDaemon;
using aidl::com::android::server::thread::openthread::IOtDaemonCallback;
using aidl::com::android::server::thread::openthread::IOtStatusReceiver;
@@ -60,7 +63,7 @@ using aidl::com::android::server::thread::openthread::OtDaemonState;
class OtDaemonServer : public BnOtDaemon, public MainloopProcessor, public vendor::VendorServer
{
public:
- explicit OtDaemonServer(otbr::Ncp::ControllerOpenThread &aNcp);
+ explicit OtDaemonServer(Application &aApplication);
virtual ~OtDaemonServer(void) = default;
// Disallow copy and assign.
@@ -86,7 +89,9 @@ private:
// Implements IOtDaemon.aidl
- Status initialize(const ScopedFileDescriptor &aTunFd, const bool enabled) override;
+ Status initialize(const ScopedFileDescriptor &aTunFd,
+ const bool enabled,
+ const std::shared_ptr<INsdPublisher> &aNsdPublisher) override;
Status setThreadEnabled(const bool enabled, const std::shared_ptr<IOtStatusReceiver> &aReceiver) override;
Status registerStateCallback(const std::shared_ptr<IOtDaemonCallback> &aCallback, int64_t listenerId) override;
bool isAttached(void);
@@ -120,6 +125,9 @@ private:
int mThreadEnabled = IOtDaemon::OT_STATE_DISABLED;
otbr::Ncp::ControllerOpenThread &mNcp;
+ otbr::BorderAgent &mBorderAgent;
+ MdnsPublisher &mMdnsPublisher;
+ std::shared_ptr<INsdPublisher> mINsdPublisher;
TaskRunner mTaskRunner;
ScopedFileDescriptor mTunFd;
OtDaemonState mState;