@@ -39,34 +39,34 @@ /*! * @brief The type of a DNS resource record. */ typedef enum { /*! A */ - OF_DNS_RESOURCE_RECORD_TYPE_A = 1, + OF_DNS_RECORD_TYPE_A = 1, /*! NS */ - OF_DNS_RESOURCE_RECORD_TYPE_NS = 2, + OF_DNS_RECORD_TYPE_NS = 2, /*! CNAME */ - OF_DNS_RESOURCE_RECORD_TYPE_CNAME = 5, + OF_DNS_RECORD_TYPE_CNAME = 5, /*! SOA */ - OF_DNS_RESOURCE_RECORD_TYPE_SOA = 6, + OF_DNS_RECORD_TYPE_SOA = 6, /*! PTR */ - OF_DNS_RESOURCE_RECORD_TYPE_PTR = 12, + OF_DNS_RECORD_TYPE_PTR = 12, /*! HINFO */ - OF_DNS_RESOURCE_RECORD_TYPE_HINFO = 13, + OF_DNS_RECORD_TYPE_HINFO = 13, /*! MX */ - OF_DNS_RESOURCE_RECORD_TYPE_MX = 15, + OF_DNS_RECORD_TYPE_MX = 15, /*! TXT */ - OF_DNS_RESOURCE_RECORD_TYPE_TXT = 16, + OF_DNS_RECORD_TYPE_TXT = 16, /*! RP */ - OF_DNS_RESOURCE_RECORD_TYPE_RP = 17, + OF_DNS_RECORD_TYPE_RP = 17, /*! AAAA */ - OF_DNS_RESOURCE_RECORD_TYPE_AAAA = 28, + OF_DNS_RECORD_TYPE_AAAA = 28, /*! SRV */ - OF_DNS_RESOURCE_RECORD_TYPE_SRV = 33, + OF_DNS_RECORD_TYPE_SRV = 33, /*! All types. Only for queries. */ - OF_DNS_RESOURCE_RECORD_TYPE_ALL = 255, -} of_dns_resource_record_type_t; + OF_DNS_RECORD_TYPE_ALL = 255, +} of_dns_record_type_t; /*! * @class OFDNSResourceRecord OFDNSResourceRecord.h ObjFW/OFDNSResourceRecord.h * * @brief A class representing a DNS resource record. @@ -73,11 +73,11 @@ */ @interface OFDNSResourceRecord: OFObject { OFString *_name; of_dns_class_t _DNSClass; - of_dns_resource_record_type_t _recordType; + of_dns_record_type_t _recordType; uint32_t _TTL; OF_RESERVE_IVARS(4) } /** @@ -91,11 +91,11 @@ @property (readonly, nonatomic) of_dns_class_t DNSClass; /*! * @brief The resource record type code. */ -@property (readonly, nonatomic) of_dns_resource_record_type_t recordType; +@property (readonly, nonatomic) of_dns_record_type_t recordType; /*! * @brief The number of seconds after which the resource record should be * discarded from the cache. */ @@ -111,11 +111,11 @@ * @param TTL The time to live for the resource record * @return An initialized OFDNSResourceRecord */ - (instancetype)initWithName: (OFString *)name DNSClass: (of_dns_class_t)DNSClass - recordType: (of_dns_resource_record_type_t)recordType + recordType: (of_dns_record_type_t)recordType TTL: (uint32_t)TTL OF_DESIGNATED_INITIALIZER; @end /*! * @class OFADNSResourceRecord OFDNSResourceRecord.h ObjFW/OFDNSResourceRecord.h @@ -133,11 +133,11 @@ */ @property (readonly, nonatomic) const of_socket_address_t *address; - (instancetype)initWithName: (OFString *)name DNSClass: (of_dns_class_t)DNSClass - recordType: (of_dns_resource_record_type_t)recordType + recordType: (of_dns_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. @@ -169,11 +169,11 @@ */ @property (readonly, nonatomic) const of_socket_address_t *address; - (instancetype)initWithName: (OFString *)name DNSClass: (of_dns_class_t)DNSClass - recordType: (of_dns_resource_record_type_t)recordType + recordType: (of_dns_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. @@ -205,11 +205,11 @@ */ @property (readonly, nonatomic) OFString *alias; - (instancetype)initWithName: (OFString *)name DNSClass: (of_dns_class_t)DNSClass - recordType: (of_dns_resource_record_type_t)recordType + recordType: (of_dns_record_type_t)recordType TTL: (uint32_t)TTL OF_UNAVAILABLE; /*! * @brief Initializes an already allocated OFCNAMEDNSResourceRecord with the * specified name, class, alias and time to live. @@ -248,11 +248,11 @@ */ @property (readonly, nonatomic) OFString *OS; - (instancetype)initWithName: (OFString *)name DNSClass: (of_dns_class_t)DNSClass - recordType: (of_dns_resource_record_type_t)recordType + recordType: (of_dns_record_type_t)recordType TTL: (uint32_t)TTL OF_UNAVAILABLE; /*! * @brief Initializes an already allocated OFHINFODNSResourceRecord with the * specified name, class, domain name and time to live. @@ -294,11 +294,11 @@ */ @property (readonly, nonatomic) OFString *mailExchange; - (instancetype)initWithName: (OFString *)name DNSClass: (of_dns_class_t)DNSClass - recordType: (of_dns_resource_record_type_t)recordType + recordType: (of_dns_record_type_t)recordType TTL: (uint32_t)TTL OF_UNAVAILABLE; /*! * @brief Initializes an already allocated OFMXDNSResourceRecord with the * specified name, class, preference, mail exchange and time to live. @@ -334,11 +334,11 @@ */ @property (readonly, nonatomic) OFString *authoritativeHost; - (instancetype)initWithName: (OFString *)name DNSClass: (of_dns_class_t)DNSClass - recordType: (of_dns_resource_record_type_t)recordType + recordType: (of_dns_record_type_t)recordType TTL: (uint32_t)TTL OF_UNAVAILABLE; /*! * @brief Initializes an already allocated OFNSDNSResourceRecord with the * specified name, class, authoritative host and time to live. @@ -372,11 +372,11 @@ */ @property (readonly, nonatomic) OFString *domainName; - (instancetype)initWithName: (OFString *)name DNSClass: (of_dns_class_t)DNSClass - recordType: (of_dns_resource_record_type_t)recordType + recordType: (of_dns_record_type_t)recordType TTL: (uint32_t)TTL OF_UNAVAILABLE; /*! * @brief Initializes an already allocated OFPTRDNSResourceRecord with the * specified name, class, domain name and time to live. @@ -416,11 +416,11 @@ */ @property (readonly, nonatomic) OFString *TXTDomainName; - (instancetype)initWithName: (OFString *)name DNSClass: (of_dns_class_t)DNSClass - recordType: (of_dns_resource_record_type_t)recordType + recordType: (of_dns_record_type_t)recordType TTL: (uint32_t)TTL OF_UNAVAILABLE; /*! * @brief Initializes an already allocated OFRPDNSResourceRecord with the * specified name, class, alias and time to live. @@ -489,11 +489,11 @@ */ @property (readonly, nonatomic) uint32_t minTTL; - (instancetype)initWithName: (OFString *)name DNSClass: (of_dns_class_t)DNSClass - recordType: (of_dns_resource_record_type_t)recordType + recordType: (of_dns_record_type_t)recordType TTL: (uint32_t)TTL OF_UNAVAILABLE; /*! * @brief Initializes an already allocated OFSOADNSResourceRecord with the * specified name, class, text data and time to live. @@ -556,11 +556,11 @@ */ @property (readonly, nonatomic) uint16_t port; - (instancetype)initWithName: (OFString *)name DNSClass: (of_dns_class_t)DNSClass - recordType: (of_dns_resource_record_type_t)recordType + recordType: (of_dns_record_type_t)recordType TTL: (uint32_t)TTL OF_UNAVAILABLE; /*! * @brief Initializes an already allocated OFSRVDNSResourceRecord with the * specified name, class, preference, mail exchange and time to live. @@ -598,11 +598,11 @@ */ @property (readonly, nonatomic) OFData *textData; - (instancetype)initWithName: (OFString *)name DNSClass: (of_dns_class_t)DNSClass - recordType: (of_dns_resource_record_type_t)recordType + recordType: (of_dns_record_type_t)recordType TTL: (uint32_t)TTL OF_UNAVAILABLE; /*! * @brief Initializes an already allocated OFTXTDNSResourceRecord with the * specified name, class, text data and time to live. @@ -621,15 +621,14 @@ #ifdef __cplusplus extern "C" { #endif extern OFString *_Nonnull of_dns_class_to_string(of_dns_class_t DNSClass); -extern OFString *_Nonnull of_dns_resource_record_type_to_string( - of_dns_resource_record_type_t recordType); +extern OFString *_Nonnull of_dns_record_type_to_string( + of_dns_record_type_t recordType); extern of_dns_class_t of_dns_class_parse(OFString *_Nonnull string); -extern of_dns_resource_record_type_t of_dns_resource_record_type_parse( - OFString *_Nonnull string); +extern of_dns_record_type_t of_dns_record_type_parse(OFString *_Nonnull string); #ifdef __cplusplus } #endif OF_ASSUME_NONNULL_END