File tree Expand file tree Collapse file tree 3 files changed +6
-10
lines changed Expand file tree Collapse file tree 3 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 6
6
@class XMPPStream;
7
7
8
8
9
- enum XMPPHandleAuthResponse
10
- {
9
+ typedef NS_ENUM ( NSInteger , XMPPHandleAuthResponse) {
10
+
11
11
XMPP_AUTH_FAIL, // Authentication failed.
12
12
// The delegate will be informed via xmppStream:didNotAuthenticate:
13
13
14
14
XMPP_AUTH_SUCCESS, // Authentication succeeded.
15
15
// The delegate will be informed via xmppStreamDidAuthenticate:
16
16
17
17
XMPP_AUTH_CONTINUE, // The authentication process is still ongoing.
18
-
19
18
};
20
- typedef enum XMPPHandleAuthResponse XMPPHandleAuthResponse;
21
19
22
20
23
21
@protocol XMPPSASLAuthentication <NSObject >
@@ -80,7 +78,7 @@ typedef enum XMPPHandleAuthResponse XMPPHandleAuthResponse;
80
78
* If the authentication is not yet complete, it should return XMPP_AUTH_CONTINUE,
81
79
* meaning the xmpp stream will continue to forward all incoming xmpp stanzas to this method.
82
80
*
83
- * This method is called by automatically XMPPStream (via the authenticate: method).
81
+ * This method is called automatically by XMPPStream (via the authenticate: method).
84
82
* You should NOT invoke this method manually.
85
83
**/
86
84
- (XMPPHandleAuthResponse)handleAuth : (NSXMLElement *)auth ;
Original file line number Diff line number Diff line change 6
6
#import " XMPPModule.h"
7
7
8
8
// Define the various states we'll use to track our progress
9
- enum XMPPStreamState
10
- {
9
+ typedef NS_ENUM (NSInteger , XMPPStreamState) {
11
10
STATE_XMPP_DISCONNECTED,
12
11
STATE_XMPP_RESOLVING_SRV,
13
12
STATE_XMPP_CONNECTING,
@@ -22,7 +21,6 @@ enum XMPPStreamState
22
21
STATE_XMPP_START_SESSION,
23
22
STATE_XMPP_CONNECTED,
24
23
};
25
- typedef enum XMPPStreamState XMPPStreamState;
26
24
27
25
/* *
28
26
* It is recommended that storage classes cache a stream's myJID.
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ @interface XMPPStream ()
93
93
94
94
GCDMulticastDelegate <XMPPStreamDelegate> *multicastDelegate;
95
95
96
- int state;
96
+ XMPPStreamState state;
97
97
98
98
GCDAsyncSocket *asyncSocket;
99
99
@@ -287,7 +287,7 @@ - (XMPPStreamState)state
287
287
__block XMPPStreamState result = STATE_XMPP_DISCONNECTED;
288
288
289
289
dispatch_block_t block = ^{
290
- result = (XMPPStreamState) state;
290
+ result = state;
291
291
};
292
292
293
293
if (dispatch_get_specific (xmppQueueTag))
You can’t perform that action at this time.
0 commit comments