-
Notifications
You must be signed in to change notification settings - Fork 1
/
fsplugin.pas
202 lines (167 loc) · 5 KB
/
fsplugin.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
unit fsplugin;
interface
uses
Windows;
{ ids for FsGetFile }
const
FS_FILE_OK=0;
FS_FILE_EXISTS=1;
FS_FILE_NOTFOUND=2;
FS_FILE_READERROR=3;
FS_FILE_WRITEERROR=4;
FS_FILE_USERABORT=5;
FS_FILE_NOTSUPPORTED=6;
FS_FILE_EXISTSRESUMEALLOWED=7;
FS_EXEC_OK=0;
FS_EXEC_ERROR=1;
FS_EXEC_YOURSELF=-1;
FS_EXEC_SYMLINK=-2;
FS_COPYFLAGS_OVERWRITE=1;
FS_COPYFLAGS_RESUME=2;
FS_COPYFLAGS_MOVE=4;
FS_COPYFLAGS_EXISTS_SAMECASE=8;
FS_COPYFLAGS_EXISTS_DIFFERENTCASE=16;
{ flags for TRequestProc }
const
RT_Other=0;
RT_UserName=1;
RT_Password=2;
RT_Account=3;
RT_UserNameFirewall=4;
RT_PasswordFirewall=5;
RT_TargetDir=6;
RT_URL=7;
RT_MsgOK=8;
RT_MsgYesNo=9;
RT_MsgOKCancel=10;
{ flags for tLogProc }
const
msgtype_connect=1;
msgtype_disconnect=2;
msgtype_details=3;
msgtype_transfercomplete=4;
msgtype_connectcomplete=5;
msgtype_importanterror=6;
msgtype_operationcomplete=7;
{ flags for FsStatusInfo }
const
FS_STATUS_START=0;
FS_STATUS_END=1;
FS_STATUS_OP_LIST=1;
FS_STATUS_OP_GET_SINGLE=2;
FS_STATUS_OP_GET_MULTI=3;
FS_STATUS_OP_PUT_SINGLE=4;
FS_STATUS_OP_PUT_MULTI=5;
FS_STATUS_OP_RENMOV_SINGLE=6;
FS_STATUS_OP_RENMOV_MULTI=7;
FS_STATUS_OP_DELETE=8;
FS_STATUS_OP_ATTRIB=9;
FS_STATUS_OP_MKDIR=10;
FS_STATUS_OP_EXEC=11;
FS_STATUS_OP_CALCSIZE=12;
FS_STATUS_OP_SEARCH=13;
FS_STATUS_OP_SEARCH_TEXT=14;
FS_STATUS_OP_SYNC_SEARCH=15;
FS_STATUS_OP_SYNC_GET=16;
FS_STATUS_OP_SYNC_PUT=17;
FS_STATUS_OP_SYNC_DELETE=18;
FS_STATUS_OP_GET_MULTI_THREAD=19;
FS_STATUS_OP_PUT_MULTI_THREAD=20;
{Flags for FsExtractCustomIcon}
const
FS_ICONFLAG_SMALL=1;
FS_ICONFLAG_BACKGROUND=2;
FS_ICON_USEDEFAULT=0;
FS_ICON_EXTRACTED=1;
FS_ICON_EXTRACTED_DESTROY=2;
FS_ICON_DELAYED=3;
const
FS_BITMAP_NONE=0;
FS_BITMAP_EXTRACTED=1;
FS_BITMAP_EXTRACT_YOURSELF=2;
FS_BITMAP_EXTRACT_YOURSELF_ANDDELETE=3;
FS_BITMAP_CACHE=256;
{Flags for crypto callback function}
FS_CRYPT_SAVE_PASSWORD=1;
FS_CRYPT_LOAD_PASSWORD=2;
FS_CRYPT_LOAD_PASSWORD_NO_UI=3; {Load password only if master password has already been entered!}
FS_CRYPT_COPY_PASSWORD=4;
FS_CRYPT_MOVE_PASSWORD=5;
FS_CRYPT_DELETE_PASSWORD=6;
FS_CRYPTOPT_MASTERPASS_SET=1; {The user already has a master password defined}
BG_DOWNLOAD=1; { Plugin supports downloads in background }
BG_UPLOAD=2; { Plugin supports uploads in background }
BG_ASK_USER=4; { Plugin requires separate connection for background transfers -> ask user first }
type
TRemoteInfo = record
SizeLow: LongInt;
SizeHigh: LongInt;
LastWriteTime: TFileTime;
Attr: LongInt;
end;
PRemoteInfo = ^TRemoteInfo;
TFsDefaultParamStruct = record
size: LongInt;
PluginInterfaceVersionLow: LongInt;
PluginInterfaceVersionHi: LongInt;
DefaultIniName: array[0..MAX_PATH-1] of Char;
end;
PFsDefaultParamStruct = ^TFsDefaultParamStruct;
{ callback functions }
TProgressProc=function(
PluginNr:integer;SourceName, TargetName:pchar;PercentDone:integer):integer; stdcall;
TProgressProcW=function(PluginNr:integer;SourceName,
TargetName:pwidechar;PercentDone:integer):integer; stdcall;
TLogProc=procedure(PluginNr,MsgType:integer;LogString:pchar); stdcall;
TLogProcW=procedure(PluginNr,MsgType:integer;LogString:pwidechar); stdcall;
TRequestProc=function(PluginNr,RequestType:integer;CustomTitle,CustomText,
ReturnedText:pchar;maxlen:integer):bool; stdcall;
TRequestProcW=function(PluginNr,RequestType:integer;CustomTitle,CustomText,
ReturnedText:pwidechar;maxlen:integer):bool; stdcall;
PCryptProc=^TCryptProc;
TCryptProc=function(PluginNr,CryptoNumber:integer;mode:integer;ConnectionName,
Password:pchar;maxlen:integer):integer; stdcall;PCryptProcW=^TCryptProcW;
TCryptProcW=function(PluginNr,CryptoNumber:integer;mode:integer;ConnectionName,
Password:pwidechar;maxlen:integer):integer; stdcall;
{****************************** content plugin part *****************************}
const ft_nomorefields=0;
ft_numeric_32=1;
ft_numeric_64=2;
ft_numeric_floating=3;
ft_date=4;
ft_time=5;
ft_boolean=6;
ft_multiplechoice=7;
ft_string=8;
ft_fulltext=9;
ft_datetime=10;
ft_stringw=11;
// for ContentGetValue
ft_nosuchfield=-1;
ft_fileerror=-2;
ft_fieldempty=-3;
ft_ondemand=-4;
ft_delayed=0;
// for ContentSetValue
ft_setsuccess=0;
setflags_first_attribute=1; {First attribute of this file}
setflags_last_attribute=2;
setflags_only_date=4;
CONTENT_DELAYIFSLOW=1; // ContentGetValue called in foreground
type tContentDefaultParamStruct=record
size,
PluginInterfaceVersionLow,
PluginInterfaceVersionHi:longint;
DefaultIniName:array[0..MAX_PATH-1] of char;
end;
pContentDefaultParamStruct=^tContentDefaultParamStruct;
type tdateformat=record
wYear,wMonth,wDay:word;
end;
pdateformat=^tdateformat;
type ttimeformat=record
wHour,wMinute,wSecond:word;
end;
ptimeformat=^ttimeformat;
implementation
end.