1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 
6 #ifndef mozilla_netwerk_dns_mdns_libmdns_nsDNSServiceInfo_h
7 #define mozilla_netwerk_dns_mdns_libmdns_nsDNSServiceInfo_h
8 
9 #include "nsCOMPtr.h"
10 #include "nsIDNSServiceDiscovery.h"
11 #include "nsIPropertyBag2.h"
12 #include "nsString.h"
13 
14 namespace mozilla {
15 namespace net {
16 
17 class nsDNSServiceInfo final : public nsIDNSServiceInfo {
18  public:
19   NS_DECL_ISUPPORTS
20   NS_DECL_NSIDNSSERVICEINFO
21 
22   explicit nsDNSServiceInfo() = default;
23   explicit nsDNSServiceInfo(nsIDNSServiceInfo* aServiceInfo);
24 
25  private:
26   virtual ~nsDNSServiceInfo() = default;
27 
28  private:
29   nsCString mHost;
30   nsCString mAddress;
31   uint16_t mPort = 0;
32   nsCString mServiceName;
33   nsCString mServiceType;
34   nsCString mDomainName;
35   nsCOMPtr<nsIPropertyBag2> mAttributes;
36 
37   bool mIsHostSet = false;
38   bool mIsAddressSet = false;
39   bool mIsPortSet = false;
40   bool mIsServiceNameSet = false;
41   bool mIsServiceTypeSet = false;
42   bool mIsDomainNameSet = false;
43   bool mIsAttributesSet = false;
44 };
45 
46 }  // namespace net
47 }  // namespace mozilla
48 
49 #endif  // mozilla_netwerk_dns_mdns_libmdns_nsDNSServiceInfo_h
50