1
2
3
4
5
6
7
8
9
10
11
|
1
2
3
4
5
6
7
8
9
10
11
12
|
-
+
+
-
+
|
/*
* Copyright (c) 2011, Florian Zeitz <florob@babelmonkeys.de>
* Copyright (c) 2011, 2012, Florian Zeitz <florob@babelmonkeys.de>
* Copyright (c) 2011, 2012, 2013, 2016, Jonathan Schleifer <js@heap.zone>
*
* https://webkeks.org/git/?p=objxmpp.git
* https://heap.zone/git/?p=objxmpp.git
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice is present in all copies.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
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
|
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
|
-
-
-
-
-
-
-
-
-
-
|
uint16_t _priority;
uint16_t _weight;
uint32_t _accumulatedWeight;
uint16_t _port;
OFString *_target;
}
#ifdef OF_HAVE_PROPERTIES
@property (readonly) uint16_t priority;
@property (readonly) uint16_t weight;
@property uint32_t accumulatedWeight;
@property (readonly) uint16_t port;
@property (readonly, copy) OFString *target;
#endif
+ (instancetype)entryWithPriority: (uint16_t)priority
weight: (uint16_t)weight
port: (uint16_t)port
target: (OFString*)target;
+ (instancetype)entryWithResourceRecord: (ns_rr)resourceRecord
handle: (ns_msg)handle;
- initWithPriority: (uint16_t)priority
weight: (uint16_t)weight
port: (uint16_t)port
target: (OFString*)target;
- initWithResourceRecord: (ns_rr)resourceRecord
handle: (ns_msg)handle;
- (uint16_t)priority;
- (uint16_t)weight;
- (uint32_t)accumulatedWeight;
- (void)setAccumulatedWeight: (uint32_t)accumulatedWeight;
- (uint16_t)port;
- (OFString*)target;
@end
@interface XMPPSRVLookup: OFObject <OFEnumerating>
{
OFString *_domain;
struct __res_state _resState;
OFList *_list;
}
#ifdef OF_HAVE_PROPERTIES
@property (readonly, copy) OFString *domain;
#endif
+ (instancetype)lookupWithDomain: (OFString*)domain;
- initWithDomain: (OFString*)domain;
- (void)XMPP_lookup;
- (void)XMPP_addEntry: (XMPPSRVEntry*)item;
@end
|