• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2019 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 #ifndef DISCOVERY_DNSSD_TESTING_FAKE_DNS_RECORD_FACTORY_H_
6 #define DISCOVERY_DNSSD_TESTING_FAKE_DNS_RECORD_FACTORY_H_
7 
8 #include <stdint.h>
9 
10 #include <chrono>
11 
12 #include "discovery/dnssd/impl/constants.h"
13 #include "discovery/mdns/mdns_records.h"
14 #include "gmock/gmock.h"
15 #include "gtest/gtest.h"
16 
17 namespace openscreen {
18 namespace discovery {
19 
20 class FakeDnsRecordFactory {
21  public:
22   static constexpr uint16_t kPortNum = 80;
23   static const uint8_t kV4AddressOctets[4];
24   static const uint16_t kV6AddressHextets[8];
25   static const char kInstanceName[];
26   static const char kServiceName[];
27   static const char kServiceNameProtocolPart[];
28   static const char kServiceNameServicePart[];
29   static const char kDomainName[];
30 
31   static MdnsRecord CreateFullyPopulatedSrvRecord(uint16_t port = kPortNum);
32 };
33 
34 }  // namespace discovery
35 }  // namespace openscreen
36 
37 #endif  // DISCOVERY_DNSSD_TESTING_FAKE_DNS_RECORD_FACTORY_H_
38