1
2
3
4
5
6
7
8
9
10
11
|
/*
* Copyright (c) 2011, Jonathan Schleifer <js@webkeks.org>
*
* https://webkeks.org/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
|
>
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
|
/*
* Copyright (c) 2011, 2012, 2013, 2016, Jonathan Schleifer <js@heap.zone>
* Copyright (c) 2011, 2012, Florian Zeitz <florob@babelmonkeys.de>
*
* 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
|
︙ | | | ︙ | |
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
|
* \brief A base class for XMPP related exceptions
*/
@interface XMPPException: OFException
{
XMPPConnection *_connection;
}
#ifdef OF_HAVE_PROPERTIES
/// \brief The connection the exception relates to
@property (readonly, retain) XMPPConnection *connection;
#endif
/**
* \brief Creates a new XMPPException.
*
* \param connection The connection that received the data responsible
* for this exception
* \return A new XMPPException
*/
+ (instancetype)exceptionWithConnection: (XMPPConnection*)connection;
/**
* \brief Initializes an already allocated XMPPException.
*
* \param connection The connection that received the data responsible
* for this exception
* \return An initialized XMPPException
*/
- initWithConnection: (XMPPConnection*)connection;
- (XMPPConnection*)connection;
@end
/**
* \brief An exception indicating a stream error was received
*/
@interface XMPPStreamErrorException: XMPPException
{
OFString *_condition, *_reason;
}
#ifdef OF_HAVE_PROPERTIES
/// \brief The defined error condition specified by the stream error
@property (readonly, copy) OFString *condition;
/// \brief The descriptive free-form text specified by the stream error
@property (readonly, copy) OFString *reason;
#endif
/**
* \brief Creates a new XMPPStreamErrorException.
*
* \param connection The connection that received the stream error
* \param condition The defined error condition specified by the stream error
* \param reason The descriptive free-form text specified by the stream error
|
<
<
<
<
<
<
|
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
|
* \brief A base class for XMPP related exceptions
*/
@interface XMPPException: OFException
{
XMPPConnection *_connection;
}
/// \brief The connection the exception relates to
@property (readonly, retain) XMPPConnection *connection;
/**
* \brief Creates a new XMPPException.
*
* \param connection The connection that received the data responsible
* for this exception
* \return A new XMPPException
*/
+ (instancetype)exceptionWithConnection: (XMPPConnection*)connection;
/**
* \brief Initializes an already allocated XMPPException.
*
* \param connection The connection that received the data responsible
* for this exception
* \return An initialized XMPPException
*/
- initWithConnection: (XMPPConnection*)connection;
@end
/**
* \brief An exception indicating a stream error was received
*/
@interface XMPPStreamErrorException: XMPPException
{
OFString *_condition, *_reason;
}
/// \brief The defined error condition specified by the stream error
@property (readonly, copy) OFString *condition;
/// \brief The descriptive free-form text specified by the stream error
@property (readonly, copy) OFString *reason;
/**
* \brief Creates a new XMPPStreamErrorException.
*
* \param connection The connection that received the stream error
* \param condition The defined error condition specified by the stream error
* \param reason The descriptive free-form text specified by the stream error
|
︙ | | | ︙ | |
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
* \param condition The defined error condition specified by the stream error
* \param reason The descriptive free-form text specified by the stream error
* \return An initialized XMPPStreamErrorException
*/
- initWithConnection: (XMPPConnection*)connection
condition: (OFString*)condition
reason: (OFString*)reason;
- (OFString*)condition;
- (OFString*)reason;
@end
/**
* \brief An exception indicating a stringprep profile
* did not apply to a string
*/
@interface XMPPStringPrepFailedException: XMPPException
{
OFString *_profile, *_string;
}
#ifdef OF_HAVE_PROPERTIES
/// \brief The name of the stringprep profile that did not apply
@property (readonly, copy) OFString *profile;
/// \brief The string that failed the stringprep profile
@property (readonly, copy) OFString *string;
#endif
/**
* \brief Creates a new XMPPStringPrepFailedException.
*
* \param connection The connection the string relates to
* \param profile The name of the stringprep profile that did not apply
* \param string The string that failed the stringprep profile
|
<
<
<
<
<
|
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
* \param condition The defined error condition specified by the stream error
* \param reason The descriptive free-form text specified by the stream error
* \return An initialized XMPPStreamErrorException
*/
- initWithConnection: (XMPPConnection*)connection
condition: (OFString*)condition
reason: (OFString*)reason;
@end
/**
* \brief An exception indicating a stringprep profile
* did not apply to a string
*/
@interface XMPPStringPrepFailedException: XMPPException
{
OFString *_profile, *_string;
}
/// \brief The name of the stringprep profile that did not apply
@property (readonly, copy) OFString *profile;
/// \brief The string that failed the stringprep profile
@property (readonly, copy) OFString *string;
/**
* \brief Creates a new XMPPStringPrepFailedException.
*
* \param connection The connection the string relates to
* \param profile The name of the stringprep profile that did not apply
* \param string The string that failed the stringprep profile
|
︙ | | | ︙ | |
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
|
* \param profile The name of the stringprep profile that did not apply
* \param string The string that failed the stringprep profile
* \return An initialized XMPPStringPrepFailedException
*/
- initWithConnection: (XMPPConnection*)connection
profile: (OFString*)profile
string: (OFString*)string;
- (OFString*)profile;
- (OFString*)string;
@end
/**
* \brief An exception indicating IDNA translation of a string failed
*/
@interface XMPPIDNATranslationFailedException: XMPPException
{
OFString *_operation, *_string;
}
#ifdef OF_HAVE_PROPERTIES
/// \brief The IDNA translation operation which failed
@property (readonly, copy) OFString *operation;
/// \brief The string that could not be translated
@property (readonly, copy) OFString *string;
#endif
/**
* \brief Creates a new XMPPIDNATranslationFailedException.
*
* \param connection The connection the string relates to
* \param operation The name of the stringprep profile that did not apply
* \param string The string that could not be translated
|
<
<
<
<
<
|
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
|
* \param profile The name of the stringprep profile that did not apply
* \param string The string that failed the stringprep profile
* \return An initialized XMPPStringPrepFailedException
*/
- initWithConnection: (XMPPConnection*)connection
profile: (OFString*)profile
string: (OFString*)string;
@end
/**
* \brief An exception indicating IDNA translation of a string failed
*/
@interface XMPPIDNATranslationFailedException: XMPPException
{
OFString *_operation, *_string;
}
/// \brief The IDNA translation operation which failed
@property (readonly, copy) OFString *operation;
/// \brief The string that could not be translated
@property (readonly, copy) OFString *string;
/**
* \brief Creates a new XMPPIDNATranslationFailedException.
*
* \param connection The connection the string relates to
* \param operation The name of the stringprep profile that did not apply
* \param string The string that could not be translated
|
︙ | | | ︙ | |
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
|
* \param operation The name of the stringprep profile that did not apply
* \param string The string that could not be translated
* \return An initialized XMPPIDNATranslationFailedException
*/
- initWithConnection: (XMPPConnection*)connection
operation: (OFString*)operation
string: (OFString*)string;
- (OFString*)operation;
- (OFString*)string;
@end
/**
* \brief An exception indicating authentication failed
*/
@interface XMPPAuthFailedException: XMPPException
{
OFString *_reason;
}
#ifdef OF_HAVE_PROPERTIES
/// \brief The reason the authentication failed
@property (readonly, copy) OFString *reason;
#endif
/**
* \brief Creates a new XMPPAuthFailedException.
*
* \param connection The connection that could not be authenticated
* \param reason The reason the authentication failed
* \return A new XMPPAuthFailedException
*/
+ (instancetype)exceptionWithConnection: (XMPPConnection*)connection
reason: (OFString*)reason;
/**
* \brief Initializes an already allocated XMPPAuthFailedException.
*
* \param connection The connection that could not be authenticated
* \param reason The reason the authentication failed
* \return An initialized XMPPAuthFailedException
*/
- initWithConnection: (XMPPConnection*)connection
reason: (OFString*)reason;
- (OFString*)reason;
@end
|
<
<
<
<
<
<
<
|
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
192
193
194
195
196
197
198
199
200
201
202
203
204
|
* \param operation The name of the stringprep profile that did not apply
* \param string The string that could not be translated
* \return An initialized XMPPIDNATranslationFailedException
*/
- initWithConnection: (XMPPConnection*)connection
operation: (OFString*)operation
string: (OFString*)string;
@end
/**
* \brief An exception indicating authentication failed
*/
@interface XMPPAuthFailedException: XMPPException
{
OFString *_reason;
}
/// \brief The reason the authentication failed
@property (readonly, copy) OFString *reason;
/**
* \brief Creates a new XMPPAuthFailedException.
*
* \param connection The connection that could not be authenticated
* \param reason The reason the authentication failed
* \return A new XMPPAuthFailedException
*/
+ (instancetype)exceptionWithConnection: (XMPPConnection*)connection
reason: (OFString*)reason;
/**
* \brief Initializes an already allocated XMPPAuthFailedException.
*
* \param connection The connection that could not be authenticated
* \param reason The reason the authentication failed
* \return An initialized XMPPAuthFailedException
*/
- initWithConnection: (XMPPConnection*)connection
reason: (OFString*)reason;
@end
|