1 // Copyright 2018 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "osp/impl/discovery/mdns/mdns_responder_adapter.h"
6
7 namespace openscreen {
8 namespace osp {
9
10 QueryEventHeader::QueryEventHeader() = default;
QueryEventHeader(QueryEventHeader::Type response_type,UdpSocket * socket)11 QueryEventHeader::QueryEventHeader(QueryEventHeader::Type response_type,
12 UdpSocket* socket)
13 : response_type(response_type), socket(socket) {}
14 QueryEventHeader::QueryEventHeader(QueryEventHeader&&) noexcept = default;
15 QueryEventHeader::~QueryEventHeader() = default;
16 QueryEventHeader& QueryEventHeader::operator=(QueryEventHeader&&) noexcept =
17 default;
18
19 AEvent::AEvent() = default;
AEvent(QueryEventHeader header,DomainName domain_name,IPAddress address)20 AEvent::AEvent(QueryEventHeader header,
21 DomainName domain_name,
22 IPAddress address)
23 : header(std::move(header)),
24 domain_name(std::move(domain_name)),
25 address(std::move(address)) {}
26 AEvent::AEvent(AEvent&&) noexcept = default;
27 AEvent::~AEvent() = default;
28 AEvent& AEvent::operator=(AEvent&&) noexcept = default;
29
30 AaaaEvent::AaaaEvent() = default;
AaaaEvent(QueryEventHeader header,DomainName domain_name,IPAddress address)31 AaaaEvent::AaaaEvent(QueryEventHeader header,
32 DomainName domain_name,
33 IPAddress address)
34 : header(std::move(header)),
35 domain_name(std::move(domain_name)),
36 address(std::move(address)) {}
37 AaaaEvent::AaaaEvent(AaaaEvent&&) noexcept = default;
38 AaaaEvent::~AaaaEvent() = default;
39 AaaaEvent& AaaaEvent::operator=(AaaaEvent&&) noexcept = default;
40
41 PtrEvent::PtrEvent() = default;
PtrEvent(QueryEventHeader header,DomainName service_instance)42 PtrEvent::PtrEvent(QueryEventHeader header, DomainName service_instance)
43 : header(std::move(header)),
44 service_instance(std::move(service_instance)) {}
45 PtrEvent::PtrEvent(PtrEvent&&) noexcept = default;
46 PtrEvent::~PtrEvent() = default;
47 PtrEvent& PtrEvent::operator=(PtrEvent&&) noexcept = default;
48
49 SrvEvent::SrvEvent() = default;
SrvEvent(QueryEventHeader header,DomainName service_instance,DomainName domain_name,uint16_t port)50 SrvEvent::SrvEvent(QueryEventHeader header,
51 DomainName service_instance,
52 DomainName domain_name,
53 uint16_t port)
54 : header(std::move(header)),
55 service_instance(std::move(service_instance)),
56 domain_name(std::move(domain_name)),
57 port(port) {}
58 SrvEvent::SrvEvent(SrvEvent&&) noexcept = default;
59 SrvEvent::~SrvEvent() = default;
60 SrvEvent& SrvEvent::operator=(SrvEvent&&) noexcept = default;
61
62 TxtEvent::TxtEvent() = default;
TxtEvent(QueryEventHeader header,DomainName service_instance,std::vector<std::string> txt_info)63 TxtEvent::TxtEvent(QueryEventHeader header,
64 DomainName service_instance,
65 std::vector<std::string> txt_info)
66 : header(std::move(header)),
67 service_instance(std::move(service_instance)),
68 txt_info(std::move(txt_info)) {}
69 TxtEvent::TxtEvent(TxtEvent&&) noexcept = default;
70 TxtEvent::~TxtEvent() = default;
71 TxtEvent& TxtEvent::operator=(TxtEvent&&) noexcept = default;
72
73 MdnsResponderAdapter::MdnsResponderAdapter() = default;
74 MdnsResponderAdapter::~MdnsResponderAdapter() = default;
75
76 } // namespace osp
77 } // namespace openscreen
78