| 1 |
unit WfxPlugin; { Plugin definitions version 2.0 } |
| 2 |
|
| 3 |
interface |
| 4 |
|
| 5 |
uses |
| 6 |
SysUtils {$IFDEF MSWINDOWS}, Windows{$ENDIF}; |
| 7 |
|
| 8 |
{ ids for FsGetFile } |
| 9 |
|
| 10 |
const FS_FILE_OK=0; |
| 11 |
|
| 12 |
FS_FILE_EXISTS=1; |
| 13 |
|
| 14 |
FS_FILE_NOTFOUND=2; |
| 15 |
|
| 16 |
FS_FILE_READERROR=3; |
| 17 |
|
| 18 |
FS_FILE_WRITEERROR=4; |
| 19 |
|
| 20 |
FS_FILE_USERABORT=5; |
| 21 |
|
| 22 |
FS_FILE_NOTSUPPORTED=6; |
| 23 |
|
| 24 |
FS_FILE_EXISTSRESUMEALLOWED=7; |
| 25 |
|
| 26 |
FS_EXEC_OK=0; |
| 27 |
|
| 28 |
FS_EXEC_ERROR=1; |
| 29 |
|
| 30 |
FS_EXEC_YOURSELF=-1; |
| 31 |
|
| 32 |
FS_EXEC_SYMLINK=-2; |
| 33 |
|
| 34 |
FS_COPYFLAGS_OVERWRITE=1; |
| 35 |
|
| 36 |
FS_COPYFLAGS_RESUME=2; |
| 37 |
|
| 38 |
FS_COPYFLAGS_MOVE=4; |
| 39 |
|
| 40 |
FS_COPYFLAGS_EXISTS_SAMECASE=8; |
| 41 |
|
| 42 |
FS_COPYFLAGS_EXISTS_DIFFERENTCASE=16; |
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
{ flags for tRequestProc } |
| 47 |
|
| 48 |
const |
| 49 |
|
| 50 |
RT_Other=0; |
| 51 |
|
| 52 |
RT_UserName=1; |
| 53 |
|
| 54 |
RT_Password=2; |
| 55 |
|
| 56 |
RT_Account=3; |
| 57 |
|
| 58 |
RT_UserNameFirewall=4; |
| 59 |
|
| 60 |
RT_PasswordFirewall=5; |
| 61 |
|
| 62 |
RT_TargetDir=6; |
| 63 |
|
| 64 |
RT_URL=7; |
| 65 |
|
| 66 |
RT_MsgOK=8; |
| 67 |
|
| 68 |
RT_MsgYesNo=9; |
| 69 |
|
| 70 |
RT_MsgOKCancel=10; |
| 71 |
|
| 72 |
{ flags for tLogProc } |
| 73 |
|
| 74 |
const msgtype_connect=1; |
| 75 |
|
| 76 |
msgtype_disconnect=2; |
| 77 |
|
| 78 |
msgtype_details=3; |
| 79 |
|
| 80 |
msgtype_transfercomplete=4; |
| 81 |
|
| 82 |
msgtype_connectcomplete=5; |
| 83 |
|
| 84 |
msgtype_importanterror=6; |
| 85 |
|
| 86 |
msgtype_operationcomplete=7; |
| 87 |
|
| 88 |
{ flags for FsStatusInfo } |
| 89 |
|
| 90 |
const FS_STATUS_START=0; |
| 91 |
|
| 92 |
FS_STATUS_END=1; |
| 93 |
|
| 94 |
FS_STATUS_OP_LIST=1; |
| 95 |
|
| 96 |
FS_STATUS_OP_GET_SINGLE=2; |
| 97 |
|
| 98 |
FS_STATUS_OP_GET_MULTI=3; |
| 99 |
|
| 100 |
FS_STATUS_OP_PUT_SINGLE=4; |
| 101 |
|
| 102 |
FS_STATUS_OP_PUT_MULTI=5; |
| 103 |
|
| 104 |
FS_STATUS_OP_RENMOV_SINGLE=6; |
| 105 |
|
| 106 |
FS_STATUS_OP_RENMOV_MULTI=7; |
| 107 |
|
| 108 |
FS_STATUS_OP_DELETE=8; |
| 109 |
|
| 110 |
FS_STATUS_OP_ATTRIB=9; |
| 111 |
|
| 112 |
FS_STATUS_OP_MKDIR=10; |
| 113 |
|
| 114 |
FS_STATUS_OP_EXEC=11; |
| 115 |
|
| 116 |
FS_STATUS_OP_CALCSIZE=12; |
| 117 |
|
| 118 |
FS_STATUS_OP_SEARCH=13; |
| 119 |
|
| 120 |
FS_STATUS_OP_SEARCH_TEXT=14; |
| 121 |
|
| 122 |
FS_STATUS_OP_SYNC_SEARCH=15; |
| 123 |
|
| 124 |
FS_STATUS_OP_SYNC_GET=16; |
| 125 |
|
| 126 |
FS_STATUS_OP_SYNC_PUT=17; |
| 127 |
|
| 128 |
FS_STATUS_OP_SYNC_DELETE=18; |
| 129 |
|
| 130 |
FS_STATUS_OP_GET_MULTI_THREAD=19; |
| 131 |
|
| 132 |
FS_STATUS_OP_PUT_MULTI_THREAD=20; |
| 133 |
|
| 134 |
{Flags for FsExtractCustomIcon} |
| 135 |
|
| 136 |
const FS_ICONFLAG_SMALL=1; |
| 137 |
|
| 138 |
FS_ICONFLAG_BACKGROUND=2; |
| 139 |
|
| 140 |
FS_ICON_USEDEFAULT=0; |
| 141 |
|
| 142 |
FS_ICON_EXTRACTED=1; |
| 143 |
|
| 144 |
FS_ICON_EXTRACTED_DESTROY=2; |
| 145 |
|
| 146 |
FS_ICON_DELAYED=3; |
| 147 |
|
| 148 |
const FS_BITMAP_NONE=0; |
| 149 |
|
| 150 |
FS_BITMAP_EXTRACTED=1; |
| 151 |
|
| 152 |
FS_BITMAP_EXTRACT_YOURSELF=2; |
| 153 |
|
| 154 |
FS_BITMAP_EXTRACT_YOURSELF_ANDDELETE=3; |
| 155 |
|
| 156 |
FS_BITMAP_CACHE=256; |
| 157 |
|
| 158 |
{Flags for crypto callback function} |
| 159 |
|
| 160 |
FS_CRYPT_SAVE_PASSWORD=1; |
| 161 |
|
| 162 |
FS_CRYPT_LOAD_PASSWORD=2; |
| 163 |
|
| 164 |
FS_CRYPT_LOAD_PASSWORD_NO_UI=3; {Load password only if master password has already been entered!} |
| 165 |
|
| 166 |
FS_CRYPT_COPY_PASSWORD=4; |
| 167 |
|
| 168 |
FS_CRYPT_MOVE_PASSWORD=5; |
| 169 |
|
| 170 |
FS_CRYPT_DELETE_PASSWORD=6; |
| 171 |
|
| 172 |
FS_CRYPTOPT_MASTERPASS_SET=1; {The user already has a master password defined} |
| 173 |
|
| 174 |
{Flags for FsGetBackgroundFlags} |
| 175 |
|
| 176 |
BG_DOWNLOAD=1; { Plugin supports downloads in background } |
| 177 |
|
| 178 |
BG_UPLOAD=2; { Plugin supports uploads in background } |
| 179 |
|
| 180 |
BG_ASK_USER=4; { Plugin requires separate connection for background transfers -> ask user first } |
| 181 |
|
| 182 |
type |
| 183 |
{ Unsigned integer with pointer size } |
| 184 |
THandle = {$IFDEF CPU64}QWord{$ELSE}LongWord{$ENDIF}; |
| 185 |
|
| 186 |
const |
| 187 |
wfxInvalidHandle: THandle = THandle(-1); |
| 188 |
|
| 189 |
{ Some Windows specific stuff } |
| 190 |
|
| 191 |
const |
| 192 |
MAXDWORD = DWORD($FFFFFFFF); |
| 193 |
FILE_ATTRIBUTE_NORMAL = 128; |
| 194 |
FILE_ATTRIBUTE_DIRECTORY = 16; |
| 195 |
FILE_ATTRIBUTE_REPARSE_POINT = $0400; |
| 196 |
FILE_ATTRIBUTE_UNIX_MODE = $80000000; |
| 197 |
|
| 198 |
type |
| 199 |
TInt64Rec = packed record |
| 200 |
case Boolean of |
| 201 |
True : (Value : Int64); |
| 202 |
False : (Low, High : DWORD); |
| 203 |
end; |
| 204 |
|
| 205 |
BOOL = LongBool; |
| 206 |
HBITMAP = THandle; |
| 207 |
HICON = THandle; |
| 208 |
HWND = THandle; |
| 209 |
|
| 210 |
type |
| 211 |
{$IFDEF MSWINDOWS} |
| 212 |
FILETIME = Windows.FILETIME; |
| 213 |
{$ELSE} |
| 214 |
FILETIME = packed record |
| 215 |
dwLowDateTime : DWORD; |
| 216 |
dwHighDateTime : DWORD; |
| 217 |
end; |
| 218 |
{$ENDIF} |
| 219 |
TFileTime = FILETIME; // for compatibility with all plugins |
| 220 |
PFileTime = ^FILETIME; |
| 221 |
TWfxFileTime = FILETIME; |
| 222 |
PWfxFileTime = ^FILETIME; |
| 223 |
|
| 224 |
{$IFDEF MSWINDOWS} |
| 225 |
WIN32_FIND_DATAA = Windows.WIN32_FIND_DATA; |
| 226 |
{$ELSE} |
| 227 |
WIN32_FIND_DATAA = packed record |
| 228 |
dwFileAttributes : DWORD; |
| 229 |
ftCreationTime : TFILETIME; |
| 230 |
ftLastAccessTime : TFILETIME; |
| 231 |
ftLastWriteTime : TFILETIME; |
| 232 |
nFileSizeHigh : DWORD; |
| 233 |
nFileSizeLow : DWORD; |
| 234 |
dwReserved0 : DWORD; |
| 235 |
dwReserved1 : DWORD; |
| 236 |
cFileName : array[0..(MAX_PATH)-1] of CHAR; |
| 237 |
cAlternateFileName : array[0..13] of CHAR; |
| 238 |
end; |
| 239 |
{$ENDIF} |
| 240 |
TWin32FindData = WIN32_FIND_DATAA; |
| 241 |
|
| 242 |
{$IFDEF MSWINDOWS} |
| 243 |
WIN32_FIND_DATAW = Windows.WIN32_FIND_DATAW; |
| 244 |
{$ELSE} |
| 245 |
WIN32_FIND_DATAW = packed record |
| 246 |
dwFileAttributes : DWORD; |
| 247 |
ftCreationTime : TFILETIME; |
| 248 |
ftLastAccessTime : TFILETIME; |
| 249 |
ftLastWriteTime : TFILETIME; |
| 250 |
nFileSizeHigh : DWORD; |
| 251 |
nFileSizeLow : DWORD; |
| 252 |
dwReserved0 : DWORD; |
| 253 |
dwReserved1 : DWORD; |
| 254 |
cFileName : array[0..(MAX_PATH)-1] of WCHAR; |
| 255 |
cAlternateFileName : array[0..13] of WCHAR; |
| 256 |
end; |
| 257 |
{$ENDIF} |
| 258 |
TWin32FindDataW = WIN32_FIND_DATAW; |
| 259 |
|
| 260 |
type |
| 261 |
|
| 262 |
tRemoteInfo=record |
| 263 |
|
| 264 |
SizeLow,SizeHigh:longint; |
| 265 |
|
| 266 |
LastWriteTime:TFileTime; |
| 267 |
|
| 268 |
Attr:longint; |
| 269 |
|
| 270 |
end; |
| 271 |
|
| 272 |
pRemoteInfo=^tRemoteInfo; |
| 273 |
|
| 274 |
type |
| 275 |
|
| 276 |
tFsDefaultParamStruct=record |
| 277 |
|
| 278 |
size, |
| 279 |
|
| 280 |
PluginInterfaceVersionLow, |
| 281 |
|
| 282 |
PluginInterfaceVersionHi:longint; |
| 283 |
|
| 284 |
DefaultIniName:array[0..MAX_PATH-1] of char; |
| 285 |
|
| 286 |
end; |
| 287 |
|
| 288 |
pFsDefaultParamStruct=^tFsDefaultParamStruct; |
| 289 |
|
| 290 |
{ For compatibility with Delphi use $IFDEF's to set calling convention } |
| 291 |
|
| 292 |
{ callback functions } |
| 293 |
|
| 294 |
type |
| 295 |
|
| 296 |
TProgressProc=function(PluginNr:integer;SourceName, |
| 297 |
|
| 298 |
TargetName:pchar;PercentDone:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 299 |
|
| 300 |
TProgressProcW=function(PluginNr:integer;SourceName, |
| 301 |
|
| 302 |
TargetName:pwidechar;PercentDone:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 303 |
|
| 304 |
TLogProc=procedure(PluginNr,MsgType:integer;LogString:pchar); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 305 |
|
| 306 |
TLogProcW=procedure(PluginNr,MsgType:integer;LogString:pwidechar); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 307 |
|
| 308 |
TRequestProc=function(PluginNr,RequestType:integer;CustomTitle,CustomText, |
| 309 |
|
| 310 |
ReturnedText:pchar;maxlen:integer):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 311 |
|
| 312 |
TRequestProcW=function(PluginNr,RequestType:integer;CustomTitle,CustomText, |
| 313 |
|
| 314 |
ReturnedText:pwidechar;maxlen:integer):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 315 |
|
| 316 |
TCryptProc=function(PluginNr,CryptoNumber:integer;mode:integer;ConnectionName, |
| 317 |
|
| 318 |
Password:pchar;maxlen:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 319 |
|
| 320 |
TCryptProcW=function(PluginNr,CryptoNumber:integer;mode:integer;ConnectionName, |
| 321 |
|
| 322 |
Password:pwidechar;maxlen:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 323 |
|
| 324 |
{ Function prototypes - the callback functions MUST be implemented exactly like this! } |
| 325 |
|
| 326 |
(* |
| 327 |
|
| 328 |
function FsInit(PluginNr:integer;pProgressProc:tProgressProc;pLogProc:tLogProc; |
| 329 |
|
| 330 |
pRequestProc:tRequestProc):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 331 |
|
| 332 |
function FsInitW(PluginNr:integer;pProgressProcW:tProgressProcW;pLogProcW:tLogProcW; |
| 333 |
|
| 334 |
pRequestProcW:tRequestProcW):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 335 |
|
| 336 |
procedure FsSetCryptCallback(CryptProc:TCryptProc;CryptoNr,Flags:integer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 337 |
|
| 338 |
procedure FsSetCryptCallbackW(CryptProcW:TCryptProcW;CryptoNr,Flags:integer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 339 |
|
| 340 |
function FsFindFirst(path :pchar;var FindData:tWIN32FINDDATA):thandle; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 341 |
|
| 342 |
function FsFindFirstW(path :pwidechar;var FindData:tWIN32FINDDATAW):thandle; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 343 |
|
| 344 |
function FsFindNext(Hdl:thandle;var FindData:tWIN32FINDDATA):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 345 |
|
| 346 |
function FsFindNextW(Hdl:thandle;var FindDataW:tWIN32FINDDATAW):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 347 |
|
| 348 |
function FsFindClose(Hdl:thandle):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 349 |
|
| 350 |
function FsMkDir(RemoteDir:pchar):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 351 |
|
| 352 |
function FsMkDirW(RemoteDir:pwidechar):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 353 |
|
| 354 |
function FsExecuteFile(MainWin:HWND;RemoteName,Verb:pchar):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 355 |
|
| 356 |
function FsExecuteFileW(MainWin:HWND;RemoteName,Verb:pwidechar):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 357 |
|
| 358 |
function FsRenMovFile(OldName,NewName:pchar;Move,OverWrite:bool; |
| 359 |
|
| 360 |
RemoteInfo:pRemoteInfo):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 361 |
|
| 362 |
function FsRenMovFileW(OldName,NewName:pwidechar;Move,OverWrite:bool; |
| 363 |
|
| 364 |
RemoteInfo:pRemoteInfo):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 365 |
|
| 366 |
function FsGetFile(RemoteName,LocalName:pchar;CopyFlags:integer; |
| 367 |
|
| 368 |
RemoteInfo:pRemoteInfo):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 369 |
|
| 370 |
function FsGetFileW(RemoteName,LocalName:pwidechar;CopyFlags:integer; |
| 371 |
|
| 372 |
RemoteInfo:pRemoteInfo):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 373 |
|
| 374 |
function FsPutFile(LocalName,RemoteName:pchar;CopyFlags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 375 |
|
| 376 |
function FsPutFileW(LocalName,RemoteName:pwidechar;CopyFlags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 377 |
|
| 378 |
function FsDeleteFile(RemoteName:pchar):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 379 |
|
| 380 |
function FsDeleteFileW(RemoteName:pwidechar):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 381 |
|
| 382 |
function FsRemoveDir(RemoteName:pchar):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 383 |
|
| 384 |
function FsRemoveDirW(RemoteName:pwidechar):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 385 |
|
| 386 |
function FsDisconnect(DisconnectRoot:pchar):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 387 |
|
| 388 |
function FsDisconnectW(DisconnectRoot:pwidechar):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 389 |
|
| 390 |
function FsSetAttr(RemoteName:pchar;NewAttr:integer):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 391 |
|
| 392 |
function FsSetAttrW(RemoteName:pwidechar;NewAttr:integer):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 393 |
|
| 394 |
function FsSetTime(RemoteName:pchar;CreationTime,LastAccessTime, |
| 395 |
|
| 396 |
LastWriteTime:PFileTime):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 397 |
|
| 398 |
function FsSetTimeW(RemoteName:pwidechar;CreationTime,LastAccessTime, |
| 399 |
|
| 400 |
LastWriteTime:PFileTime):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 401 |
|
| 402 |
procedure FsStatusInfo(RemoteDir:pchar;InfoStartEnd,InfoOperation:integer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 403 |
|
| 404 |
procedure FsStatusInfoW(RemoteDir:pwidechar;InfoStartEnd,InfoOperation:integer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 405 |
|
| 406 |
procedure FsGetDefRootName(DefRootName:pchar;maxlen:integer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 407 |
|
| 408 |
function FsExtractCustomIcon(RemoteName:pchar;ExtractFlags:integer; |
| 409 |
|
| 410 |
var TheIcon:hicon):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 411 |
|
| 412 |
function FsExtractCustomIconW(RemoteName:pwidechar;ExtractFlags:integer; |
| 413 |
|
| 414 |
var TheIcon:hicon):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 415 |
|
| 416 |
procedure FsSetDefaultParams(dps:pFsDefaultParamStruct); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 417 |
|
| 418 |
function FsGetPreviewBitmap(RemoteName:pchar;width,height:integer, |
| 419 |
|
| 420 |
var ReturnedBitmap:hbitmap):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 421 |
|
| 422 |
function FsGetPreviewBitmapW(RemoteName:pwidechar;width,height:integer, |
| 423 |
|
| 424 |
var ReturnedBitmap:hbitmap):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 425 |
|
| 426 |
function FsLinksToLocalFiles:bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 427 |
|
| 428 |
function FsGetLocalName(RemoteName:pchar;maxlen:integer):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 429 |
|
| 430 |
function FsGetLocalNameW(RemoteName:pwidechar;maxlen:integer):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 431 |
|
| 432 |
*) |
| 433 |
|
| 434 |
{****************************** content plugin part *****************************} |
| 435 |
|
| 436 |
const ft_nomorefields=0; |
| 437 |
|
| 438 |
ft_numeric_32=1; |
| 439 |
|
| 440 |
ft_numeric_64=2; |
| 441 |
|
| 442 |
ft_numeric_floating=3; |
| 443 |
|
| 444 |
ft_date=4; |
| 445 |
|
| 446 |
ft_time=5; |
| 447 |
|
| 448 |
ft_boolean=6; |
| 449 |
|
| 450 |
ft_multiplechoice=7; |
| 451 |
|
| 452 |
ft_string=8; |
| 453 |
|
| 454 |
ft_fulltext=9; |
| 455 |
|
| 456 |
ft_datetime=10; |
| 457 |
|
| 458 |
ft_stringw=11; |
| 459 |
|
| 460 |
// for ContentGetValue |
| 461 |
|
| 462 |
ft_nosuchfield=-1; |
| 463 |
|
| 464 |
ft_fileerror=-2; |
| 465 |
|
| 466 |
ft_fieldempty=-3; |
| 467 |
|
| 468 |
ft_ondemand=-4; |
| 469 |
|
| 470 |
ft_delayed=0; |
| 471 |
|
| 472 |
// for ContentSetValue |
| 473 |
|
| 474 |
ft_setsuccess=0; |
| 475 |
|
| 476 |
setflags_first_attribute=1; {First attribute of this file} |
| 477 |
|
| 478 |
setflags_last_attribute=2; |
| 479 |
|
| 480 |
setflags_only_date=4; |
| 481 |
|
| 482 |
CONTENT_DELAYIFSLOW=1; // ContentGetValue called in foreground |
| 483 |
|
| 484 |
type tContentDefaultParamStruct=record |
| 485 |
|
| 486 |
size, |
| 487 |
|
| 488 |
PluginInterfaceVersionLow, |
| 489 |
|
| 490 |
PluginInterfaceVersionHi:longint; |
| 491 |
|
| 492 |
DefaultIniName:array[0..MAX_PATH-1] of char; |
| 493 |
|
| 494 |
end; |
| 495 |
|
| 496 |
pContentDefaultParamStruct=^tContentDefaultParamStruct; |
| 497 |
|
| 498 |
type tdateformat=record |
| 499 |
|
| 500 |
wYear,wMonth,wDay:word; |
| 501 |
|
| 502 |
end; |
| 503 |
|
| 504 |
pdateformat=^tdateformat; |
| 505 |
|
| 506 |
type ttimeformat=record |
| 507 |
|
| 508 |
wHour,wMinute,wSecond:word; |
| 509 |
|
| 510 |
end; |
| 511 |
|
| 512 |
ptimeformat=^ttimeformat; |
| 513 |
|
| 514 |
{ Function prototypes: } |
| 515 |
|
| 516 |
(* |
| 517 |
|
| 518 |
procedure FsContentGetDetectString(DetectString:pchar;maxlen:integer); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 519 |
|
| 520 |
function FsContentGetSupportedField(FieldIndex:integer;FieldName:pchar; |
| 521 |
|
| 522 |
Units:pchar;maxlen:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 523 |
|
| 524 |
function FsContentGetValue(FileName:pchar;FieldIndex,UnitIndex:integer;FieldValue:pbyte; |
| 525 |
|
| 526 |
maxlen,flags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 527 |
|
| 528 |
function FsContentGetValueW(FileName:pwidechar;FieldIndex,UnitIndex:integer;FieldValue:pbyte; |
| 529 |
|
| 530 |
maxlen,flags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 531 |
|
| 532 |
procedure FsContentSetDefaultParams(dps:pContentDefaultParamStruct); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 533 |
|
| 534 |
procedure FsContentStopGetValue(FileName:pchar); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 535 |
|
| 536 |
procedure FsContentStopGetValueW(FileName:pwidechar); {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 537 |
|
| 538 |
function FsContentGetDefaultSortOrder(FieldIndex:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 539 |
|
| 540 |
function FsContentGetSupportedFieldFlags(FieldIndex:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 541 |
|
| 542 |
function FsContentSetValue(FileName:pchar;FieldIndex,UnitIndex,FieldType:integer; |
| 543 |
|
| 544 |
FieldValue:pbyte;flags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 545 |
|
| 546 |
function FsContentSetValueW(FileName:pwidechar;FieldIndex,UnitIndex,FieldType:integer; |
| 547 |
|
| 548 |
FieldValue:pbyte;flags:integer):integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 549 |
|
| 550 |
function FsContentGetDefaultView(ViewContents,ViewHeaders,ViewWidths, |
| 551 |
|
| 552 |
ViewOptions:pchar;maxlen:integer):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 553 |
|
| 554 |
function FsContentGetDefaultViewW(ViewContents,ViewHeaders,ViewWidths, |
| 555 |
|
| 556 |
ViewOptions:pwidechar;maxlen:integer):bool; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 557 |
|
| 558 |
function FsGetBackgroundFlags:integer; {$IFDEF MSWINDOWS}stdcall{$ELSE}cdecl{$ENDIF}; |
| 559 |
|
| 560 |
*) |
| 561 |
|
| 562 |
implementation |
| 563 |
|
| 564 |
end. |