Differences From Artifact [0fc50e0aa4]:
- File src/OFDNSResourceRecord.h — part of check-in [462cb8a108] at 2018-08-04 15:27:47 on branch trunk — OFDNSResolver: Add support for parsing SRV records (user: js, size: 19244) [annotate] [blame] [check-ins using]
To Artifact [f9b46d8995]:
- File
src/OFDNSResourceRecord.h
— part of check-in
[75d2d3ba01]
at
2018-08-11 14:29:25
on branch trunk
— OFDNSResourceRecord: Use of_socket_address_t
This avoids unnecessary string construction and parsing and removes
duplicate code to convert an address into a string. (user: js, size: 19352) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" #import "OFString.h" OF_ASSUME_NONNULL_BEGIN /*! @file */ @class OFData; | > > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" #import "OFString.h" #import "socket.h" OF_ASSUME_NONNULL_BEGIN /*! @file */ @class OFData; |
︙ | ︙ | |||
117 118 119 120 121 122 123 | /*! * @class OFADNSResourceRecord OFDNSResourceRecord.h ObjFW/OFDNSResourceRecord.h * * @brief A class representing an A DNS resource record. */ @interface OFADNSResourceRecord: OFDNSResourceRecord { | | | | | | | | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | /*! * @class OFADNSResourceRecord OFDNSResourceRecord.h ObjFW/OFDNSResourceRecord.h * * @brief A class representing an A DNS resource record. */ @interface OFADNSResourceRecord: OFDNSResourceRecord { of_socket_address_t _address; } /*! * @brief The IPv4 address of the resource record. */ @property (readonly, nonatomic) const of_socket_address_t *address; - (instancetype)initWithName: (OFString *)name recordClass: (of_dns_resource_record_class_t)recordClass recordType: (of_dns_resource_record_type_t)recordType TTL: (uint32_t)TTL OF_UNAVAILABLE; /*! * @brief Initializes an already allocated OFADNSResourceRecord with the * specified name, class, address and time to live. * * @param name The name for the resource record * @param address The address for the resource record * @param TTL The time to live for the resource record * @return An initialized OFADNSResourceRecord */ - (instancetype)initWithName: (OFString *)name address: (const of_socket_address_t *)address TTL: (uint32_t)TTL OF_DESIGNATED_INITIALIZER; @end /*! * @class OFAAAADNSResourceRecord \ * OFDNSResourceRecord.h ObjFW/OFDNSResourceRecord.h * * @brief A class represenging a DNS resource record. */ @interface OFAAAADNSResourceRecord: OFDNSResourceRecord { of_socket_address_t _address; } /*! * @brief The IPv6 address of the resource record. */ @property (readonly, nonatomic) const of_socket_address_t *address; - (instancetype)initWithName: (OFString *)name recordClass: (of_dns_resource_record_class_t)recordClass recordType: (of_dns_resource_record_type_t)recordType TTL: (uint32_t)TTL OF_UNAVAILABLE; /*! * @brief Initializes an already allocated OFAAAADNSResourceRecord with the * specified name, class, address and time to live. * * @param name The name for the resource record * @param address The address for the resource record * @param TTL The time to live for the resource record * @return An initialized OFAAAADNSResourceRecord */ - (instancetype)initWithName: (OFString *)name address: (const of_socket_address_t *)address TTL: (uint32_t)TTL OF_DESIGNATED_INITIALIZER; @end /*! * @class OFCNAMEDNSResourceRecord \ * OFDNSResourceRecord.h ObjFW/OFDNSResourceRecord.h * |
︙ | ︙ |