robin / cocoa-web-resource

A file transfer solution for iPhone and iPod Touch. Support uploading, download and delete files via browser.

This URL has Read+Write access

cocoa-web-resource / CocoaWebResource / HTTPResponse.h
100644 35 lines (22 sloc) 0.513 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
#import <Foundation/Foundation.h>
 
 
@protocol HTTPResponse
 
- (UInt64)contentLength;
 
- (UInt64)offset;
- (void)setOffset:(UInt64)offset;
 
- (NSData *)readDataOfLength:(unsigned int)length;
 
@end
 
@interface HTTPFileResponse : NSObject <HTTPResponse>
{
NSString *filePath;
NSFileHandle *fileHandle;
}
 
- (id)initWithFilePath:(NSString *)filePath;
- (NSString *)filePath;
 
@end
 
@interface HTTPDataResponse : NSObject <HTTPResponse>
{
unsigned offset;
NSData *data;
}
 
- (id)initWithData:(NSData *)data;
 
@end