aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanda Wang <handaw@google.com>2024-02-23 05:19:15 +0000
committerHanda Wang <handaw@google.com>2024-02-23 05:23:39 +0000
commit184813fc1b9089c41eb67a09a422201ee8409c72 (patch)
tree73adac3d80539fd6f7d96d458614475a8212008a
parent69b880e0536c7f861f30e17ac8f9efeb58cf98e3 (diff)
downloadot-br-posix-184813fc1b9089c41eb67a09a422201ee8409c72.tar.gz
Fix build
- Add dummy implementation for the new interfaces of mDNS Publisher. - Use `Application.GetPublisher()` to align with the most recent codebase. Bug: 320820261 Change-Id: I8f327615245784824542c496caef1a1b7190f9f5
-rw-r--r--src/android/mdns_publisher.cpp19
-rw-r--r--src/android/mdns_publisher.hpp4
-rw-r--r--src/android/otdaemon_server.cpp8
3 files changed, 27 insertions, 4 deletions
diff --git a/src/android/mdns_publisher.cpp b/src/android/mdns_publisher.cpp
index ddb0437d..9ed68eb0 100644
--- a/src/android/mdns_publisher.cpp
+++ b/src/android/mdns_publisher.cpp
@@ -176,6 +176,17 @@ otbrError MdnsPublisher::PublishHostImpl(const std::string &aName,
return OTBR_ERROR_MDNS;
}
+otbrError MdnsPublisher::PublishKeyImpl(const std::string &aName, const KeyData &aKeyData, ResultCallback &&aCallback)
+{
+ OTBR_UNUSED_VARIABLE(aName);
+ OTBR_UNUSED_VARIABLE(aKeyData);
+ OTBR_UNUSED_VARIABLE(aCallback);
+
+ DieForNotImplemented(__func__);
+
+ return OTBR_ERROR_MDNS;
+}
+
void MdnsPublisher::UnpublishHost(const std::string &aName, ResultCallback &&aCallback)
{
OTBR_UNUSED_VARIABLE(aName);
@@ -186,6 +197,14 @@ void MdnsPublisher::UnpublishHost(const std::string &aName, ResultCallback &&aCa
return;
}
+void MdnsPublisher::UnpublishKey(const std::string &aName, ResultCallback &&aCallback)
+{
+ OTBR_UNUSED_VARIABLE(aName);
+ OTBR_UNUSED_VARIABLE(aCallback);
+
+ DieForNotImplemented(__func__);
+}
+
void MdnsPublisher::SubscribeService(const std::string &aType, const std::string &aInstanceName)
{
OTBR_UNUSED_VARIABLE(aType);
diff --git a/src/android/mdns_publisher.hpp b/src/android/mdns_publisher.hpp
index 97840fb7..f55b944a 100644
--- a/src/android/mdns_publisher.hpp
+++ b/src/android/mdns_publisher.hpp
@@ -71,6 +71,8 @@ public:
void UnpublishHost(const std::string &aName, ResultCallback &&aCallback) override;
+ void UnpublishKey(const std::string &aName, ResultCallback &&aCallback) override;
+
void SubscribeService(const std::string &aType, const std::string &aInstanceName) override;
void UnsubscribeService(const std::string &aType, const std::string &aInstanceName) override;
@@ -106,6 +108,8 @@ protected:
otbrError PublishHostImpl(const std::string &aName, const AddressList &aAddresses, ResultCallback &&aCallback);
+ otbrError PublishKeyImpl(const std::string &aName, const KeyData &aKeyData, ResultCallback &&aCallback) override;
+
void OnServiceResolveFailedImpl(const std::string &aType, const std::string &aInstanceName, int32_t aErrorCode);
void OnHostResolveFailedImpl(const std::string &aHostName, int32_t aErrorCode);
diff --git a/src/android/otdaemon_server.cpp b/src/android/otdaemon_server.cpp
index 54e3d9a7..83176f46 100644
--- a/src/android/otdaemon_server.cpp
+++ b/src/android/otdaemon_server.cpp
@@ -100,7 +100,7 @@ static Ipv6AddressInfo ConvertToAddressInfo(const otIp6AddressInfo &aAddressInfo
OtDaemonServer::OtDaemonServer(Application &aApplication)
: mNcp(aApplication.GetNcp())
, mBorderAgent(aApplication.GetBorderAgent())
- , mMdnsPublisher(static_cast<MdnsPublisher &>(aApplication.GetBorderAgent().GetPublisher()))
+ , mMdnsPublisher(static_cast<MdnsPublisher &>(aApplication.GetPublisher()))
, mBorderRouterConfiguration()
{
mClientDeathRecipient =
@@ -324,9 +324,9 @@ Status OtDaemonServer::initialize(const ScopedFileDescriptor &aTunFd,
const bool enabled,
const std::shared_ptr<INsdPublisher> &aINsdPublisher)
{
- otbrLogInfo("OT daemon is initialized by system server (tunFd=%d, enabled=%s)",
- aTunFd.get(), enabled ? "true" : "false");
- mTunFd = aTunFd.dup();
+ otbrLogInfo("OT daemon is initialized by system server (tunFd=%d, enabled=%s)", aTunFd.get(),
+ enabled ? "true" : "false");
+ mTunFd = aTunFd.dup();
mINsdPublisher = aINsdPublisher;
if (enabled)