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: white, Hacker, petermad, Stefan2

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

Plugin interface descriptions for TC 7.55 (beta)

Post by *ghisler(Author) »

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/plugins/wcx_ref2.21se_chm.zip
File system plugins:
http://ghisler.fileburst.com/fsplugins/fspluginhelp2.1se_chm.zip
Lister plugins:
http://ghisler.fileburst.com/lsplugins/listplughelp2.1_chm.zip
Content plugins:
http://ghisler.fileburst.com/content/contentpluginhelp210se_chm.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
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

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: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

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
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

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: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

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 / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Fixed, thanks!
Author of Total Commander
https://www.ghisler.com
User avatar
tbeu
Power Member
Power Member
Posts: 1336
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Typo in contentpluginhelp210beta.zip

Post by *tbeu »

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 / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Fixed, thanks!
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

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 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

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
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

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 10.52 / Win10 x64
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

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 10.52 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have just checked it - TC does not modify them. Only ReturnedText is modified.
Author of Total Commander
https://www.ghisler.com
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

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 10.52 / Win10 x64
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

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