Overview
Comment: | Change how roster items are stored. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
e53970f55fec1608d6d34ec0d29842c9 |
User & Date: | js on 2011-04-01 01:09:04 |
Other Links: | manifest | tags |
Context
2011-04-01
| ||
01:14 | Add convenience header and method. check-in: 6c757fb3c0 user: js tags: trunk | |
01:09 | Change how roster items are stored. check-in: e53970f55f user: js tags: trunk | |
2011-03-31
| ||
12:25 | Adjust to newest ObjFW and greatly improve XML handling. check-in: 423434d147 user: js tags: trunk | |
Changes
Modified configure.ac from [cc022bbe90] to [e73fb2f584].
︙ | ︙ | |||
55 56 57 58 59 60 61 | BUILDSYS_TOUCH_DEPS dnl We don't call AC_PROG_CPP, but only AC_PROG_OBJCPP and set CPP to OBJCPP dnl and add OBJCPPA.FLAGS to CPPFLAGS, thus we need to AC_SUBST these ourself AC_SUBST(CPP) AC_SUBST(CPPFLAGS) | | | 55 56 57 58 59 60 61 62 63 64 | BUILDSYS_TOUCH_DEPS dnl We don't call AC_PROG_CPP, but only AC_PROG_OBJCPP and set CPP to OBJCPP dnl and add OBJCPPA.FLAGS to CPPFLAGS, thus we need to AC_SUBST these ourself AC_SUBST(CPP) AC_SUBST(CPPFLAGS) AC_SUBST(PACKAGE, ObjXMPP) AC_CONFIG_FILES([buildsys.mk extra.mk]) AC_OUTPUT |
Modified src/XMPPRoster.h from [6e37e7971b] to [1f83f6aa00].
︙ | ︙ | |||
24 25 26 27 28 29 30 | @class XMPPConnection; @class XMPPRosterItem; @interface XMPPRoster: OFObject { XMPPConnection *connection; | | | > | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | @class XMPPConnection; @class XMPPRosterItem; @interface XMPPRoster: OFObject { XMPPConnection *connection; OFMutableDictionary *rosterItems; } - initWithConnection: (XMPPConnection*)conn; - (void)XMPP_addRosterItem: (XMPPRosterItem*)rosterItem; - (void)XMPP_updateRosterItem: (XMPPRosterItem*)rosterItem; - (void)XMPP_deleteRosterItem: (XMPPRosterItem*)rosterItem; - (OFDictionary*)rosterItems; - (void)addRosterItem: (XMPPRosterItem*)rosterItem; - (void)updateRosterItem: (XMPPRosterItem*)rosterItem; - (void)deleteRosterItem: (XMPPRosterItem*)rosterItem; @end |
Modified src/XMPPRoster.m from [401105b7c9] to [4eed8628a8].
︙ | ︙ | |||
29 30 31 32 33 34 35 | @implementation XMPPRoster - initWithConnection: (XMPPConnection*)conn { self = [super init]; @try { connection = [conn retain]; | | < < < | < < < < | < < < < | | < < < < | < < | | | < < < | < < < < | < < < | < < | < | < < < | | 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 | @implementation XMPPRoster - initWithConnection: (XMPPConnection*)conn { self = [super init]; @try { connection = [conn retain]; rosterItems = [[OFMutableDictionary alloc] init]; } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [connection release]; [super dealloc]; } - (void)XMPP_addRosterItem: (XMPPRosterItem*)rosterItem { return [self XMPP_updateRosterItem: rosterItem]; } - (void)XMPP_updateRosterItem: (XMPPRosterItem*)rosterItem { [rosterItems setObject: rosterItem forKey: [[rosterItem JID] bareJID]]; } - (void)XMPP_deleteRosterItem: (XMPPRosterItem*)rosterItem { [rosterItems removeObjectForKey: [[rosterItem JID] bareJID]]; } - (OFDictionary*)rosterItems { return [[rosterItems copy] autorelease]; } - (void)addRosterItem: (XMPPRosterItem*)rosterItem { [self updateRosterItem: rosterItem]; } |
︙ | ︙ |
Modified tests/test.m from [d26de2a21f] to [af27a5ba19].
︙ | ︙ | |||
122 123 124 125 126 127 128 | [conn requestRoster]; } - (void)connectionDidReceiveRoster :(XMPPConnection*)conn { XMPPPresence *pres; | < < < < < < | | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | [conn requestRoster]; } - (void)connectionDidReceiveRoster :(XMPPConnection*)conn { XMPPPresence *pres; of_log(@"Got roster: %@", [[conn roster] rosterItems]); pres = [XMPPPresence presence]; [pres addPriority: 10]; [pres addStatus: @"ObjXMPP test is working!"]; [conn sendStanza: pres]; } |
︙ | ︙ |