Plugin interface descriptions for TC 7.55 (beta)

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, Stefan2, white, sheep

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36354
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Plugin interface descriptions for TC 7.55 (beta)

Post by *ghisler(Author) » 2010-03-26, 10:17 UTC

There have been 3 major improvements to the plugin interfaces in TC 7.55:
1. Background packing and unpacking with packer plugins
2. Background uploads and downloads with file system plugins
3. Custom compare functions for synchronize dirs

Plugin reference help files:

Packer plugins:
http://ghisler.fileburst.com/beta/wcx_ref2.21beta.zip
Lister plugins:
There is no change to the lister plugin interface.
File system plugins:
http://ghisler.fileburst.com/beta/fspluginhelp2.1beta.zip
Content plugins:
http://ghisler.fileburst.com/beta/contentpluginhelp210beta.zip

Here are some beta plugins supporting these new functions:
1. Background packing+unpacking: Bzip2 plugin v1.2 and sources
2a. Background file system plugin: sftp 0.97 beta and sources
2b. Background file system plugin: WinCE / Mobile and sources
3. Content plugin with compare function (for sync): wdx_filesys sample and sources
Author of Total Commander
http://www.ghisler.com

User avatar
MVV
Power Member
Power Member
Posts: 8107
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2010-03-26, 10:36 UTC

As I see, there is no changes yet in FsExecuteFile function description regarding returning file path in RemoteName parameter for temporary panels.
Please tell me how many characters I may write to RemoteName buffer while returning FS_EXECUTE_YOURSELF (for both FsExecuteFile and FsExecuteFileW functions).

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36354
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2010-03-26, 11:33 UTC

If the version reported is 2.0 or newer, you may return up to 1023 characters (plus terminating 0). If it's older, you may return up to 259 characters (plus terminating 0). Do not include any prefix for extra-long names.
Author of Total Commander
http://www.ghisler.com

User avatar
MVV
Power Member
Power Member
Posts: 8107
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2010-03-26, 11:48 UTC

Thanks, I've set buffer size to 1024 for 2.0 and 260 for earlier versions (including null character).

User avatar
tbeu
Power Member
Power Member
Posts: 1197
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu » 2010-03-27, 10:11 UTC

In contentpluginhelp210beta.zip, on page contplug.h the first comment should read the correct plugin version number 2.10 instead of 1.5.
TC plugins: Autodesk 3ds Max Preview, Autodesk Revit Preview, Blat Mailer, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, SolidWorks Preview and more

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36354
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2010-03-28, 13:39 UTC

Fixed, thanks!
Author of Total Commander
http://www.ghisler.com

User avatar
tbeu
Power Member
Power Member
Posts: 1197
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Typo in contentpluginhelp210beta.zip

Post by *tbeu » 2010-04-19, 19:42 UTC

In contentpluginhelp210beta.zip, on page ContentGetSupportedFieldFlags the description for contflags_substmask should start with "A combination of all above substitution flags."
TC plugins: Autodesk 3ds Max Preview, Autodesk Revit Preview, Blat Mailer, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, SolidWorks Preview and more

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36354
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2010-04-20, 15:40 UTC

Fixed, thanks!
Author of Total Commander
http://www.ghisler.com

User avatar
Flint
Power Member
Power Member
Posts: 3159
Joined: 2003-10-27, 09:25 UTC
Location: Moscow, Russia
Contact:

Post by *Flint » 2010-04-26, 13:55 UTC

ghisler(Author)
A small request for the FS-plugin interface: if the return value is ft_stringw, please, increase the supported buffer length to 1024 characters (2048 bytes).

Reason: If there is a temporary panel plugin which contains a field with source file path, it can return long paths via FsGetLocalNameW, but in FsContentGetValueW maxlen is measured in bytes, so it's impossible to return source path longer than 511 wide characters.


BTW, header in the fsplugin.h still tells "version 2.0". Should not it be 2.1 instead? Or did you plan to change it after the 7.55 final?
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 9.21rc1 / Win7 x64 SP1, Win10 x64

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36354
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2010-04-26, 15:55 UTC

Hmm, a quick glance at the code shows that 1023 characters should work - what size value is sent to the plugin as maximum possible length?
Author of Total Commander
http://www.ghisler.com

User avatar
Flint
Power Member
Power Member
Posts: 3159
Joined: 2003-10-27, 09:25 UTC
Location: Moscow, Russia
Contact:

Post by *Flint » 2010-04-26, 16:16 UTC

ghisler(Author)
Ah, sorry, I misinterpreted what I saw. Probably I looked at maxlen value when TC was retrieving another field. Now I checked — indeed, maxlen=2047. The problem is that TC cuts the path when I show it in the custom column (by 258 characters). So, it's not a plugin interface restriction, but that of TC interface.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 9.21rc1 / Win7 x64 SP1, Win10 x64

User avatar
Flint
Power Member
Power Member
Posts: 3159
Joined: 2003-10-27, 09:25 UTC
Location: Moscow, Russia
Contact:

Post by *Flint » 2010-05-05, 14:15 UTC

Why are the parameters CustomTitle and CustomText in the function tRequestProc[W] are char* and not const char*? Does TC change them?

The problem is that I wanted to pass a constant string to tRequestProcW, but got a compiler message about it. Currently I changed the function definition to take constant string, but if TC suddenly tries to modify them, it will result in AV. Can I call RequestProcW(…, L"SomeTitle", …); or do I need to make a writable copy of the "SomeTitle" first?
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 9.21rc1 / Win7 x64 SP1, Win10 x64

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36354
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2010-05-06, 15:45 UTC

I have just checked it - TC does not modify them. Only ReturnedText is modified.
Author of Total Commander
http://www.ghisler.com

User avatar
Flint
Power Member
Power Member
Posts: 3159
Joined: 2003-10-27, 09:25 UTC
Location: Moscow, Russia
Contact:

Post by *Flint » 2010-05-06, 17:23 UTC

ghisler(Author)
Thanks for the information. In this case, char* should be replaced with const char* in the header file to avoid this ambiguity.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 9.21rc1 / Win7 x64 SP1, Win10 x64

User avatar
MVV
Power Member
Power Member
Posts: 8107
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2010-07-12, 09:21 UTC

BTW error was found in WCX interface HLP file:
The following functions do not exist in a Unicode form and must be implemented as Ansi:

ReadHeader - use ReadHeaderEx
CloseArchive
GetPackerCaps
ConfigurePacker
PackToMem
DoneMemPack
PackSetDefaultParams
ReadHeaderEx

Post Reply