Index: src/XMPPConnection.m ================================================================== --- src/XMPPConnection.m +++ src/XMPPConnection.m @@ -1,8 +1,8 @@ /* - * Copyright (c) 2010, 2011, 2012, 2013, 2015, 2016, 2017, 2018, 2019 - * Jonathan Schleifer + * Copyright (c) 2010, 2011, 2012, 2013, 2015, 2016, 2017, 2018, 2019, 2021 + * Jonathan Schleifer * Copyright (c) 2011, 2012, Florian Zeitz * * https://heap.zone/objxmpp/ * * Permission to use, copy, modify, and/or distribute this software for any @@ -342,12 +342,12 @@ else { OFString *SRVDomain = [_domainToASCII stringByPrependingString: @"_xmpp-client._tcp."]; OFDNSQuery *query = [OFDNSQuery queryWithDomainName: SRVDomain - DNSClass: OF_DNS_CLASS_IN - recordType: OF_DNS_RECORD_TYPE_SRV]; + DNSClass: OFDNSClassIN + recordType: OFDNSRecordTypeSRV]; [[OFThread DNSResolver] asyncPerformQuery: query delegate: self]; } objc_autoreleasePoolPop(pool); @@ -751,11 +751,11 @@ [_delegates broadcastSelector: @selector( connectionWillUpgradeToTLS:) withObject: self]; newSock = [[SSLSocket alloc] initWithSocket: _socket]; - newSock.certificateVerificationEnabled = false; + newSock.verifiesCertificates = false; #if 0 /* FIXME: Not yet implemented by ObjOpenSSL */ [newSock setCertificateFile: _certificateFile]; [newSock setPrivateKeyFile: _privateKeyFile]; [newSock setPrivateKeyPassphrase: _privateKeyPassphrase]; @@ -1082,11 +1082,11 @@ - (void)xmpp_handleSessionForConnection: (XMPPConnection *)connection IQ: (XMPPIQ *)IQ { if (![IQ.type isEqual: @"result"]) - OF_ENSURE(0); + OFEnsure(0); [_delegates broadcastSelector: @selector(connection:wasBoundToJID:) withObject: self withObject: _JID]; } Index: src/XMPPContactManager.m ================================================================== --- src/XMPPContactManager.m +++ src/XMPPContactManager.m @@ -1,8 +1,8 @@ /* * Copyright (c) 2013, Florian Zeitz - * Copyright (c) 2013, 2016, 2019, Jonathan Schleifer + * Copyright (c) 2013, 2016, 2019, 2021, Jonathan Schleifer * * https://heap.zone/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 @@ -159,11 +159,10 @@ XMPPJID *JID = presence.from; OFString *type = presence.type; /* Subscription request */ if ([type isEqual: @"subscribe"]) { - of_log(@"ObjXMPP: received subscription request"); [_delegates broadcastSelector: @selector(contactManager: didReceiveSubscriptionRequest:) withObject: self withObject: presence]; return; Index: src/XMPPDiscoEntity.m ================================================================== --- src/XMPPDiscoEntity.m +++ src/XMPPDiscoEntity.m @@ -1,8 +1,8 @@ /* * Copyright (c) 2013, Florian Zeitz - * Copyright (c) 2013, 2016, 2019, Jonathan Schleifer + * Copyright (c) 2013, 2016, 2019, 2021, Jonathan Schleifer * * https://heap.zone/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 @@ -112,12 +112,11 @@ } - (OFString *)capsHash { OFMutableString *caps = [OFMutableString string]; - OFSHA1Hash *hash = [OFSHA1Hash - cryptoHashWithAllowsSwappableMemory: true]; + OFSHA1Hash *hash = [OFSHA1Hash hashWithAllowsSwappableMemory: true]; OFData *digest; for (XMPPDiscoIdentity *identity in _identities) [caps appendFormat: @"%@/%@//%@<", identity.category, identity.type, identity.name]; Index: src/XMPPDiscoIdentity.m ================================================================== --- src/XMPPDiscoIdentity.m +++ src/XMPPDiscoIdentity.m @@ -1,8 +1,8 @@ /* * Copyright (c) 2013, Florian Zeitz - * Copyright (c) 2013, 2016, 2019, Jonathan Schleifer + * Copyright (c) 2013, 2016, 2019, 2021, Jonathan Schleifer * * https://heap.zone/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 @@ -103,45 +103,44 @@ return true; return false; } -- (uint32_t)hash -{ - uint32_t hash; - - OF_HASH_INIT(hash); - - OF_HASH_ADD_HASH(hash, _category.hash); - OF_HASH_ADD_HASH(hash, _type.hash); - OF_HASH_ADD_HASH(hash, _name.hash); - - OF_HASH_FINALIZE(hash); +- (unsigned long)hash +{ + unsigned long hash; + + OFHashInit(&hash); + + OFHashAddHash(&hash, _category.hash); + OFHashAddHash(&hash, _type.hash); + OFHashAddHash(&hash, _name.hash); + + OFHashFinalize(&hash); return hash; } -- (of_comparison_result_t)compare: (id )object +- (OFComparisonResult)compare: (id )object { XMPPDiscoIdentity *identity; - of_comparison_result_t categoryResult; - of_comparison_result_t typeResult; + OFComparisonResult categoryResult, typeResult; if (object == self) - return OF_ORDERED_SAME; + return OFOrderedSame; if (![(id)object isKindOfClass: [XMPPDiscoIdentity class]]) @throw [OFInvalidArgumentException exception]; identity = (XMPPDiscoIdentity *)object; categoryResult = [_category compare: identity->_category]; - if (categoryResult != OF_ORDERED_SAME) + if (categoryResult != OFOrderedSame) return categoryResult; typeResult = [_type compare: identity->_type]; - if (typeResult != OF_ORDERED_SAME) + if (typeResult != OFOrderedSame) return typeResult; return [_name compare: identity->_name]; } @end Index: src/XMPPFileStorage.m ================================================================== --- src/XMPPFileStorage.m +++ src/XMPPFileStorage.m @@ -1,7 +1,7 @@ /* - * Copyright (c) 2012, 2019, Jonathan Schleifer + * Copyright (c) 2012, 2019, 2021, Jonathan Schleifer * * https://heap.zone/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 @@ -48,11 +48,11 @@ void *pool = objc_autoreleasePoolPush(); _file = [file copy]; @try { _data = [[OFData dataWithContentsOfFile: file] - .messagePackValue copy]; + .objectByParsingMessagePack copy]; } @catch (id e) { _data = [[OFMutableDictionary alloc] init]; } objc_autoreleasePoolPop(pool); @@ -160,27 +160,27 @@ objc_autoreleasePoolPop(pool); return boolean; } -- (void)setIntegerValue: (intmax_t)integer +- (void)setIntegerValue: (long long)integer forPath: (OFString *)path { void *pool = objc_autoreleasePoolPush(); - [self xmpp_setObject: [OFNumber numberWithIntMax: integer] + [self xmpp_setObject: [OFNumber numberWithLongLong: integer] forPath: path]; objc_autoreleasePoolPop(pool); } -- (intmax_t)integerValueForPath: (OFString *)path +- (long long)integerValueForPath: (OFString *)path { void *pool = objc_autoreleasePoolPush(); - intmax_t integer; + long long integer; - integer = [[self xmpp_objectForPath: path] intMaxValue]; + integer = [[self xmpp_objectForPath: path] longLongValue]; objc_autoreleasePoolPop(pool); return integer; } Index: src/XMPPJID.m ================================================================== --- src/XMPPJID.m +++ src/XMPPJID.m @@ -1,7 +1,7 @@ /* - * Copyright (c) 2011, 2012, 2013, 2019, Jonathan Schleifer + * Copyright (c) 2011, 2012, 2013, 2019, 2021, Jonathan Schleifer * Copyright (c) 2011, 2012, 2013, Florian Zeitz * * https://heap.zone/objxmpp/ * * Permission to use, copy, modify, and/or distribute this software for any @@ -57,24 +57,24 @@ resourcesep = [string rangeOfString: @"/"].location; if (nodesep == SIZE_MAX) self.node = nil; else - self.node = - [string substringWithRange: of_range(0, nodesep)]; + self.node = [string substringWithRange: + OFRangeMake(0, nodesep)]; if (resourcesep == SIZE_MAX) { self.resource = nil; resourcesep = string.length; } else { - of_range_t range = of_range(resourcesep + 1, + OFRange range = OFRangeMake(resourcesep + 1, string.length - resourcesep - 1); self.resource = [string substringWithRange: range]; } self.domain = [string substringWithRange: - of_range(nodesep + 1, resourcesep - nodesep - 1)]; + OFRangeMake(nodesep + 1, resourcesep - nodesep - 1)]; } @catch (id e) { [self release]; @throw e; } @@ -233,20 +233,20 @@ return true; return false; } -- (uint32_t)hash -{ - uint32_t hash; - - OF_HASH_INIT(hash); - - OF_HASH_ADD_HASH(hash, _node.hash); - OF_HASH_ADD_HASH(hash, _domain.hash); - OF_HASH_ADD_HASH(hash, _resource.hash); - - OF_HASH_FINALIZE(hash); +- (unsigned long)hash +{ + unsigned long hash; + + OFHashInit(&hash); + + OFHashAddHash(&hash, _node.hash); + OFHashAddHash(&hash, _domain.hash); + OFHashAddHash(&hash, _resource.hash); + + OFHashFinalize(&hash); return hash; } @end Index: src/XMPPPresence.m ================================================================== --- src/XMPPPresence.m +++ src/XMPPPresence.m @@ -1,7 +1,8 @@ /* - * Copyright (c) 2011, 2012, 2013, 2016, 2019, Jonathan Schleifer + * Copyright (c) 2011, 2012, 2013, 2016, 2019, 2021, + * Jonathan Schleifer * Copyright (c) 2011, 2012, 2013, Florian Zeitz * * https://heap.zone/objxmpp/ * * Permission to use, copy, modify, and/or distribute this software for any @@ -41,11 +42,11 @@ if ([show isEqual: @"dnd"]) return 3; if ([show isEqual: @"xa"]) return 4; - OF_ENSURE(0); + OFEnsure(0); } @implementation XMPPPresence @synthesize status = _status, show = _show, priority = _priority; @@ -112,12 +113,12 @@ namespace: XMPP_NS_CLIENT])) self.status = subElement.stringValue; if ((subElement = [element elementForName: @"priority" namespace: XMPP_NS_CLIENT])) - self.priority = [OFNumber - numberWithIntMax: subElement.decimalValue]; + self.priority = [OFNumber numberWithLongLong: + [subElement longLongValueWithBase: 10]]; } @catch (id e) { [self release]; @throw e; } @@ -171,11 +172,11 @@ [old release]; } - (void)setPriority: (OFNumber *)priority { - intmax_t prio = priority.intMaxValue; + long long prio = priority.longLongValue; OFNumber *old; if ((prio < -128) || (prio > 127)) @throw [OFInvalidArgumentException exception]; @@ -184,52 +185,52 @@ if (oldPriority != nil) [self removeChild: oldPriority]; OFString *priority_s = - [OFString stringWithFormat: @"%" @PRId8, priority.int8Value]; + [OFString stringWithFormat: @"%hhd", priority.charValue]; [self addChild: [OFXMLElement elementWithName: @"priority" namespace: XMPP_NS_CLIENT stringValue: priority_s]]; old = _priority; _priority = [priority copy]; [old release]; } -- (of_comparison_result_t)compare: (id )object +- (OFComparisonResult)compare: (id )object { XMPPPresence *otherPresence; OFNumber *otherPriority; OFString *otherShow; - of_comparison_result_t priorityOrder; + OFComparisonResult priorityOrder; if (object == self) - return OF_ORDERED_SAME; + return OFOrderedSame; if (![(id)object isKindOfClass: [XMPPPresence class]]) @throw [OFInvalidArgumentException exception]; otherPresence = (XMPPPresence *)object; otherPriority = otherPresence.priority; if (otherPriority == nil) - otherPriority = [OFNumber numberWithInt8: 0]; + otherPriority = [OFNumber numberWithChar: 0]; if (_priority != nil) priorityOrder = [_priority compare: otherPriority]; else priorityOrder = - [[OFNumber numberWithInt8: 0] compare: otherPriority]; + [[OFNumber numberWithChar: 0] compare: otherPriority]; - if (priorityOrder != OF_ORDERED_SAME) + if (priorityOrder != OFOrderedSame) return priorityOrder; otherShow = otherPresence.show; if ([_show isEqual: otherShow]) - return OF_ORDERED_SAME; + return OFOrderedSame; if (showToInt(_show) < showToInt(otherShow)) - return OF_ORDERED_ASCENDING; + return OFOrderedAscending; - return OF_ORDERED_DESCENDING; + return OFOrderedDescending; } @end Index: src/XMPPSCRAMAuth.m ================================================================== --- src/XMPPSCRAMAuth.m +++ src/XMPPSCRAMAuth.m @@ -1,8 +1,8 @@ /* * Copyright (c) 2011, Florian Zeitz - * Copyright (c) 2011, 2019, Jonathan Schleifer + * Copyright (c) 2011, 2019, 2021, Jonathan Schleifer * * https://heap.zone/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 @@ -224,12 +224,12 @@ - (OFData *)xmpp_parseServerFirstMessage: (OFData *)data { size_t i; const uint8_t *clientKey, *serverKey, *clientSignature; - intmax_t iterCount = 0; - id hash; + long long iterCount = 0; + id hash; OFMutableData *ret, *authMessage, *tmpArray; OFData *salt = nil, *saltedPassword; OFString *tmpString, *sNonce = nil; enum { GOT_SNONCE = 0x01, @@ -246,11 +246,11 @@ data.itemSize]; for (OFString *component in [challenge componentsSeparatedByString: @","]) { OFString *entry = [component substringWithRange: - of_range(2, component.length - 2)]; + OFRangeMake(2, component.length - 2)]; if ([component hasPrefix: @"r="]) { if (![entry hasPrefix: _cNonce]) @throw [XMPPAuthFailedException exceptionWithConnection: nil @@ -261,11 +261,11 @@ got |= GOT_SNONCE; } else if ([component hasPrefix: @"s="]) { salt = [OFData dataWithBase64EncodedString: entry]; got |= GOT_SALT; } else if ([component hasPrefix: @"i="]) { - iterCount = entry.decimalValue; + iterCount = [entry longLongValueWithBase: 10]; got |= GOT_ITERCOUNT; } } if (got != (GOT_SNONCE | GOT_SALT | GOT_ITERCOUNT)) @@ -395,11 +395,11 @@ if (_authenticated) return nil; mess = [OFString stringWithUTF8String: data.items length: data.count * data.itemSize]; - value = [mess substringWithRange: of_range(2, mess.length - 2)]; + value = [mess substringWithRange: OFRangeMake(2, mess.length - 2)]; if ([mess hasPrefix: @"v="]) { if (![value isEqual: _serverSignature.stringByBase64Encoding]) @throw [XMPPAuthFailedException exceptionWithConnection: nil @@ -428,11 +428,11 @@ if (buf[i] == ',') buf[i] = '~'; } return [OFString stringWithCString: (char *)buf - encoding: OF_STRING_ENCODING_ASCII + encoding: OFStringEncodingASCII length: 64]; } - (const uint8_t *)xmpp_HMACWithKey: (OFData *)key data: (OFData *)data @@ -439,11 +439,11 @@ { void *pool = objc_autoreleasePoolPush(); OFMutableData *k = [OFMutableData data]; size_t i, kSize, blockSize = [_hashType blockSize]; uint8_t *kI = NULL, *kO = NULL; - id hashI, hashO; + id hashI, hashO; if (key.itemSize * key.count > blockSize) { hashI = [[[_hashType alloc] init] autorelease]; [hashI updateWithBuffer: key.items length: key.itemSize * key.count]; @@ -452,12 +452,12 @@ } else [k addItems: key.items count: key.itemSize * key.count]; @try { - kI = [self allocMemoryWithSize: blockSize]; - kO = [self allocMemoryWithSize: blockSize]; + kI = OFAllocMemory(1, blockSize); + kO = OFAllocMemory(1, blockSize); kSize = k.count; memcpy(kI, k.items, kSize); memset(kI + kSize, 0, blockSize - kSize); memcpy(kO, kI, blockSize); @@ -466,23 +466,20 @@ kI[i] ^= HMAC_IPAD; kO[i] ^= HMAC_OPAD; } hashI = [[[_hashType alloc] init] autorelease]; - [hashI updateWithBuffer: kI - length: blockSize]; + [hashI updateWithBuffer: kI length: blockSize]; [hashI updateWithBuffer: data.items length: data.itemSize * data.count]; hashO = [[[_hashType alloc] init] autorelease]; - [hashO updateWithBuffer: kO - length: blockSize]; - [hashO updateWithBuffer: hashI.digest - length: hashI.digestSize]; + [hashO updateWithBuffer: kO length: blockSize]; + [hashO updateWithBuffer: hashI.digest length: hashI.digestSize]; } @finally { - [self freeMemory: kI]; - [self freeMemory: kO]; + OFFreeMemory(kI); + OFFreeMemory(kO); } [hashO retain]; objc_autoreleasePoolPop(pool); @@ -500,11 +497,11 @@ const uint8_t *u, *uOld; intmax_t j, k; OFMutableData *salty, *tmp; OFData *ret; - result = [self allocMemoryWithSize: digestSize]; + result = OFAllocMemory(1, digestSize); @try { memset(result, 0, digestSize); salty = [[salt mutableCopy] autorelease]; @@ -537,15 +534,15 @@ } ret = [OFData dataWithItems: result count: digestSize]; } @finally { - [self freeMemory: result]; + OFFreeMemory(result); } [ret retain]; objc_autoreleasePoolPop(pool); return [ret autorelease]; } @end Index: src/XMPPStorage.h ================================================================== --- src/XMPPStorage.h +++ src/XMPPStorage.h @@ -1,7 +1,7 @@ /* - * Copyright (c) 2012, Jonathan Schleifer + * Copyright (c) 2012, 2021, Jonathan Schleifer * * https://heap.zone/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 @@ -34,17 +34,17 @@ forPath: (OFString *)path; - (nullable OFString *)stringValueForPath: (OFString *)path; - (void)setBooleanValue: (bool)boolean forPath: (OFString *)path; - (bool)booleanValueForPath: (OFString *)path; -- (void)setIntegerValue: (intmax_t)integer +- (void)setIntegerValue: (long long)integer forPath: (OFString *)path; -- (intmax_t)integerValueForPath: (OFString *)path; +- (long long)integerValueForPath: (OFString *)path; - (void)setArray: (nullable OFArray *)array forPath: (OFString *)path; - (nullable OFArray *)arrayForPath: (OFString *)path; - (void)setDictionary: (nullable OFDictionary *)dictionary forPath: (OFString *)path; - (nullable OFDictionary *)dictionaryForPath: (OFString *)path; @end OF_ASSUME_NONNULL_END Index: tests/test.m ================================================================== --- tests/test.m +++ tests/test.m @@ -1,7 +1,7 @@ /* - * Copyright (c) 2010, 2011, 2019, Jonathan Schleifer + * Copyright (c) 2010, 2011, 2019, 2021, Jonathan Schleifer * Copyright (c) 2011, 2012, Florian Zeitz * * https://heap.zone/objxmpp/ * * Permission to use, copy, modify, and/or distribute this software for any @@ -53,11 +53,11 @@ OFArray *arguments = [OFApplication arguments]; XMPPPresence *pres = [XMPPPresence presence]; pres.show = @"xa"; pres.status = @"Bored"; - pres.priority = [OFNumber numberWithInt8: 20]; + pres.priority = [OFNumber numberWithChar: 20]; pres.to = [XMPPJID JIDWithString: @"alice@example.com"]; pres.from = [XMPPJID JIDWithString: @"bob@example.org"]; assert([pres.XMLString isEqual: @"xa" @"Bored20" @@ -64,15 +64,15 @@ @""]); XMPPPresence *pres2 = [XMPPPresence presence]; pres2.show = @"away"; pres2.status = @"Bored"; - pres2.priority = [OFNumber numberWithInt8: 23]; + pres2.priority = [OFNumber numberWithChar: 23]; pres2.to = [XMPPJID JIDWithString: @"alice@example.com"]; pres2.from = [XMPPJID JIDWithString: @"bob@example.org"]; - assert([pres compare: pres2] == OF_ORDERED_ASCENDING); + assert([pres compare: pres2] == OFOrderedAscending); XMPPMessage *msg = [XMPPMessage messageWithType: @"chat"]; msg.body = @"Hello everyone"; msg.to = [XMPPJID JIDWithString: @"jdev@conference.jabber.org"]; msg.from = [XMPPJID JIDWithString: @"alice@example.com"]; @@ -116,11 +116,11 @@ [roster addDelegate: self]; [[XMPPStreamManagement alloc] initWithConnection: conn]; if (arguments.count != 3) { - of_log(@"Invalid count of command line arguments!"); + OFLog(@"Invalid count of command line arguments!"); [OFApplication terminateWithStatus: 1]; } conn.domain = [arguments objectAtIndex: 0]; conn.username = [arguments objectAtIndex: 1]; @@ -131,29 +131,29 @@ } - (void)connection: (XMPPConnection *)conn didReceiveElement: (OFXMLElement *)element { - of_log(@"In: %@", element); + OFLog(@"In: %@", element); } - (void)connection: (XMPPConnection *)conn didSendElement: (OFXMLElement *)element { - of_log(@"Out: %@", element); + OFLog(@"Out: %@", element); } - (void)connectionWasAuthenticated: (XMPPConnection *)conn { - of_log(@"Auth successful"); + OFLog(@"Auth successful"); } - (void)connection: (XMPPConnection *)conn_ wasBoundToJID: (XMPPJID *)JID { - of_log(@"Bound to JID: %@", JID.fullJID); - of_log(@"Supports SM: %@", + OFLog(@"Bound to JID: %@", JID.fullJID); + OFLog(@"Supports SM: %@", conn_.supportsStreamManagement ? @"true" : @"false"); XMPPDiscoEntity *discoEntity = [[XMPPDiscoEntity alloc] initWithConnection: conn]; @@ -201,14 +201,14 @@ - (void)rosterWasReceived: (XMPPRoster *)roster_ { XMPPPresence *pres; - of_log(@"Got roster: %@", roster_.rosterItems); + OFLog(@"Got roster: %@", roster_.rosterItems); pres = [XMPPPresence presence]; - pres.priority = [OFNumber numberWithInt8: 10]; + pres.priority = [OFNumber numberWithChar: 10]; pres.status = @"ObjXMPP test is working!"; [conn sendStanza: pres]; #ifdef OF_HAVE_BLOCKS @@ -216,53 +216,53 @@ ID: [conn generateStanzaID]]; [IQ addChild: [OFXMLElement elementWithName: @"ping" namespace: @"urn:xmpp:ping"]]; [conn sendIQ: IQ callbackBlock: ^ (XMPPConnection *c, XMPPIQ *resp) { - of_log(@"Ping response: %@", resp); + OFLog(@"Ping response: %@", resp); }]; #endif } - (void)connectionDidUpgradeToTLS: (XMPPConnection *)conn_ { OFString *reason; if (![conn_ checkCertificateAndGetReason: &reason]) { - [of_stdout writeString: @"Couldn't verify certificate: "]; - [of_stdout writeFormat: @"%@\n", reason]; - [of_stdout writeString: @"Do you want to continue [y/N]? "]; + [OFStdOut writeString: @"Couldn't verify certificate: "]; + [OFStdOut writeFormat: @"%@\n", reason]; + [OFStdOut writeString: @"Do you want to continue [y/N]? "]; - if (![[of_stdin readLine] hasPrefix: @"y"]) + if (![[OFStdIn readLine] hasPrefix: @"y"]) [OFApplication terminateWithStatus: 1]; } } - (void)roster: (XMPPRoster *)roster_ didReceiveRosterItem: (XMPPRosterItem *)rosterItem { - of_log(@"Got roster push: %@", rosterItem); + OFLog(@"Got roster push: %@", rosterItem); } - (bool)connection: (XMPPConnection *)conn didReceiveIQ: (XMPPIQ *)iq { - of_log(@"IQ: %@", iq); + OFLog(@"IQ: %@", iq); return NO; } - (void)connection: (XMPPConnection *)conn didReceiveMessage: (XMPPMessage *)msg { - of_log(@"Message: %@", msg); + OFLog(@"Message: %@", msg); } - (void)connection: (XMPPConnection *)conn didReceivePresence: (XMPPPresence *)pres { - of_log(@"Presence: %@", pres); + OFLog(@"Presence: %@", pres); } - (void)connection: (XMPPConnection *)conn didThrowException: (id)e { @@ -270,8 +270,8 @@ } - (void)connectionWasClosed: (XMPPConnection *)conn error: (OFXMLElement *)error { - of_log(@"Connection was closed: %@", error); + OFLog(@"Connection was closed: %@", error); } @end