| 1 |
unit DsxPlugin; |
| 2 |
|
| 3 |
{$include calling.inc} |
| 4 |
|
| 5 |
interface |
| 6 |
|
| 7 |
uses |
| 8 |
SysUtils; |
| 9 |
|
| 10 |
type |
| 11 |
|
| 12 |
PDsxSearchRecord = ^TDsxSearchRecord; |
| 13 |
TDsxSearchRecord = record |
| 14 |
StartPath: array[0..1023] of AnsiChar; |
| 15 |
FileMask: array[0..1023] of AnsiChar; |
| 16 |
Attributes: Cardinal; |
| 17 |
AttribStr: array[0..127] of AnsiChar; |
| 18 |
CaseSensitive: Boolean; |
| 19 |
{ Date/time search } |
| 20 |
IsDateFrom, |
| 21 |
IsDateTo, |
| 22 |
IsTimeFrom, |
| 23 |
IsTimeTo: Boolean; |
| 24 |
DateTimeFrom, |
| 25 |
DateTimeTo: TDateTime; |
| 26 |
{ File size search } |
| 27 |
IsFileSizeFrom, |
| 28 |
IsFileSizeTo: Boolean; |
| 29 |
FileSizeFrom, |
| 30 |
FileSizeTo: Int64; |
| 31 |
{ Find/replace text } |
| 32 |
IsFindText: Boolean; |
| 33 |
FindText: array[0..1023] of AnsiChar; |
| 34 |
IsReplaceText: Boolean; |
| 35 |
ReplaceText: array[0..1023] of AnsiChar; |
| 36 |
NotContainingText: Boolean; |
| 37 |
end; |
| 38 |
|
| 39 |
|
| 40 |
TDsxDefaultParamStruct = record |
| 41 |
Size, |
| 42 |
PluginInterfaceVersionLow, |
| 43 |
PluginInterfaceVersionHi: Longint; |
| 44 |
DefaultIniName: array[0..MAX_PATH - 1] of Char; |
| 45 |
end; |
| 46 |
PDsxDefaultParamStruct = ^TDsxDefaultParamStruct; |
| 47 |
|
| 48 |
{ For compatibility with Delphi use $IFDEF's to set calling convention } |
| 49 |
|
| 50 |
{Prototypes} |
| 51 |
{Callbacks procs} |
| 52 |
TSAddFileProc = procedure(PluginNr: Integer; FoundFile: PChar); dcpcall; |
| 53 |
//if FoundFile='' then searching is finished |
| 54 |
|
| 55 |
TSUpdateStatusProc = procedure(PluginNr: Integer; CurrentFile: PChar; |
| 56 |
FilesScaned: Integer); dcpcall; |
| 57 |
|
| 58 |
{Mandatory (must be implemented)} |
| 59 |
TSInit = function(dps: PDsxDefaultParamStruct; pAddFileProc: TSAddFileProc; |
| 60 |
pUpdateStatus: TSUpdateStatusProc): Integer; dcpcall; |
| 61 |
TSStartSearch = procedure(PluginNr: Integer; pSearchRec: PDsxSearchRecord); dcpcall; |
| 62 |
TSStopSearch = procedure(PluginNr: Integer); dcpcall; |
| 63 |
TSFinalize = procedure(PluginNr: Integer); dcpcall; |
| 64 |
|
| 65 |
implementation |
| 66 |
|
| 67 |
end. |
| 68 |
|