added files

This commit is contained in:
Tony Tam 2013-03-13 23:47:05 -07:00
parent 0a7e606650
commit af5f8909a6
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,17 @@
#import <Foundation/Foundation.h>
@interface NIKFile : NSObject {
@private
NSString* name;
NSString* mimeType;
NSData* data;
}
@property(nonatomic, readonly) NSString* name;
@property(nonatomic, readonly) NSString* mimeType;
@property(nonatomic, readonly) NSData* data;
- (id) initWithNameData: (NSString*) filename
mimeType: (NSString*) mimeType
data: (NSData*) data;
@end

View File

@ -0,0 +1,26 @@
#import "NIKFile.h"
@implementation NIKFile
@synthesize name = _name;
@synthesize mimeType = _mimeType;
@synthesize data = _data;
- (id) init {
self = [super init];
return self;
}
- (id) initWithNameData: (NSString*) filename
mimeType: (NSString*) fileMimeType
data: (NSData*) data {
self = [super init];
if(self) {
_name = filename;
_mimeType = fileMimeType;
_data = data;
}
return self;
}
@end