Permalink
Browse files

Adding warning for accidental non-arc compilation.

  • Loading branch information...
robbiehanson committed Nov 23, 2011
1 parent 09b594a commit 4c2cdfa40f5913b1cd4b1f163910d279b0a35524
Showing with 339 additions and 125 deletions.
  1. +4 −0 Categories/NSData+XMPP.m
  2. +4 −0 Categories/NSNumber+XMPP.m
  3. +4 −0 Core/XMPPIQ.m
  4. +5 −0 Core/XMPPJID.m
  5. +4 −0 Core/XMPPMessage.m
  6. +4 −0 Core/XMPPModule.m
  7. +4 −0 Core/XMPPParser.m
  8. +4 −0 Core/XMPPPresence.m
  9. +4 −0 Core/XMPPStream.m
  10. +4 −0 Extensions/CoreDataStorage/XMPPCoreDataStorage.m
  11. +3 −0 Extensions/Reconnect/XMPPReconnect.m
  12. +4 −0 Extensions/Roster/CoreDataStorage/XMPPGroupCoreDataStorageObject.m
  13. +4 −0 Extensions/Roster/CoreDataStorage/XMPPResourceCoreDataStorageObject.m
  14. +4 −0 Extensions/Roster/CoreDataStorage/XMPPRosterCoreDataStorage.m
  15. +5 −0 Extensions/Roster/CoreDataStorage/XMPPUserCoreDataStorageObject.m
  16. +5 −1 Extensions/Roster/MemoryStorage/XMPPResourceMemoryStorage.m
  17. +4 −0 Extensions/Roster/MemoryStorage/XMPPRosterMemoryStorage.m
  18. +3 −0 Extensions/Roster/MemoryStorage/XMPPUserMemoryStorage.m
  19. +4 −0 Extensions/Roster/XMPPRoster.m
  20. +8 −4 Extensions/XEP-0009/XMPPIQ+JabberRPC.m
  21. +5 −4 Extensions/XEP-0009/XMPPIQ+JabberRPCResonse.m
  22. +12 −22 Extensions/XEP-0009/XMPPJabberRPCModule.m
  23. +12 −10 Extensions/XEP-0045/XMPPRoom.h
  24. +32 −64 Extensions/XEP-0045/XMPPRoom.m
  25. +3 −3 Extensions/XEP-0045/XMPPRoomOccupant.h
  26. +6 −8 Extensions/XEP-0045/XMPPRoomOccupant.m
  27. +4 −0 Extensions/XEP-0054/CoreDataStorage/XMPPvCardCoreDataStorage.m
  28. +4 −0 Extensions/XEP-0054/CoreDataStorage/XMPPvCardCoreDataStorageObject.m
  29. +6 −3 Extensions/XEP-0054/XMPPvCardTemp.m
  30. +4 −0 Extensions/XEP-0054/XMPPvCardTempAdr.m
  31. +4 −0 Extensions/XEP-0054/XMPPvCardTempAdrTypes.m
  32. +3 −1 Extensions/XEP-0054/XMPPvCardTempBase.m
  33. +4 −0 Extensions/XEP-0054/XMPPvCardTempEmail.m
  34. +4 −0 Extensions/XEP-0054/XMPPvCardTempLabel.m
  35. +8 −1 Extensions/XEP-0054/XMPPvCardTempModule.m
  36. +4 −0 Extensions/XEP-0054/XMPPvCardTempTel.m
  37. +4 −0 Extensions/XEP-0060/XMPPPubSub.m
  38. +4 −0 Extensions/XEP-0065/TURNSocket.m
  39. +4 −3 Extensions/XEP-0082/NSDate+XMPPDateTimeProfiles.m
  40. +3 −0 Extensions/XEP-0082/XMPPDateTimeProfiles.m
  41. +4 −0 Extensions/XEP-0100/XMPPTransports.m
  42. +4 −0 Extensions/XEP-0115/CoreDataStorage/XMPPCapabilitiesCoreDataStorage.m
  43. +4 −0 Extensions/XEP-0115/CoreDataStorage/XMPPCapsCoreDataStorageObject.m
  44. +4 −0 Extensions/XEP-0115/CoreDataStorage/XMPPCapsResourceCoreDataStorageObject.m
  45. +4 −0 Extensions/XEP-0115/XMPPCapabilities.m
  46. +3 −0 Extensions/XEP-0153/XMPPvCardAvatarModule.m
  47. +4 −0 Extensions/XEP-0199/XMPPAutoPing.m
  48. +4 −0 Extensions/XEP-0199/XMPPPing.m
  49. +4 −0 Extensions/XEP-0202/XMPPAutoTime.m
  50. +4 −0 Extensions/XEP-0202/XMPPTime.m
  51. +4 −0 Extensions/XEP-0203/XMPPElement+Delay.m
  52. +4 −0 Utilities/DDList.m
  53. +4 −0 Utilities/GCDMulticastDelegate.m
  54. +5 −0 Utilities/XMPPDigestAuthentication.m
  55. +4 −0 Utilities/XMPPIDTracker.m
  56. +4 −0 Utilities/XMPPSRVResolver.m
  57. +5 −0 Utilities/XMPPXFacebookPlatformAuthentication.m
  58. +55 −1 Xcode/DesktopXMPP/XMPPStream.xcodeproj/project.pbxproj
View
@@ -1,6 +1,10 @@
#import "NSData+XMPP.h"
#import <CommonCrypto/CommonDigest.h>
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
+
@implementation NSData (XMPP)
@@ -1,5 +1,9 @@
#import "NSNumber+XMPP.h"
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
+
@implementation NSNumber (XMPP)
View
@@ -4,6 +4,10 @@
#import <objc/runtime.h>
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
+
@implementation XMPPIQ
View
@@ -1,6 +1,11 @@
#import "XMPPJID.h"
#import "LibIDN.h"
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
+
+
@implementation XMPPJID
+ (BOOL)validateDomain:(NSString *)domain
View
@@ -4,6 +4,10 @@
#import <objc/runtime.h>
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
+
@implementation XMPPMessage
View
@@ -2,6 +2,10 @@
#import "XMPPStream.h"
#import "XMPPLogging.h"
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
+
// Log levels: off, error, warn, info, verbose
#if DEBUG
static const int xmppLogLevel = XMPP_LOG_LEVEL_WARN;
View
@@ -6,6 +6,10 @@
#import "DDXMLPrivate.h"
#endif
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
+
// Log levels: off, error, warn, info, verbose
#if DEBUG
static const int xmppLogLevel = XMPP_LOG_LEVEL_VERBOSE;
View
@@ -4,6 +4,10 @@
#import <objc/runtime.h>
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
+
@implementation XMPPPresence
View
@@ -21,6 +21,10 @@
#import <CFNetwork/CFNetwork.h>
#endif
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
+
#if TARGET_OS_IPHONE
#define SOCKET_BUFFER_SIZE 512 // bytes
#else
@@ -8,6 +8,10 @@
#import <objc/runtime.h>
#import <libkern/OSAtomic.h>
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
+
// Log levels: off, error, warn, info, verbose
#if DEBUG
static const int xmppLogLevel = XMPP_LOG_LEVEL_VERBOSE;
@@ -3,6 +3,9 @@
#import "XMPPLogging.h"
#import "NSXMLElement+XMPP.h"
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
#define IMPOSSIBLE_REACHABILITY_FLAGS 0xFFFFFFFF
@@ -5,6 +5,10 @@
// Copyright (c) 2011 RF.com. All rights reserved.
//
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
+
#import "XMPPGroupCoreDataStorageObject.h"
#import "XMPPUserCoreDataStorageObject.h"
@@ -4,6 +4,10 @@
#import "XMPPUserCoreDataStorageObject.h"
#import "XMPPResourceCoreDataStorageObject.h"
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
+
// Log levels: off, error, warn, info, verbose
#if DEBUG
static const int xmppLogLevel = XMPP_LOG_LEVEL_WARN;
@@ -8,6 +8,10 @@
#import "XMPPLogging.h"
#import "NSNumber+XMPP.h"
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
+
// Log levels: off, error, warn, info, verbose
#if DEBUG
static const int xmppLogLevel = XMPP_LOG_LEVEL_INFO | XMPP_LOG_FLAG_TRACE;
@@ -5,6 +5,11 @@
#import "XMPPGroupCoreDataStorageObject.h"
#import "NSNumber+XMPP.h"
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
+
+
@interface XMPPUserCoreDataStorageObject ()
@property(nonatomic,strong) XMPPJID *primitiveJid;
@@ -2,6 +2,11 @@
#import "XMPPElement+Delay.h"
#import "XMPPRosterMemoryStoragePrivate.h"
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
+
+
@implementation XMPPResourceMemoryStorage
- (id)initWithPresence:(XMPPPresence *)aPresence
@@ -20,7 +25,6 @@ - (id)initWithPresence:(XMPPPresence *)aPresence
return self;
}
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark Copying
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -4,6 +4,10 @@
#import "XMPPRosterMemoryStoragePrivate.h"
#import "XMPPLogging.h"
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
+
// Log levels: off, error, warn, info, verbose
#if DEBUG
static const int xmppLogLevel = XMPP_LOG_LEVEL_WARN; // | XMPP_LOG_FLAG_TRACE;
@@ -1,6 +1,9 @@
#import "XMPP.h"
#import "XMPPRosterMemoryStoragePrivate.h"
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
@interface XMPPUserMemoryStorage (PrivateAPI)
- (void)recalculatePrimaryResource;
@@ -3,6 +3,10 @@
#import "XMPPLogging.h"
#import "XMPPFramework.h"
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
+
// Log levels: off, error, warn, info, verbose
// Log flags: trace
#if DEBUG
@@ -5,10 +5,14 @@
// Created by Eric Chamberlain on 5/16/10.
//
-#import "XMPPIQ+JabberRPC.h"
-#import "NSData+XMPP.h"
+#import "XMPPIQ+JabberRPC.h"
#import "XMPP.h"
+#import "NSData+XMPP.h"
+
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
@implementation XMPPIQ(JabberRPC)
@@ -102,8 +106,8 @@ +(NSXMLElement *)valueElementFromObject:(id)object {
return [self valueElementFromArray: object];
} else if ([object isKindOfClass: [NSDictionary class]]) {
return [self valueElementFromDictionary: object];
- } else if (((CFBooleanRef)object == kCFBooleanTrue) || ((CFBooleanRef)object == kCFBooleanFalse)) {
- return [self valueElementFromBoolean: (CFBooleanRef)object];
+ } else if (((__bridge CFBooleanRef)object == kCFBooleanTrue) || ((__bridge CFBooleanRef)object == kCFBooleanFalse)) {
+ return [self valueElementFromBoolean: (__bridge CFBooleanRef)object];
} else if ([object isKindOfClass: [NSNumber class]]) {
return [self valueElementFromNumber: object];
} else if ([object isKindOfClass: [NSString class]]) {
@@ -6,12 +6,14 @@
//
#import "XMPPIQ+JabberRPCResonse.h"
-
+#import "XMPPJabberRPCModule.h"
+#import "XMPPLogging.h"
#import "NSData+XMPP.h"
#import "NSXMLElement+XMPP.h"
-#import "XMPPJabberRPCModule.h"
-#import "XMPPLogging.h"
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
// Log levels: off, error, warn, info, verbose
#if DEBUG
@@ -240,7 +242,6 @@ - (NSDate *)parseDateString: (NSString *)dateString withFormat: (NSString *)form
result = [dateFormatter dateFromString: dateString];
- [dateFormatter release];
return result;
}
@@ -10,6 +10,11 @@
#import "XMPPIQ+JabberRPC.h"
#import "XMPPIQ+JabberRPCResonse.h"
#import "XMPPLogging.h"
+#import "XMPPFramework.h"
+
+#if ! __has_feature(objc_arc)
+#warning This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC).
+#endif
// Log levels: off, error, warn, info, verbose
// Log flags: trace
@@ -19,13 +24,6 @@
static const int xmppLogLevel = XMPP_LOG_LEVEL_WARN;
#endif
-// can turn off if not acting as a Jabber-RPC server
-#define INTEGRATE_WITH_CAPABILITIES 1
-
-#if INTEGRATE_WITH_CAPABILITIES
-#import "XMPPCapabilities.h"
-#endif
-
NSString *const XMPPJabberRPCErrorDomain = @"XMPPJabberRPCErrorDomain";
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -87,9 +85,7 @@ - (void)cancelTimer
- (void)dealloc
{
[self cancelTimer];
- [rpcID release];
- [super dealloc];
}
@end
@@ -158,7 +154,7 @@ - (BOOL)activate:(XMPPStream *)aXmppStream
if ([super activate:aXmppStream])
{
- #if INTEGRATE_WITH_CAPABILITIES
+ #ifdef _XMPP_CAPABILITIES_H
[xmppStream autoAddDelegate:self delegateQueue:moduleQueue toModulesOfClass:[XMPPCapabilities class]];
#endif
@@ -172,7 +168,7 @@ - (void)deactivate
{
XMPPLogTrace();
-#if INTEGRATE_WITH_CAPABILITIES
+#ifdef _XMPP_CAPABILITIES_H
[xmppStream removeAutoDelegate:self delegateQueue:moduleQueue fromModulesOfClass:[XMPPCapabilities class]];
#endif
@@ -183,8 +179,6 @@ - (void)dealloc
{
XMPPLogTrace();
- [rpcIDs release];
- [super dealloc];
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -204,13 +198,10 @@ - (NSString *)sendRpcIQ:(XMPPIQ *)iq withTimeout:(NSTimeInterval)timeout
dispatch_source_t timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, moduleQueue);
- dispatch_source_set_event_handler(timer, ^{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
- [self timeoutRemoveRpcID:elementID];
+ dispatch_source_set_event_handler(timer, ^{ @autoreleasepool {
- [pool drain];
- });
+ [self timeoutRemoveRpcID:elementID];
+ }});
dispatch_time_t tt = dispatch_time(DISPATCH_TIME_NOW, (timeout * NSEC_PER_SEC));
@@ -220,7 +211,6 @@ - (NSString *)sendRpcIQ:(XMPPIQ *)iq withTimeout:(NSTimeInterval)timeout
RPCID *rpcID = [[RPCID alloc] initWithRpcID:elementID timer:timer];
[rpcIDs setObject:rpcID forKey:elementID];
- [rpcID release];
[xmppStream sendElement:iq];
@@ -310,7 +300,7 @@ - (BOOL)xmppStream:(XMPPStream *)sender didReceiveIQ:(XMPPIQ *)iq
[rpcID cancelTimer];
[rpcIDs removeObjectForKey:elementID];
-#if INTEGRATE_WITH_CAPABILITIES
+#ifdef _XMPP_CAPABILITIES_H
} else if ([iq isSetIQ]) {
// we would receive set when implementing Jabber-RPC server
@@ -327,7 +317,7 @@ - (BOOL)xmppStream:(XMPPStream *)sender didReceiveIQ:(XMPPIQ *)iq
#pragma mark XMPPCapabilities delegate
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-#if INTEGRATE_WITH_CAPABILITIES
+#ifdef _XMPP_CAPABILITIES_H
/**
* If an XMPPCapabilites instance is used we want to advertise our support for JabberRPC.
**/
Oops, something went wrong.

0 comments on commit 4c2cdfa

Please sign in to comment.