ObjFW
OFDNSQuery.h
1 /*
2  * Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
3  *
4  * All rights reserved.
5  *
6  * This file is part of ObjFW. It may be distributed under the terms of the
7  * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
8  * the packaging of this file.
9  *
10  * Alternatively, it may be distributed under the terms of the GNU General
11  * Public License, either version 2 or 3, which can be found in the file
12  * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
13  * file.
14  */
15 
16 #import "OFObject.h"
17 #import "OFDNSResourceRecord.h"
18 
19 OF_ASSUME_NONNULL_BEGIN
20 
21 @class OFString;
22 
29 {
30  OFString *_domainName;
31  of_dns_class_t _DNSClass;
32  of_dns_record_type_t _recordType;
33  OF_RESERVE_IVARS(OFDNSQuery, 4)
34 }
35 
39 @property (readonly, nonatomic) OFString *domainName;
40 
44 @property (readonly, nonatomic) of_dns_class_t DNSClass;
45 
49 @property (readonly, nonatomic) of_dns_record_type_t recordType;
50 
59 + (instancetype)queryWithDomainName: (OFString *)domainName
60  DNSClass: (of_dns_class_t)DNSClass
61  recordType: (of_dns_record_type_t)recordType;
62 
71 - (instancetype)initWithDomainName: (OFString *)domainName
72  DNSClass: (of_dns_class_t)DNSClass
73  recordType: (of_dns_record_type_t)recordType
74  OF_DESIGNATED_INITIALIZER;
75 
76 - (instancetype)init OF_UNAVAILABLE;
77 @end
78 
79 OF_ASSUME_NONNULL_END
of_dns_record_type_t
The type of a DNS resource record.
Definition: OFDNSResourceRecord.h:41
of_dns_class_t
The DNS class.
Definition: OFDNSResourceRecord.h:31
A class representing a DNS query.
Definition: OFDNSQuery.h:30
The root class for all other classes inside ObjFW.
Definition: OFObject.h:520
A class for handling strings.
Definition: OFString.h:132
A protocol for the creation of copies.
Definition: OFObject.h:1187