mirror of
https://github.com/swisspol/GCDWebServer.git
synced 2026-04-24 00:00:04 +08:00
Move ivars to class extensions
This commit is contained in:
@@ -27,14 +27,7 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface GCDWebServerResponse : NSObject {
|
||||
@private
|
||||
NSString* _type;
|
||||
NSUInteger _length;
|
||||
NSInteger _status;
|
||||
NSUInteger _maxAge;
|
||||
NSMutableDictionary* _headers;
|
||||
}
|
||||
@interface GCDWebServerResponse : NSObject
|
||||
@property(nonatomic, readonly) NSString* contentType;
|
||||
@property(nonatomic, readonly) NSUInteger contentLength;
|
||||
@property(nonatomic) NSInteger statusCode; // Default is 200
|
||||
@@ -60,11 +53,7 @@
|
||||
- (id)initWithRedirect:(NSURL*)location permanent:(BOOL)permanent;
|
||||
@end
|
||||
|
||||
@interface GCDWebServerDataResponse : GCDWebServerResponse {
|
||||
@private
|
||||
NSData* _data;
|
||||
NSInteger _offset;
|
||||
}
|
||||
@interface GCDWebServerDataResponse : GCDWebServerResponse
|
||||
+ (GCDWebServerDataResponse*)responseWithData:(NSData*)data contentType:(NSString*)type;
|
||||
- (id)initWithData:(NSData*)data contentType:(NSString*)type;
|
||||
@end
|
||||
@@ -78,11 +67,7 @@
|
||||
- (id)initWithHTMLTemplate:(NSString*)path variables:(NSDictionary*)variables; // Simple template system that replaces all occurences of "%variable%" with corresponding value (encodes using UTF-8)
|
||||
@end
|
||||
|
||||
@interface GCDWebServerFileResponse : GCDWebServerResponse {
|
||||
@private
|
||||
NSString* _path;
|
||||
int _file;
|
||||
}
|
||||
@interface GCDWebServerFileResponse : GCDWebServerResponse
|
||||
+ (GCDWebServerFileResponse*)responseWithFile:(NSString*)path;
|
||||
+ (GCDWebServerFileResponse*)responseWithFile:(NSString*)path isAttachment:(BOOL)attachment;
|
||||
- (id)initWithFile:(NSString*)path;
|
||||
|
||||
Reference in New Issue
Block a user