FileTransfers.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:26k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       FileTransfers.h
  3.  
  4.      Contains:   CommToolbox File Transfer Manager Interfaces.
  5.  
  6.      Version:    Technology: System 7.5
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1988-2001 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __FILETRANSFERS__
  18. #define __FILETRANSFERS__
  19. #ifndef __CONDITIONALMACROS__
  20. #include "ConditionalMacros.h"
  21. #endif
  22. #ifndef __STANDARDFILE__
  23. #include "StandardFile.h"
  24. #endif
  25. #ifndef __CTBUTILITIES__
  26. #include "CTBUtilities.h"
  27. #endif
  28. #ifndef __CONNECTIONS__
  29. #include "Connections.h"
  30. #endif
  31. #ifndef __FILES__
  32. #include "Files.h"
  33. #endif
  34. #ifndef __TERMINALS__
  35. #include "Terminals.h"
  36. #endif
  37. #if PRAGMA_ONCE
  38. #pragma once
  39. #endif
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43. #if PRAGMA_IMPORT
  44. #pragma import on
  45. #endif
  46. #if PRAGMA_STRUCT_ALIGN
  47.     #pragma options align=mac68k
  48. #elif PRAGMA_STRUCT_PACKPUSH
  49.     #pragma pack(push, 2)
  50. #elif PRAGMA_STRUCT_PACK
  51.     #pragma pack(2)
  52. #endif
  53. #if CALL_NOT_IN_CARBON
  54. enum {
  55.     curFTVersion                = 2                             /* current file transfer manager version*/
  56. };
  57. enum {
  58.                                                                 /* FTErr    */
  59.     ftGenericError              = -1,
  60.     ftNoErr                     = 0,
  61.     ftRejected                  = 1,
  62.     ftFailed                    = 2,
  63.     ftTimeOut                   = 3,
  64.     ftTooManyRetry              = 4,
  65.     ftNotEnoughDSpace           = 5,
  66.     ftRemoteCancel              = 6,
  67.     ftWrongFormat               = 7,
  68.     ftNoTools                   = 8,
  69.     ftUserCancel                = 9,
  70.     ftNotSupported              = 10
  71. };
  72. typedef OSErr                           FTErr;
  73. enum {
  74.     ftIsFTMode                  = 1 << 0,
  75.     ftNoMenus                   = 1 << 1,
  76.     ftQuiet                     = 1 << 2,
  77.     ftConfigChanged             = 1 << 4,
  78.     ftSucc                      = 1 << 7
  79. };
  80. typedef unsigned long                   FTFlags;
  81. enum {
  82.     ftSameCircuit               = 1 << 0,
  83.     ftSendDisable               = 1 << 1,
  84.     ftReceiveDisable            = 1 << 2,
  85.     ftTextOnly                  = 1 << 3,
  86.     ftNoStdFile                 = 1 << 4,
  87.     ftMultipleFileSend          = 1 << 5
  88. };
  89. typedef unsigned short                  FTAttributes;
  90. enum {
  91.     ftReceiving                 = 0,
  92.     ftTransmitting              = 1,
  93.     ftFullDuplex                = 2                             /* (16) added ftFullDuplex bit.*/
  94. };
  95. typedef unsigned short                  FTDirection;
  96. typedef CALLBACK_API( long , FileTransferDefProcPtr )(TermHandle hTerm, short msg, long p1, long p2, long p3);
  97. /*  application routines type definitions */
  98. typedef struct FTRecord                 FTRecord;
  99. typedef FTRecord *                      FTPtr;
  100. typedef FTPtr *                         FTHandle;
  101. typedef CALLBACK_API( OSErr , FileTransferReadProcPtr )(unsigned long *count, Ptr pData, long refCon, short fileMsg);
  102. typedef CALLBACK_API( OSErr , FileTransferWriteProcPtr )(unsigned long *count, Ptr pData, long refCon, short fileMsg);
  103. typedef CALLBACK_API( Size , FileTransferSendProcPtr )(Ptr thePtr, long theSize, long refCon, CMChannel channel, CMFlags flag);
  104. typedef CALLBACK_API( Size , FileTransferReceiveProcPtr )(Ptr thePtr, long theSize, long refCon, CMChannel channel, CMFlags *flag);
  105. typedef CALLBACK_API( OSErr , FileTransferEnvironsProcPtr )(long refCon, ConnEnvironRec *theEnvirons);
  106. typedef CALLBACK_API( void , FileTransferNotificationProcPtr )(FTHandle hFT, const FSSpec *pFSSpec);
  107. typedef CALLBACK_API( void , FileTransferChooseIdleProcPtr )(void );
  108. typedef STACK_UPP_TYPE(FileTransferDefProcPtr)                  FileTransferDefUPP;
  109. typedef STACK_UPP_TYPE(FileTransferReadProcPtr)                 FileTransferReadUPP;
  110. typedef STACK_UPP_TYPE(FileTransferWriteProcPtr)                FileTransferWriteUPP;
  111. typedef STACK_UPP_TYPE(FileTransferSendProcPtr)                 FileTransferSendUPP;
  112. typedef STACK_UPP_TYPE(FileTransferReceiveProcPtr)              FileTransferReceiveUPP;
  113. typedef STACK_UPP_TYPE(FileTransferEnvironsProcPtr)             FileTransferEnvironsUPP;
  114. typedef STACK_UPP_TYPE(FileTransferNotificationProcPtr)         FileTransferNotificationUPP;
  115. typedef STACK_UPP_TYPE(FileTransferChooseIdleProcPtr)           FileTransferChooseIdleUPP;
  116. struct FTRecord {
  117.     short                           procID;
  118.     FTFlags                         flags;
  119.     FTErr                           errCode;
  120.     long                            refCon;
  121.     long                            userData;
  122.     FileTransferDefUPP              defProc;
  123.     Ptr                             config;
  124.     Ptr                             oldConfig;
  125.     FileTransferEnvironsUPP         environsProc;
  126.     long                            reserved1;
  127.     long                            reserved2;
  128.     Ptr                             ftPrivate;
  129.     FileTransferSendUPP             sendProc;
  130.     FileTransferReceiveUPP          recvProc;
  131.     FileTransferWriteUPP            writeProc;
  132.     FileTransferReadUPP             readProc;
  133.     WindowPtr                       owner;
  134.     FTDirection                     direction;
  135.     SFReply                         theReply;
  136.     long                            writePtr;
  137.     long                            readPtr;
  138.     Ptr                             theBuf;
  139.     long                            bufSize;
  140.     Str255                          autoRec;
  141.     FTAttributes                    attributes;
  142. };
  143. typedef unsigned short                  FTCompletionKind;
  144. enum {
  145.                                                                 /* FTReadProc messages */
  146.     ftReadOpenFile              = 0,                            /* count = forkFlags, buffer = pblock from PBGetFInfo */
  147.     ftReadDataFork              = 1,
  148.     ftReadRsrcFork              = 2,
  149.     ftReadAbort                 = 3,
  150.     ftReadComplete              = 4,
  151.     ftReadSetFPos               = 6,                            /* count = forkFlags, buffer = pBlock same as PBSetFPos */
  152.     ftReadGetFPos               = 7                             /* count = forkFlags, buffer = pBlock same as PBGetFPos */
  153. };
  154. enum {
  155.                                                                 /* FTWriteProc messages */
  156.     ftWriteOpenFile             = 0,                            /* count = forkFlags, buffer = pblock from PBGetFInfo */
  157.     ftWriteDataFork             = 1,
  158.     ftWriteRsrcFork             = 2,
  159.     ftWriteAbort                = 3,
  160.     ftWriteComplete             = 4,
  161.     ftWriteFileInfo             = 5,
  162.     ftWriteSetFPos              = 6,                            /* count = forkFlags, buffer = pBlock same as PBSetFPos */
  163.     ftWriteGetFPos              = 7                             /* count = forkFlags, buffer = pBlock same as PBGetFPos */
  164. };
  165. enum {
  166.                                                                 /*    fork flags */
  167.     ftOpenDataFork              = 1,
  168.     ftOpenRsrcFork              = 2
  169. };
  170. #if OPAQUE_UPP_TYPES
  171. #if CALL_NOT_IN_CARBON
  172.     EXTERN_API(FileTransferDefUPP)
  173.     NewFileTransferDefUPP          (FileTransferDefProcPtr  userRoutine);
  174.     EXTERN_API(FileTransferReadUPP)
  175.     NewFileTransferReadUPP         (FileTransferReadProcPtr userRoutine);
  176.     EXTERN_API(FileTransferWriteUPP)
  177.     NewFileTransferWriteUPP        (FileTransferWriteProcPtr userRoutine);
  178.     EXTERN_API(FileTransferSendUPP)
  179.     NewFileTransferSendUPP         (FileTransferSendProcPtr userRoutine);
  180.     EXTERN_API(FileTransferReceiveUPP)
  181.     NewFileTransferReceiveUPP      (FileTransferReceiveProcPtr userRoutine);
  182.     EXTERN_API(FileTransferEnvironsUPP)
  183.     NewFileTransferEnvironsUPP     (FileTransferEnvironsProcPtr userRoutine);
  184.     EXTERN_API(FileTransferNotificationUPP)
  185.     NewFileTransferNotificationUPP    (FileTransferNotificationProcPtr userRoutine);
  186.     EXTERN_API(FileTransferChooseIdleUPP)
  187.     NewFileTransferChooseIdleUPP    (FileTransferChooseIdleProcPtr userRoutine);
  188.     EXTERN_API(void)
  189.     DisposeFileTransferDefUPP      (FileTransferDefUPP      userUPP);
  190.     EXTERN_API(void)
  191.     DisposeFileTransferReadUPP     (FileTransferReadUPP     userUPP);
  192.     EXTERN_API(void)
  193.     DisposeFileTransferWriteUPP    (FileTransferWriteUPP    userUPP);
  194.     EXTERN_API(void)
  195.     DisposeFileTransferSendUPP     (FileTransferSendUPP     userUPP);
  196.     EXTERN_API(void)
  197.     DisposeFileTransferReceiveUPP    (FileTransferReceiveUPP userUPP);
  198.     EXTERN_API(void)
  199.     DisposeFileTransferEnvironsUPP    (FileTransferEnvironsUPP userUPP);
  200.     EXTERN_API(void)
  201.     DisposeFileTransferNotificationUPP    (FileTransferNotificationUPP userUPP);
  202.     EXTERN_API(void)
  203.     DisposeFileTransferChooseIdleUPP    (FileTransferChooseIdleUPP userUPP);
  204.     EXTERN_API(long)
  205.     InvokeFileTransferDefUPP       (TermHandle              hTerm,
  206.                                     short                   msg,
  207.                                     long                    p1,
  208.                                     long                    p2,
  209.                                     long                    p3,
  210.                                     FileTransferDefUPP      userUPP);
  211.     EXTERN_API(OSErr)
  212.     InvokeFileTransferReadUPP      (unsigned long *         count,
  213.                                     Ptr                     pData,
  214.                                     long                    refCon,
  215.                                     short                   fileMsg,
  216.                                     FileTransferReadUPP     userUPP);
  217.     EXTERN_API(OSErr)
  218.     InvokeFileTransferWriteUPP     (unsigned long *         count,
  219.                                     Ptr                     pData,
  220.                                     long                    refCon,
  221.                                     short                   fileMsg,
  222.                                     FileTransferWriteUPP    userUPP);
  223.     EXTERN_API(Size)
  224.     InvokeFileTransferSendUPP      (Ptr                     thePtr,
  225.                                     long                    theSize,
  226.                                     long                    refCon,
  227.                                     CMChannel               channel,
  228.                                     CMFlags                 flag,
  229.                                     FileTransferSendUPP     userUPP);
  230.     EXTERN_API(Size)
  231.     InvokeFileTransferReceiveUPP    (Ptr                    thePtr,
  232.                                     long                    theSize,
  233.                                     long                    refCon,
  234.                                     CMChannel               channel,
  235.                                     CMFlags *               flag,
  236.                                     FileTransferReceiveUPP  userUPP);
  237.     EXTERN_API(OSErr)
  238.     InvokeFileTransferEnvironsUPP    (long                  refCon,
  239.                                     ConnEnvironRec *        theEnvirons,
  240.                                     FileTransferEnvironsUPP userUPP);
  241.     EXTERN_API(void)
  242.     InvokeFileTransferNotificationUPP    (FTHandle          hFT,
  243.                                     const FSSpec *          pFSSpec,
  244.                                     FileTransferNotificationUPP userUPP);
  245.     EXTERN_API(void)
  246.     InvokeFileTransferChooseIdleUPP    (FileTransferChooseIdleUPP userUPP);
  247. #endif  /* CALL_NOT_IN_CARBON */
  248. #else
  249.     enum { uppFileTransferDefProcInfo = 0x0000FEF0 };               /* pascal 4_bytes Func(4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes) */
  250.     enum { uppFileTransferReadProcInfo = 0x00002FE0 };              /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes) */
  251.     enum { uppFileTransferWriteProcInfo = 0x00002FE0 };             /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes) */
  252.     enum { uppFileTransferSendProcInfo = 0x0000AFF0 };              /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 2_bytes) */
  253.     enum { uppFileTransferReceiveProcInfo = 0x0000EFF0 };           /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes) */
  254.     enum { uppFileTransferEnvironsProcInfo = 0x000003E0 };          /* pascal 2_bytes Func(4_bytes, 4_bytes) */
  255.     enum { uppFileTransferNotificationProcInfo = 0x000003C0 };      /* pascal no_return_value Func(4_bytes, 4_bytes) */
  256.     enum { uppFileTransferChooseIdleProcInfo = 0x00000000 };        /* pascal no_return_value Func() */
  257.     #define NewFileTransferDefUPP(userRoutine)                      (FileTransferDefUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileTransferDefProcInfo, GetCurrentArchitecture())
  258.     #define NewFileTransferReadUPP(userRoutine)                     (FileTransferReadUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileTransferReadProcInfo, GetCurrentArchitecture())
  259.     #define NewFileTransferWriteUPP(userRoutine)                    (FileTransferWriteUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileTransferWriteProcInfo, GetCurrentArchitecture())
  260.     #define NewFileTransferSendUPP(userRoutine)                     (FileTransferSendUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileTransferSendProcInfo, GetCurrentArchitecture())
  261.     #define NewFileTransferReceiveUPP(userRoutine)                  (FileTransferReceiveUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileTransferReceiveProcInfo, GetCurrentArchitecture())
  262.     #define NewFileTransferEnvironsUPP(userRoutine)                 (FileTransferEnvironsUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileTransferEnvironsProcInfo, GetCurrentArchitecture())
  263.     #define NewFileTransferNotificationUPP(userRoutine)             (FileTransferNotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileTransferNotificationProcInfo, GetCurrentArchitecture())
  264.     #define NewFileTransferChooseIdleUPP(userRoutine)               (FileTransferChooseIdleUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFileTransferChooseIdleProcInfo, GetCurrentArchitecture())
  265.     #define DisposeFileTransferDefUPP(userUPP)                      DisposeRoutineDescriptor(userUPP)
  266.     #define DisposeFileTransferReadUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  267.     #define DisposeFileTransferWriteUPP(userUPP)                    DisposeRoutineDescriptor(userUPP)
  268.     #define DisposeFileTransferSendUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  269.     #define DisposeFileTransferReceiveUPP(userUPP)                  DisposeRoutineDescriptor(userUPP)
  270.     #define DisposeFileTransferEnvironsUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  271.     #define DisposeFileTransferNotificationUPP(userUPP)             DisposeRoutineDescriptor(userUPP)
  272.     #define DisposeFileTransferChooseIdleUPP(userUPP)               DisposeRoutineDescriptor(userUPP)
  273.     #define InvokeFileTransferDefUPP(hTerm, msg, p1, p2, p3, userUPP)  (long)CALL_FIVE_PARAMETER_UPP((userUPP), uppFileTransferDefProcInfo, (hTerm), (msg), (p1), (p2), (p3))
  274.     #define InvokeFileTransferReadUPP(count, pData, refCon, fileMsg, userUPP)  (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppFileTransferReadProcInfo, (count), (pData), (refCon), (fileMsg))
  275.     #define InvokeFileTransferWriteUPP(count, pData, refCon, fileMsg, userUPP)  (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppFileTransferWriteProcInfo, (count), (pData), (refCon), (fileMsg))
  276.     #define InvokeFileTransferSendUPP(thePtr, theSize, refCon, channel, flag, userUPP)  (Size)CALL_FIVE_PARAMETER_UPP((userUPP), uppFileTransferSendProcInfo, (thePtr), (theSize), (refCon), (channel), (flag))
  277.     #define InvokeFileTransferReceiveUPP(thePtr, theSize, refCon, channel, flag, userUPP)  (Size)CALL_FIVE_PARAMETER_UPP((userUPP), uppFileTransferReceiveProcInfo, (thePtr), (theSize), (refCon), (channel), (flag))
  278.     #define InvokeFileTransferEnvironsUPP(refCon, theEnvirons, userUPP)  (OSErr)CALL_TWO_PARAMETER_UPP((userUPP), uppFileTransferEnvironsProcInfo, (refCon), (theEnvirons))
  279.     #define InvokeFileTransferNotificationUPP(hFT, pFSSpec, userUPP)  CALL_TWO_PARAMETER_UPP((userUPP), uppFileTransferNotificationProcInfo, (hFT), (pFSSpec))
  280.     #define InvokeFileTransferChooseIdleUPP(userUPP)                CALL_ZERO_PARAMETER_UPP((userUPP), uppFileTransferChooseIdleProcInfo)
  281. #endif
  282. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  283. #define NewFileTransferDefProc(userRoutine)                     NewFileTransferDefUPP(userRoutine)
  284. #define NewFileTransferReadProc(userRoutine)                    NewFileTransferReadUPP(userRoutine)
  285. #define NewFileTransferWriteProc(userRoutine)                   NewFileTransferWriteUPP(userRoutine)
  286. #define NewFileTransferSendProc(userRoutine)                    NewFileTransferSendUPP(userRoutine)
  287. #define NewFileTransferReceiveProc(userRoutine)                 NewFileTransferReceiveUPP(userRoutine)
  288. #define NewFileTransferEnvironsProc(userRoutine)                NewFileTransferEnvironsUPP(userRoutine)
  289. #define NewFileTransferNotificationProc(userRoutine)            NewFileTransferNotificationUPP(userRoutine)
  290. #define NewFileTransferChooseIdleProc(userRoutine)              NewFileTransferChooseIdleUPP(userRoutine)
  291. #define CallFileTransferDefProc(userRoutine, hTerm, msg, p1, p2, p3) InvokeFileTransferDefUPP(hTerm, msg, p1, p2, p3, userRoutine)
  292. #define CallFileTransferReadProc(userRoutine, count, pData, refCon, fileMsg) InvokeFileTransferReadUPP(count, pData, refCon, fileMsg, userRoutine)
  293. #define CallFileTransferWriteProc(userRoutine, count, pData, refCon, fileMsg) InvokeFileTransferWriteUPP(count, pData, refCon, fileMsg, userRoutine)
  294. #define CallFileTransferSendProc(userRoutine, thePtr, theSize, refCon, channel, flag) InvokeFileTransferSendUPP(thePtr, theSize, refCon, channel, flag, userRoutine)
  295. #define CallFileTransferReceiveProc(userRoutine, thePtr, theSize, refCon, channel, flag) InvokeFileTransferReceiveUPP(thePtr, theSize, refCon, channel, flag, userRoutine)
  296. #define CallFileTransferEnvironsProc(userRoutine, refCon, theEnvirons) InvokeFileTransferEnvironsUPP(refCon, theEnvirons, userRoutine)
  297. #define CallFileTransferNotificationProc(userRoutine, hFT, pFSSpec) InvokeFileTransferNotificationUPP(hFT, pFSSpec, userRoutine)
  298. #define CallFileTransferChooseIdleProc(userRoutine)             InvokeFileTransferChooseIdleUPP(userRoutine)
  299. #if CALL_NOT_IN_CARBON
  300. EXTERN_API( FTErr )
  301. InitFT                          (void);
  302. EXTERN_API( Handle )
  303. FTGetVersion                    (FTHandle               hFT);
  304. EXTERN_API( short )
  305. FTGetFTVersion                  (void);
  306. EXTERN_API( FTHandle )
  307. FTNew                           (short                  procID,
  308.                                  FTFlags                flags,
  309.                                  FileTransferSendUPP    sendProc,
  310.                                  FileTransferReceiveUPP  recvProc,
  311.                                  FileTransferReadUPP    readProc,
  312.                                  FileTransferWriteUPP   writeProc,
  313.                                  FileTransferEnvironsUPP  environsProc,
  314.                                  WindowPtr              owner,
  315.                                  long                   refCon,
  316.                                  long                   userData);
  317. EXTERN_API( void )
  318. FTDispose                       (FTHandle               hFT);
  319. EXTERN_API( FTErr )
  320. FTStart                         (FTHandle               hFT,
  321.                                  FTDirection            direction,
  322.                                  const SFReply *        fileInfo);
  323. EXTERN_API( FTErr )
  324. FTAbort                         (FTHandle               hFT);
  325. EXTERN_API( FTErr )
  326. FTSend                          (FTHandle               hFT,
  327.                                  short                  numFiles,
  328.                                  FSSpecArrayPtr         pFSSpec,
  329.                                  FileTransferNotificationUPP  notifyProc);
  330. EXTERN_API( FTErr )
  331. FTReceive                       (FTHandle               hFT,
  332.                                  FSSpecPtr              pFSSpec,
  333.                                  FileTransferNotificationUPP  notifyProc);
  334. EXTERN_API( void )
  335. FTExec                          (FTHandle               hFT);
  336. EXTERN_API( void )
  337. FTActivate                      (FTHandle               hFT,
  338.                                  Boolean                activate);
  339. EXTERN_API( void )
  340. FTResume                        (FTHandle               hFT,
  341.                                  Boolean                resume);
  342. EXTERN_API( Boolean )
  343. FTMenu                          (FTHandle               hFT,
  344.                                  short                  menuID,
  345.                                  short                  item);
  346. EXTERN_API( short )
  347. FTChoose                        (FTHandle *             hFT,
  348.                                  Point                  where,
  349.                                  FileTransferChooseIdleUPP  idleProc);
  350. EXTERN_API( void )
  351. FTEvent                         (FTHandle               hFT,
  352.                                  const EventRecord *    theEvent);
  353. EXTERN_API( Boolean )
  354. FTValidate                      (FTHandle               hFT);
  355. EXTERN_API( void )
  356. FTDefault                       (Ptr *                  theConfig,
  357.                                  short                  procID,
  358.                                  Boolean                allocate);
  359. EXTERN_API( Handle )
  360. FTSetupPreflight                (short                  procID,
  361.                                  long *                 magicCookie);
  362. EXTERN_API( void )
  363. FTSetupSetup                    (short                  procID,
  364.                                  const void *           theConfig,
  365.                                  short                  count,
  366.                                  DialogPtr              theDialog,
  367.                                  long *                 magicCookie);
  368. EXTERN_API( Boolean )
  369. FTSetupFilter                   (short                  procID,
  370.                                  const void *           theConfig,
  371.                                  short                  count,
  372.                                  DialogPtr              theDialog,
  373.                                  EventRecord *          theEvent,
  374.                                  short *                theItem,
  375.                                  long *                 magicCookie);
  376. EXTERN_API( void )
  377. FTSetupItem                     (short                  procID,
  378.                                  const void *           theConfig,
  379.                                  short                  count,
  380.                                  DialogPtr              theDialog,
  381.                                  short *                theItem,
  382.                                  long *                 magicCookie);
  383. EXTERN_API( void )
  384. FTSetupXCleanup                 (short                  procID,
  385.                                  const void *           theConfig,
  386.                                  short                  count,
  387.                                  DialogPtr              theDialog,
  388.                                  Boolean                OKed,
  389.                                  long *                 magicCookie);
  390. EXTERN_API( void )
  391. FTSetupPostflight               (short                  procID);
  392. EXTERN_API( Ptr )
  393. FTGetConfig                     (FTHandle               hFT);
  394. EXTERN_API( short )
  395. FTSetConfig                     (FTHandle               hFT,
  396.                                  const void *           thePtr);
  397. EXTERN_API( FTErr )
  398. FTIntlToEnglish                 (FTHandle               hFT,
  399.                                  const void *           inputPtr,
  400.                                  Ptr *                  outputPtr,
  401.                                  short                  language);
  402. EXTERN_API( FTErr )
  403. FTEnglishToIntl                 (FTHandle               hFT,
  404.                                  const void *           inputPtr,
  405.                                  Ptr *                  outputPtr,
  406.                                  short                  language);
  407. EXTERN_API( void )
  408. FTGetToolName                   (short                  procID,
  409.                                  Str255                 name);
  410. EXTERN_API( short )
  411. FTGetProcID                     (ConstStr255Param       name);
  412. EXTERN_API( void )
  413. FTSetRefCon                     (FTHandle               hFT,
  414.                                  long                   refCon);
  415. EXTERN_API( long )
  416. FTGetRefCon                     (FTHandle               hFT);
  417. EXTERN_API( void )
  418. FTSetUserData                   (FTHandle               hFT,
  419.                                  long                   userData);
  420. EXTERN_API( long )
  421. FTGetUserData                   (FTHandle               hFT);
  422. EXTERN_API( void )
  423. FTGetErrorString                (FTHandle               hFT,
  424.                                  short                  id,
  425.                                  Str255                 errMsg);
  426. /*
  427.     These Async routines were added to InterfaceLib in System 7.5
  428. */
  429. EXTERN_API( FTErr )
  430. FTSendAsync                     (FTHandle               hFT,
  431.                                  short                  numFiles,
  432.                                  FSSpecArrayPtr         pFSSpec,
  433.                                  FileTransferNotificationUPP  notifyProc);
  434. EXTERN_API( FTErr )
  435. FTReceiveAsync                  (FTHandle               hFT,
  436.                                  FSSpecPtr              pFSSpec,
  437.                                  FileTransferNotificationUPP  notifyProc);
  438. EXTERN_API( FTErr )
  439. FTCompletionAsync               (FTHandle               hFT,
  440.                                  FTCompletionKind       completionCall);
  441. #endif  /* CALL_NOT_IN_CARBON */
  442. #endif  /* CALL_NOT_IN_CARBON */
  443. #if PRAGMA_STRUCT_ALIGN
  444.     #pragma options align=reset
  445. #elif PRAGMA_STRUCT_PACKPUSH
  446.     #pragma pack(pop)
  447. #elif PRAGMA_STRUCT_PACK
  448.     #pragma pack()
  449. #endif
  450. #ifdef PRAGMA_IMPORT_OFF
  451. #pragma import off
  452. #elif PRAGMA_IMPORT
  453. #pragma import reset
  454. #endif
  455. #ifdef __cplusplus
  456. }
  457. #endif
  458. #endif /* __FILETRANSFERS__ */