From 4aba4d7597005af1efa12f420e01d5f938ad60d8 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 25 Oct 2009 18:11:35 +0100 Subject: Clean VFS API up a little Strictly split archiving and networking mode, get rid of prefixes --- vfs/uVFSprototypes.pas | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'vfs/uVFSprototypes.pas') diff --git a/vfs/uVFSprototypes.pas b/vfs/uVFSprototypes.pas index 01a31d3..5da4bc9 100644 --- a/vfs/uVFSprototypes.pas +++ b/vfs/uVFSprototypes.pas @@ -184,7 +184,7 @@ type user_data: Pointer): LongBool; cdecl; type - // Log function which could plugin call - the application must handle the messages (e.g. write them to the stdout) + // Log function for plugin debugging output - host application will print or save these messages PVFSLogFunc = ^TVFSLogFunc; TVFSLogFunc = procedure(const S: PChar); cdecl; @@ -193,16 +193,10 @@ type TVFSFree = procedure (g: TVFSGlobs); cdecl; // Performs cleanup and destroy all objects 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 + // Returns VFS API Version; must match version hardcoded in the host program, otherwise the module is not loaded + // Please use the cVFSVersion constant as a return value 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 TVFSGetArchiveExts = function: PChar; cdecl; // Returns the list of filename extensions which the module can handle separated by ';' (without a leading dots) // Returning NULL or not defining the symbol at all means plugin can't handle archives @@ -217,9 +211,11 @@ type // Sets the block size for I/O operations (not all modules supports this) - TVFSOpen = function (g:TVFSGlobs; const sName: PChar): TVFSResult; cdecl; - // TODO: Opens the location (file or URI/URL) - // In case of URI, do not supply password encoded in the string; plugin will automatically spawn the TVFSAskPasswordCallback callback + TVFSOpenArchive = function (g:TVFSGlobs; const sName: PChar): TVFSResult; cdecl; + // Opens specified archive. This will also switch plugin (an instance) into archiving mode + TVFSOpenURI = function (g:TVFSGlobs; const sURI: PChar): TVFSResult; cdecl; + // Opens specified network location. This will also switch plugin (an instance) into networking mode + // In case of URI, do not supply password encoded in the string; plugin will automatically spawn the TVFSAskPasswordCallback callback when needed TVFSClose = function (g:TVFSGlobs): TVFSResult; cdecl; // Closes the file or connection to the server TVFSMkDir = function (g:TVFSGlobs; const sDirName: PChar): TVFSResult; cdecl; -- cgit v1.2.3