|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WCXPluginInterface
This is the interface for Total Commander WCX plugins.
Field Summary | |
---|---|
static int |
E_BAD_ARCHIVE
CRC error in archive data. |
static int |
E_BAD_DATA
Data is bad. |
static int |
E_EABORTED
Function aborted by user. |
static int |
E_ECLOSE
Error closing file. |
static int |
E_ECREATE
Cannot create file. |
static int |
E_END_ARCHIVE
No more files in archive. |
static int |
E_EOPEN
Cannot open existing file. |
static int |
E_EREAD
Error reading from file. |
static int |
E_EWRITE
Error writing to file. |
static int |
E_NO_FILES
No files found. |
static int |
E_NO_MEMORY
Not enough memory. |
static int |
E_NOT_SUPPORTED
Function not supported. |
static int |
E_SMALL_BUF
Buffer too small. |
static int |
E_TOO_MANY_FILES
Too many files to pack. |
static int |
E_UNKNOWN_FORMAT
Archive format unknown. |
static int |
MEM_OPTIONS_WANTHEADERS
startMemPack(): The output stream should include the complete headers (beginning+end). |
static int |
MEMPACK_DONE
packToMem(): DONE. |
static int |
MEMPACK_OK
packToMem(): SUCCESS. |
static int |
PK_CAPS_BY_CONTENT
getPackerCaps(): Detect archive type by content. |
static int |
PK_CAPS_DELETE
getPackerCaps(): Can delete files. |
static int |
PK_CAPS_ENCRYPT
getPackerCaps(): Plugin supports PK_PACK_ENCRYPT option. |
static int |
PK_CAPS_HIDE
getPackerCaps(): Don't show packer icon, don't open with Enter but with Ctrl+PgDn. |
static int |
PK_CAPS_MEMPACK
getPackerCaps(): Supports packing in memory. |
static int |
PK_CAPS_MODIFY
getPackerCaps(): Can modify existing archives. |
static int |
PK_CAPS_MULTIPLE
getPackerCaps(): Archive can contain multiple files. |
static int |
PK_CAPS_NEW
getPackerCaps(): Can create new archives. |
static int |
PK_CAPS_OPTIONS
getPackerCaps(): Has options dialog. |
static int |
PK_CAPS_SEARCHTEXT
getPackerCaps(): Allow searching for text in archives created with this plugin. |
static int |
PK_EXTRACT
processFile(): Extract to disk. |
static int |
PK_PACK_MOVE_FILES
packFiles(): Delete original after packing. |
static int |
PK_PACK_SAVE_PATHS
packFiles(): Save path names of files. |
static int |
PK_SKIP
processFile(): Skip this file. |
static int |
PK_TEST
processFile(): Test file integrity. |
static int |
PK_VOL_ASK
setChangeVol(): Ask user for location of next volume. |
static int |
PK_VOL_NOTIFY
setChangeVol(): Notify app that next volume will be unpacked. |
static int |
SUCCESS
Success. |
Method Summary | |
---|---|
boolean |
canYouHandleThisFile(java.lang.String fileName)
CanYouHandleThisFile allows the plugin to handle files with different extensions than the one defined in Total Commander. |
int |
closeArchive(java.lang.Object archiveData)
CloseArchive should perform all necessary operations when an archive is about to be closed. |
int |
configurePacker(int parentWin)
ConfigurePacker gets called when the user clicks the Configure button from within "Pack files..." dialog box in Totalcmd. |
int |
deleteFiles(java.lang.String packedFile,
java.lang.String deleteList)
DeleteFiles should delete the specified files from the archive. |
int |
doneMemPack(java.lang.Object hMemPack)
DoneMemPack ends packing into memory. |
int |
getPackerCaps()
GetPackerCaps tells Totalcmd what features your packer plugin supports. |
java.lang.Object |
openArchive(OpenArchiveData archiveData)
OpenArchive should return a unique handle representing the archive. |
int |
packFiles(java.lang.String packedFile,
java.lang.String subPath,
java.lang.String srcPath,
java.lang.String addList,
int flags)
PackFiles specifies what should happen when a user creates, or adds files to the archive. |
void |
packSetDefaultParams(DefaultParam dps)
PackSetDefaultParams is called immediately after loading the DLL, before any other function. |
int |
packToMem(java.lang.Object hMemPack,
java.lang.String bufIn,
int inLen,
java.lang.String bufOut,
int outLen,
int seekBy,
PackToMem packToMem)
PackToMem packs the next chunk of data passed to it and/or returns the compressed data to the calling program. |
int |
processFile(java.lang.Object archiveData,
int operation,
java.lang.String destPath,
java.lang.String destName)
ProcessFile should unpack the specified file or test the integrity of the archive. |
int |
readHeader(java.lang.Object archiveData,
HeaderData headerData)
Totalcmd calls ReadHeader to find out what files are in the archive. |
int |
readHeaderEx(java.lang.Object archiveData,
HeaderDataEx headerDataEx)
Totalcmd calls ReadHeaderEx to find out what files are in the archive. |
java.lang.Object |
startMemPack(int options,
java.lang.String fileName)
StartMemPack starts packing into memory. |
Field Detail |
---|
static final int SUCCESS
static final int E_END_ARCHIVE
static final int E_NO_MEMORY
static final int E_BAD_DATA
static final int E_BAD_ARCHIVE
static final int E_UNKNOWN_FORMAT
static final int E_EOPEN
static final int E_ECREATE
static final int E_ECLOSE
static final int E_EREAD
static final int E_EWRITE
static final int E_SMALL_BUF
static final int E_EABORTED
static final int E_NO_FILES
static final int E_TOO_MANY_FILES
static final int E_NOT_SUPPORTED
static final int PK_SKIP
static final int PK_TEST
static final int PK_EXTRACT
static final int PK_PACK_MOVE_FILES
static final int PK_PACK_SAVE_PATHS
static final int PK_CAPS_NEW
static final int PK_CAPS_MODIFY
static final int PK_CAPS_MULTIPLE
static final int PK_CAPS_DELETE
static final int PK_CAPS_OPTIONS
static final int PK_CAPS_MEMPACK
static final int PK_CAPS_BY_CONTENT
static final int PK_CAPS_SEARCHTEXT
static final int PK_CAPS_HIDE
static final int PK_CAPS_ENCRYPT
static final int MEM_OPTIONS_WANTHEADERS
static final int MEMPACK_OK
static final int MEMPACK_DONE
static final int PK_VOL_ASK
static final int PK_VOL_NOTIFY
Method Detail |
---|
java.lang.Object openArchive(OpenArchiveData archiveData)
archiveData
- The archive data being open
int readHeader(java.lang.Object archiveData, HeaderData headerData)
archiveData
- Contains the handle returned by OpenArchive. The programmer is
encouraged to store other information in the location that can
be accessed via this handle. For example, you may want to
store the position in the archive when returning files
information in ReadHeader.headerData
- HeaderData is supposed to provide Totalcmd with information
about the next file contained in the archive.
int processFile(java.lang.Object archiveData, int operation, java.lang.String destPath, java.lang.String destName)
archiveData
- contains the handle previously returned by you in OpenArchive.
Using this, you should be able to find out information (such
as the archive filename) that you need for extracting files
from the archive.operation
- Operation is set to one of the following:
destPath
- Either DestName contains the full path and file name and
DestPath is NULL, or DestName contains only the file name and
DestPath the file path. This is done for compatibility with
unrar.dll.destName
- Either DestName contains the full path and file name and
DestPath is NULL, or DestName contains only the file name and
DestPath the file path. This is done for compatibility with
unrar.dll.
int closeArchive(java.lang.Object archiveData)
archiveData
- refers to the value returned by a programmer within a previous
call to OpenArchive.
int packFiles(java.lang.String packedFile, java.lang.String subPath, java.lang.String srcPath, java.lang.String addList, int flags)
packedFile
- refers to the archive that is to be created or modified. The
string contains the full path.subPath
- is either NULL, when the files should be packed with the paths
given with the file names, or not NULL when they should be
placed below the given subdirectory within the archive.
Example:
srcPath
- contains path to the files in AddList. SrcPath and AddList
together specify files that are to be packed into PackedFile.addList
- Each string in AddList is zero-delimited (ends in zero), and
the AddList string ends with an extra zero byte, i.e. there
are two zero bytes at the end of AddList.flags
- can contain a combination of the following values reflecting
the user choice from within Totalcmd:
int deleteFiles(java.lang.String packedFile, java.lang.String deleteList)
packedFile
- contains full path and name of the the archive.deleteList
- contains the list of files that should be deleted from the
archive. The format of this string is the same as AddList
within PackFiles.
int getPackerCaps()
int configurePacker(int parentWin)
parentWin
- That is, you make your dialog box a child of Parent.
java.lang.Object startMemPack(int options, java.lang.String fileName)
options
- Options can contain a combination of the following values:
fileName
- refers to the name of the file being packed - some packers
store the name in the local header.
int packToMem(java.lang.Object hMemPack, java.lang.String bufIn, int inLen, java.lang.String bufOut, int outLen, int seekBy, PackToMem packToMem)
hMemPack
- is the handle returned by StartMemPack()bufIn
- is a pointer to the data which needs to be packedinLen
- contains the number of bytes pointed to by BufInbufOut
- is a pointer to a buffer which can receive packed dataoutLen
- contains the size of the buffer pointed to by BufOutseekBy
- May by set to the offset from the current output posisition by
which the file pointer has to be moved BEFORE accepting the
data in BufOut. This allows the plugin to modify a file header
also AFTER packing, e.g. to write a CRC to the header.packToMem
- has to receive infos about the operation of this method.
int doneMemPack(java.lang.Object hMemPack)
hMemPack
- is the handle returned by StartMemPack.
boolean canYouHandleThisFile(java.lang.String fileName)
fileName
- contains the fully qualified name (path+name) of the file to
be checked.
void packSetDefaultParams(DefaultParam dps)
dps
- This object currently contains the version number of the
plugin interface, and the suggested location for the settings
file (ini file). It is recommended to store any
plugin-specific information either directly in that file, or
in that directory under a different name. Make sure to use a
unique header when storing data in this file, because it is
shared by other file system plugins! If your plugin needs more
than 1kbyte of data, you should use your own ini file because
ini files are limited to 64k.int readHeaderEx(java.lang.Object archiveData, HeaderDataEx headerDataEx)
ReadHeaderEx is called as long as it returns zero (as long as the previous call to this function returned zero). Each time it is called, HeaderDataEx is supposed to provide Totalcmd with information about the next file contained in the archive. When all files in the archive have been returned, ReadHeaderEx should return E_END_ARCHIVE which will prevent ReaderHeaderEx from being called again. If an error occurs, ReadHeaderEx should return one of the error values or 0 for no error.
In short, you are supposed to set at least PackSize, PackSizeHigh, UnpSize, UnpSizeHigh, FileTime, and FileName members of tHeaderDataEx. Totalcmd will use this information to display content of the archive when the archive is viewed as a directory.
archiveData
- contains the handle returned by OpenArchive. The programmer is
encouraged to store other information in the location that can
be accessed via this handle. For example, you may want to
store the position in the archive when returning files
information in ReadHeaderEx.headerDataEx
- HeaderDataEx is supposed to provide Totalcmd with information
about the next file contained in the archive.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |