type
TcdbfapiPlus = class(TObject)
public
procedure initLibrary(magicNumber : Integer; email : String);
function openDBFfile(filename : String): Boolean;
procedure closeDBFfile;
function recCount: Integer;
function fieldCount: Integer;
function getRecord(recno : Integer): Boolean;
function readRecord(recno : Integer): Boolean;
function writeRecord(recno : Integer): Boolean;
function readField(recno : Integer; fieldno : Integer): Boolean;
function writeField(recno : Integer; fieldno : Integer): Boolean;
function indexOfField(fieldname : String): Integer;
function getString(fieldno : Integer): String;
function getValue(fieldno : Integer): double;
function getDateTime(fieldno : Integer): TDateTime;
function getTicks(fieldno : Integer): int64;
function getMemoBuf(fieldno : Integer; var len : Integer): Pointer;
function isMemoField(fieldno : Integer): Boolean;
function isNumericField(fieldno : Integer): Boolean;
function isDateField(fieldno : Integer): Boolean;
function isCurrentDeleted: Boolean;
function isDeleted(recno : Integer): Boolean;
procedure clearRecord;
procedure clearField(fieldno : Integer);
procedure setFieldString (fieldno : Integer; s : string);
procedure setFieldDouble (fieldno : Integer; value : double);
procedure setField (fieldno : Integer; s : string; value : double);
procedure setMemoBuf(field : Integer; src : Pointer; len : Integer);
function markAsDeleted(recno : Integer): Boolean;
function recallDeleted(recno : Integer): Boolean;
function deleteRecord(recno : Integer): Boolean;
function appendRecord(blankrecord : Boolean): Boolean;
function insertRecord(recno : Integer; blankrecord : Boolean): Boolean;
procedure setOrder (fieldlist : String);
procedure setOrderA(fields : array of String);
procedure unsetOrder;
procedure descendingMode(descending : Boolean);
procedure setFilter (expression : String );
procedure unsetFilter;
procedure caseSensitiveMode(sensitive : Boolean);
function pack: Boolean;
function truncate(recno : Integer): Boolean;
function zap: Boolean;
function fileType: Integer;
function filetypeAsText: string;
function recordLength: Integer;
function lastUpdated: string;
function headerSize: Integer;
function filename: string;
function filenameMemo: string;
function driverName: String;
procedure resetLastRecord;
function fieldName(fieldno : Integer): String;
function fieldType(fieldno : Integer): char;
function fieldLength(fieldno : Integer): Integer;
function fieldDecimal(fieldno : Integer): Integer;
function typeAsText(c :char): string;
procedure setEncoding(e : Integer);
procedure setDateFormat(format : String);
procedure setDateDelimiter(delimiter : char);
procedure setReadOnly(value : Boolean);
function isReadOnly: Boolean;
function prepareNewTable(fileType : Integer): Boolean;
function prepareNewTableX(fileType : Integer; memoSize : Integer; driver : String): Boolean;
procedure addField (fieldname : String; fieldType : char; length : Integer);
procedure addFieldX(fieldname : String; fieldType : char; length : Integer; dec : Integer);
function createTable(filename : String): Boolean;
function createAndOpenTable(filename : String): Boolean;
procedure setByte(offset : Integer; b : byte);
function getByte(offset : Integer): byte;
end.