cdbfapi.framework for iOS, OSX, Objective-C

@interface cdbfapi : NSObject

- (void) initLibrary:(NSInteger)magicNumber email:(NSString*)email;

- (BOOL) openDBFfile: (NSString *) filename;
- (void) closeDBFfile;

- (NSInteger) recCount;
- (NSInteger) fieldCount;

- (BOOL) getRecord:(NSInteger) recno;
- (BOOL) readRecord: (NSInteger) recno;
- (BOOL) writeRecord: (NSInteger) recno;

- (BOOL) readField: (NSInteger) recno fieldno: (NSInteger) fieldno;
- (BOOL) writeField: (NSInteger) recno fieldno: (NSInteger) fieldno;

- (NSInteger) indexOfField: (NSString*) fieldname;

- (NSString*) getString: (NSInteger) fieldno;
- (double) getValue: (NSInteger) fieldno;

- (NSDate*) getDateTime: (NSInteger) fieldno;
- (int64_t) getTicks: (NSInteger) fieldno;

- (NSData*)	getMemoBuf:(NSInteger) fieldno;

- (BOOL) isMemoField: (NSInteger) fieldno;
- (BOOL) isNumericField: (NSInteger) fieldno;
- (BOOL) isDateField: (NSInteger) fieldno;

- (BOOL) isDeleted;
- (BOOL) isDeleted: (NSInteger) fieldno;

- (void) clearRecord;
- (void) clearField: (NSInteger) fieldno;

- (void) setField: (NSInteger) fieldno asString: (NSString*) string;
- (void) setField: (NSInteger) fieldno asDouble: (double) value;
- (void) setField: (NSInteger) fieldno asString: (NSString*) string asDouble: (double) value;

- (void) setMemoBuf:(NSInteger) fieldno data:(NSData*)data;

- (BOOL) markAsDeleted: (NSInteger) recno;
- (BOOL) recallDeleted: (NSInteger) recno;

- (BOOL) deleteRecord: (NSInteger) recno;
- (BOOL) appendRecord: (BOOL) blankrecord;
- (BOOL) insertRecord: (NSInteger) recno blank: (BOOL) blankrecord;

- (void) setOrder: (NSString*) fieldlist;
- (void) setOrderA: (NSArray *) array;
- (void) unsetOrder;
- (void) descendingMode:(BOOL)descending;

- (void) setFilter: (NSString*) expression;
- (void) unsetFilter;
- (void) caseSensitiveMode:(BOOL)sensitive;

- (BOOL) pack;
- (BOOL) truncate:(NSInteger) recno;
- (BOOL) zap;

- (NSInteger) fileType;
- (NSString*)filetypeAsText;

- (NSInteger) recordLength;
- (NSString*) lastUpdated;
- (NSInteger) headerSize;

- (NSString*) filename;
- (NSString*) filenameMemo;
- (NSString*) driverName;

- (void)resetLastRecord;

- (NSString*) fieldName: (NSInteger) fieldno;
- (char)      fieldType: (NSInteger) fieldno;
- (NSInteger) fieldLength: (NSInteger) fieldno;
- (NSInteger) fieldDecimal: (NSInteger) fieldno;

+ (NSString*)typeAsText:(char)c;

- (void) setEncoding: (NSInteger) encoding;
- (void) setDateFormat: (NSString*) format;
- (void) setDateDelimiter: (char) c;

- (void) setReadOnly:(BOOL)value;
- (BOOL) isReadOnly;

- (BOOL) prepareNewTable:(NSInteger) fileType;
- (BOOL) prepareNewTable:(NSInteger) fileType memoSize:(NSInteger)memoSize driver:(NSString*)driver;

- (void) addField: (NSString*) fieldname fieldType: (char)c length: (NSInteger)length;
- (void) addField: (NSString*) fieldname fieldType: (char)c length: (NSInteger)length decimal: (NSInteger) decimal;

- (BOOL) createTable: (NSString*) filename;
- (BOOL) createAndOpenTable: (NSString*) filename;

- (void) setByte:(NSInteger)offset byte:(char)byte;
- (char) getByte:(NSInteger)offset;


@end