lachie / cheepcheep

my very own twitter client

This URL has Read+Write access

cheepcheep / MGTwitterHTTPURLConnection.h
100644 41 lines (33 sloc) 1.115 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// MGTwitterHTTPURLConnection.h
// MGTwitterEngine
//
// Created by Matt Gemmell on 16/02/2008.
// Copyright 2008 Magic Aubergine.
//
 
#if TARGET_OS_ASPEN
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#else
#import <Cocoa/Cocoa.h>
#endif
 
#import "MGTwitterRequestTypes.h"
 
@interface MGTwitterHTTPURLConnection : NSURLConnection {
    NSMutableData *_data; // accumulated data received on this connection
    MGTwitterRequestType _requestType; // general type of this request, mostly for error handling
    MGTwitterResponseType _responseType; // type of response data expected (if successful)
    NSString *_identifier;
}
 
// Initializer
- (id)initWithRequest:(NSURLRequest *)request delegate:(id)delegate
           requestType:(MGTwitterRequestType)requestType responseType:(MGTwitterResponseType)responseType;
 
// Data helper methods
- (void)resetDataLength;
- (void)appendData:(NSData *)data;
 
// Accessors
- (NSString *)identifier;
- (NSData *)data;
- (MGTwitterRequestType)requestType;
- (MGTwitterResponseType)responseType;
- (NSString *)description;
 
@end