Differences From Artifact [7a00751abf]:
- File tests/test.m — part of check-in [15caf24f36] at 2012-02-06 15:33:50 on branch trunk — Fix a few bugs in roster versioning. (user: js, size: 6411) [annotate] [blame] [check-ins using]
To Artifact [4505fb0d79]:
- File
tests/test.m
— part of check-in
[a618f77f45]
at
2012-08-10 12:08:23
on branch trunk
— Add very basic Stream Management (XEP-0198) support
This implementation only counts incomming stanzas and
sends ACKs on request.
While basic this already allows servers to write
messages to offline storage that were sent to,
but never received by a client. (user: js, size: 6584) [annotate] [blame] [check-ins using]
︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | + | #import "XMPPConnection.h" #import "XMPPJID.h" #import "XMPPStanza.h" #import "XMPPIQ.h" #import "XMPPMessage.h" #import "XMPPPresence.h" #import "XMPPRoster.h" #import "XMPPStreamManagement.h" #import "XMPPJSONFileStorage.h" @interface AppDelegate: OFObject #ifdef OF_HAVE_OPTIONAL_PROTOCOLS <OFApplicationDelegate, XMPPConnectionDelegate, XMPPRosterDelegate> #endif { |
︙ | |||
100 101 102 103 104 105 106 107 108 109 110 111 112 113 | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | + + | XMPPJSONFileStorage *storage = [[XMPPJSONFileStorage alloc] initWithFile: @"storage.json"]; [conn setDataStorage: storage]; roster = [[XMPPRoster alloc] initWithConnection: conn]; [roster addDelegate: self]; [[XMPPStreamManagement alloc] initWithConnection: conn]; if ([arguments count] != 3) { of_log(@"Invalid count of command line arguments!"); [OFApplication terminateWithStatus: 1]; } [conn setDomain: [arguments objectAtIndex: 0]]; [conn setUsername: [arguments objectAtIndex: 1]]; |
︙ | |||
135 136 137 138 139 140 141 | 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | - + + | } - (void)connectionWasAuthenticated: (XMPPConnection*)conn { of_log(@"Auth successful"); } |
︙ |