22
23
24
25
26
27
28
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
|
22
23
24
25
26
27
28
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
|
+
+
-
+
-
+
+
-
+
-
+
-
-
+
+
+
-
-
-
+
-
+
+
+
|
*/
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
#import <ObjFW/ObjFW.h>
OF_ASSUME_NONNULL_BEGIN
@interface XMPPSRVEntry: OFObject
{
uint16_t _priority;
uint16_t _weight;
uint32_t _accumulatedWeight;
uint16_t _port;
OFString *_target;
}
@property (readonly) uint16_t priority;
@property (readonly) uint16_t weight;
@property uint32_t accumulatedWeight;
@property (readonly) uint16_t port;
@property (readonly, copy) OFString *target;
@property (readonly, nonatomic) OFString *target;
+ (instancetype)entryWithPriority: (uint16_t)priority
weight: (uint16_t)weight
port: (uint16_t)port
target: (OFString*)target;
target: (OFString *)target;
+ (instancetype)entryWithResourceRecord: (ns_rr)resourceRecord
handle: (ns_msg)handle;
- init OF_UNAVAILABLE;
- initWithPriority: (uint16_t)priority
weight: (uint16_t)weight
port: (uint16_t)port
target: (OFString*)target;
target: (OFString *)target;
- initWithResourceRecord: (ns_rr)resourceRecord
handle: (ns_msg)handle;
@end
@interface XMPPSRVLookup: OFObject <OFEnumerating>
{
OFString *_domain;
struct __res_state _resState;
OFList *_list;
}
@property (readonly, copy) OFString *domain;
@property (readonly, nonatomic) OFString *domain;
+ (instancetype)lookupWithDomain: (OFString*)domain;
- initWithDomain: (OFString*)domain;
+ (instancetype)lookupWithDomain: (OFString *)domain;
- init OF_UNAVAILABLE;
- initWithDomain: (OFString *)domain;
- (void)XMPP_lookup;
- (void)XMPP_addEntry: (XMPPSRVEntry*)item;
@end
@interface XMPPSRVEnumerator: OFEnumerator
{
OFList *_list;
of_list_object_t *_listIter;
OFList *_subListCopy;
bool _done;
}
- init OF_UNAVAILABLE;
- initWithList: (OFList*)list;
- initWithList: (OFList *)list;
@end
OF_ASSUME_NONNULL_END
|