1*8542734aSAndroid Build Coastguard Worker /** 2*8542734aSAndroid Build Coastguard Worker * Copyright (c) 2022, The Android Open Source Project 3*8542734aSAndroid Build Coastguard Worker * 4*8542734aSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License"); 5*8542734aSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 6*8542734aSAndroid Build Coastguard Worker * You may obtain a copy of the License at 7*8542734aSAndroid Build Coastguard Worker * 8*8542734aSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 9*8542734aSAndroid Build Coastguard Worker * 10*8542734aSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 11*8542734aSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 12*8542734aSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*8542734aSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 14*8542734aSAndroid Build Coastguard Worker * limitations under the License. 15*8542734aSAndroid Build Coastguard Worker */ 16*8542734aSAndroid Build Coastguard Worker 17*8542734aSAndroid Build Coastguard Worker #pragma once 18*8542734aSAndroid Build Coastguard Worker 19*8542734aSAndroid Build Coastguard Worker #include <android/net/mdns/aidl/BnMDns.h> 20*8542734aSAndroid Build Coastguard Worker #include <binder/BinderService.h> 21*8542734aSAndroid Build Coastguard Worker 22*8542734aSAndroid Build Coastguard Worker namespace android::net { 23*8542734aSAndroid Build Coastguard Worker 24*8542734aSAndroid Build Coastguard Worker class MDnsService : public BinderService<MDnsService>, public android::net::mdns::aidl::BnMDns { 25*8542734aSAndroid Build Coastguard Worker public: 26*8542734aSAndroid Build Coastguard Worker static status_t start(); getServiceName()27*8542734aSAndroid Build Coastguard Worker static char const* getServiceName() { return "mdns"; } 28*8542734aSAndroid Build Coastguard Worker 29*8542734aSAndroid Build Coastguard Worker binder::Status startDaemon() override; 30*8542734aSAndroid Build Coastguard Worker binder::Status stopDaemon() override; 31*8542734aSAndroid Build Coastguard Worker binder::Status registerService( 32*8542734aSAndroid Build Coastguard Worker const ::android::net::mdns::aidl::RegistrationInfo& info) override; 33*8542734aSAndroid Build Coastguard Worker binder::Status discover(const ::android::net::mdns::aidl::DiscoveryInfo& info) override; 34*8542734aSAndroid Build Coastguard Worker binder::Status resolve(const ::android::net::mdns::aidl::ResolutionInfo& info) override; 35*8542734aSAndroid Build Coastguard Worker binder::Status getServiceAddress( 36*8542734aSAndroid Build Coastguard Worker const ::android::net::mdns::aidl::GetAddressInfo& info) override; 37*8542734aSAndroid Build Coastguard Worker binder::Status stopOperation(int32_t id) override; 38*8542734aSAndroid Build Coastguard Worker binder::Status registerEventListener( 39*8542734aSAndroid Build Coastguard Worker const android::sp<android::net::mdns::aidl::IMDnsEventListener>& listener) override; 40*8542734aSAndroid Build Coastguard Worker binder::Status unregisterEventListener( 41*8542734aSAndroid Build Coastguard Worker const android::sp<android::net::mdns::aidl::IMDnsEventListener>& listener) override; 42*8542734aSAndroid Build Coastguard Worker }; 43*8542734aSAndroid Build Coastguard Worker 44*8542734aSAndroid Build Coastguard Worker } // namespace android::net 45