@@ -36,13 +36,11 @@ #import "XMPPRoster.h" #import "XMPPStreamManagement.h" #import "XMPPFileStorage.h" @interface AppDelegate: OFObject -#ifdef OF_HAVE_OPTIONAL_PROTOCOLS -#endif { XMPPConnection *conn; XMPPRoster *roster; } @end @@ -129,29 +127,29 @@ [conn setResource: @"ObjXMPP"]; [conn asyncConnectAndHandle]; } -- (void)connection: (XMPPConnection*)conn - didReceiveElement: (OFXMLElement*)element +- (void)connection: (XMPPConnection *)conn + didReceiveElement: (OFXMLElement *)element { of_log(@"In: %@", element); } -- (void)connection: (XMPPConnection*)conn - didSendElement: (OFXMLElement*)element +- (void)connection: (XMPPConnection *)conn + didSendElement: (OFXMLElement *)element { of_log(@"Out: %@", element); } -- (void)connectionWasAuthenticated: (XMPPConnection*)conn +- (void)connectionWasAuthenticated: (XMPPConnection *)conn { of_log(@"Auth successful"); } -- (void)connection: (XMPPConnection*)conn_ - wasBoundToJID: (XMPPJID*)jid +- (void)connection: (XMPPConnection *)conn_ + wasBoundToJID: (XMPPJID *)jid { of_log(@"Bound to JID: %@", [jid fullJID]); of_log(@"Supports SM: %@", [conn_ supportsStreamManagement] ? @"true" : @"false"); @@ -198,11 +196,11 @@ [discoEntity addDiscoNode: nodeChicago]; [roster requestRoster]; } -- (void)rosterWasReceived: (XMPPRoster*)roster_ +- (void)rosterWasReceived: (XMPPRoster *)roster_ { XMPPPresence *pres; of_log(@"Got roster: %@", [roster_ rosterItems]); @@ -222,11 +220,11 @@ of_log(@"Ping response: %@", resp); }]; #endif } -- (void)connectionDidUpgradeToTLS: (XMPPConnection*)conn_ +- (void)connectionDidUpgradeToTLS: (XMPPConnection *)conn_ { OFString *reason; if (![conn_ checkCertificateAndGetReason: &reason]) { [of_stdout writeString: @"Couldn't verify certificate: "]; @@ -236,42 +234,42 @@ if (![[of_stdin readLine] hasPrefix: @"y"]) [OFApplication terminateWithStatus: 1]; } } -- (void)roster: (XMPPRoster*)roster_ - didReceiveRosterItem: (XMPPRosterItem*)rosterItem +- (void)roster: (XMPPRoster *)roster_ + didReceiveRosterItem: (XMPPRosterItem *)rosterItem { of_log(@"Got roster push: %@", rosterItem); } -- (bool)connection: (XMPPConnection*)conn - didReceiveIQ: (XMPPIQ*)iq +- (bool)connection: (XMPPConnection *)conn + didReceiveIQ: (XMPPIQ *)iq { of_log(@"IQ: %@", iq); return NO; } -- (void)connection: (XMPPConnection*)conn - didReceiveMessage: (XMPPMessage*)msg +- (void)connection: (XMPPConnection *)conn + didReceiveMessage: (XMPPMessage *)msg { of_log(@"Message: %@", msg); } -- (void)connection: (XMPPConnection*)conn - didReceivePresence: (XMPPPresence*)pres +- (void)connection: (XMPPConnection *)conn + didReceivePresence: (XMPPPresence *)pres { of_log(@"Presence: %@", pres); } -- (void)connection: (XMPPConnection*)conn +- (void)connection: (XMPPConnection *)conn didThrowException: (id)e { @throw e; } -- (void)connectionWasClosed: (XMPPConnection*)conn +- (void)connectionWasClosed: (XMPPConnection *)conn { of_log(@"Connection was closed!"); } @end