dsxplugin.pas 1.7 KB

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