|
|
|
|
@@ -1,6 +1,7 @@
|
|
|
|
|
{ BePascal - A pascal wrapper around the BeOS API
|
|
|
|
|
Copyright (C) 2002 Olivier Coursiere
|
|
|
|
|
Copyright (C) 2002 - 2003 Olivier Coursiere
|
|
|
|
|
Eric Jourde
|
|
|
|
|
Oscar Lesta
|
|
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
|
modify it under the terms of the GNU Library General Public
|
|
|
|
|
@@ -16,21 +17,20 @@
|
|
|
|
|
License along with this library; if not, write to the Free
|
|
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
}
|
|
|
|
|
unit dataio;
|
|
|
|
|
unit DataIO;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
beobj, supportdefs;
|
|
|
|
|
BeObj, SupportDefs;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
BDataIO = class(TBeObject)
|
|
|
|
|
private
|
|
|
|
|
public
|
|
|
|
|
constructor Create; override;
|
|
|
|
|
destructor Destroy; override;
|
|
|
|
|
function Read(buffer : Pointer; size : Size_t) : SSize_t; virtual; abstract;
|
|
|
|
|
function Write(buffer : Pointer; size : Size_t) : SSize_t; virtual; abstract;
|
|
|
|
|
function Read(buffer : Pointer; size : size_t) : ssize_t; virtual; abstract;
|
|
|
|
|
function Write(buffer : Pointer; size : size_t) : ssize_t; virtual; abstract;
|
|
|
|
|
{ procedure _ReservedDataIO1;
|
|
|
|
|
procedure _ReservedDataIO2;
|
|
|
|
|
procedure _ReservedDataIO3;
|
|
|
|
|
@@ -48,19 +48,18 @@ type
|
|
|
|
|
// function operator=( : BDataIO) : BDataIO;
|
|
|
|
|
// procedure int32 _reserved[2];
|
|
|
|
|
end;
|
|
|
|
|
type
|
|
|
|
|
TPositionIO = class(BDataIO)
|
|
|
|
|
private
|
|
|
|
|
|
|
|
|
|
BPositionIO = class(BDataIO)
|
|
|
|
|
public
|
|
|
|
|
constructor Create; override;
|
|
|
|
|
destructor Destroy; override;
|
|
|
|
|
// function Read(buffer : Pointer; size : Size_t) : SSize_t; override;
|
|
|
|
|
// function Write(buffer : Pointer; size : Size_t) : SSize_t; override;
|
|
|
|
|
function ReadAt(pos : off_t; buffer : Pointer; size : Size_t) : SSize_t; virtual; abstract;
|
|
|
|
|
function WriteAt(pos : off_t; buffer : Pointer; size : Size_t) : SSize_t; virtual; abstract;
|
|
|
|
|
// function Read(buffer : Pointer; size : size_t) : ssize_t; override;
|
|
|
|
|
// function Write(buffer : Pointer; size : size_t) : ssize_t; override;
|
|
|
|
|
function ReadAt(pos : off_t; buffer : Pointer; size : size_t) : ssize_t; virtual; abstract;
|
|
|
|
|
function WriteAt(pos : off_t; buffer : Pointer; size : size_t) : ssize_t; virtual; abstract;
|
|
|
|
|
function Seek(aposition : off_t; seek_mode : Cardinal) : off_t; virtual; abstract;
|
|
|
|
|
// function Position : off_t; virtual;
|
|
|
|
|
function SetSize(size : off_t) : Status_t; virtual;
|
|
|
|
|
function SetSize(size : off_t) : status_t; virtual;
|
|
|
|
|
{ procedure _ReservedPositionIO1;
|
|
|
|
|
procedure _ReservedPositionIO2;
|
|
|
|
|
procedure _ReservedPositionIO3;
|
|
|
|
|
@@ -76,63 +75,61 @@ type
|
|
|
|
|
}
|
|
|
|
|
// procedure int32 _reserved[2];
|
|
|
|
|
end;
|
|
|
|
|
type
|
|
|
|
|
TMallocIO = class(TPositionIO)
|
|
|
|
|
private
|
|
|
|
|
|
|
|
|
|
BMallocIO = class(BPositionIO)
|
|
|
|
|
public
|
|
|
|
|
constructor Create; override;
|
|
|
|
|
destructor Destroy; override;
|
|
|
|
|
function ReadAt(pos : off_t; abuffer : Pointer; size : Size_t) : SSize_t; override;
|
|
|
|
|
function WriteAt(pos : off_t; abuffer : Pointer; size : Size_t) : SSize_t; override;
|
|
|
|
|
function ReadAt(pos : off_t; abuffer : Pointer; size : size_t) : ssize_t; override;
|
|
|
|
|
function WriteAt(pos : off_t; abuffer : Pointer; size : size_t) : ssize_t; override;
|
|
|
|
|
function Seek(pos : off_t; seek_mode : Cardinal) : off_t; override;
|
|
|
|
|
// function Position : off_t; override;
|
|
|
|
|
function SetSize(size : off_t) : Status_t; override;
|
|
|
|
|
procedure SetBlockSize(blocksize : Size_t); virtual;
|
|
|
|
|
function SetSize(size : off_t) : status_t; override;
|
|
|
|
|
procedure SetBlockSize(blocksize : size_t); virtual;
|
|
|
|
|
function Buffer : Pointer;
|
|
|
|
|
// function BufferLength : Size_t;
|
|
|
|
|
// function BufferLength : size_t;
|
|
|
|
|
{ procedure _ReservedMallocIO1;
|
|
|
|
|
procedure _ReservedMallocIO2;
|
|
|
|
|
}
|
|
|
|
|
// constructor Create(MallocIO : TMallocIO);
|
|
|
|
|
// function operator=( : TMallocIO) : TMallocIO;
|
|
|
|
|
{ function fBlockSize : Size_t;
|
|
|
|
|
function fMallocSize : Size_t;
|
|
|
|
|
function fLength : Size_t;
|
|
|
|
|
{ function fBlockSize : size_t;
|
|
|
|
|
function fMallocSize : size_t;
|
|
|
|
|
function fLength : size_t;
|
|
|
|
|
function fData : PChar;
|
|
|
|
|
function fPosition : off_t;
|
|
|
|
|
}
|
|
|
|
|
// procedure _reserved[1] : integer;
|
|
|
|
|
end;
|
|
|
|
|
type
|
|
|
|
|
TMemoryIO = class(TPositionIO)
|
|
|
|
|
private
|
|
|
|
|
|
|
|
|
|
BMemoryIO = class(BPositionIO)
|
|
|
|
|
public
|
|
|
|
|
constructor Create; override;
|
|
|
|
|
constructor Create(p : Pointer; len : Size_t); virtual;
|
|
|
|
|
constructor Create(p : Pointer; len : size_t); virtual;
|
|
|
|
|
destructor Destroy; override;
|
|
|
|
|
function ReadAt(pos : off_t; buffer : Pointer; size : Size_t) : SSize_t; override;
|
|
|
|
|
function WriteAt(pos : off_t; buffer : Pointer; size : Size_t) : SSize_t; override;
|
|
|
|
|
function ReadAt(pos : off_t; buffer : Pointer; size : size_t) : ssize_t; override;
|
|
|
|
|
function WriteAt(pos : off_t; buffer : Pointer; size : size_t) : ssize_t; override;
|
|
|
|
|
function Seek(pos : off_t; seek_mode : Cardinal) : off_t; override;
|
|
|
|
|
// function Position : off_t; override;
|
|
|
|
|
function SetSize(size : off_t) : Status_t; override;
|
|
|
|
|
function SetSize(size : off_t) : status_t; override;
|
|
|
|
|
{ procedure _ReservedMemoryIO1;
|
|
|
|
|
procedure _ReservedMemoryIO2;
|
|
|
|
|
}
|
|
|
|
|
constructor Create(MemoryIO : TMemoryIO);
|
|
|
|
|
// function operator=(MemoryIO : TMemoryIO) : TMemoryIO;
|
|
|
|
|
constructor Create(MemoryIO : BMemoryIO);
|
|
|
|
|
// function operator=(MemoryIO : BMemoryIO) : BMemoryIO;
|
|
|
|
|
{ function fReadOnly : boolean;
|
|
|
|
|
function fBuf : PChar;
|
|
|
|
|
function fLen : Size_t;
|
|
|
|
|
function fPhys : Size_t;
|
|
|
|
|
function fPos : Size_t;
|
|
|
|
|
function fLen : size_t;
|
|
|
|
|
function fPhys : size_t;
|
|
|
|
|
function fPos : size_t;
|
|
|
|
|
}
|
|
|
|
|
// function _reserved[1] : int32;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function BDataIO_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BDataIO_Create_1';
|
|
|
|
|
procedure BDataIO_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BDataIO_Free';
|
|
|
|
|
//function BDataIO_Read(AObject : TCPlusObject; buffer : Pointer; size : Size_t) : SSize_t; cdecl; external BePascalLibName name 'BDataIO_Read';
|
|
|
|
|
//function BDataIO_Write(AObject : TCPlusObject; buffer : Pointer; size : Size_t) : SSize_t; cdecl; external BePascalLibName name 'BDataIO_Write';
|
|
|
|
|
//function BDataIO_Read(AObject : TCPlusObject; buffer : Pointer; size : size_t) : ssize_t; cdecl; external BePascalLibName name 'BDataIO_Read';
|
|
|
|
|
//function BDataIO_Write(AObject : TCPlusObject; buffer : Pointer; size : size_t) : ssize_t; cdecl; external BePascalLibName name 'BDataIO_Write';
|
|
|
|
|
{procedure BDataIO__ReservedDataIO1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BDataIO__ReservedDataIO1';
|
|
|
|
|
procedure BDataIO__ReservedDataIO2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BDataIO__ReservedDataIO2';
|
|
|
|
|
procedure BDataIO__ReservedDataIO3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BDataIO__ReservedDataIO3';
|
|
|
|
|
@@ -151,13 +148,13 @@ function BDataIO_Create(AObject : TBeObject; DataIO : BDataIO) : TCPlusObject; c
|
|
|
|
|
//procedure BDataIO_int32 _reserved[2](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BDataIO_int32 _reserved[2]';
|
|
|
|
|
function BPositionIO_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BPositionIO_Create';
|
|
|
|
|
procedure BPositionIO_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BPositionIO_Free';
|
|
|
|
|
function BPositionIO_Read(AObject : TCPlusObject; buffer : Pointer; size : Size_t) : SSize_t; cdecl; external BePascalLibName name 'BPositionIO_Read';
|
|
|
|
|
function BPositionIO_Write(AObject : TCPlusObject; buffer : Pointer; size : Size_t) : SSize_t; cdecl; external BePascalLibName name 'BPositionIO_Write';
|
|
|
|
|
function BPositionIO_ReadAt(AObject : TCPlusObject; pos : off_t; buffer : Pointer; size : Size_t) : SSize_t; cdecl; external BePascalLibName name 'BPositionIO_ReadAt';
|
|
|
|
|
function BPositionIO_WriteAt(AObject : TCPlusObject; pos : off_t; buffer : Pointer; size : Size_t) : SSize_t; cdecl; external BePascalLibName name 'BPositionIO_WriteAt';
|
|
|
|
|
function BPositionIO_Read(AObject : TCPlusObject; buffer : Pointer; size : size_t) : ssize_t; cdecl; external BePascalLibName name 'BPositionIO_Read';
|
|
|
|
|
function BPositionIO_Write(AObject : TCPlusObject; buffer : Pointer; size : size_t) : ssize_t; cdecl; external BePascalLibName name 'BPositionIO_Write';
|
|
|
|
|
function BPositionIO_ReadAt(AObject : TCPlusObject; pos : off_t; buffer : Pointer; size : size_t) : ssize_t; cdecl; external BePascalLibName name 'BPositionIO_ReadAt';
|
|
|
|
|
function BPositionIO_WriteAt(AObject : TCPlusObject; pos : off_t; buffer : Pointer; size : size_t) : ssize_t; cdecl; external BePascalLibName name 'BPositionIO_WriteAt';
|
|
|
|
|
function BPositionIO_Seek(AObject : TCPlusObject; position : off_t; seek_mode : Cardinal) : off_t; cdecl; external BePascalLibName name 'BPositionIO_Seek';
|
|
|
|
|
//function BPositionIO_Position(AObject : TCPlusObject) : off_t; cdecl; external BePascalLibName name 'BPositionIO_Position';
|
|
|
|
|
function BPositionIO_SetSize(AObject : TCPlusObject; size : off_t) : Status_t; cdecl; external BePascalLibName name 'BPositionIO_SetSize';
|
|
|
|
|
function BPositionIO_SetSize(AObject : TCPlusObject; size : off_t) : status_t; cdecl; external BePascalLibName name 'BPositionIO_SetSize';
|
|
|
|
|
{procedure BPositionIO__ReservedPositionIO1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BPositionIO__ReservedPositionIO1';
|
|
|
|
|
procedure BPositionIO__ReservedPositionIO2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BPositionIO__ReservedPositionIO2';
|
|
|
|
|
procedure BPositionIO__ReservedPositionIO3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BPositionIO__ReservedPositionIO3';
|
|
|
|
|
@@ -174,14 +171,14 @@ procedure BPositionIO__ReservedPositionIO12(AObject : TCPlusObject); cdecl; exte
|
|
|
|
|
//procedure BPositionIO_int32 _reserved[2](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BPositionIO_int32 _reserved[2]';
|
|
|
|
|
function BMallocIO_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BMallocIO_Create';
|
|
|
|
|
procedure BMallocIO_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMallocIO_Free';
|
|
|
|
|
function BMallocIO_ReadAt(AObject : TCPlusObject; pos : off_t; buffer : Pointer; size : Size_t) : SSize_t; cdecl; external BePascalLibName name 'BMallocIO_ReadAt';
|
|
|
|
|
function BMallocIO_WriteAt(AObject : TCPlusObject; pos : off_t; buffer : Pointer; size : Size_t) : SSize_t; cdecl; external BePascalLibName name 'BMallocIO_WriteAt';
|
|
|
|
|
function BMallocIO_ReadAt(AObject : TCPlusObject; pos : off_t; buffer : Pointer; size : size_t) : ssize_t; cdecl; external BePascalLibName name 'BMallocIO_ReadAt';
|
|
|
|
|
function BMallocIO_WriteAt(AObject : TCPlusObject; pos : off_t; buffer : Pointer; size : size_t) : ssize_t; cdecl; external BePascalLibName name 'BMallocIO_WriteAt';
|
|
|
|
|
function BMallocIO_Seek(AObject : TCPlusObject; pos : off_t; seek_mode : Cardinal) : off_t; cdecl; external BePascalLibName name 'BMallocIO_Seek';
|
|
|
|
|
//function BMallocIO_Position(AObject : TCPlusObject) : off_t; cdecl; external BePascalLibName name 'BMallocIO_Position';
|
|
|
|
|
function BMallocIO_SetSize(AObject : TCPlusObject; size : off_t) : Status_t; cdecl; external BePascalLibName name 'BMallocIO_SetSize';
|
|
|
|
|
procedure BMallocIO_SetBlockSize(AObject : TCPlusObject; blocksize : Size_t); cdecl; external BePascalLibName name 'BMallocIO_SetBlockSize';
|
|
|
|
|
function BMallocIO_SetSize(AObject : TCPlusObject; size : off_t) : status_t; cdecl; external BePascalLibName name 'BMallocIO_SetSize';
|
|
|
|
|
procedure BMallocIO_SetBlockSize(AObject : TCPlusObject; blocksize : size_t); cdecl; external BePascalLibName name 'BMallocIO_SetBlockSize';
|
|
|
|
|
function BMallocIO_Buffer(AObject : TCPlusObject) : Pointer; cdecl; external BePascalLibName name 'BMallocIO_Buffer';
|
|
|
|
|
//function BMallocIO_BufferLength(AObject : TCPlusObject) : Size_t; cdecl; external BePascalLibName name 'BMallocIO_BufferLength';
|
|
|
|
|
//function BMallocIO_BufferLength(AObject : TCPlusObject) : size_t; cdecl; external BePascalLibName name 'BMallocIO_BufferLength';
|
|
|
|
|
{procedure BMallocIO__ReservedMallocIO1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMallocIO__ReservedMallocIO1';
|
|
|
|
|
procedure BMallocIO__ReservedMallocIO2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMallocIO__ReservedMallocIO2';
|
|
|
|
|
}
|
|
|
|
|
@@ -195,18 +192,18 @@ procedure BMallocIO_off_t fPosition(AObject : TCPlusObject); cdecl; external BeP
|
|
|
|
|
procedure BMallocIO_int32 _reserved[1](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMallocIO_int32 _reserved[1]';
|
|
|
|
|
}
|
|
|
|
|
function BMemoryIO_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BMemoryIO_Create';
|
|
|
|
|
function BMemoryIO_Create(AObject : TBeObject; p : Pointer; len : Size_t) : TCPlusObject; cdecl; external BePascalLibName name 'BMemoryIO_Create_1';
|
|
|
|
|
function BMemoryIO_Create(AObject : TBeObject; p : Pointer; len : size_t) : TCPlusObject; cdecl; external BePascalLibName name 'BMemoryIO_Create_1';
|
|
|
|
|
procedure BMemoryIO_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMemoryIO_Free';
|
|
|
|
|
function BMemoryIO_ReadAt(AObject : TCPlusObject; pos : off_t; buffer : Pointer; size : Size_t) : SSize_t; cdecl; external BePascalLibName name 'BMemoryIO_ReadAt';
|
|
|
|
|
function BMemoryIO_WriteAt(AObject : TCPlusObject; pos : off_t; buffer : Pointer; size : Size_t) : SSize_t; cdecl; external BePascalLibName name 'BMemoryIO_WriteAt';
|
|
|
|
|
function BMemoryIO_ReadAt(AObject : TCPlusObject; pos : off_t; buffer : Pointer; size : size_t) : ssize_t; cdecl; external BePascalLibName name 'BMemoryIO_ReadAt';
|
|
|
|
|
function BMemoryIO_WriteAt(AObject : TCPlusObject; pos : off_t; buffer : Pointer; size : size_t) : ssize_t; cdecl; external BePascalLibName name 'BMemoryIO_WriteAt';
|
|
|
|
|
function BMemoryIO_Seek(AObject : TCPlusObject; pos : off_t; seek_mode : Cardinal) : off_t; cdecl; external BePascalLibName name 'BMemoryIO_Seek';
|
|
|
|
|
function BMemoryIO_Position(AObject : TCPlusObject) : off_t; cdecl; external BePascalLibName name 'BMemoryIO_Position';
|
|
|
|
|
function BMemoryIO_SetSize(AObject : TCPlusObject; size : off_t) : Status_t; cdecl; external BePascalLibName name 'BMemoryIO_SetSize';
|
|
|
|
|
function BMemoryIO_SetSize(AObject : TCPlusObject; size : off_t) : status_t; cdecl; external BePascalLibName name 'BMemoryIO_SetSize';
|
|
|
|
|
{procedure BMemoryIO__ReservedMemoryIO1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMemoryIO__ReservedMemoryIO1';
|
|
|
|
|
procedure BMemoryIO__ReservedMemoryIO2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMemoryIO__ReservedMemoryIO2';
|
|
|
|
|
}
|
|
|
|
|
function BMemoryIO_Create(AObject : TBeObject; MemoryIO : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BMemoryIO_Create';
|
|
|
|
|
//function BMemoryIO_operator=(AObject : TCPlusObject; : TMemoryIO) : TMemoryIO; cdecl; external BePascalLibName name 'BMemoryIO_operator=';
|
|
|
|
|
//function BMemoryIO_operator=(AObject : TCPlusObject; : BMemoryIO) : BMemoryIO; cdecl; external BePascalLibName name 'BMemoryIO_operator=';
|
|
|
|
|
{procedure BMemoryIO_bool fReadOnly(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMemoryIO_bool fReadOnly';
|
|
|
|
|
procedure BMemoryIO_char *fBuf(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMemoryIO_char *fBuf';
|
|
|
|
|
procedure BMemoryIO_size_t fLen(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BMemoryIO_size_t fLen';
|
|
|
|
|
@@ -309,318 +306,317 @@ begin
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
constructor TPositionIO.Create;
|
|
|
|
|
constructor BPositionIO.Create;
|
|
|
|
|
begin
|
|
|
|
|
CPlusObject := BPositionIO_Create(Self);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
destructor TPositionIO.Destroy;
|
|
|
|
|
destructor BPositionIO.Destroy;
|
|
|
|
|
begin
|
|
|
|
|
BPositionIO_Free(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
{function TPositionIO.Read(buffer : Pointer; size : Size_t) : SSize_t;
|
|
|
|
|
{function BPositionIO.Read(buffer : Pointer; size : size_t) : ssize_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BPositionIO_Read(CPlusObject, buffer, size);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function TPositionIO.Write(buffer : Pointer; size : Size_t) : SSize_t;
|
|
|
|
|
function BPositionIO.Write(buffer : Pointer; size : size_t) : ssize_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BPositionIO_Write(CPlusObject, buffer, size);
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{function TPositionIO.ReadAt(pos : off_t; buffer : Pointer; size : Size_t) : SSize_t;
|
|
|
|
|
{function BPositionIO.ReadAt(pos : off_t; buffer : Pointer; size : size_t) : ssize_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BPositionIO_ReadAt(CPlusObject, pos, buffer, size);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function TPositionIO.WriteAt(pos : off_t; buffer : Pointer; size : Size_t) : SSize_t;
|
|
|
|
|
function BPositionIO.WriteAt(pos : off_t; buffer : Pointer; size : size_t) : ssize_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BPositionIO_WriteAt(CPlusObject, pos, buffer, size);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function TPositionIO.Seek(aposition : off_t; seek_mode : Cardinal) : off_t;
|
|
|
|
|
function BPositionIO.Seek(aposition : off_t; seek_mode : Cardinal) : off_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BPositionIO_Seek(CPlusObject, aposition, seek_mode);
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{function TPositionIO.Position : off_t;
|
|
|
|
|
{function BPositionIO.Position : off_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BPositionIO_Position(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function TPositionIO.SetSize(size : off_t) : Status_t;
|
|
|
|
|
function BPositionIO.SetSize(size : off_t) : status_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BPositionIO_SetSize(CPlusObject, size);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
{procedure TPositionIO._ReservedPositionIO1;
|
|
|
|
|
{procedure BPositionIO._ReservedPositionIO1;
|
|
|
|
|
begin
|
|
|
|
|
BPositionIO__ReservedPositionIO1(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TPositionIO._ReservedPositionIO2;
|
|
|
|
|
procedure BPositionIO._ReservedPositionIO2;
|
|
|
|
|
begin
|
|
|
|
|
BPositionIO__ReservedPositionIO2(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TPositionIO._ReservedPositionIO3;
|
|
|
|
|
procedure BPositionIO._ReservedPositionIO3;
|
|
|
|
|
begin
|
|
|
|
|
BPositionIO__ReservedPositionIO3(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TPositionIO._ReservedPositionIO4;
|
|
|
|
|
procedure BPositionIO._ReservedPositionIO4;
|
|
|
|
|
begin
|
|
|
|
|
BPositionIO__ReservedPositionIO4(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TPositionIO._ReservedPositionIO5;
|
|
|
|
|
procedure BPositionIO._ReservedPositionIO5;
|
|
|
|
|
begin
|
|
|
|
|
BPositionIO__ReservedPositionIO5(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TPositionIO._ReservedPositionIO6;
|
|
|
|
|
procedure BPositionIO._ReservedPositionIO6;
|
|
|
|
|
begin
|
|
|
|
|
BPositionIO__ReservedPositionIO6(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TPositionIO._ReservedPositionIO7;
|
|
|
|
|
procedure BPositionIO._ReservedPositionIO7;
|
|
|
|
|
begin
|
|
|
|
|
BPositionIO__ReservedPositionIO7(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TPositionIO._ReservedPositionIO8;
|
|
|
|
|
procedure BPositionIO._ReservedPositionIO8;
|
|
|
|
|
begin
|
|
|
|
|
BPositionIO__ReservedPositionIO8(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TPositionIO._ReservedPositionIO9;
|
|
|
|
|
procedure BPositionIO._ReservedPositionIO9;
|
|
|
|
|
begin
|
|
|
|
|
BPositionIO__ReservedPositionIO9(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TPositionIO._ReservedPositionIO10;
|
|
|
|
|
procedure BPositionIO._ReservedPositionIO10;
|
|
|
|
|
begin
|
|
|
|
|
BPositionIO__ReservedPositionIO10(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TPositionIO._ReservedPositionIO11;
|
|
|
|
|
procedure BPositionIO._ReservedPositionIO11;
|
|
|
|
|
begin
|
|
|
|
|
BPositionIO__ReservedPositionIO11(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TPositionIO._ReservedPositionIO12;
|
|
|
|
|
procedure BPositionIO._ReservedPositionIO12;
|
|
|
|
|
begin
|
|
|
|
|
BPositionIO__ReservedPositionIO12(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{procedure TPositionIO.int32 _reserved[2];
|
|
|
|
|
{procedure BPositionIO.int32 _reserved[2];
|
|
|
|
|
begin
|
|
|
|
|
BPositionIO_int32 _reserved[2](CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
constructor TMallocIO.Create;
|
|
|
|
|
constructor BMallocIO.Create;
|
|
|
|
|
begin
|
|
|
|
|
CPlusObject := BMallocIO_Create(Self);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
destructor TMallocIO.Destroy;
|
|
|
|
|
destructor BMallocIO.Destroy;
|
|
|
|
|
begin
|
|
|
|
|
BMallocIO_Free(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function TMallocIO.ReadAt(pos : off_t; abuffer : Pointer; size : Size_t) : SSize_t;
|
|
|
|
|
function BMallocIO.ReadAt(pos : off_t; abuffer : Pointer; size : size_t) : ssize_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BMallocIO_ReadAt(CPlusObject, pos, abuffer, size);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function TMallocIO.WriteAt(pos : off_t; abuffer : Pointer; size : Size_t) : SSize_t;
|
|
|
|
|
function BMallocIO.WriteAt(pos : off_t; abuffer : Pointer; size : size_t) : ssize_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BMallocIO_WriteAt(CPlusObject, pos, abuffer, size);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function TMallocIO.Seek(pos : off_t; seek_mode : Cardinal) : off_t;
|
|
|
|
|
function BMallocIO.Seek(pos : off_t; seek_mode : Cardinal) : off_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BMallocIO_Seek(CPlusObject, pos, seek_mode);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
{function TMallocIO.Position : off_t;
|
|
|
|
|
{function BMallocIO.Position : off_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BMallocIO_Position(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function TMallocIO.SetSize(size : off_t) : Status_t;
|
|
|
|
|
function BMallocIO.SetSize(size : off_t) : status_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BMallocIO_SetSize(CPlusObject, size);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TMallocIO.SetBlockSize(blocksize : Size_t);
|
|
|
|
|
procedure BMallocIO.SetBlockSize(blocksize : size_t);
|
|
|
|
|
begin
|
|
|
|
|
BMallocIO_SetBlockSize(CPlusObject, blocksize);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function TMallocIO.Buffer : Pointer;
|
|
|
|
|
function BMallocIO.Buffer : Pointer;
|
|
|
|
|
begin
|
|
|
|
|
Result := BMallocIO_Buffer(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
{function TMallocIO.BufferLength : Size_t;
|
|
|
|
|
{function BMallocIO.BufferLength : size_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BMallocIO_BufferLength(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{procedure TMallocIO._ReservedMallocIO1;
|
|
|
|
|
{procedure BMallocIO._ReservedMallocIO1;
|
|
|
|
|
begin
|
|
|
|
|
BMallocIO__ReservedMallocIO1(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TMallocIO._ReservedMallocIO2;
|
|
|
|
|
procedure BMallocIO._ReservedMallocIO2;
|
|
|
|
|
begin
|
|
|
|
|
BMallocIO__ReservedMallocIO2(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//constructor TMallocIO.Create(MallocIO : TMallocIO);
|
|
|
|
|
//constructor BMallocIO.Create(MallocIO : BMallocIO);
|
|
|
|
|
//begin
|
|
|
|
|
// CPlusObject := BMallocIO_Create(Self, MallocIO);
|
|
|
|
|
//end;
|
|
|
|
|
|
|
|
|
|
{function TMallocIO.operator=( : TMallocIO) : TMallocIO;
|
|
|
|
|
{function BMallocIO.operator=( : BMallocIO) : BMallocIO;
|
|
|
|
|
begin
|
|
|
|
|
BMallocIO_operator=(CPlusObject, );
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{function TMallocIO.fBlockSize : Size_t;
|
|
|
|
|
{function BMallocIO.fBlockSize : size_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BMallocIO_fBlockSize(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function TMallocIO.fMallocSize : Size_t;
|
|
|
|
|
function BMallocIO.fMallocSize : size_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BMallocIO_size_t fMallocSize(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function TMallocIO.fLength : Size_t;
|
|
|
|
|
function BMallocIO.fLength : size_t;
|
|
|
|
|
begin
|
|
|
|
|
BMallocIO_size_t fLength(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function TMallocIO.fData : PChar;
|
|
|
|
|
function BMallocIO.fData : PChar;
|
|
|
|
|
begin
|
|
|
|
|
Result := BMallocIO_char *fData(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function TMallocIO.fPosition : off_t;
|
|
|
|
|
function BMallocIO.fPosition : off_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BMallocIO_fPosition(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{procedure TMallocIO.int32 _reserved[1];
|
|
|
|
|
{procedure BMallocIO.int32 _reserved[1];
|
|
|
|
|
begin
|
|
|
|
|
BMallocIO_int32 _reserved[1](CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
constructor TMemoryIO.Create;
|
|
|
|
|
constructor BMemoryIO.Create;
|
|
|
|
|
begin
|
|
|
|
|
CPlusObject := BMemoryIO_Create(Self);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constructor TMemoryIO.Create(p : Pointer; len : Size_t);
|
|
|
|
|
constructor BMemoryIO.Create(p : Pointer; len : size_t);
|
|
|
|
|
begin
|
|
|
|
|
CPlusObject := BMemoryIO_Create(Self, p, len);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
destructor TMemoryIO.Destroy;
|
|
|
|
|
destructor BMemoryIO.Destroy;
|
|
|
|
|
begin
|
|
|
|
|
BMemoryIO_Free(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function TMemoryIO.ReadAt(pos : off_t; buffer : Pointer; size : Size_t) : SSize_t;
|
|
|
|
|
function BMemoryIO.ReadAt(pos : off_t; buffer : Pointer; size : size_t) : ssize_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BMemoryIO_ReadAt(CPlusObject, pos, buffer, size);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function TMemoryIO.WriteAt(pos : off_t; buffer : Pointer; size :Size_t) :SSize_t;
|
|
|
|
|
function BMemoryIO.WriteAt(pos : off_t; buffer : Pointer; size :size_t) :ssize_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BMemoryIO_WriteAt(CPlusObject, pos, buffer, size);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
function TMemoryIO.Seek(pos : off_t; seek_mode : Cardinal) : off_t;
|
|
|
|
|
function BMemoryIO.Seek(pos : off_t; seek_mode : Cardinal) : off_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BMemoryIO_Seek(CPlusObject, pos, seek_mode);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
{function TMemoryIO.Position : off_t;
|
|
|
|
|
{function BMemoryIO.Position : off_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BMemoryIO_Position(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function TMemoryIO.SetSize(size : off_t) : Status_t;
|
|
|
|
|
function BMemoryIO.SetSize(size : off_t) : status_t;
|
|
|
|
|
begin
|
|
|
|
|
Result := BMemoryIO_SetSize(CPlusObject, size);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
{procedure TMemoryIO._ReservedMemoryIO1;
|
|
|
|
|
{procedure BMemoryIO._ReservedMemoryIO1;
|
|
|
|
|
begin
|
|
|
|
|
BMemoryIO__ReservedMemoryIO1(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TMemoryIO._ReservedMemoryIO2;
|
|
|
|
|
procedure BMemoryIO._ReservedMemoryIO2;
|
|
|
|
|
begin
|
|
|
|
|
BMemoryIO__ReservedMemoryIO2(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
constructor TMemoryIO.Create(MemoryIO : TMemoryIO);
|
|
|
|
|
constructor BMemoryIO.Create(MemoryIO : BMemoryIO);
|
|
|
|
|
begin
|
|
|
|
|
CPlusObject := BMemoryIO_Create(Self, MemoryIO.CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
{function TMemoryIO.operator=( : TMemoryIO) : TMemoryIO;
|
|
|
|
|
{function BMemoryIO.operator=( : BMemoryIO) : BMemoryIO;
|
|
|
|
|
begin
|
|
|
|
|
BMemoryIO_operator=(CPlusObject, );
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{procedure TMemoryIO.bool fReadOnly;
|
|
|
|
|
{procedure BMemoryIO.bool fReadOnly;
|
|
|
|
|
begin
|
|
|
|
|
BMemoryIO_bool fReadOnly(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TMemoryIO.char *fBuf;
|
|
|
|
|
procedure BMemoryIO.char *fBuf;
|
|
|
|
|
begin
|
|
|
|
|
BMemoryIO_char *fBuf(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TMemoryIO.size_t fLen;
|
|
|
|
|
procedure BMemoryIO.size_t fLen;
|
|
|
|
|
begin
|
|
|
|
|
BMemoryIO_size_t fLen(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TMemoryIO.size_t fPhys;
|
|
|
|
|
procedure BMemoryIO.size_t fPhys;
|
|
|
|
|
begin
|
|
|
|
|
BMemoryIO_size_t fPhys(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TMemoryIO.size_t fPos;
|
|
|
|
|
procedure BMemoryIO.size_t fPos;
|
|
|
|
|
begin
|
|
|
|
|
BMemoryIO_size_t fPos(CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TMemoryIO.int32 _reserved[1];
|
|
|
|
|
procedure BMemoryIO.int32 _reserved[1];
|
|
|
|
|
begin
|
|
|
|
|
BMemoryIO_int32 _reserved[1](CPlusObject);
|
|
|
|
|
end;
|
|
|
|
|
|