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