diff options
Diffstat (limited to 'vfs/uVFSprototypes.pas')
| -rw-r--r-- | vfs/uVFSprototypes.pas | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/vfs/uVFSprototypes.pas b/vfs/uVFSprototypes.pas index b454769..d236d01 100644 --- a/vfs/uVFSprototypes.pas +++ b/vfs/uVFSprototypes.pas @@ -80,9 +80,7 @@ const type TVFSResult = longint; TVFSGlobs = Pointer; - // The plugin can store some data into this object for identify the object instances - // It is allocated in the application side with the size returned by VFSAllocNeeded() - // Generally, it is required for correct cooperation of thread in the module + // Plugin private data for each connection/instance // File descriptor for Open, Read, Write, Close, Seek operations TVFSFileDes = Pointer; @@ -145,6 +143,7 @@ type end; // This structure contains basic informations about the plugin + PVFSInfo = ^TVFSInfo; TVFSInfo = record ID: PChar; // unique identifier, not shown in GUI Name: PChar; // plugin name, GUI string (UTF-8) @@ -187,7 +186,7 @@ type type // Log function which could plugin call - the application must handle the messages (e.g. write them to the stdout) PVFSLogFunc = ^TVFSLogFunc; - TVFSLogFunc = procedure(S: PChar); cdecl; + TVFSLogFunc = procedure(const S: PChar); cdecl; TVFSNew = function (LogFunc: PVFSLogFunc): TVFSGlobs; cdecl; // Allocates memory for the globs structure and performs intialization of the plugin @@ -196,16 +195,20 @@ type TVFSVersion = function: integer; cdecl; // Returns API Version; the host application checks for this number and if the returned number is less than a value required by the host application, the module is not loaded // Please use the cVFSVersion constant as return value - TVFSGetInfo = function: TVFSInfo; cdecl; - // Returns the structure with module info + TVFSGetInfo = function: PVFSInfo; cdecl; + // Returns module info struct, tuxcmd will take care of memory deallocation TVFSGetPrefix = function (g:TVFSGlobs): PChar; cdecl; // Returns prefix used in the application to show difference between local and VFS filesystems (e.g. "ftp" or "smb") + // tuxcmd will take care of memory deallocation TVFSGetCharset = function (g:TVFSGlobs): PChar; cdecl; // TODO: Returns charset which the plugin uses + // tuxcmd will take care of memory deallocation TVFSGetExts = function: PChar; cdecl; // Returns the list of filename extensions which the module can handle separated by ';' (without a leading dots) + // tuxcmd will take care of memory deallocation TVFSGetServices = function: PChar; cdecl; // Returns the list of supported remote protocols separated by ';' (without the '://') + // tuxcmd will take care of memory deallocation TVFSCaps = function (const sExt: PChar): Integer; cdecl; // TODO: Returns a bit mask of plugin capabilities TVFSSetProtocolLogFunc = procedure (g:TVFSGlobs; ProtocolLogFunc: TVFSLogFunc); cdecl; @@ -236,14 +239,15 @@ type // Try to change the directory when correct permissions TVFSGetPath = function (g:TVFSGlobs): PChar; cdecl; // Returns the current working path (not all plugins can support this; just return '/' in this case) + // tuxcmd will take care of memory deallocation TVFSGetPathURI = function (g:TVFSGlobs): PChar; cdecl; // Returns the current working path in the URI form - // !!!!!!!!!!! k temhle (a vsem ostatnim) funkcim pridat komentar, kdo ma vubec pamet dealokovat + udelat review pluginus + // tuxcmd will take care of memory deallocation TVFSGetFileSystemSize = function (g:TVFSGlobs; const APath: PChar): Int64; cdecl; // Gets the size of filesystem; the path is optional, specified to recognize various mounted filesystems in the tree TVFSGetFileSystemFree = function (g:TVFSGlobs; const APath: PChar): Int64; cdecl; TVFSGetFSLabel = function (g:TVFSGlobs; const APath: PChar): PChar; cdecl; - // Gets the filesystem label + // Gets the filesystem label, tuxcmd will take care of memory deallocation TVFSIsOnSameFS = function (g:TVFSGlobs; const Path1, Path2: PChar): boolean; cdecl; TVFSTwoSameFiles = function (g:TVFSGlobs; const Path1, Path2: PChar): boolean; cdecl; // Checks if the two files are simmilar (used to test the case-insensitive filesystem - or hardlinks) |
