public abstract class WDXPluginAdapter extends java.lang.Object implements WDXPluginInterface
CONTENT_DELAYIFSLOW, CONTFLAGS_EDIT, CONTFLAGS_FIELDEDIT, CONTFLAGS_PASSTHROUGH_SIZE_FLOAT, CONTFLAGS_SUBSTATTRIBUTES, CONTFLAGS_SUBSTATTRIBUTESTR, CONTFLAGS_SUBSTDATE, CONTFLAGS_SUBSTDATETIME, CONTFLAGS_SUBSTMASK, CONTFLAGS_SUBSTSIZE, CONTFLAGS_SUBSTTIME, CONTST_READNEWDIR, CONTST_REFRESHPRESSED, CONTST_SHOWHINT, SETFLAGS_FIRST_ATTRIBUTE, SETFLAGS_LAST_ATTRIBUTE, SETFLAGS_ONLY_DATE| Constructor and Description |
|---|
WDXPluginAdapter() |
| Modifier and Type | Method and Description |
|---|---|
int |
contentEditValue(int parentWin,
int fieldIndex,
int unitIndex,
int fieldType,
FieldValue fieldValue,
int maxlen,
int flags,
java.lang.String langidentifier)
ContentEditValue allows a plugin to implement a custom input dialog to
enter special values like date and time.
|
int |
contentGetDefaultSortOrder(int fieldIndex)
ContentGetDefaultSortOrder is called when the user clicks on the sorting
header above the columns.
|
java.lang.String |
contentGetDetectString(int maxLen)
ContentGetDetectString is called when the plugin is loaded for the first
time.
|
abstract int |
contentGetSupportedField(int fieldIndex,
java.lang.StringBuffer fieldName,
java.lang.StringBuffer units,
int maxlen)
ContentGetSupportedField is called to enumerate all supported fields.
|
int |
contentGetSupportedFieldFlags(int fieldIndex)
ContentGetSupportedFieldFlags is called to get various information about
a plugin variable.
|
abstract int |
contentGetValue(java.lang.String fileName,
int fieldIndex,
int unitIndex,
FieldValue fieldValue,
int maxlen,
int flags)
ContentGetValue is called to retrieve the value of a specific field for a
given file, e.g. the date field of a file.
|
void |
contentPluginUnloading()
ContentPluginUnloading is called just before the plugin is unloaded, e.g.
|
void |
contentSendStateInformation(int state,
java.lang.String path)
ContentSendStateInformation is called to inform the plugin about a state
change.
|
void |
contentSetDefaultParams(DefaultParam dps)
ContentsSetDefaultParams is called immediately after loading the DLL.
|
int |
contentSetValue(java.lang.String fileName,
int fieldIndex,
int unitIndex,
int fieldType,
FieldValue fieldValue,
int flags)
ContentSetValue is called to set the value of a specific field for a
given file, e.g. to change the date field of a file.
|
void |
contentStopGetValue(java.lang.String fileName)
ContentStopGetValue is called to tell a plugin that a directory change
has occurred, and the plugin should stop loading a value.
|
public abstract int contentGetSupportedField(int fieldIndex,
java.lang.StringBuffer fieldName,
java.lang.StringBuffer units,
int maxlen)
contentGetSupportedField in interface WDXPluginInterfacefieldIndex - The index of the field for which TC requests information.
Starting with 0, the FieldIndex is increased until the plugin
returns an error.fieldName - Here the plugin has to return the name of the field with index
FieldIndex. The field may not contain the following chars: .
(dot) | (vertical line) : (colon). You may return a maximum of
maxlen characters, including the trailing 0.units - When a field supports several units like bytes, kbytes, Mbytes
etc, they need to be specified here in the following form:
bytes|kbytes|Mbytes . The separator is the vertical dash
(Alt+0124). As field names, unit names may not contain a
vertical dash, a dot, or a colon. You may return a maximum of
maxlen characters, including the trailing 0. If the field type
is FT_MULTIPLECHOICE, the plugin needs to return all possible
values here. Example: The field "File Type" of the built-in
content plugin can have the values "File", "Folder" and
"Reparse point". The available choices need to be returned in
the following form: File|Folder|Reparse point . The same
separator is used as for Units. You may return a maximum of
maxlen characters, including the trailing 0. The field type
FT_MULTIPLECHOICE does NOT support any units.maxlen - The maximum number of characters, including the trailing 0,
which may be returned in each of the fields.public abstract int contentGetValue(java.lang.String fileName,
int fieldIndex,
int unitIndex,
FieldValue fieldValue,
int maxlen,
int flags)
contentGetValue in interface WDXPluginInterfacefileName - The name of the file for which the plugin needs to return the
field data.fieldIndex - The index of the field for which the content has to be
returned. This is the same index as the FieldIndex value in
ContentGetSupportedField.unitIndex - The index of the unit used. fieldValue - Here the plugin needs to return the requested data. The data
format depends on the field type:
maxlen - The maximum number of bytes fitting into the FieldValue
variable.flags - Currently only one flag is defined:
public java.lang.String contentGetDetectString(int maxLen)
contentGetDetectString in interface WDXPluginInterfacemaxLen - Maximum length, in bytes, of the detection string (currently
2k).public void contentSetDefaultParams(DefaultParam dps)
contentSetDefaultParams in interface WDXPluginInterfacedps - This structure of type ContentDefaultParamStruct 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 void contentStopGetValue(java.lang.String fileName)
contentStopGetValue in interface WDXPluginInterfacefileName - The name of the file for which ContentGetValue is currently
being called.public int contentGetDefaultSortOrder(int fieldIndex)
contentGetDefaultSortOrder in interface WDXPluginInterfacefieldIndex - The index of the field for which the sort order should be
returned.public void contentPluginUnloading()
contentPluginUnloading in interface WDXPluginInterfacepublic int contentGetSupportedFieldFlags(int fieldIndex)
contentGetSupportedFieldFlags in interface WDXPluginInterfacefieldIndex - The index of the field for which the sort order should be
returned.
public int contentEditValue(int parentWin,
int fieldIndex,
int unitIndex,
int fieldType,
FieldValue fieldValue,
int maxlen,
int flags,
java.lang.String langidentifier)
contentEditValue in interface WDXPluginInterfaceparentWin - The parent window handle for the dialog.fieldIndex - The index of the field for which the content editor is called.
This is the same index as the fieldIndex value in
contentGetSupportedField.unitIndex - The index of the unit used. fieldType - The type of data passed to the plugin in fieldValue. This is
the same type as returned by the plugin via
contentGetSupportedField.fieldValue - Here the plugin receives the data to be edited, and returns
the result back to the caller. The data format depends on the
field type:
maxlen - The maximum number of bytes fitting into the fieldValue
variable.flags - Currently the following flags are defined:
langidentifier - A 1-3 character language identifier, the same as the last part
of the language file name used. public void contentSendStateInformation(int state,
java.lang.String path)
contentSendStateInformation in interface WDXPluginInterfacestate - The state which has changed. The following states are defined:
path - Current path. In case of CONTSTR_SHOWHINT, this is the path to
the file, otherwise to the current directory.
public int contentSetValue(java.lang.String fileName,
int fieldIndex,
int unitIndex,
int fieldType,
FieldValue fieldValue,
int flags)
contentSetValue in interface WDXPluginInterfacefileName - The name of the file for which the plugin needs to change the
field data. This is set to NULL to indicate the end of change
attributes (see remarks below).fieldIndex - The index of the field for which the content has to be
returned. This is the same index as the FieldIndex value in
ContentGetSupportedField. This is set to -1 to signal the end
of change attributes (see remarks below).unitIndex - The index of the unit used. fieldType - The type of data passed to the plugin in FieldValue. This is
the same type as returned by the plugin via
ContentGetSupportedField. If the plugin returned a different
type via ContentGetValue, the the FieldType _may_ be of that
type too.fieldValue - Here the plugin receives the data to be changed. The data
format depends on the field type:
flags - Currently the following flags are defined: