-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHexViewModel.h
More file actions
36 lines (30 loc) · 939 Bytes
/
HexViewModel.h
File metadata and controls
36 lines (30 loc) · 939 Bytes
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
36
/*
*========================================================
* HexViewModel.h
* Hex View
*
* Created by Aaron Spiteri on 7/03/11.
* Copyright 2011 __MyCompanyName__. All rights reserved.
*
*========================================================
*/
#import <Cocoa/Cocoa.h>
#import <limits.h>
#import <stdio.h>
#import "HexView.h"
#define HEXFORMAT "0x%04x "
#define BYTESZ 1
#define POFFSET 30 /* progress bar offset in bytes */
@interface HexViewModel : NSObject {
NSString *fileError;/* file error */
NSFileHandle *filedes; /* file descriptor */
NSData *fbuffer; /* buffer containing file data */
}
@property(nonatomic, copy) NSString *fileError;
@property(nonatomic, copy) NSString *filePath;
@property(nonatomic, copy) NSData *fbuffer;
-(HexViewModel *) initWithFilePath: (NSString *) filePathIn;
-(BOOL)checkFile;
-(NSString *)getFileError;
-(NSString *)getBufferAsHex: (id)prog;
@end