HTTPResponse.h
上传用户:kc0325
上传日期:2020-06-20
资源大小:204k
文件大小:1k
- #import <Foundation/Foundation.h>
- @protocol HTTPResponse
- - (UInt64)contentLength;
- - (UInt64)offset;
- - (void)setOffset:(UInt64)offset;
- - (NSData *)readDataOfLength:(unsigned int)length;
- #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
- @optional
- - (NSDictionary *)httpHeaders;
- #endif
- @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