mirror of
https://github.com/wyan/m48plus
synced 2024-11-16 07:47:40 +01:00
34 lines
513 B
Objective-C
34 lines
513 B
Objective-C
#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
|