Permalink
Browse files

Update header to make externally-built framework/lib ARC-friendly.

  • Loading branch information...
1 parent 0d2ef87 commit d72026f27e1ee367ae9afb21ee54540214e37f98 @lukhnos committed Oct 9, 2011
Showing with 45 additions and 28 deletions.
  1. +17 −11 LFWebAPIKit/LFHTTPRequest.h
  2. +1 −1 LFWebAPIKit/LFHTTPRequest.m
  3. +27 −16 Source/ObjectiveFlickr.h
@@ -99,28 +99,18 @@ extern NSString *const LFHTTPRequestPOSTMethod;
- (NSData *)getReceivedDataAndDetachFromRequest;
-- (NSDictionary *)requestHeader;
-- (void)setRequestHeader:(NSDictionary *)requestHeader;
- (NSTimeInterval)timeoutInterval;
- (void)setTimeoutInterval:(NSTimeInterval)timeoutInterval;
-- (NSString *)userAgent;
-- (void)setUserAgent:(NSString *)userAgent;
-- (NSString *)contentType;
-- (void)setContentType:(NSString *)contentType;
- (NSData *)receivedData;
- (NSString *)receivedContentType;
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4
- (NSUInteger)expectedDataLength;
#else
- (unsigned int)expectedDataLength;
#endif
-- (id)delegate;
-- (void)setDelegate:(id)delegate;
-
-- (void)setSessionInfo:(id)aSessionInfo;
-- (id)sessionInfo;
#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4
+
@property (copy) NSDictionary *requestHeader;
@property (assign) NSTimeInterval timeoutInterval;
@property (copy) NSString *userAgent;
@@ -131,7 +121,23 @@ extern NSString *const LFHTTPRequestPOSTMethod;
@property (retain) id sessionInfo;
@property (assign) BOOL shouldWaitUntilDone;
@property (readonly) BOOL isRunning;
+
+#else
+
+- (NSDictionary *)requestHeader;
+- (void)setRequestHeader:(NSDictionary *)requestHeader;
+- (NSString *)userAgent;
+- (void)setUserAgent:(NSString *)userAgent;
+- (NSString *)contentType;
+- (void)setContentType:(NSString *)contentType;
+- (id)delegate;
+- (void)setDelegate:(id)delegate;
+- (void)setSessionInfo:(id)aSessionInfo;
+- (id)sessionInfo;
+
+
#endif
+
@end
@interface NSObject (LFHTTPRequestDelegate)
@@ -585,7 +585,7 @@ - (BOOL)_performMethod:(NSString *)methodName onURL:(NSURL *)url withData:(NSDat
BOOL isReentrant = (_synchronousMessagePort != nil);
if (!isReentrant) {
- _synchronousMessagePort = [[NSPort port] retain];
+ _synchronousMessagePort = (NSMessagePort *)[[NSPort port] retain];
[currentRunLoop addPort:_synchronousMessagePort forMode:currentMode];
}
View
@@ -53,15 +53,30 @@ extern NSString *const OFFlickrDeletePermission;
}
- (id)initWithAPIKey:(NSString *)inKey sharedSecret:(NSString *)inSharedSecret;
-- (void)setAuthToken:(NSString *)inAuthToken;
-- (NSString *)authToken;
// URL provisioning
- (NSURL *)photoSourceURLFromDictionary:(NSDictionary *)inDictionary size:(NSString *)inSizeModifier;
- (NSURL *)photoWebPageURLFromDictionary:(NSDictionary *)inDictionary;
- (NSURL *)loginURLFromFrobDictionary:(NSDictionary *)inFrob requestedPermission:(NSString *)inPermission;
// API endpoints
+
+#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4
+@property (nonatomic, readonly) NSString *key;
+@property (nonatomic, readonly) NSString *sharedSecret;
+@property (nonatomic, retain) NSString *authToken;
+
+@property (nonatomic, retain) NSString *RESTAPIEndpoint;
+@property (nonatomic, retain) NSString *photoSource;
+@property (nonatomic, retain) NSString *photoWebPageSource;
+@property (nonatomic, retain) NSString *authEndpoint;
+@property (nonatomic, retain) NSString *uploadEndpoint;
+#else
+
+- (void)setAuthToken:(NSString *)inAuthToken;
+- (NSString *)authToken;
+
+
- (void)setRESTAPIEndpoint:(NSString *)inEndpoint;
- (NSString *)RESTAPIEndpoint;
@@ -74,16 +89,8 @@ extern NSString *const OFFlickrDeletePermission;
- (void)setUploadEndpoint:(NSString *)inEndpoint;
- (NSString *)uploadEndpoint;
-#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4
-@property (nonatomic, readonly) NSString *key;
-@property (nonatomic, readonly) NSString *sharedSecret;
-@property (nonatomic, retain) NSString *authToken;
-@property (nonatomic, retain) NSString *RESTAPIEndpoint;
-@property (nonatomic, retain) NSString *photoSource;
-@property (nonatomic, retain) NSString *photoWebPageSource;
-@property (nonatomic, retain) NSString *authEndpoint;
-@property (nonatomic, retain) NSString *uploadEndpoint;
+
#endif
@end
@@ -134,11 +141,6 @@ typedef id OFFlickrAPIRequestDelegateType;
- (id)initWithAPIContext:(OFFlickrAPIContext *)inContext;
- (OFFlickrAPIContext *)context;
-- (OFFlickrAPIRequestDelegateType)delegate;
-- (void)setDelegate:(OFFlickrAPIRequestDelegateType)inDelegate;
-
-- (id)sessionInfo;
-- (void)setSessionInfo:(id)inInfo;
- (NSTimeInterval)requestTimeoutInterval;
- (void)setRequestTimeoutInterval:(NSTimeInterval)inTimeInterval;
@@ -157,5 +159,14 @@ typedef id OFFlickrAPIRequestDelegateType;
@property (nonatomic, assign) OFFlickrAPIRequestDelegateType delegate;
@property (nonatomic, retain) id sessionInfo;
@property (nonatomic, assign) NSTimeInterval requestTimeoutInterval;
+#else
+
+- (OFFlickrAPIRequestDelegateType)delegate;
+- (void)setDelegate:(OFFlickrAPIRequestDelegateType)inDelegate;
+
+- (id)sessionInfo;
+- (void)setSessionInfo:(id)inInfo;
+
#endif
+
@end

0 comments on commit d72026f

Please sign in to comment.