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 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"
18
19OF_ASSUME_NONNULL_BEGIN
20
21@class OFArray OF_GENERIC(ObjectType);
22@class OFDictionary OF_GENERIC(KeyType, ObjectType);
23
24typedef OFDictionary OF_GENERIC(OFString *, OFArray OF_GENERIC(
26
32OF_SUBCLASSING_RESTRICTED
34{
35 OFString *_domainName;
36 OFDNSResponseRecords _answerRecords, _authorityRecords;
37 OFDNSResponseRecords _additionalRecords;
38}
39
43@property (readonly, nonatomic) OFString *domainName;
44
51@property (readonly, nonatomic) OFDNSResponseRecords answerRecords;
52
59@property (readonly, nonatomic) OFDNSResponseRecords authorityRecords;
60
67@property (readonly, nonatomic) OFDNSResponseRecords additionalRecords;
68
78+ (instancetype)responseWithDomainName: (OFString *)domainName
79 answerRecords: (OFDNSResponseRecords)answerRecords
80 authorityRecords: (OFDNSResponseRecords)authorityRecords
81 additionalRecords: (OFDNSResponseRecords)additionalRecords;
82
92- (instancetype)initWithDomainName: (OFString *)domainName
93 answerRecords: (OFDNSResponseRecords)answerRecords
94 authorityRecords: (OFDNSResponseRecords)authorityRecords
95 additionalRecords: (OFDNSResponseRecords)additionalRecords
96 OF_DESIGNATED_INITIALIZER;
97
98- (instancetype)init OF_UNAVAILABLE;
99@end
100
101OF_ASSUME_NONNULL_END
An abstract class for storing objects in an array.
Definition OFArray.h:105
A class representing a DNS resource record.
Definition OFDNSResourceRecord.h:74
A class storing a response from OFDNSResolver.
Definition OFDNSResponse.h:34
An abstract class for storing objects in a dictionary.
Definition OFDictionary.h:80
The root class for all other classes inside ObjFW.
Definition OFObject.h:688
A class for handling strings.
Definition OFString.h:135