Permalink
Browse files

Make IKURLConnectionType public

  • Loading branch information...
1 parent 32c1cd1 commit 3b4913c5404b524a33fa1cdbb4cebf607f1b71a2 @matthiasplappert committed Mar 27, 2011
@@ -421,7 +421,7 @@ - (void)connectionDidFinishLoading:(IKURLConnection *)connection
code:NSURLErrorBadServerResponse
userInfo:nil];
- IKURLConnectionType type = [connection _type];
+ IKURLConnectionType type = connection.type;
if (type == IKURLConnectionTypeAuthAccessToken) {
NSInteger statusCode = connection.response.statusCode;
if (statusCode != 200) {
@@ -24,38 +24,13 @@
#import "IKURLConnection.h"
-typedef enum {
- IKURLConnectionTypeUnknown = -1,
-
- IKURLConnectionTypeAuthAccessToken,
- IKURLConnectionTypeAuthVerifyCredentials,
-
- IKURLConnectionTypeBookmarksList,
- IKURLConnectionTypeBookmarksUpdateReadProgress,
- IKURLConnectionTypeBookmarksAdd,
- IKURLConnectionTypeBookmarksDelete,
- IKURLConnectionTypeBookmarksStar,
- IKURLConnectionTypeBookmarksUnstar,
- IKURLConnectionTypeBookmarksArchive,
- IKURLConnectionTypeBookmarksUnarchive,
- IKURLConnectionTypeBookmarksMove,
- IKURLConnectionTypeBookmarksText,
-
- IKURLConnectionTypeFoldersList,
- IKURLConnectionTypeFoldersAdd,
- IKURLConnectionTypeFoldersDelete,
- IKURLConnectionTypeFoldersOrder
-} IKURLConnectionType;
-
-
@interface IKURLConnection (Private)
- (void)_appendData:(NSData *)data;
- (void)_setUserInfo:(id)userInfo;
- (void)_setResponse:(NSHTTPURLResponse *)response;
- (void)_setType:(IKURLConnectionType)type;
-- (IKURLConnectionType)_type;
- (void)_setContext:(id)context;
- (id)_context;
@@ -23,19 +23,44 @@
#import <Foundation/Foundation.h>
+typedef enum {
+ IKURLConnectionTypeUnknown = -1,
+
+ IKURLConnectionTypeAuthAccessToken,
+ IKURLConnectionTypeAuthVerifyCredentials,
+
+ IKURLConnectionTypeBookmarksList,
+ IKURLConnectionTypeBookmarksUpdateReadProgress,
+ IKURLConnectionTypeBookmarksAdd,
+ IKURLConnectionTypeBookmarksDelete,
+ IKURLConnectionTypeBookmarksStar,
+ IKURLConnectionTypeBookmarksUnstar,
+ IKURLConnectionTypeBookmarksArchive,
+ IKURLConnectionTypeBookmarksUnarchive,
+ IKURLConnectionTypeBookmarksMove,
+ IKURLConnectionTypeBookmarksText,
+
+ IKURLConnectionTypeFoldersList,
+ IKURLConnectionTypeFoldersAdd,
+ IKURLConnectionTypeFoldersDelete,
+ IKURLConnectionTypeFoldersOrder
+} IKURLConnectionType;
+
+
@interface IKURLConnection : NSURLConnection {
NSURLRequest *_request;
NSHTTPURLResponse *_response;
NSMutableData *_data;
id _userInfo;
+ IKURLConnectionType _type;
- NSInteger _type;
id _context;
}
@property (nonatomic, readonly) NSURLRequest *request;
@property (nonatomic, readonly) NSHTTPURLResponse *response;
@property (nonatomic, readonly) NSData *data;
@property (nonatomic, readonly) id userInfo;
+@property (nonatomic, readonly) IKURLConnectionType type;
@end
@@ -26,7 +26,7 @@
@implementation IKURLConnection
-@synthesize request = _request, response = _response, data = _data, userInfo = _userInfo;
+@synthesize request = _request, response = _response, data = _data, userInfo = _userInfo, type = _type;
- (id)initWithRequest:(NSURLRequest *)request delegate:(id)delegate startImmediately:(BOOL)startImmediately
{
@@ -36,8 +36,8 @@ - (id)initWithRequest:(NSURLRequest *)request delegate:(id)delegate startImmedia
_response = nil;
_data = [[NSMutableData alloc] init];
_userInfo = nil;
+ _type = IKURLConnectionTypeUnknown;
- _type = IKURLConnectionTypeUnknown;
_context = nil;
}
return self;
@@ -97,11 +97,6 @@ - (void)_setType:(IKURLConnectionType)type
}
}
-- (IKURLConnectionType)_type
-{
- return _type;
-}
-
- (void)_setContext:(id)context
{
if (_context != context) {

0 comments on commit 3b4913c

Please sign in to comment.