ObjFW  Diff

Differences From Artifact [9eabf8af48]:

To Artifact [83177f4956]:


29
30
31
32
33
34
35

36
37
38



39
40
41
42





43



44
45
46

47
48
49



50
51
52

53
54
55



56
57
58

59
60
61
62
63
64
65
66
67
68
69
70
71



72
73

74
75
76
77
78
79
80
81
82
83

84
85
86



87
88
89
90
91
92
29
30
31
32
33
34
35
36



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53


54
55
56
57
58
59
60
61


62
63
64
65
66
67
68
69


70
71
72
73
74
75
76
77
78
79
80



81
82
83


84
85
86
87
88
89
90
91
92
93
94
95



96
97
98
99
100
101
102
103
104







+
-
-
-
+
+
+




+
+
+
+
+

+
+
+

-
-
+



+
+
+

-
-
+



+
+
+

-
-
+










-
-
-
+
+
+
-
-
+










+
-
-
-
+
+
+






/*!
 * @class OFDNSResponse OFDNSResponse.h ObjFW/OFDNSResponse.h
 *
 * @brief A class storing a response from @ref OFDNSResolver.
 */
@interface OFDNSResponse: OFObject
{
	OFString *_domainName;
	of_dns_response_records_t _Nullable _answerRecords;
	of_dns_response_records_t _Nullable _authorityRecords;
	of_dns_response_records_t _Nullable _additionalRecords;
	of_dns_response_records_t _answerRecords;
	of_dns_response_records_t _authorityRecords;
	of_dns_response_records_t _additionalRecords;
	OF_RESERVE_IVARS(4)
}

/*!
 * @brief The domain name of the response.
 */
@property (readonly, nonatomic) OFString *domainName;

/*!
 * @brief The answer records of the response.
 *
 * This is a dictionary with the key being the domain name and the value being
 * an array of @ref OFDNSResourceRecord.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic)
    of_dns_response_records_t answerRecords;
@property (readonly, nonatomic) of_dns_response_records_t answerRecords;

/*!
 * @brief The authority records of the response.
 *
 * This is a dictionary with the key being the domain name and the value being
 * an array of @ref OFDNSResourceRecord.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic)
    of_dns_response_records_t authorityRecords;
@property (readonly, nonatomic) of_dns_response_records_t authorityRecords;

/*!
 * @brief The additional records of the response.
 *
 * This is a dictionary with the key being the domain name and the value being
 * an array of @ref OFDNSResourceRecord.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic)
    of_dns_response_records_t additionalRecords;
@property (readonly, nonatomic) of_dns_response_records_t additionalRecords;

/*!
 * @brief Creates a new, autoreleased OFDNSResponse.
 *
 * @param answerRecords The answer records of the response
 * @param authorityRecords The authority records of the response
 * @param additionalRecords The additional records of the response
 * @return A new, autoreleased OFDNSResponse
 */
+ (instancetype)
    responseWithAnswerRecords: (nullable of_dns_response_records_t)answerRecords
	     authorityRecords: (nullable of_dns_response_records_t)
				   authorityRecords
    responseWithDomainName: (OFString *)domainName
	     answerRecords: (of_dns_response_records_t)answerRecords
	  authorityRecords: (of_dns_response_records_t)authorityRecords
	    additionalRecords: (nullable of_dns_response_records_t)
				   additionalRecords;
	 additionalRecords: (of_dns_response_records_t)additionalRecords;

/*!
 * @brief Initializes an already allocated OFDNSResponse.
 *
 * @param answerRecords The answer records of the response
 * @param authorityRecords The authority records of the response
 * @param additionalRecords The additional records of the response
 * @return An initialized OFDNSResponse
 */
- (instancetype)
    initWithDomainName: (OFString *)domainName
    initWithAnswerRecords: (nullable of_dns_response_records_t)answerRecords
	 authorityRecords: (nullable of_dns_response_records_t)authorityRecords
	additionalRecords: (nullable of_dns_response_records_t)additionalRecords
	 answerRecords: (of_dns_response_records_t)answerRecords
      authorityRecords: (of_dns_response_records_t)authorityRecords
     additionalRecords: (of_dns_response_records_t)additionalRecords
    OF_DESIGNATED_INITIALIZER;

- (instancetype)init OF_UNAVAILABLE;
@end

OF_ASSUME_NONNULL_END