Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Talkto master #19

Open
wants to merge 200 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
200 commits
Select commit Hold shift + click to select a range
71d2a95
Added XMPP transport protocol and delegate.
Mar 16, 2011
5b4967e
Moved XMPP transport protocol source to separate file.
Mar 16, 2011
75a4384
Added XMPPTransportProtocol.h to iPhoneXMPP Xcode proj.
Mar 16, 2011
633457f
Added socket transport stub file.
Mar 16, 2011
61b1b53
Added socket transport files to iPhoneXMPP project.
Mar 16, 2011
f74a9a1
Updated transport protocol with more methods and better names.
Mar 17, 2011
62e9a8a
Adopting multicast delegates for XMPPTransports.
Mar 18, 2011
9600240
Mark all delegate methods as optional.
Mar 18, 2011
1c2a3f0
Successfully initializing XMPPSocketTransport.
Mar 18, 2011
d8c3a7a
Using XMPPSocketTransport in iPhoneXMPP, instead of relying on the pr…
Mar 18, 2011
89db8e3
Send <stream:stream> opening negotiation successfully.
Mar 18, 2011
a775960
Add setMyJID method to transport protocol.
Mar 18, 2011
ac1b446
Remove class extension which was used to provide 'private' methods.
Mar 18, 2011
261f09f
Read opening stream tag from server and call transportDidConnect:
Mar 18, 2011
9f50995
Read uptil the <stream:features> tag.
Mar 18, 2011
433f20b
Add TLS support.
Mar 18, 2011
2fe8ac6
Make stream restarts work.
Mar 18, 2011
b5c2916
Send successful PLAIN auth (tested with gtalk)
Mar 18, 2011
7e07898
Stream restart after plain auth.
Mar 18, 2011
d11d957
bind, session and XML stanza exchange works now!
Mar 18, 2011
3b03dc3
No need to add received stanzas to the rootElement.
Mar 19, 2011
8c8f57b
Handle disconnects.
Mar 19, 2011
247bf49
Send stanzas using the transport for registration and remaining auth …
Mar 19, 2011
1a3be78
Integrate P2P transport with XMPPSocketTransport.
Mar 19, 2011
e08edf7
Update ServerlessDemo to work with P2P transport.
Mar 19, 2011
cba4718
Add SRV resolution to XMPPSocketTransport.
Mar 20, 2011
7fd7a21
Add keep alive to XMPPSocketTransport.
Mar 20, 2011
4af550d
BoshTransport Initial Commit
satyamshekhar Mar 21, 2011
f7b6fea
Remove unnecessary code from XMPPStream.
Mar 21, 2011
d0beea4
Merge branch 'bosh' of github.com:directi/xmppframework into bosh
satyamshekhar Mar 21, 2011
2f4aa3d
Remove XMPPReconnect from iPhoneXMPP.
Mar 21, 2011
7be7ee0
Update iPhoneXMPP to work with socket transport and SRV.
Mar 21, 2011
16815f8
Merge branch 'bosh' of github.com:directi/xmppframework into bosh
satyamshekhar Mar 21, 2011
637aaf0
Send a transportDidStartNegotiation: message after stream restart.
Mar 21, 2011
161f8fd
Fix memory leaks.
Mar 22, 2011
a036732
Added transport protocol header to XMPP.h
Mar 22, 2011
95d8e7b
Setting the state = negotiating for stream_features that come after a…
satyamshekhar Mar 25, 2011
53918e2
ping-pong and inorder processing working
satyamshekhar Mar 28, 2011
3b2ad11
Refactoring: changing variable names
satyamshekhar Mar 29, 2011
95b26b2
Merge branch 'bosh' of github.com:directi/xmppframework into bosh
satyamshekhar Mar 29, 2011
7f4d7c7
Adding ASIHTTPRequest to xmppframework
satyamshekhar Mar 29, 2011
788f138
Merging boshwindowmanager with bosh transport and refactoring a little
satyamshekhar Mar 29, 2011
8be7968
Removing BoshWindowManager.[hm] and renaming and removing few functions
satyamshekhar Mar 30, 2011
96cb3bf
Refactoring more - and resending the failed requests.
satyamshekhar Mar 31, 2011
02982bd
Transport now disconnects gracefully
satyamshekhar Mar 31, 2011
57172da
Using request rid in BoshWindowManager
satyamshekhar Mar 31, 2011
03f431b
Disconnect now going through window manager to make sure it doesnot e…
satyamshekhar Apr 1, 2011
2f50f8f
Logging now as used to be in dojo.xmpp
satyamshekhar Apr 1, 2011
bf229c6
Fix received rid check.
Apr 1, 2011
8e4f17e
Copying the stanza before appending to request
satyamshekhar Apr 1, 2011
1e569a8
Merge branch 'bosh' of github.com:directi/xmppframework into bosh
satyamshekhar Apr 1, 2011
bc15980
Cancelling pending http requests when disconnected
satyamshekhar Apr 1, 2011
87ac768
Forgot to commit BoshTransport.h
satyamshekhar Apr 1, 2011
78292a7
Clearing delegates before cancelling the requests.
satyamshekhar Apr 4, 2011
31d0cd3
Clearing pending requests after the response for terminate comes back…
satyamshekhar Apr 4, 2011
165d968
Handling the cases where server sends terminate type in response
satyamshekhar Apr 6, 2011
9297826
Handling the case where the connection request recieves a terminate r…
satyamshekhar Apr 7, 2011
e68947a
Catching Terminate conditions in all responses
satyamshekhar Apr 7, 2011
613bc42
Removing extraneous logging. Bug: disconnect called as soon as possible
satyamshekhar Apr 12, 2011
d67b968
Adding retrying logic to BOSH
satyamshekhar Apr 12, 2011
12b5a20
Changing the reconnect logic in BOSH
satyamshekhar Apr 13, 2011
cda8b06
Refactored BoshWindowManager and Removed TERMINATED state
satyamshekhar Apr 13, 2011
7ea743e
Changing Bosh attributes from NSNumbers to scalar types
satyamshekhar Apr 14, 2011
ed16ed4
BOSH now accepts NSURL instead of NSString, rid is incremented by mak…
satyamshekhar Apr 14, 2011
1bc1f02
Fix NSAsserts with multiple printf args.
Apr 15, 2011
08e3493
Fix <body> attributes sent in session creation request.
Apr 19, 2011
6ea6b8a
Fix plain auth success handling.
Apr 20, 2011
4057562
rid now asssociated with userInfo attribute of http request
satyamshekhar Apr 20, 2011
dfabbc1
Merge branch 'bosh' of github.com:directi/xmppframework into bosh
satyamshekhar Apr 20, 2011
3f588fd
Adding inactivity attribute in session creation
satyamshekhar Apr 23, 2011
4a4d659
Adding Exp BackOff
satyamshekhar May 4, 2011
6a0a93e
Merge branch 'master' into vcard
May 6, 2011
660ab79
Adding ua = iphone
satyamshekhar May 8, 2011
3f0dd2e
Commenting a breaking code fragmant. Could be something to do with up…
May 9, 2011
c51ce14
Added support for EXTVAL in fetching avatar. Making asynchronous http…
May 9, 2011
ed30a38
Merge remote branch 'origin/bosh' into talkto-master
May 10, 2011
c671c29
Not repeating a call when avatar is fetched for two cases- http and x…
May 11, 2011
76dc824
Making inactivity configurable
satyamshekhar May 13, 2011
0e73ba0
Merge branch 'bosh' into talkto-master
satyamshekhar May 13, 2011
86e3094
Adding Read Receipts to XMPPMessage
satyamshekhar May 16, 2011
125ad2f
Do not do initial roster update on a different thread.
May 17, 2011
74bc193
Ensure that <bind> is not attempted before xmppStream is authenticated.
May 28, 2011
5e511bd
Indentation fixes
satyamshekhar May 29, 2011
66b03be
Sending another bosh request before processing the current response
satyamshekhar May 29, 2011
8da526e
Sending empty requests till we get the terminate response from the se…
satyamshekhar May 29, 2011
ee9fb28
Defining a repeating string in header.
May 30, 2011
a3707ec
Merge branch 'talkto-master' of github.com:directi/xmppframework into…
May 30, 2011
2062a98
Merge branch 'talkto-master' of github.com:directi/xmppframework into…
satyamshekhar May 30, 2011
8889282
Revert "Sending another bosh request before processing the current re…
May 31, 2011
c7a7f73
Iterating over only the first level children of the root node<body>
satyamshekhar Jun 2, 2011
bf8f406
Ensure that only one <x xmlns="vcard-temp:x:update" element is sent o…
Jun 3, 2011
ee5c313
Revert all changes made to vCard avatar module.
Jun 6, 2011
b4af5f9
Bugfix: Retain myPresence before sending it.
Jun 6, 2011
c6f1b5a
Bugfix: make sure that only one vcard-update <x> element is included …
Jun 7, 2011
94cbe1d
In AvatarModule, if releasing moduleStorage, better retain it.
Jun 7, 2011
3052ba3
Merge remote-tracking branch 'origin/talkto-master' into talkto-master
Jun 8, 2011
750d19c
Upon accepting a buddy request, do not automatically add the buddy to…
Jun 9, 2011
88631db
Added transport delegate methods for willSend and didSend stanzas.
Jun 16, 2011
3945438
Added support for specifying host and port values in BoshTransport, t…
Jun 17, 2011
07e7a03
Removing received rids from the window manager
satyamshekhar Jun 20, 2011
132598d
Fixing spelling mistake
satyamshekhar Jun 20, 2011
a120f5d
cancelling http request whose response is not yet returned during dea…
satyamshekhar Jun 20, 2011
5ae3327
BOSH: Use DDLogSend and DDLogRecvPre to log sent and received HTTP bo…
Jun 23, 2011
3717148
BOSH: Replace all NSLog calls with DDLog*.
Jun 23, 2011
e9f3a1c
BOSH: Use 'nonatomic' properties for RequestResponsePair.
Jun 23, 2011
c3af735
BOSH: Retain 'request' and 'response' in RequestResponsePair.
Jun 23, 2011
3dcd132
BOSH: Remove unused variable -- it was also causing a memory leak.
Jun 23, 2011
c200bf7
BOSH: Fix memory leak -- RequestResponsePair instance was not being r…
Jun 23, 2011
c97fd66
BOSH: Don't copy NSXMLElement unnecessarily while creating payload to…
Jun 23, 2011
365267c
BOSH: Add an exception instead of logging a logic error.
Jun 23, 2011
819b41e
BOSH: Whitespace fixes.
Jun 23, 2011
c0cdca3
BOSH: Fix memory leak -- don't copy response child nodes in broadcast…
Jun 23, 2011
b1ade6a
Copy the <stream:features> element that XMPPStream gets from the
Jun 24, 2011
98cd1fe
Treating any response without the bosh namespace as a req failure
satyamshekhar Jun 24, 2011
5a09b74
BOSH: Cancel pending HTTP requests before disconnect, not while de-al…
Jun 26, 2011
360a2f4
vCard: Send 'x-only-base64encodedimage-required' attribute to get BIN…
Jun 29, 2011
8361b58
Added support for customAuthentication, Added a custom property for t…
saileshmittal Jul 29, 2011
598956d
Revert "Added support for customAuthentication, Added a custom proper…
saileshmittal Aug 2, 2011
f83dad3
Added a state for custom authentication.
saileshmittal Aug 2, 2011
4878ac6
Must be able to send stanza's when state is custom_auth.
saileshmittal Aug 2, 2011
aeed029
Passing in target and selector while calling functions and storing it…
saileshmittal Aug 3, 2011
2249e3f
Not disconnecting xmppstream if the server messages before establishi…
satyamshekhar Aug 18, 2011
e377b27
Using an attribute routeProtocol to be used inside 'route'.
saileshmittal Aug 25, 2011
fff07a5
XMPPMessage: Send 'sid' attribute with message receipt.
Sep 19, 2011
8313eaf
Add NSCoding protocol to XMPPStream. Also make transport a assignable…
pushpraj Oct 18, 2011
6c68418
Add NSCoding protocol to NSXMLElement. Also add class method 'parseWe…
pushpraj Oct 18, 2011
8024156
BoshTransport.m: fixing ownership of 'lang' in boshTransport. Also ma…
pushpraj Oct 18, 2011
94c0b7e
Add NSCoding protocol to BoshTransport and related internal classes
pushpraj Oct 18, 2011
7fc1f89
Add method to resend unacknowledged packets in BoshTransport
pushpraj Oct 18, 2011
b615a71
Update ASIHTTPRequest.
Oct 19, 2011
c911ea1
Fix indentation and naming conventions in recent changed files
pushpraj Oct 20, 2011
e607538
Retain transport in XmppStream
pushpraj Oct 20, 2011
c78cc58
Ensure resendRemainingRequests method in BoshTransport sends atleast …
pushpraj Oct 20, 2011
86939f4
Archive transport with archiving xmppStream
pushpraj Oct 20, 2011
306ee54
Bugfix typo by calling [self init] insteed of [super init] in recent …
pushpraj Oct 20, 2011
9dfb93b
Memory Leak fix- avoid retaining new root element in xmppStream
pushpraj Oct 21, 2011
561ca61
Add XMPPTransportProtocol method to notify receiving an empty Packet …
pushpraj Nov 1, 2011
35daf62
Leak fix- releasing some members of boshTransport
pushpraj Nov 4, 2011
2d91517
Leak fix- rootElement in XmppStream
pushpraj Nov 4, 2011
384a95e
Merge branch 'talkto-master' into archiveXmppStream-BoshTransport
pushpraj Nov 9, 2011
43bc61d
Avoid assign transport directly in XmppStream. Use property transport…
pushpraj Nov 29, 2011
8fd211f
Add archiving NSHTTPCookieStorage's persisted cookies with bosh trans…
pushpraj Nov 29, 2011
ff0e09c
Add pause/resume methods in xmppStream and Bosh Transport.
pushpraj Nov 30, 2011
ff5c9f9
Remove all requests on pausing Bosh Transport
pushpraj Nov 30, 2011
e7bdc1d
Remove transportDidReceiveEmptyPacket from BoshTransport
pushpraj Dec 5, 2011
af981a2
BoshTransport: Remove and cancel requests in pendingHTTPRequests_ at …
pushpraj Dec 8, 2011
3e42310
BoshTransport: Allow disconnection while in state CONNECTING.
pushpraj Dec 9, 2011
b17d27a
Add |supportsPause| for transport and xmppStream.
Dec 27, 2011
415e45d
Fix whitespace.
Dec 27, 2011
af2ee9c
XMPPStream: Should not add or remove self as a transport delegate dur…
Dec 27, 2011
7206f0b
Remove frivolous NSLog()s.
Dec 27, 2011
486e9f5
BoshTransport: enable sending pending xmpp stanzas while transport is…
pushpraj Dec 29, 2011
4e14831
BoshTransport: Send 'terminate' with pending xmpp stanzas in same req…
pushpraj Dec 29, 2011
0bd12b0
Merge branch 'archive-xmppStream+pause' into talkto-master
Dec 29, 2011
336f3e9
BoshTransport: YES or NO should be assigned to a BOOL variable.
Dec 29, 2011
6eaccf2
Init pendingHTTPRequests_ while unarchiving BOSH transport.
Dec 29, 2011
684ab94
Fix indentation.
Dec 29, 2011
2dc0fa9
BoshTransport: Simlify logic of trySendingStanzas method.
pushpraj Dec 30, 2011
2d29c34
Merge pull request #10 from directi/bosh-send-pending-while-disconnec…
pushpraj Dec 30, 2011
69af57f
Make bosh properties nonatomic
pushpraj Jan 3, 2012
e82189f
Make XMPPSocketTransport properties nonatomic
pushpraj Jan 3, 2012
2887401
XMPPRoster: Make hasRoster/setHasRoster methods public
pushpraj Jan 4, 2012
d4fede5
XmppStream: RemoveDelegate self from Transport on dealloc
pushpraj Jan 4, 2012
32b2431
Merge branch 'maintainance-bosh' into talkto-master
pushpraj Jan 5, 2012
bdc71e7
BoshTransport: Dont save retryCounter/ nextRequestDelay on pause,
pushpraj Jan 13, 2012
5c2fdac
BoshTransport: Reset retryCounter on resumption
pushpraj Jan 16, 2012
5bdfa21
BoshTransport: Enable reconnection on DISCONNECTING state as well
pushpraj Jan 16, 2012
6661d2a
BoshTransport: Limit max retryRequestDelay
pushpraj Jan 16, 2012
5ad7a95
Set max-delay-limit before reconnect to 64 sec
pushpraj Jan 16, 2012
b54c661
BoshTransport: Limit |nextRequestDelay| to DELAY_UPPER_LIMIT.
Jan 16, 2012
2a4e777
BoshTransport: Reduce DELAY_UPPER_LIMIT to 32 seconds.
Jan 16, 2012
9f65e9a
Fix formatting.
Jan 16, 2012
750a78d
BoshTransport: Ensure that queued performSelector: requests are cance…
Jan 16, 2012
2108895
Merge branch 'update-retry-logic' into talkto-master
Jan 16, 2012
46b6879
BoshTransport: Cancel scheduled performSelector:withDelay: when cance…
pushpraj Jan 17, 2012
29598a1
Cache values returned by XMPPElement's -from and -to methods.
Jan 19, 2012
a4da712
Cache values returned by LibIDN.
Jan 20, 2012
ac3fe34
Bugfix: Values returned by LibIDN weren't actually being cached.
Jan 20, 2012
e794565
Disable presence cache for unavailable roster.
pushpraj Jan 31, 2012
72f5113
Cleanup- remove earlyPresenceElements.
pushpraj Jan 31, 2012
a9ce129
Remove unused method.
Feb 1, 2012
24b41e2
Stop using private API selector (ignore:).
Feb 24, 2012
18ed3e6
Add log for sending packet.
pushpraj Mar 20, 2012
8c49254
BoshTransport: Log response in case there is a parsing failure.
Mar 21, 2012
853545e
Merge remote-tracking branch 'origin/talkto-master' into talkto-master
Mar 21, 2012
b9e3075
Log BOSH sid and rid for non-debug builds.
Mar 21, 2012
a589f08
Log when the presence comes. ONLY FOR INTERNAL BUILD.
pushpraj Mar 22, 2012
c73747f
Log when sending request for vcard. ONLY FOR INTERNAL BUILD.
pushpraj Mar 22, 2012
9e26923
Don't disconnect stream in case of BOSH parse failure.
Apr 4, 2012
16c611b
Move logging level for presences to DDLogVerbose.
pushpraj Apr 4, 2012
b02ab38
Merge pull request #16 from directi/presences-to-logverbose
chaitanyagupta Apr 4, 2012
c037c8f
Merge branch 'talkto-master' into bosh-retry-on-parse-failure
Apr 5, 2012
44f1fa9
Merge branch 'bosh-retry-on-parse-failure' into talkto-master
Apr 5, 2012
8e941f8
Fix style for multi-line conditional.
Apr 5, 2012
201bdfe
Fix presence logging in xmppStream rather than xmppRoster.
pushpraj Apr 12, 2012
24db697
Change send/receive log levels to verbose.
saileshmittal Apr 27, 2012
391bb72
Remove the xml:lang attribute from incoming presence elements.
May 23, 2012
8f295d3
Fix memory leak.
Jun 13, 2012
a498f4b
BoshTransport: Stop using DDLogSend and DDLogRecvPre for logging.
Jun 18, 2012
16a6684
XMPPvCardTemp: Add 'id' attribute to vcard request iq packet.
pushpraj Aug 13, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Categories/NSXMLElementAdditions.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#endif


@interface NSXMLElement (XMPPStreamAdditions)
@interface NSXMLElement (XMPPStreamAdditions) <NSCoding>

+ (NSXMLElement *)elementWithName:(NSString *)name xmlns:(NSString *)ns;

Expand Down Expand Up @@ -43,4 +43,6 @@
- (NSString *)namespaceStringValueForPrefix:(NSString *)prefix;
- (NSString *)namespaceStringValueForPrefix:(NSString *)prefix withDefaultValue:(NSString *)defaultValue;

+ (NSXMLElement *)parseWellFormatedXMLString:(NSString *)xml;

@end
24 changes: 24 additions & 0 deletions Categories/NSXMLElementAdditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,28 @@ - (NSString *)namespaceStringValueForPrefix:(NSString *)prefix withDefaultValue:
return (namespace) ? [namespace stringValue] : defaultValue;
}

+ (NSXMLElement *)parseWellFormatedXMLString:(NSString *)xml
{
NSXMLDocument *doc = [[[NSXMLDocument alloc] initWithXMLString:xml
options:0
error:NULL] autorelease];
NSXMLElement *element = [doc rootElement];
[element detach];
return element;
}

#define kNSXMLElement @"NSXMLElementCompactXMLString"

- (void)encodeWithCoder: (NSCoder *)coder
{
[coder encodeObject:[self compactXMLString] forKey:kNSXMLElement];
}

- (id)initWithCoder: (NSCoder *)coder
{
[self release];
self = [[NSXMLElement parseWellFormatedXMLString:(NSString *)[coder decodeObjectForKey:kNSXMLElement]] retain];
return self;
}

@end
165 changes: 165 additions & 0 deletions Core/Transports/BoshTransport.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
//
// BoshTransport.h
// iPhoneXMPP
//
// Created by Satyam Shekhar on 3/17/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "XMPPTransportProtocol.h"
#import "XMPPJID.h"
#import "MulticastDelegate.h"
#import "ASIHTTPRequest.h"

typedef enum {
ATTR_TYPE = 0,
NAMESPACE_TYPE = 1
} XMLNodeType;

/*
host-unknown
host-gone
item-not-found
policy-violation
remote-connection-failed
bad-request
internal-server-error
remote-stream-error
undefined-condition
*/

#define BoshTerminateConditionDomain @"BoshTerminateCondition"

typedef enum {
HOST_UNKNOWN = 1,
HOST_GONE = 2,
ITEM_NOT_FOUND = 3,
POLICY_VIOLATION = 4,
REMOTE_CONNECTION_FAILED = 5,
BAD_REQUEST = 6,
INTERNAL_SERVER_ERROR = 7,
REMOTE_STREAM_ERROR = 8,
UNDEFINED_CONDITION = 9
} BoshTerminateConditions;

typedef enum {
CONNECTED = 0,
CONNECTING = 1,
DISCONNECTING = 2,
DISCONNECTED = 3,
TERMINATING = 4
} BoshTransportState;

@interface RequestResponsePair : NSObject <NSCoding>
@property (nonatomic, retain) NSXMLElement *request;
@property (nonatomic, retain) NSXMLElement *response;
- (id)initWithRequest:(NSXMLElement *)request response:(NSXMLElement *)response;
- (void)dealloc;
@end

#pragma mark -

/**
* Handles the in-order processing of responses.
**/
@interface BoshWindowManager : NSObject <NSCoding> {
long long maxRidReceived; // all rid value less than equal to maxRidReceived are processed.
long long maxRidSent;
NSMutableSet *receivedRids;
}

@property (nonatomic) unsigned int windowSize;
@property (nonatomic, readonly) long long maxRidReceived;

- (id)initWithRid:(long long)rid;
- (void)sentRequestForRid:(long long)rid;
- (void)receivedResponseForRid:(long long)rid;
- (BOOL)isWindowFull;
- (BOOL)isWindowEmpty;
- (void)dealloc;
@end


#pragma mark -

@interface BoshTransport : NSObject <XMPPTransportProtocol, NSCoding> {
NSString *boshVersion;

long long nextRidToSend;
long long maxRidProcessed;

NSMutableArray *pendingXMPPStanzas;
BoshWindowManager *boshWindowManager;
BoshTransportState state;

NSMutableDictionary *requestResponsePairs;

MulticastDelegate <XMPPTransportDelegate> *multicastDelegate;
NSError *disconnectError_;

int retryCounter;
NSTimeInterval nextRequestDelay;

BOOL secure;
unsigned int requests;
}

@property (nonatomic, retain) XMPPJID *myJID;
@property (nonatomic, assign) unsigned int wait;
@property (nonatomic, assign) unsigned int hold;
@property (nonatomic, copy) NSString *lang;
@property (nonatomic, copy) NSString *domain;
@property (nonatomic, copy) NSString *routeProtocol;
@property (nonatomic, copy) NSString *host;
@property (nonatomic, assign) unsigned int port;
@property (nonatomic, assign) unsigned int inactivity;
@property (nonatomic, readonly) BOOL secure;
@property (nonatomic, readonly) unsigned int requests;
@property (nonatomic, copy) NSString *authid;
@property (nonatomic, copy) NSString *sid;
@property (nonatomic, copy) NSURL *url;
@property (nonatomic, readonly) NSError *disconnectError;

@property(nonatomic, readonly) BOOL isPaused;

/* init Methods */
- (id)initWithUrl:(NSURL *)url forDomain:(NSString *)domain;
- (id)initWithUrl:(NSURL *)url
forDomain:(NSString *)domain
routeProtocol:(NSString *)routeProtocol
host:(NSString *)host
port:(unsigned int)port;
- (id)initWithUrl:(NSURL *)url
forDomain:(NSString *)domain
withDelegate:(id<XMPPTransportDelegate>)delegate;
- (id)initWithUrl:(NSURL *)url
forDomain:(NSString *)domain
routeProtocol:(NSString *)routeProtocol
host:(NSString *)host
port:(unsigned int)port
withDelegate:(id<XMPPTransportDelegate>)delegate;

- (void)dealloc;

/* ASI http methods - Delegate Methods */
- (void)requestFinished:(ASIHTTPRequest *)request;
- (void)requestFailed:(ASIHTTPRequest *)request;

/* Protocol Methods */
- (BOOL)isConnected;
- (void)addDelegate:(id)delegate;
- (void)removeDelegate:(id)delegate;
- (XMPPJID *)myJID;
- (void)setMyJID:(XMPPJID *)jid;
- (BOOL)connect:(NSError **)errPtr;
- (void)disconnect;
- (void)restartStream;
- (float)serverXmppStreamVersionNumber;
- (BOOL)sendStanza:(NSXMLElement *)stanza;
- (BOOL)sendStanzaWithString:(NSString *)string;

- (void)pause;
- (void)resume;

@end
Loading