ObjFW
Loading...
Searching...
No Matches
OFDNSResponse.h
1/*
2 * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im>
3 *
4 * All rights reserved.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License version 3.0 only,
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * version 3.0 for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * version 3.0 along with this program. If not, see
17 * <https://www.gnu.org/licenses/>.
18 */
19
20#import "OFObject.h"
22
23OF_ASSUME_NONNULL_BEGIN
24
25@class OFArray OF_GENERIC(ObjectType);
26@class OFDictionary OF_GENERIC(KeyType, ObjectType);
27
28typedef OFDictionary OF_GENERIC(OFString *, OFArray OF_GENERIC(
30
36OF_SUBCLASSING_RESTRICTED
38{
39 OFString *_domainName;
40 OFDNSResponseRecords _answerRecords, _authorityRecords;
41 OFDNSResponseRecords _additionalRecords;
42}
43
47@property (readonly, nonatomic) OFString *domainName;
48
55@property (readonly, nonatomic) OFDNSResponseRecords answerRecords;
56
63@property (readonly, nonatomic) OFDNSResponseRecords authorityRecords;
64
71@property (readonly, nonatomic) OFDNSResponseRecords additionalRecords;
72
82+ (instancetype)responseWithDomainName: (OFString *)domainName
83 answerRecords: (OFDNSResponseRecords)answerRecords
84 authorityRecords: (OFDNSResponseRecords)authorityRecords
85 additionalRecords: (OFDNSResponseRecords)additionalRecords;
86
96- (instancetype)initWithDomainName: (OFString *)domainName
97 answerRecords: (OFDNSResponseRecords)answerRecords
98 authorityRecords: (OFDNSResponseRecords)authorityRecords
99 additionalRecords: (OFDNSResponseRecords)additionalRecords
100 OF_DESIGNATED_INITIALIZER;
101
102- (instancetype)init OF_UNAVAILABLE;
103@end
104
105OF_ASSUME_NONNULL_END
An abstract class for storing objects in an array.
Definition OFArray.h:109
A class representing a DNS resource record.
Definition OFDNSResourceRecord.h:82
A class storing a response from OFDNSResolver.
Definition OFDNSResponse.h:38
An abstract class for storing objects in a dictionary.
Definition OFDictionary.h:84
The root class for all other classes inside ObjFW.
Definition OFObject.h:692
A class for handling strings.
Definition OFString.h:139