@@ -1,8 +1,8 @@ /* * Copyright (c) 2010, 2011, 2012, Jonathan Schleifer - * Copyright (c) 2011, Florian Zeitz + * Copyright (c) 2011, 2012, Florian Zeitz * * https://webkeks.org/hg/objxmpp/ * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -45,12 +45,10 @@ #import "XMPPStanza.h" #import "XMPPJID.h" #import "XMPPIQ.h" #import "XMPPMessage.h" #import "XMPPPresence.h" -#import "XMPPRoster.h" -#import "XMPPRosterItem.h" #import "XMPPMulticastDelegate.h" #import "XMPPExceptions.h" #import "namespaces.h" @implementation XMPPConnection @@ -92,11 +90,10 @@ [resource release]; [JID release]; [delegates release]; [callbacks release]; [authModule release]; - [roster release]; [super dealloc]; } - (void)setUsername: (OFString*)username_ @@ -531,20 +528,16 @@ * them the next time the parser returns. */ oldParser = parser; oldElementBuilder = elementBuilder; - [roster release]; - parser = [[OFXMLParser alloc] init]; [parser setDelegate: self]; elementBuilder = [[OFXMLElementBuilder alloc] init]; [elementBuilder setDelegate: self]; - roster = [[XMPPRoster alloc] initWithConnection: self]; - [sock writeFormat: @"\n" @"", domain]; @@ -780,15 +773,10 @@ [callback runWithIQ: iq]; [callbacks removeObjectForKey: [iq ID]]; return; } - if ([iq elementForName: @"query" - namespace: XMPP_NS_ROSTER]) - if ([roster handleIQ: iq]) - return; - handled = [delegates broadcastSelector: @selector( connection:didReceiveIQ:) forConnection: self withObject: iq]; @@ -1057,15 +1045,10 @@ - (XMPPMulticastDelegate*)XMPP_delegates { return delegates; } - -- (XMPPRoster*)roster -{ - return [[roster retain] autorelease]; -} @end @implementation OFObject (XMPPConnectionDelegate) - (void)connection: (XMPPConnection*)connection didReceiveElement: (OFXMLElement*)element @@ -1084,14 +1067,10 @@ - (void)connection: (XMPPConnection*)connection wasBoundToJID: (XMPPJID*)JID { } -- (void)connectionDidReceiveRoster: (XMPPConnection*)connection -{ -} - - (BOOL)connection: (XMPPConnection*)connection didReceiveIQ: (XMPPIQ*)iq { return NO; } @@ -1102,15 +1081,10 @@ } - (void)connection: (XMPPConnection*)connection didReceiveMessage: (XMPPMessage*)message { -} - -- (void)connection: (XMPPConnection*)connection - didReceiveRosterItem: (XMPPRosterItem*)rosterItem -{ } - (void)connectionWasClosed: (XMPPConnection*)connection { }