diff --git a/adb_mdns.h b/adb_mdns.h
index 3111248..471ec25 100644
--- a/adb_mdns.h
+++ b/adb_mdns.h
@@ -14,10 +14,11 @@
  * limitations under the License.
  */
 
-#ifndef _ADB_MDNS_H_
-#define _ADB_MDNS_H_
+#pragma once
 
-#include <android-base/macros.h>
+#include <optional>
+#include <string>
+#include <string_view>
 
 // The rules for Service Names [RFC6335] state that they may be no more
 // than fifteen characters long (not counting the mandatory underscore),
@@ -28,65 +29,70 @@
 #define ADB_MDNS_TLS_PAIRING_TYPE "adb-tls-pairing"
 #define ADB_MDNS_TLS_CONNECT_TYPE "adb-tls-connect"
 
-const int kADBTransportServiceRefIndex = 0;
-const int kADBSecurePairingServiceRefIndex = 1;
-const int kADBSecureConnectServiceRefIndex = 2;
-
-// Each ADB Secure service advertises with a TXT record indicating the version
-// using a key/value pair per RFC 6763 (https://tools.ietf.org/html/rfc6763).
-//
-// The first key/value pair is always the version of the protocol.
-// There may be more key/value pairs added after.
-//
-// The version is purposely represented as the single letter "v" due to the
-// need to minimize DNS traffic. The version starts at 1.  With each breaking
-// protocol change, the version is incremented by 1.
-//
-// Newer adb clients/daemons need to recognize and either reject
-// or be backward-compatible with older verseions if there is a mismatch.
-//
-// Relevant sections:
-//
-// """
-// 6.4.  Rules for Keys in DNS-SD Key/Value Pairs
-//
-// The key MUST be at least one character.  DNS-SD TXT record strings
-// beginning with an '=' character (i.e., the key is missing) MUST be
-// silently ignored.
-//
-// ...
-//
-// 6.5.  Rules for Values in DNS-SD Key/Value Pairs
-//
-// If there is an '=' in a DNS-SD TXT record string, then everything
-// after the first '=' to the end of the string is the value.  The value
-// can contain any eight-bit values including '='.
-// """
-
-#define ADB_SECURE_SERVICE_VERSION_TXT_RECORD(ver) ("v=" #ver)
-
 // Client/service versions are initially defined to be matching,
 // but may go out of sync as different clients and services
 // try to talk to each other.
 #define ADB_SECURE_SERVICE_VERSION 1
 #define ADB_SECURE_CLIENT_VERSION ADB_SECURE_SERVICE_VERSION
 
-const char* kADBSecurePairingServiceTxtRecord =
-        ADB_SECURE_SERVICE_VERSION_TXT_RECORD(ADB_SECURE_SERVICE_VERSION);
-const char* kADBSecureConnectServiceTxtRecord =
-        ADB_SECURE_SERVICE_VERSION_TXT_RECORD(ADB_SECURE_SERVICE_VERSION);
+constexpr int kADBTransportServiceRefIndex = 0;
+constexpr int kADBSecurePairingServiceRefIndex = 1;
+constexpr int kADBSecureConnectServiceRefIndex = 2;
+constexpr int kNumADBDNSServices = 3;
 
-#define ADB_FULL_MDNS_SERVICE_TYPE(atype) ("_" atype "._tcp")
-const char* kADBDNSServices[] = {ADB_FULL_MDNS_SERVICE_TYPE(ADB_MDNS_SERVICE_TYPE),
-                                 ADB_FULL_MDNS_SERVICE_TYPE(ADB_MDNS_TLS_PAIRING_TYPE),
-                                 ADB_FULL_MDNS_SERVICE_TYPE(ADB_MDNS_TLS_CONNECT_TYPE)};
+extern const char* _Nonnull kADBSecurePairingServiceTxtRecord;
+extern const char* _Nonnull kADBSecureConnectServiceTxtRecord;
 
-const char* kADBDNSServiceTxtRecords[] = {
-        nullptr,
-        kADBSecurePairingServiceTxtRecord,
-        kADBSecureConnectServiceTxtRecord,
+extern const char* _Nonnull kADBDNSServices[kNumADBDNSServices];
+extern const char* _Nonnull kADBDNSServiceTxtRecords[kNumADBDNSServices];
+
+#if ADB_HOST
+// ADB Secure DNS service interface. Used to query what ADB Secure DNS services have been
+// resolved, and to run some kind of callback for each one.
+using adb_secure_foreach_service_callback =
+        std::function<void(const std::string& service_name, const std::string& reg_type,
+                           const std::string& ip_address, uint16_t port)>;
+
+// Tries to connect to a |service_name| if found. Returns true if found and
+// connected, false otherwise.
+bool adb_secure_connect_by_service_name(const std::string& instance_name);
+
+// Returns the index in kADBDNSServices array if |reg_type| matches a service name, otherwise
+// std::nullopt.
+std::optional<int> adb_DNSServiceIndexByName(std::string_view reg_type);
+// Returns true if auto-connect is allowed for |service_name| and |instance_name|.
+// See ADB_MDNS_AUTO_CONNECT environment variable for more info.
+bool adb_DNSServiceShouldAutoConnect(std::string_view service_name, std::string_view instance_name);
+
+void mdns_cleanup(void);
+std::string mdns_check();
+std::string mdns_list_discovered_services();
+
+struct MdnsInfo {
+    std::string service_name;
+    std::string service_type;
+    std::string addr;
+    uint16_t port = 0;
+
+    MdnsInfo(std::string_view name, std::string_view type, std::string_view addr, uint16_t port)
+        : service_name(name), service_type(type), addr(addr), port(port) {}
 };
 
-const int kNumADBDNSServices = arraysize(kADBDNSServices);
+std::optional<MdnsInfo> mdns_get_connect_service_info(const std::string& name);
+std::optional<MdnsInfo> mdns_get_pairing_service_info(const std::string& name);
 
-#endif
+// TODO: Remove once openscreen has support for bonjour client APIs.
+struct AdbMdnsResponderFuncs {
+    std::string (*_Nonnull mdns_check)(void);
+    std::string (*_Nonnull mdns_list_discovered_services)(void);
+    std::optional<MdnsInfo> (*_Nonnull mdns_get_connect_service_info)(const std::string&);
+    std::optional<MdnsInfo> (*_Nonnull mdns_get_pairing_service_info)(const std::string&);
+    void (*_Nonnull mdns_cleanup)(void);
+    bool (*_Nonnull adb_secure_connect_by_service_name)(const std::string&);
+};  // AdbBonjourCallbacks
+
+// TODO: Remove once openscreen has support for bonjour client APIs.
+// Start mdns discovery using MdnsResponder backend. Fills in AdbMdnsResponderFuncs for adb mdns
+// related functions.
+AdbMdnsResponderFuncs StartMdnsResponderDiscovery();
+#endif  // ADB_HOST
