home *** CD-ROM | disk | FTP | other *** search
/ MacAddict Special 2004: T…timate How-To Collection / MacAddict SPECIAL 2004 Ultimate How to Collection.toast / FTP for Free / Fetch 4.0.3 trial / Fetch Example Scripts / FetchAE.h < prev   
Encoding:
C/C++ Source or Header  |  2002-02-05  |  7.4 KB  |  233 lines

  1. /*
  2.      FetchAE.h -- sample Apple Event code for Fetch
  3.      
  4.      Copyright (c) 1996, Dartmouth College
  5.      Copyright (c) 2001, Fetch Softworks
  6.      All Rights Reserved.
  7.      
  8.      Distribution and use of this code is hereby permitted, provided that any resulting
  9.      work includes the copyright statement above.
  10. */
  11.  
  12. #define    FETCH_APP_SIGNATURE        'FTCh'
  13.  
  14. #define    kAEFetchSuite            'FTCh'
  15. #define    kAEDownloadEvent        'Dnld'
  16. #define    kAEViewFileEvent        'VwFi'
  17. #define    kAEViewFileListEvent        'VwFL'
  18. #define    kAEPutIntoEvent            'PutI'
  19. #define    kAEFetchPutIntoItemsParam    'Itms'
  20. #define    kAEFetchPutIntoTextFormatParam    'TFmt'
  21. #define    kAEFetchPutIntoBinaryFormatParam    'BFmt'
  22. #define    kAESendFTPCommandEvent        'SndC'
  23. #define    kAEFetchSendFTPCommandsParam    'Cmds'
  24.  
  25. /* custom app properties (i.e. preferences) */
  26. #define    pTextCreator            'pTCr'
  27. #define    pCacheTimeout            'pCTo'
  28. #define    pDecodeBinhex            'pBhx'
  29. #define    pDecodeMacbin            'pMb2'
  30. #define    pDecodeAppleSingle        'pASg'
  31. #define    pDecodeMacHost            'pMHt'
  32. #define    pDecodeStuffit            'pSit'
  33. #define    pTickleServer            'pTkl'
  34. #define    pDownloadDir            'pDDr'
  35. #define    pUseDownloadFolder        'pUDF'
  36. #define    pDisplayMessages        'pMgs'
  37. #define    pUseTypeImage            'pTpI'
  38. #define    pOmitDotFiles            'pODF'
  39. #define    pDefaultTextFont        'pTFt'
  40. #define    pDefaultTextFontSize        'pTFS'
  41. #define    pDefaultTabWidth        'pTbW'
  42. #define    pDefaultBinaryType        'pBTp'
  43. #define    pDefaultBinaryCreator        'pBCr'
  44. #define    pTranslateISO            'pISO'
  45. #define    pShowSignonDialog        'pSSD'
  46. #define    pDefaultUploadBinaryFormat    'pUBF'
  47. #define    pDefaultIncludingText        'pDIT'
  48. #define    pPassiveMode            'pPSV'
  49. #define    pMinimumDataPort        'pMnP'
  50. #define    pMaximumDataPort        'pMxP'
  51. #define    pUseSOCKSGateway        'pSks'
  52. #define    pSOCKSGatewayHost        'pSkH'
  53. #define    pSOCKSGatewayPort        'pSkP'
  54. #define pSocksVersion            'pSkV'
  55. #define    pUseProxyServer            'pPxy'
  56. #define    pProxyServer            'pPxS'
  57. #define    pProxyUserid            'pPUs'
  58. #define    pProxyPassword            'pPPw'
  59. #define    pProxyType            'pPTy'
  60. #define    pDontProxyDomains        'pDPD'
  61. #define    pAutomaticDefaultToText        'pAuT'
  62. #define    pMaxCacheSize            'pMCS'
  63. #define    pOverwriteFiles            'pOvw'
  64. #define    pCaseSensitiveNames        'pCSN'
  65. #define    pDefaultBookmarkFont        'pDBF'
  66. #define    pDefaultBookmarkFontSize    'pDBS'
  67. #define    pDefaultTransferFont        'pDTF'
  68. #define    pDefaultTransferFontSize    'pDTS'
  69. #define    pAddTxtSuffixes            'pATS'
  70. #define    pAddHqxSuffixes            'pAHS'
  71. #define    pAddBinSuffixes            'pABS'
  72. #define    pAddICSuffixes            'pAIS'
  73. #define    pEncodedNames            'pEcN'
  74. #define    pUseInternetConfig        'pUIC'
  75. #define    pAllowDuplicateConns        'pADC'
  76. #define    pInfoMacMirror            'pIMM'
  77. #define    pUMichMirror            'pUMM'
  78. #define    pAnarchieEmulation        'pAEm'
  79. #define    pDefaultShortcut        'pDSh'
  80. #define    pMysteryItemsAsFiles        'pMIF'
  81. #define    pDontUseOT            'pDUO'
  82. #define pIgnoreCache            'pIgC'
  83. #define    pWarnInsecurePass        'pWIP'
  84. #define    pWarnCleartextPassSecureServer    'pWCS'
  85. #define    pStrictCheckProtectionLevel    'pSCP'
  86. #define    pForwardableCredentials        'pFCr'
  87. #define    pSendDummyPass            'pSDP'
  88. #define    pNotifyOptions            'pNfO'
  89. #define    pNotifySound            'pNfS'
  90. #define    pNotifyBlinkIcon        'pBli'
  91. #define    pDefaultDownloadMode        'pDDM'
  92. #define    pDirectServerToServer        'pDXf'
  93. #define    pExternalTextEditor        'pETE'
  94. #define    pExternalImageEditor        'pEIE'
  95. #define    pSKeyWithMD5            'pSM5'
  96. #define    pNoADAT                'p!AD'
  97. #define    pNoMACB                'p!MB'
  98. #define    pNoNOOP                'p!NP'
  99. #define    pUNIXLISTMinusAL        'pUL-'
  100. #define    pNoNavServices            'p!NS'
  101. #define    pRetryDelay            'pRDy'
  102. #define    pDontUploadDotFiles        'pDUD'
  103. #define    pNoMDTM                'p!MD'
  104. #define    pFoldersFirstSorting        'pFFS'
  105.  
  106. /* enumerations for use with app properties */
  107. #define    kFileFormatEnumeration        'FFmt'
  108. #define    eUnknownFileFormat        'Unkn'
  109. #define    eTextFileFormat            'Text'
  110. #define    eWrappedTextFileFormat        'WTxt'
  111. #define    eRawDataFileFormat        'RawD'
  112. #define    eBinHexFileFormat        'BHex'
  113. #define    eMacBinary1FileFormat        'MBn1'
  114. #define    eMacBinary2FileFormat        'MBn2'
  115. #define eMacBinary3FileFormat        'MBn3'
  116. #define    eAppleSingleFileFormat        'ApSg'
  117. #define    eMacHostFileFormat        'MHst'
  118. #define    eAutomaticFileFormat        'tAut'    // must match kTransferAutomatic
  119.  
  120. #define    kProxyTypeEumeration        'PxTy'
  121. #define    eSiteHostnameProxy        'PxSh'
  122. #define    eUserAfterLogonProxy        'PxUI'
  123. #define    eProxyOpenProxy            'PxOp'
  124. #define    eTransparentProxy        'PxTr'
  125. #define    eUserWithNoLogonProxy        'PxUn'
  126. #define    eProxyidAtHostProxy        'Pxfr'
  127. #define    eUseridAtHostProxyidProxy    'Pxrr'
  128. #define    eUseridAtProxyidAtHostProxy    'Pxrf'
  129.  
  130. #define    kNotifyOptionsEnumeration    'NfOp'
  131. #define    eNoNotification                'NNon'
  132. #define    eBeepNotification            'NBee'
  133. #define    eSpeakNotification            'NSpk'
  134. #define    eSoundNotification            'NSnd'
  135.  
  136. #define    kSocksVersionEnumeration    'SkVr'
  137. #define    eSocksVersion4                'Sk40'
  138. #define    eSocksVersion43                'Sk43'
  139. #define    eSocksVersion5                'Sk50'
  140.  
  141. #define    cTransferWindow        'cFWA'
  142. #define    cHelpWindow        'cFWB'
  143. #define    cTextWindow        'cFWC'
  144. #define    cBookmarkListWindow    'cFWD'
  145. #define    cShortcutWindow        'cFWE'
  146. #define    cTranscriptWindow    'cFWF'
  147. #define    cMediaWindow        'cFWG'
  148.  
  149. #define    cFirstFWindow        cTransferWindow
  150. #define    cLastFWindow        cMediaWindow
  151.     
  152. #define    pTransferMode        'pTxM'        /* cTransferWindow properties */
  153. #define    pViewOrder        'pVOr'
  154. #define    pHostName        'pHNm'
  155. #define    pUserID            'pUid'
  156. #define    pPassword        'pPwd'
  157. #define    pStartDir        'pSDr'
  158. #define    pWorkDir        'pWDr'
  159. #define    pStatus            'pSta'
  160. #define    pCurrentItem        'pCrI'
  161. #define    pApproxSize        'pASz'
  162. #define    pBytesTransfered    'pBTx'
  163. #define    pElapsedTime        'pElT'
  164. #define    pTransferFormat        'pTFm'
  165. #define    pParentDir        'pPDr'
  166. #define    pAuthenticate        'pAut'
  167. #define    pEncrypt        'pEnc'
  168.  
  169. #define    pText            'pTxt'        /* cTextWindow, cTranscriptWindow, cHelpWindow properties */
  170.         
  171. //#define    pViewOrder    'pVOr'        /* cBookmarkList, cShortcutWindow properties */
  172. #define    pFileSpec        'pFSp'
  173. //#define    pIsModified    'imod'
  174.  
  175. #define    kTransferModeEnumeration    'TxMd'    /* pTransferMode enumeration */
  176. #define    kTransferAutomatic    'tAut'
  177. #define    kTransferBinary        'tBin'
  178. #define    kTransferText        'tTxt'
  179.  
  180. #define    cHostItem        'cFHA'
  181. #define    cHostFile        'cFHB'
  182. #define    cHostDirectory        'cFHC'
  183. #define    cURL            'cFHD'
  184.  
  185. #define    cFirstHostItemClass    cHostItem
  186. #define    cLastHostItemClass    cURL
  187.     
  188. #define    kHostItemTypeEnumeration    'HtTp'    /* pHostItemType enumeration */
  189. #define    kHostItemFile        'hFil'
  190. #define    kHostItemDirectory    'hDir'
  191. #define    kHostItemLink        'hLnk'
  192. #define    kHostItemUnknown    'hUnk'
  193.  
  194. #define    kAuthenticationTypeEnumeration    'Auth'    /* pAuthenticationType enumeration */
  195. #define    kAuthCleartextEnum    'aClr'
  196. #define    kAuthKClientEnum    'aKCl'
  197. #define    kAuthGSSEnum        'aGSS'
  198.  
  199. #define    cFirstHostItemClass    cHostItem
  200. #define    cLastHostItemClass    cURL
  201.     
  202. #define    pHostItemType        'pTyp'    /* cHostItem, cHostFile, cHostDirectory properties */
  203. //#define    pName            'pnam'
  204. #define    pURL            'pURL'
  205. #define    pSize            'pSiz'
  206. #define    pModDate        'pMod'
  207.  
  208. #define    cBookmark        'cBmk'
  209.  
  210. //#define    pHostItemType        'pTyp'    /* cBookmark properties */
  211. //#define    pName            'pnam'
  212. #define    pURL            'pURL'
  213. #define    pHostName        'pHNm'
  214. #define    pUserID            'pUid'
  215. #define    pPassword        'pPwd'
  216. #define    pPath            'pPth'
  217. #define    pSize            'pSiz'
  218. #define    pModDate        'pMod'
  219.  
  220. extern OSErr FetchOpenURL(char *url, AEIdleUPP idleUPP);
  221. extern OSErr FetchPut(FSSpec *fspec, char *url, AEIdleUPP idleUPP);
  222. extern OSErr FetchGet(char *url, FSSpec *fspec, AEIdleUPP idleUPP);
  223. extern OSErr FetchViewFile(char *url, AEIdleUPP idleUPP);
  224. extern OSErr FetchItemExists(char *fname, Boolean *exists, AEIdleUPP idleUPP);
  225. extern OSErr FetchRenameItem(char *oldname, char *newname, AEIdleUPP idleUPP);
  226. extern OSErr FetchCreateDirectory(char *dirname, AEIdleUPP idleUPP);
  227. extern OSErr FetchSendCommand(char *cmd, char *url, AEIdleUPP idleUPP);
  228. extern OSErr FetchGetPreference(DescType propCode, AEDesc *valueDesc, AEIdleUPP idleUPP);
  229. extern OSErr FetchSetPreference(DescType propCode, AEDesc *valueDesc, AEIdleUPP idleUPP);
  230.  
  231.  
  232.  
  233.