|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object plugins.wcx.WCXPluginAdapter
public abstract class WCXPluginAdapter
Field Summary |
---|
Constructor Summary | |
---|---|
WCXPluginAdapter()
|
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. |
abstract 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. |
abstract java.lang.Object |
openArchive(OpenArchiveData archiveData)
OpenArchive should return a unique handle representing the archive. |
int |
packerSetChangeVol(java.lang.String arcName,
int mode)
When you want the user to be asked about changing volume, call this function with appropriate parameters. |
int |
packerSetProcessData(java.lang.String fileName,
int size)
The function that notifies the user about the progress when un/packing files. |
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. |
abstract 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. |
abstract 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WCXPluginAdapter()
Method Detail |
---|
public abstract java.lang.Object openArchive(OpenArchiveData archiveData)
openArchive
in interface WCXPluginInterface
archiveData
- The archive data being open
public abstract int readHeader(java.lang.Object archiveData, HeaderData headerData)
readHeader
in interface WCXPluginInterface
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.
public abstract int processFile(java.lang.Object archiveData, int operation, java.lang.String destPath, java.lang.String destName)
processFile
in interface WCXPluginInterface
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.
public abstract int closeArchive(java.lang.Object archiveData)
closeArchive
in interface WCXPluginInterface
archiveData
- refers to the value returned by a programmer within a previous
call to OpenArchive.
public int packFiles(java.lang.String packedFile, java.lang.String subPath, java.lang.String srcPath, java.lang.String addList, int flags)
packFiles
in interface WCXPluginInterface
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:
public int deleteFiles(java.lang.String packedFile, java.lang.String deleteList)
deleteFiles
in interface WCXPluginInterface
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.
public int getPackerCaps()
getPackerCaps
in interface WCXPluginInterface
public int configurePacker(int parentWin)
configurePacker
in interface WCXPluginInterface
parentWin
- That is, you make your dialog box a child of Parent.
public java.lang.Object startMemPack(int options, java.lang.String fileName)
startMemPack
in interface WCXPluginInterface
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.
public int packToMem(java.lang.Object hMemPack, java.lang.String bufIn, int inLen, java.lang.String bufOut, int outLen, int seekBy, PackToMem packToMem)
packToMem
in interface WCXPluginInterface
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.
public int doneMemPack(java.lang.Object hMemPack)
doneMemPack
in interface WCXPluginInterface
hMemPack
- is the handle returned by StartMemPack.
public boolean canYouHandleThisFile(java.lang.String fileName)
canYouHandleThisFile
in interface WCXPluginInterface
fileName
- contains the fully qualified name (path+name) of the file to
be checked.
public void packSetDefaultParams(DefaultParam dps)
packSetDefaultParams
in interface WCXPluginInterface
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.public 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.
readHeaderEx
in interface WCXPluginInterface
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.
public final int packerSetChangeVol(java.lang.String arcName, int mode)
arcName
- specifies the filename of the archive that you are processing,
and will receive the name of the next volume.mode
- Set Mode to one of the following values, according to what you
want Totalcmd to ask the user:
public final int packerSetProcessData(java.lang.String fileName, int size)
fileName
- can be used to pass a pointer to the currently processed
filename, or NULL if it is not available.size
- Size to the number of bytes processed since the previous call
to the function.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |