Repository navigation
Expand file tree
/
Copy pathafpcdev.rez
More file actions
496 lines (438 loc) · 14.2 KB
/
Copy pathafpcdev.rez
File metadata and controls
496 lines (438 loc) · 14.2 KB
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
#include "types.rez"
resource rVersion (1) {
{ 1,0,0,beta,1 },
verUS,
"AFP Mounter",
"By Stephen Heumann"
};
resource rComment (1) {
"The AFP Mounter control panel allows you to connect to "
"file servers using the Apple Filing Protocol (AFP) "
"over either AppleTalk or TCP/IP.\n"
"\n"
"Copyright 2017 Stephen Heumann\n"
"\n"
"This program contains material from the ORCA/C Run-Time Libraries, "
"copyright 1987-1996 by Byte Works, Inc. Used with permission."
};
resource rCDEVFlags (1) {
wantMachine+wantHit+wantClose+wantEvents+wantEdit+wantCreate,
1, /* enabled */
1, /* version */
1, /* min ROM version */
0, /* reserved */
{0, 0, 55, 320}, /* rectangle */
"AFP Mounter", /* name */
"Stephen Heumann", /* author */
"v1.0b1" /* version string */
};
read rCDevCode (0x1,convert,locked) "AFPMounter.obj";
resource rIcon (1) {
0x8000, /* color icon */
20, /* dimensions */
28,
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
$"F00000000FFFFFFFFFFFFFFFFFFF"
$"F0DDDDDD0FFFFFFFFFFFFFFFFFFF"
$"F0DDDDDD04FFFFFFFF4FFFFFFFFF"
$"F0DDDDDD04FFFFFFFF4F0FF000FF"
$"F0DDDDDD444FFFFF0444A0F0DD0F"
$"F0000000444FFFF0E4440A00DD0F"
$"FF0FFFF4F4F4FFF04E404AA0DD0F"
$"F000000404F4FFF04E404A00DD0F"
$"F0F4FF4F04FF4F04004004000000"
$"F000040004FFF44303433343330F"
$"4444444444444444444444444444"
$"3333333334333333334333333333"
$"4444444444444444444444444444"
$"FFFFFFFFF4FFFFFFFF4FFFFFFFFF"
$"FFFFFFFFF4FFFFFFFF4FFFFFFFFF"
$"FFFFFFFFF4FFFFFFFF4FFFFFFFFF"
$"FFFFFFFFF4FFFFFFFF4FFFFFFFFF",
$"0000000000000000000000000000"
$"0000000000000000000000000000"
$"0000000000000000000000000000"
$"0FFFFFFFF0000000000000000000"
$"0FFFFFFFF0000000000000000000"
$"0FFFFFFFFF00000000F000000000"
$"0FFFFFFFFF00000000F0F00FFF00"
$"0FFFFFFFFFF00000FFFFFF0FFFF0"
$"0FFFFFFFFFF0000FFFFFFFFFFFF0"
$"00FFFFFF0F0F000FFFFFFFFFFFF0"
$"0FFFFFFFFF0F000FFFFFFFFFFFF0"
$"0FFFFFFFFF00F0FFFFFFFFFFFFFF"
$"0FFFFFFFFF000FFFFFFFFFFFFFF0"
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
$"000000000F00000000F000000000"
$"000000000F00000000F000000000"
$"000000000F00000000F000000000"
$"000000000F00000000F000000000"
};
#define cdevWindow 1000
#define helpWindow 2000
#define serverAddressTxt 2
#define urlLine 3
#define saveAliasBtn 4
#define connectBtn 1
#define optionsPopUp 6
#define trianglePic 7
#define helpTxt 5
#define saveFilePrompt 100
#define optionsMenu 300
#define afpOverTCPOptionsItem 301
#define useLargeReadsItem 302
#define forceAFP22Item 303
#define fakeSleepItem 304
#define useLargeWritesItem 305
#define ignoreErrorsSettingFileTypesItem 306
/*
* Controls in the control panel window (for 640 mode or 320 mode)
*/
resource rControlList (640) {
{
cdevWindow+serverAddressTxt,
cdevWindow+urlLine,
cdevWindow+saveAliasBtn,
cdevWindow+connectBtn,
cdevWindow+trianglePic,
cdevWindow+optionsPopUp
};
};
resource rControlList (320) {
{
cdevWindow+serverAddressTxt,
cdevWindow+urlLine,
cdevWindow+saveAliasBtn,
cdevWindow+connectBtn,
cdevWindow+trianglePic+320,
cdevWindow+optionsPopUp+320
};
};
resource rControlTemplate (cdevWindow+serverAddressTxt) {
serverAddressTxt, /* control ID */
{4, 10, 15, 270}, /* control rect */
statTextControl {{
fBlastText, /* flags */
$1000+RefIsResource, /* moreFlags */
0, /* refCon */
cdevWindow+serverAddressTxt /* title ref */
}};
};
resource rTextForLETextBox2 (cdevWindow+serverAddressTxt) {
"AFP Server Address:"
};
resource rControlTemplate (cdevWindow+urlLine) {
urlLine,
{15, 10, 28, 310},
editLineControl {{
0,
$7000+RefIsResource,
0,
255, /* max size */
cdevWindow+urlLine /* text ref */
}};
};
resource rPString (cdevWindow+urlLine) { "afp://" };
resource rControlTemplate (cdevWindow+saveAliasBtn) {
saveAliasBtn,
{35, 10, 0, 0},
SimpleButtonControl {{
NormalButton,
$1000+RefIsResource,
0,
cdevWindow+saveAliasBtn
}};
};
resource rPString(cdevWindow+saveAliasBtn) { "Save Alias..." };
resource rControlTemplate (cdevWindow+connectBtn) {
connectBtn,
{35, 220, 0, 0},
SimpleButtonControl {{
DefaultButton,
$3000+RefIsResource,
0,
cdevWindow+connectBtn,
0, /* color table ref */
{"\$0D","\$0D",0,0} /* key equivalent = Return */
}};
};
resource rPString(cdevWindow+connectBtn) { "Connect" };
/* Options menu pop-up -- separate versions for 640 mode and 320 mode */
resource rControlTemplate (cdevWindow+optionsPopUp) {
optionsPopUp,
{5, 282, 13, 310 },
PopUpControl {{
fDontDrawTitle+fDontDrawResult,
fCtlProcNotPtr+RefIsResource/*+fDrawPopDownIcon*/,
0,
0,
optionsMenu, /* menu ref */
afpOverTCPOptionsItem, /* initial value */
0
}};
};
resource rControlTemplate (cdevWindow+optionsPopUp+ 320) {
optionsPopUp,
{5, 296, 13, 310 },
PopUpControl {{
fDontDrawTitle+fDontDrawResult,
fCtlProcNotPtr+RefIsResource/*+fDrawPopDownIcon*/,
0,
0,
optionsMenu, /* menu ref */
afpOverTCPOptionsItem, /* initial value */
0
}};
};
/* Triangle to draw on options pop-up */
resource rControlTemplate (cdevWindow+trianglePic) {
trianglePic,
{7, 286, 11, 302},
PictureControl {{
CtlInactive,
fCtlProcNotPtr+RefIsResource,
0,
trianglePic /* picture reference */
}};
};
resource rControlTemplate (cdevWindow+trianglePic+320) {
trianglePic,
{7, 298, 0, 0},
PictureControl {{
CtlInactive,
fCtlProcNotPtr+RefIsResource,
0,
trianglePic /* picture reference */
}};
};
data rPicture (trianglePic) {
$"8000 0000 0000 0400 1000 1182 0100 0A00"
$"01C0 01C0 FF3F FF3F 9000 8000 0000 0400"
$"0000 0000 0400 1000 0000 0000 0400 1000"
$"0000 0000 0400 1000 0000 0000 0000 F000"
$"000F FF00 00FF FFF0 0FFF"
};
resource rMenu (optionsMenu) {
optionsMenu, /* menu ID */
refIsResource*menuTitleRefShift + refIsResource*itemRefShift,
optionsMenu, /* menu title ref (not drawn) */
{
afpOverTCPOptionsItem,
useLargeReadsItem,
useLargeWritesItem,
forceAFP22Item,
fakeSleepItem,
ignoreErrorsSettingFileTypesItem
};
};
resource rPString(optionsMenu,noCrossBank) { "" };
resource rMenuItem (afpOverTCPOptionsItem) {
afpOverTCPOptionsItem, /* menu item ID */
"","",
0,
fDisabled+refIsResource*itemTitleRefShift,
afpOverTCPOptionsItem /* menu item title ref */
};
resource rPString(afpOverTCPOptionsItem,noCrossBank) { "AFP Over TCP Options:" };
resource rMenuItem (useLargeReadsItem) {
useLargeReadsItem, /* menu item ID */
"","",
$12,
refIsResource*itemTitleRefShift,
useLargeReadsItem /* menu item title ref */
};
resource rPString(useLargeReadsItem,noCrossBank) { "Use Large Reads" };
resource rMenuItem (useLargeWritesItem) {
useLargeWritesItem, /* menu item ID */
"","",
0,
refIsResource*itemTitleRefShift,
useLargeWritesItem /* menu item title ref */
};
resource rPString(useLargeWritesItem,noCrossBank) { "Use Large Writes" };
resource rMenuItem (forceAFP22Item) {
forceAFP22Item, /* menu item ID */
"","",
0,
refIsResource*itemTitleRefShift,
forceAFP22Item /* menu item title ref */
};
resource rPString(forceAFP22Item,noCrossBank) { "Force AFP Version 2.2" };
resource rMenuItem (fakeSleepItem) {
fakeSleepItem, /* menu item ID */
"","",
0,
refIsResource*itemTitleRefShift,
fakeSleepItem /* menu item title ref */
};
resource rPString(fakeSleepItem,noCrossBank) { "Fake Sleep to Keep Alive" };
resource rMenuItem (ignoreErrorsSettingFileTypesItem) {
ignoreErrorsSettingFileTypesItem, /* menu item ID */
"","",
0,
refIsResource*itemTitleRefShift,
ignoreErrorsSettingFileTypesItem /* menu item title ref */
};
resource rPString(ignoreErrorsSettingFileTypesItem,noCrossBank) {
"Ignore Errors Setting File Types"
};
/*
* Controls in the help window
*/
resource rControlList (2) {
{
helpWindow+helpTxt
};
};
resource rControlTemplate (helpWindow+helpTxt) {
helpTxt,
{38, 5, 138, 280},
statTextControl {{
0, /* flags */
$1000+RefIsResource, /* moreFlags */
0, /* refCon */
helpWindow+helpTxt /* title ref */
}};
};
resource rTextForLETextBox2 (helpWindow+helpTxt) {
"The AFP Mounter control panel allows you to connect to "
"file servers using the Apple Filing Protocol (AFP) "
"over either AppleTalk or TCP/IP networks. "
"The server address can be specified by URLs "
"of the following forms:\n\$01X\$03\$00"
"afp://[user:password@]server[:port]/\n\$01X\$00\$00"
"volume (to connect using TCP/IP)\n\$01X\$03\$00"
"afp:/at/[user:password@]server:zone/\n\$01X\$00\$00"
"volume (to connect using AppleTalk)\n"
};
resource rPString(saveFilePrompt) { "Save server alias as:" };
/*
* Error messages
*/
#define fstMissingError 3000
#define noEasyMountError 3001
#define tempFileError 3002
#define aliasFileError 3003
#define tempFileNameError 3004
#define saveAliasError 3005
#define noAFPBridgeError 3006
#define noAFPBridgeWarning 3007
#define protoInvalidError 4000
#define noServerOrVolumeNameError 4001
#define serverNameTooLongError 4002
#define volumeNameTooLongError 4003
#define zoneTooLongError 4004
#define usernameTooLongError 4005
#define passwordTooLongError 4006
#define volpassTooLongError 4007
#define passwordWithoutUserError 4008
#define badUAMError 4009
resource rAlertString (fstMissingError) {
"72:"
"To use the AFP Mounter control panel, the AppleShare FST "
"and the AppleTalk-related system components it requires "
"must be installed and enabled."
":^#0\$00"
};
resource rAlertString (noEasyMountError) {
"72:"
"Communication with EasyMount failed.\n"
"\n"
"To use the AFP Mounter control panel, EasyMount must be "
"installed and enabled."
":^#0\$00"
};
resource rAlertString (protoInvalidError) {
"32:"
"The specified address is not a valid AFP URL."
":^#0\$00"
};
resource rAlertString (noServerOrVolumeNameError) {
"32:"
"Please specify at least a server and volume name in the AFP URL."
":^#0\$00"
};
resource rAlertString (serverNameTooLongError) {
"32:"
"The server name is too long (maximum 32 characters)."
":^#0\$00"
};
resource rAlertString (volumeNameTooLongError) {
"32:"
"The volume name is too long (maximum 27 characters)."
":^#0\$00"
};
resource rAlertString (zoneTooLongError) {
"32:"
"The zone name is too long (maximum 32 characters)."
":^#0\$00"
};
resource rAlertString (usernameTooLongError) {
"32:"
"The username is too long (maximum 31 characters)."
":^#0\$00"
};
resource rAlertString (passwordTooLongError) {
"32:"
"The password is too long (maximum 8 characters)."
":^#0\$00"
};
resource rAlertString (volpassTooLongError) {
"32:"
"The volume password is too long (maximum 8 characters)."
":^#0\$00"
};
resource rAlertString (passwordWithoutUserError) {
"42:"
"When a password is specified, a user name must also be given."
":^#0\$00"
};
resource rAlertString (badUAMError) {
"62:"
"The requested user authentication method is not supported "
"or cannot be used with the specified URL."
":^#0\$00"
};
resource rAlertString (tempFileError) {
"82:"
"There was an error writing the temporary file used by the "
"AFPMounter control panel. Please make sure the directory "
"containing the AFPMounter control panel is writable and "
"remove the AFPMounter.Temp file if it is present."
":^#0\$00"
};
resource rAlertString (aliasFileError) {
"32:"
"There was an error writing the alias file."
":^#0\$00"
};
resource rAlertString (tempFileNameError) {
"72:"
"There was an error while constructing the name for the "
"temporary file used by the AFPMounter control panel."
":^#0\$00"
};
resource rAlertString (saveAliasError) {
"42:"
"There was an error while attempting to save the alias file."
":^#0\$00"
};
resource rAlertString (noAFPBridgeError) {
"62:"
"To connect to AFP servers over TCP, AFPBridge and Marinetti "
"must be installed and enabled. Please install them and then "
"restart your system."
":^#0\$00"
};
resource rAlertString (noAFPBridgeWarning) {
"74:"
"To connect to AFP servers over TCP, AFPBridge and Marinetti "
"must be installed and enabled. You can continue to save an "
"alias now, but to connect to the server you will need to "
"install them and then restart your system."
":#1:^#6\$00"
};