19
20
21
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
|
19
20
21
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
|
+
+
-
-
+
+
-
-
+
+
-
+
-
-
-
+
+
+
-
-
+
+
+
+
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "XMPPStanza.h"
OF_ASSUME_NONNULL_BEGIN
/**
* \brief A class describing an IQ stanza.
*/
@interface XMPPIQ: XMPPStanza
/**
* \brief Creates a new XMPPIQ with the specified type and ID.
*
* \param type The value for the stanza's type attribute
* \param ID The value for the stanza's id attribute
* \return A new autoreleased XMPPIQ
*/
+ (instancetype)IQWithType: (OFString*)type
ID: (OFString*)ID;
+ (instancetype)IQWithType: (OFString *)type
ID: (OFString *)ID;
/**
* \brief Initializes an already allocated XMPPIQ with the specified type and
* ID.
*
* \param type The value for the stanza's type attribute
* \param ID The value for the stanza's id attribute
* \return An initialized XMPPIQ
*/
- initWithType: (OFString*)type
ID: (OFString*)ID;
- initWithType: (OFString *)type
ID: (OFString *)ID;
/**
* \brief Generates a result IQ for the receiving object.
*
* \return A new autoreleased XMPPIQ
*/
- (XMPPIQ*)resultIQ;
- (XMPPIQ *)resultIQ;
/**
* \brief Generates an error IQ for the receiving object.
*
* \param type An error type as defined by RFC 6120
* \param condition An error condition as defined by RFC 6120
* \param text A descriptive text
* \return A new autoreleased XMPPIQ
*/
- (XMPPIQ*)errorIQWithType: (OFString*)type
condition: (OFString*)condition
text: (OFString*)text;
- (XMPPIQ *)errorIQWithType: (OFString *)type
condition: (OFString *)condition
text: (nullable OFString *)text;
/**
* \brief Generates an error IQ for the receiving object.
*
* \param type An error type as defined by RFC 6120
* \param condition A defined conditions from RFC 6120
* \return A new autoreleased XMPPIQ
*/
- (XMPPIQ*)errorIQWithType: (OFString*)type
condition: (OFString*)condition;
- (XMPPIQ *)errorIQWithType: (OFString *)type
condition: (OFString *)condition;
@end
OF_ASSUME_NONNULL_END
|