inetmgr.pp 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970
  1. {$MACRO ON}
  2. (******************************************************************************
  3. *
  4. * Copyright (c) 1996-2000 Palm, Inc. or its subsidiaries.
  5. * All rights reserved.
  6. *
  7. * File: INetMgr.h
  8. *
  9. * Release: Palm OS SDK 4.0 (63220)
  10. *
  11. * Description:
  12. * This header file contains equates for the Internet Library.
  13. *
  14. * History:
  15. * 6/2/97 Created by Ron Marianetti
  16. * 12/23/99 Fix <> vs. "" problem. (jmp)
  17. *
  18. *****************************************************************************)
  19. {$IFNDEF FPC_DOTTEDUNITS}
  20. unit inetmgr;
  21. {$ENDIF FPC_DOTTEDUNITS}
  22. interface
  23. {$IFDEF FPC_DOTTEDUNITS}
  24. uses PalmApi.Palmos, PalmApi.Libtraps, PalmApi.Errorbase, PalmApi.Datamgr, PalmApi.Systemresources, PalmApi.Event_;
  25. {$ELSE FPC_DOTTEDUNITS}
  26. uses palmos, libtraps, errorbase, datamgr, systemresources, event_;
  27. {$ENDIF FPC_DOTTEDUNITS}
  28. // Creator. Used for both the database that contains the INet Library and
  29. // it's features for the feature manager.
  30. const
  31. inetCreator = sysFileCINetLib; // The Net Library creator
  32. // INet Library features have this creator
  33. inetLibFtrCreator = sysFileCINetLib; // creatorID of INet Lib features.
  34. // Name of the InetLib
  35. inetLibName = 'INet.lib'; // pass in to SysLibFind()
  36. // Feature inetCreator, #0 is index of the the version number feature.
  37. // The Feature creator is inetLibFtrCreator.
  38. // Encoding is: 0xMMmfsbbb, where MM is major version, m is minor version
  39. // f is bug fix, s is stage: 3-release,2-beta,1-alpha,0-development,
  40. // bbb is build number for non-releases
  41. // V1.12b3 would be: 0x01122003
  42. // V2.00a2 would be: 0x02001002
  43. // V1.01 would be: 0x01013000
  44. inetFtrNumVersion = 0;
  45. // INetLib owns the Ctp device bits feature.
  46. // Those bits contains device specific info bits that are sent to the Elaine server.
  47. // See Ctp.h for the bit descriptions
  48. inetFtrNumCtpDeviceBits1 = 1;
  49. inetLibType = sysFileTLibrary; // Our Net Code Resources Database type
  50. // ID for proxy IP address in flash
  51. inetFlashProxyID = 'IP';
  52. inetDefaultFlashProxyID = 'DP';
  53. //Also uses mobitexNetworkIdUS and mobitexNetworkIdCanada (0xb433 and 0xc4d7) to store
  54. //current proxies for US and Canada. The responsibility for writing these and keeping
  55. //them in sync lies with the Wireless panel, not with netlib.
  56. //-----------------------------------------------------------------------------
  57. // IP addresses of Elaine servers - used for default wireless proxies
  58. //-----------------------------------------------------------------------------
  59. netProxyIPManhattanHGA = $0A0186A5; // Manhattan HGA = 10.1.134.165 or MAN 100005
  60. netProxyIPDefaultHGA = netProxyIPManhattanHGA;
  61. netProxyIPDefaultHGAStr = '10.1.134.165'; // Should correspond to above value
  62. (********************************************************************
  63. * Error codes
  64. ********************************************************************)
  65. inetErrNone = 0;
  66. inetErrTooManyClients = inetErrorClass or 1; // Too many clients already
  67. inetErrHandleInvalid = inetErrorClass or 2; // Invalid inetH or sockH
  68. inetErrParamsInvalid = inetErrorClass or 3;
  69. inetErrURLVersionInvalid = inetErrorClass or 4;
  70. inetErrURLBufTooSmall = inetErrorClass or 5;
  71. inetErrURLInvalid = inetErrorClass or 6;
  72. inetErrTooManySockets = inetErrorClass or 7;
  73. inetErrNoRequestCreated = inetErrorClass or 8;
  74. inetErrNotConnected = inetErrorClass or 9;
  75. inetErrInvalidRequest = inetErrorClass or 10;
  76. inetErrNeedTime = inetErrorClass or 11;
  77. inetErrHostnameInvalid = inetErrorClass or 12;
  78. inetErrInvalidPort = inetErrorClass or 13;
  79. inetErrInvalidHostAddr = inetErrorClass or 14;
  80. inetErrNilBuffer = inetErrorClass or 15;
  81. inetErrConnectTimeout = inetErrorClass or 16;
  82. inetErrResolveTimeout = inetErrorClass or 17;
  83. inetErrSendReqTimeout = inetErrorClass or 18;
  84. inetErrReadTimeout = inetErrorClass or 19;
  85. inetErrBufTooSmall = inetErrorClass or 20;
  86. inetErrSchemeNotSupported = inetErrorClass or 21;
  87. inetErrInvalidResponse = inetErrorClass or 22;
  88. inetErrSettingTooLarge = inetErrorClass or 25;
  89. inetErrSettingSizeInvalid = inetErrorClass or 26;
  90. inetErrRequestTooLong = inetErrorClass or 27;
  91. inetErrSettingNotImplemented = inetErrorClass or 28;
  92. // Configuration errors
  93. inetErrConfigNotFound = inetErrorClass or 29;
  94. inetErrConfigCantDelete = inetErrorClass or 30;
  95. inetErrConfigTooMany = inetErrorClass or 31;
  96. inetErrConfigBadName = inetErrorClass or 32;
  97. inetErrConfigNotAlias = inetErrorClass or 33;
  98. inetErrConfigCantPointToAlias = inetErrorClass or 34;
  99. inetErrConfigEmpty = inetErrorClass or 35;
  100. inetErrConfigAliasErr = inetErrorClass or 37;
  101. inetErrNoWirelessInterface = inetErrorClass or 38;
  102. // Encryption related errors
  103. inetErrEncryptionNotAvail = inetErrorClass or 39;
  104. // Need to re-send transaction because server told us to reset our
  105. // encryption sequence number
  106. inetErrNeedRetryEncSeqNum = inetErrorClass or 40;
  107. // Need to re-send transaction because server sent us a new
  108. // public key to use.
  109. inetErrNeedRetryEncPublicKey = inetErrorClass or 41;
  110. inetErrResponseTooShort = inetErrorClass or 42;
  111. // errors specific to handling Mobitex ILLEGAL responses
  112. inetErrMobitexIllegalOKHost = inetErrorClass or 43;
  113. inetErrMobitexIllegalBadHost = inetErrorClass or 44;
  114. // see error 92 also
  115. // HTTP errors
  116. inetErrHTTPBadRequest = inetErrorClass or 45;
  117. inetErrHTTPUnauthorized = inetErrorClass or 46;
  118. inetErrHTTPForbidden = inetErrorClass or 47;
  119. inetErrHTTPNotFound = inetErrorClass or 48;
  120. inetErrHTTPMethodNotAllowed = inetErrorClass or 49;
  121. inetErrHTTPNotAcceptable = inetErrorClass or 50;
  122. inetErrHTTPProxyAuthRequired = inetErrorClass or 51;
  123. inetErrHTTPRequestTimeout = inetErrorClass or 52;
  124. inetErrHTTPConflict = inetErrorClass or 53;
  125. inetErrHTTPGone = inetErrorClass or 54;
  126. inetErrHTTPLengthRequired = inetErrorClass or 55;
  127. inetErrHTTPPreconditionFailed = inetErrorClass or 56;
  128. inetErrHTTPRequestTooLarge = inetErrorClass or 57;
  129. inetErrHTTPRequestURITooLong = inetErrorClass or 58;
  130. inetErrHTTPUnsupportedType = inetErrorClass or 59;
  131. inetErrHTTPServerError = inetErrorClass or 60;
  132. // CTP errors
  133. inetErrCTPServerError = inetErrorClass or 61;
  134. // Cache errors
  135. inetErrTypeNotCached = inetErrorClass or 62;
  136. inetErrCacheInvalid = inetErrorClass or 63;
  137. // Palm: and PalmCall: scheme errors
  138. inetErrURLDispatched = inetErrorClass or 64;
  139. inetErrDatabaseNotFound = inetErrorClass or 65;
  140. inetErrCTPMalformedRequest = inetErrorClass or 66;
  141. inetErrCTPUnknownCommand = inetErrorClass or 67;
  142. inetErrCTPTruncated = inetErrorClass or 68;
  143. inetErrCTPUnknownError = inetErrorClass or 69;
  144. inetErrCTPProxyError = inetErrorClass or 70;
  145. inetErrCTPSocketErr = inetErrorClass or 71;
  146. inetErrCTPInvalidURL = inetErrorClass or 72;
  147. inetErrCTPReferringPageOutOfDate = inetErrorClass or 73;
  148. inetErrCTPBadRequest = inetErrorClass or 74;
  149. inetErrUNUSED = inetErrorClass or 75;
  150. inetErrCTPMailServerDown = inetErrorClass or 76;
  151. inetErrCTPHostNotFound = inetErrorClass or 77;
  152. // Content Conversion Errors
  153. inetErrCTPContentInvalidTag = inetErrorClass or 78;
  154. inetErrCTPContentInternal = inetErrorClass or 79;
  155. inetErrCTPContentDataEnd = inetErrorClass or 80;
  156. inetErrCTPContentResourceTooBig = inetErrorClass or 81;
  157. inetErrCTPContentNoNoFrames = inetErrorClass or 82;
  158. inetErrCTPContentUnsupportedContent = inetErrorClass or 83;
  159. inetErrCTPContentUnsupportedEncoding = inetErrorClass or 84;
  160. inetErrCTPContentBadForm = inetErrorClass or 85;
  161. inetErrCTPContentBadFormMissingAction = inetErrorClass or 86;
  162. inetErrCTPContentBadFormMissingMethod = inetErrorClass or 87;
  163. inetErrCTPContentNoSourceData = inetErrorClass or 88;
  164. inetErrCTPContentBadImage = inetErrorClass or 89;
  165. inetErrCTPContentImageTooLarge = inetErrorClass or 90;
  166. // Mobitex illegal handled error code. This error is sent after
  167. //INetLib handles inetErrMobitexIllegalOKHost or inetErrMobitexIllegalBadHost
  168. //errors. The application needs to know that something went wrong and it needs
  169. //to change state. This error does not need to be displayed to the user.
  170. inetErrMobitexErrorHandled = inetErrorClass or 91;
  171. // Proxy down, non-default host, show dialog asking to revert to default
  172. inetErrProxyDownBadHost = inetErrorClass or 92;
  173. // A second type of readtime. This should occur only when some data is received
  174. // and the connection is lost.
  175. inetErrHostConnectionLost = inetErrorClass or 93;
  176. // Unable to locate link record within a PQA file
  177. inetErrLinkNotFound = inetErrorClass or 94;
  178. inetErrCacheInvalidSort = inetErrorClass or 95;
  179. // The following are used and bit field parameters to the sort routine. They
  180. // are additive but ordered. Precendence is given to the lowest ordered bit.
  181. inetCacheCompareByMasterURL = $01;
  182. inetCacheCompareByURL = $02;
  183. inetCacheCompareByTime = $04;
  184. (********************************************************************
  185. * Input flags
  186. ********************************************************************)
  187. //-----------------------------------------------------------------------------
  188. // flag word definitions for INetLibURLOpen
  189. //-----------------------------------------------------------------------------
  190. inetOpenURLFlagLookInCache = $0001;
  191. inetOpenURLFlagKeepInCache = $0002;
  192. inetOpenURLFlagForceEncOn = $0008; // use encryption even if
  193. // scheme does not desire it
  194. inetOpenURLFlagForceEncOff = $0010; // no encryption even if
  195. // scheme desires it
  196. //-----------------------------------------------------------------------------
  197. // flag word definitions for INetURLInfo. These flags bits are set in the
  198. // flags field of the INetURLINfoType structure by INetLibURLGetInfo()
  199. //-----------------------------------------------------------------------------
  200. inetURLInfoFlagIsSecure = $0001;
  201. inetURLInfoFlagIsRemote = $0002;
  202. inetURLInfoFlagIsInCache = $0004;
  203. (********************************************************************
  204. * Configuration Support
  205. ********************************************************************)
  206. //-----------------------------------------------------------------------------
  207. // Names of built-in configuration aliases available through the
  208. // INetLibConfigXXX calls
  209. //-----------------------------------------------------------------------------
  210. inetCfgNameDefault = '.Default'; // The default configuration
  211. inetCfgNameDefWireline = '.DefWireline'; // The default wireline configuration
  212. inetCfgNameDefWireless = '.DefWireless'; // The default wireless configuration
  213. inetCfgNameCTPDefault = '.CTPDefault'; // Points to either .CTPWireline or .CTPWireless
  214. inetCfgNameCTPWireline = '.CTPWireline'; // Wireline through the Jerry Proxy
  215. inetCfgNameCTPWireless = '.CTPWireless'; // Wireless through the Jerry Proxy
  216. //--------------------------------------------------------------------
  217. // Structure of a configuration name. Used by INetLibConfigXXX calls
  218. //---------------------------------------------------------------------
  219. const
  220. inetConfigNameSize = 32;
  221. type
  222. INetConfigNameType = record
  223. name: array [0..inetConfigNameSize-1] of AnsiChar; // name of configuration
  224. end;
  225. INetConfigNamePtr = ^INetConfigNameType;
  226. (********************************************************************
  227. * Scheme Types
  228. ********************************************************************)
  229. type
  230. INetSchemeEnum = WordEnum; //!!!
  231. const
  232. inetSchemeUnknown = -1;
  233. inetSchemeDefault = 0;
  234. inetSchemeHTTP = Succ(inetSchemeDefault); // http:
  235. inetSchemeHTTPS = Succ(inetSchemeHTTP); // https:
  236. inetSchemeFTP = Succ(inetSchemeHTTPS); // ftp:
  237. inetSchemeGopher = Succ(inetSchemeFTP); // gopher:
  238. inetSchemeFile = Succ(inetSchemeGopher); // file:
  239. inetSchemeNews = Succ(inetSchemeFile); // news:
  240. inetSchemeMailTo = Succ(inetSchemeNews); // mailto:
  241. inetSchemePalm = Succ(inetSchemeMailTo); // palm:
  242. inetSchemePalmCall = Succ(inetSchemePalm); // palmcall:
  243. inetSchemeMail = Succ(inetSchemePalmCall); // not applicable to URLS, but used
  244. // for the INetLibSockOpen call when
  245. // creating a socket for mail IO
  246. inetSchemeMac = Succ(inetSchemeMail); // mac: - Mac file system HTML
  247. inetSchemeFirst = inetSchemeHTTP; // first one
  248. inetSchemeLast = inetSchemeMail; // last one
  249. (********************************************************************
  250. * Scheme Ports
  251. ********************************************************************)
  252. const
  253. inetPortFTP = 21;
  254. inetPortHTTP = 80;
  255. inetPortGopher = 70;
  256. inetPortNews = 119;
  257. inetPortHTTPS = 44;
  258. (********************************************************************
  259. * Structure of a cracked URL.
  260. ********************************************************************)
  261. type
  262. INetURLType = record
  263. version: UInt16; // should be 0, for future compatibility
  264. schemeP: ^UInt8; // ptr to scheme portion
  265. schemeLen: UInt16; // size of scheme portion
  266. schemeEnum: UInt16; // INetSchemEnum
  267. usernameP: ^UInt8; // ptr to username portion
  268. usernameLen: UInt16; // size of username
  269. passwordP: ^UInt8; // ptr to password portion
  270. passwordLen: UInt16; // size of password
  271. hostnameP: ^UInt8; // ptr to host name portion
  272. hostnameLen: UInt16; // size of host name
  273. port: UInt16; // port number
  274. pathP: ^UInt8; // ptr to path portion
  275. pathLen: UInt16; // size of path
  276. paramP: ^UInt8; // param (;param)
  277. paramLen: UInt16; // size of param
  278. queryP: ^UInt8; // query (?query)
  279. queryLen: UInt16; // size of query
  280. fragP: ^UInt8; // fragment (#frag)
  281. fragLen: UInt16; // size of fragment
  282. end;
  283. (********************************************************************
  284. * Structure for INetURLInfo. This structure is filled in with info
  285. * about a URL.
  286. ********************************************************************)
  287. type
  288. INetURLInfoType = record
  289. version: UInt16; // should be 0, for future compatibility
  290. flags: UInt16; // flags word, one or ore of
  291. // inetURLInfoFlagXXX flags
  292. undefined: UInt32; // reserved for future use
  293. end;
  294. (********************************************************************
  295. * Content and Compression Type Enums(from proxy server or PQA Builder)
  296. ********************************************************************)
  297. type
  298. INetContentTypeEnum = Enum;
  299. const
  300. inetContentTypeTextPlain = 0;
  301. inetContentTypeTextHTML = Succ(inetContentTypeTextPlain);
  302. inetContentTypeImageGIF = Succ(inetContentTypeTextHTML);
  303. inetContentTypeImageJPEG = Succ(inetContentTypeImageGIF);
  304. inetContentTypeApplicationCML = Succ(inetContentTypeImageJPEG);
  305. inetContentTypeImagePalmOS = Succ(inetContentTypeApplicationCML);
  306. inetContentTypeOthe = Succ(inetContentTypeImagePalmOS);
  307. type
  308. INetCompressionTypeEnum = Enum;
  309. const
  310. inetCompressionTypeNone = 0;
  311. inetCompressionTypeBitPacked = Succ(inetCompressionTypeNone);
  312. inetCompressionTypeLZ77 = Succ(inetCompressionTypeBitPacked);
  313. inetCompressionTypeBest = Succ(inetCompressionTypeLZ77);
  314. inetCompressionTypeLZ77Primer1 = Succ(inetCompressionTypeBest);
  315. (********************************************************************
  316. * Proxy Types
  317. ********************************************************************)
  318. type
  319. INetProxyEnum = Enum;
  320. const
  321. inetProxyNone = 0; // no proxy
  322. inetProxyCTP = 1; // CTP (Jerry) proxy
  323. (********************************************************************
  324. * Transport Types
  325. ********************************************************************)
  326. type
  327. INetTransportEnum = Enum;
  328. const
  329. inetTransportPPP = 0; // PPP
  330. inetTransportMobitex = 1; // Mobitex
  331. (********************************************************************
  332. * Settings for the INetLibSettingSet/Get call.
  333. ********************************************************************)
  334. type
  335. INetSettingEnum = Enum;
  336. const
  337. inetSettingProxyType = 0; // (RW) UInt32, INetProxyEnum
  338. inetSettingProxyName = Succ(inetSettingProxyType); // (RW) AnsiChar[], name of proxy
  339. inetSettingProxyPort = Succ(inetSettingProxyName); // (RW) UInt32, TCP port # of proxy
  340. inetSettingProxySocketType = Succ(inetSettingProxyPort); // (RW) UInt32, which type of socket to use
  341. // netSocketTypeXXX
  342. inetSettingCacheSize = Succ(inetSettingProxySocketType); // (RW) UInt32, max size of cache
  343. inetSettingCacheRef = Succ(inetSettingCacheSize); // (R) DmOpenRef, ref of cache DB
  344. inetSettingNetLibConfig = Succ(inetSettingCacheRef); // (RW) UInt32, Which NetLib config to use.
  345. inetSettingRadioID = Succ(inetSettingNetLibConfig); // (R) UInt32[2], the 64-bit radio ID
  346. inetSettingBaseStationID = Succ(inetSettingRadioID); // (R) UInt32, the radio base station ID
  347. inetSettingMaxRspSize = Succ(inetSettingBaseStationID); // (W) UInt32 (in bytes)
  348. inetSettingConvAlgorithm = Succ(inetSettingMaxRspSize); // (W) UInt32 (CTPConvEnum)
  349. inetSettingContentWidth = Succ(inetSettingConvAlgorithm); // (W) UInt32 (in pixels)
  350. inetSettingContentVersion = Succ(inetSettingContentWidth); // (W) UInt32 Content version (encoder version)
  351. inetSettingNoPersonalInfo = Succ(inetSettingContentVersion); // (RW) UInt32 send no deviceID/zipcode
  352. inetSettingUserName = Succ(inetSettingNoPersonalInfo);
  353. //---------------------------------------------------------------------------------
  354. // New Settings as of PalmOS 4.0
  355. //---------------------------------------------------------------------------------
  356. inetSettingGraphicsSel = Succ(inetSettingUserName); // (W) UInt8 (User Graphics selection)
  357. inetSettingTransportType = Succ(inetSettingGraphicsSel); // (RW) UInt32, INetTransportEnum
  358. inetSettingServerBits1 = Succ(inetSettingTransportType); // (RW) UInt32, bits sent by the server over ctp
  359. inetSettingSendRawLocationInfo = Succ(inetSettingServerBits1); // (W) Boolean, make the handheld send its Raw Location information.
  360. // One use of this feature is to convert Web clipping's "%Location:..." codes into content info
  361. inetSettingEnableCookies = Succ(inetSettingSendRawLocationInfo); // (RW) Boolean
  362. // true: Cookies are enabled
  363. // false: Cookies are disabled (default)
  364. inetSettingMaxCookieJarSize = Succ(inetSettingEnableCookies);
  365. // (RW) UInt32, maximum cookie jar size in
  366. // in kilobytes
  367. // The following setting is a new interface in PalmOS 4.0 that allow Clipper
  368. // or other INetLib clients to get raw location information as described in
  369. // PalmLocRawData.h.
  370. // INetLib will return a pointer to a newly allocated memory buffer containing
  371. // the raw location information to send to Elaine (Web Clipping proxy server).
  372. // Elaine will then use a Windows DLL to analyse the raw location information
  373. // in order to transform it into something useful like zipcode, cityname, etc.
  374. // See PalmLocRawData.h for more details...
  375. inetSettingLocRawInfo = Succ(inetSettingMaxCookieJarSize); // (R) void* Allocated memory buffer - must be free by caller
  376. // The following affect how the "Web Clipping" panel will edit the
  377. // configuration. When "reset to default" is pressed, these default
  378. // values will be copied back into the appropriate place.
  379. // If the field is set to not be editable, the panel will not allow
  380. // the user to change it
  381. inetSettingProxyNameDefault = Succ(inetSettingLocRawInfo); // Default Name for this config
  382. inetSettingProxyPortDefault = Succ(inetSettingProxyNameDefault); // Default Port for this config
  383. inetSettingProxyNameEditable = Succ(inetSettingProxyPortDefault); // Is the proxy name editable?
  384. inetSettingProxyPortEditable = Succ(inetSettingProxyNameEditable); // Is the proxy port editable?
  385. inetSettingPalmUserID = Succ(inetSettingProxyPortEditable); // The palm.net user id
  386. inetSettingLast = Succ(inetSettingPalmUserID);
  387. (********************************************************************
  388. * Settings for the INetLibSockSettingSet/Get call.
  389. ********************************************************************)
  390. type
  391. INetSockSettingEnum = Enum;
  392. const
  393. inetSockSettingScheme = 0; // (R) UInt32, INetSchemeEnum
  394. inetSockSettingSockContext = Succ(inetSockSettingScheme); // (RW) UInt32,
  395. inetSockSettingCompressionType = Succ(inetSockSettingSockContext); // (R) AnsiChar[]
  396. inetSockSettingCompressionTypeID = Succ(inetSockSettingCompressionType); // (R) UInt32 (INetCompressionTypeEnum)
  397. inetSockSettingContentType = Succ(inetSockSettingCompressionTypeID); // (R) AnsiChar[]
  398. inetSockSettingContentTypeID = Succ(inetSockSettingContentType); // (R) UInt32 (INetContentTypeEnum)
  399. inetSockSettingData = Succ(inetSockSettingContentTypeID); // (R) UInt32, pointer to data
  400. inetSockSettingDataHandle = Succ(inetSockSettingData); // (R) UInt32, MemHandle to data
  401. inetSockSettingDataOffset = Succ(inetSockSettingDataHandle); // (R) UInt32, offset to data from MemHandle
  402. inetSockSettingTitle = Succ(inetSockSettingDataOffset); // (RW) AnsiChar[]
  403. inetSockSettingURL = Succ(inetSockSettingTitle); // (R) AnsiChar[]
  404. inetSockSettingIndexURL = Succ(inetSockSettingURL); // (RW) AnsiChar[]
  405. inetSockSettingFlags = Succ(inetSockSettingIndexURL); // (W) UInt16, one or more of
  406. // inetOpenURLFlagXXX flags
  407. inetSockSettingReadTimeout = Succ(inetSockSettingFlags); // (RW) UInt32. Read timeout in ticks
  408. inetSockSettingContentVersion = Succ(inetSockSettingReadTimeout); // (R) UInt32, version number for content
  409. inetSockSettingLast = Succ(inetSockSettingContentVersion);
  410. (********************************************************************
  411. * Possible socket status values that can be returned from INetLibSockStatus
  412. ********************************************************************)
  413. type
  414. INetStatusEnum = Enum;
  415. const
  416. inetStatusNew = 0; // just opened
  417. inetStatusResolvingName = Succ(inetStatusNew); // looking up host address
  418. inetStatusNameResolved = Succ(inetStatusResolvingName); // found host address
  419. inetStatusConnecting = Succ(inetStatusNameResolved); // connecting to host
  420. inetStatusConnected = Succ(inetStatusConnecting); // connected to host
  421. inetStatusSendingRequest = Succ(inetStatusConnected); // sending request
  422. inetStatusWaitingForResponse = Succ(inetStatusSendingRequest); // waiting for response
  423. inetStatusReceivingResponse = Succ(inetStatusWaitingForResponse); // receiving response
  424. inetStatusResponseReceived = Succ(inetStatusReceivingResponse); // response received
  425. inetStatusClosingConnection = Succ(inetStatusResponseReceived); // closing connection
  426. inetStatusClosed = Succ(inetStatusClosingConnection); // closed
  427. inetStatusAcquiringNetwork = Succ(inetStatusClosed); // network temporarily
  428. // unreachable; socket on hold
  429. inetStatusPrvInvalid = 30; // internal value, not
  430. // returned by INetMgr. Should
  431. // be last.
  432. (********************************************************************
  433. * HTTP Attributes which can be set/get using the
  434. * INetLibHTTPAttrSet/Get calls.
  435. *
  436. * Generally, attributes are only set BEFORE calling
  437. * INetLibSockHTTPReqSend
  438. * and attributes are only gotten AFTER the complete response
  439. * has been received.
  440. *
  441. * Attributes marked with the following flags:
  442. * (R) - read only
  443. * (W) - write only
  444. * (RW) - read/write
  445. * (-) - not implemented yet
  446. ********************************************************************)
  447. type
  448. INetHTTPAttrEnum = Enum;
  449. const
  450. // local error trying to communicate with server, if any
  451. inetHTTPAttrCommErr = 0; // (R) UInt32, read-only
  452. // object attributes, defined at creation
  453. inetHTTPAttrEntityURL = Succ(inetHTTPAttrCommErr); // (-) AnsiChar[], which resource was requested
  454. //-----------------------------------------------------------
  455. // Request only attributes
  456. //-----------------------------------------------------------
  457. inetHTTPAttrReqAuthorization = Succ(inetHTTPAttrEntityURL); // (-) AnsiChar[]
  458. inetHTTPAttrReqFrom = Succ(inetHTTPAttrReqAuthorization); // (-) AnsiChar[]
  459. inetHTTPAttrReqIfModifiedSince = Succ(inetHTTPAttrReqFrom); // (-) UInt32
  460. inetHTTPAttrReqReferer = Succ(inetHTTPAttrReqIfModifiedSince); // (-) AnsiChar[]
  461. // The following are ignored unless going through a CTP proxy
  462. inetHTTPAttrWhichPart = Succ(inetHTTPAttrReqReferer); // (W) UInt32 (0 -> N)
  463. inetHTTPAttrIncHTTP = Succ(inetHTTPAttrWhichPart); // (W) UInt32 (Boolean) only applicable
  464. // when inetHTTPAttrConvAlgorithm set to
  465. // ctpConvNone
  466. inetHTTPAttrCheckMailHi = Succ(inetHTTPAttrIncHTTP); // (W) UInt32
  467. inetHTTPAttrCheckMailLo = Succ(inetHTTPAttrCheckMailHi); // (W) UInt32
  468. inetHTTPAttrReqContentVersion = Succ(inetHTTPAttrCheckMailLo); // (W) UInt32 Desired content version. Represented
  469. // as 2 low bytes. Lowest byte is minor version,
  470. // next higher byte is major version.
  471. //--------------------------------------------------------------
  472. // Response only attributes
  473. //--------------------------------------------------------------
  474. // Server response info
  475. inetHTTPAttrRspAll = Succ(inetHTTPAttrReqContentVersion); // (-) AnsiChar[] - entire HTTP response including
  476. // data
  477. inetHTTPAttrRspSize = Succ(inetHTTPAttrRspAll); // (R) UInt32 - entire HTTP Response size including
  478. // header and data
  479. inetHTTPAttrRspVersion = Succ(inetHTTPAttrRspSize); // (-) AnsiChar[]
  480. inetHTTPAttrResult = Succ(inetHTTPAttrRspVersion); // (R) UInt32 (ctpErrXXX when using CTP Proxy)
  481. inetHTTPAttrErrDetail = Succ(inetHTTPAttrResult); // (R) UInt32 (server/proxy err code when
  482. // using CTP Proxy)
  483. inetHTTPAttrReason = Succ(inetHTTPAttrErrDetail); // (R) AnsiChar[]
  484. inetHTTPAttrDate = Succ(inetHTTPAttrReason); // (-) UInt32
  485. inetHTTPAttrNoCache = Succ(inetHTTPAttrDate); // (-) UInt32
  486. inetHTTPAttrPragma = Succ(inetHTTPAttrNoCache); // (-) AnsiChar[]
  487. inetHTTPAttrServer = Succ(inetHTTPAttrPragma); // (-) AnsiChar[]
  488. inetHTTPAttrWWWAuthentication = Succ(inetHTTPAttrServer); // (-) AnsiChar[]
  489. // Returned entity attributes
  490. inetHTTPAttrContentAllow = Succ(inetHTTPAttrWWWAuthentication); // (-) AnsiChar[]
  491. inetHTTPAttrContentLength = Succ(inetHTTPAttrContentAllow); // (R) UInt32
  492. inetHTTPAttrContentLengthUncompressed = Succ(inetHTTPAttrContentLength); // (R) UInt32 (in bytes)
  493. inetHTTPAttrContentPtr = Succ(inetHTTPAttrContentLengthUncompressed); // (-) AnsiChar *
  494. inetHTTPAttrContentExpires = Succ(inetHTTPAttrContentPtr); // (-) UInt32
  495. inetHTTPAttrContentLastModified = Succ(inetHTTPAttrContentExpires); // (-) UInt32
  496. inetHTTPAttrContentLocation = Succ(inetHTTPAttrContentLastModified); // (-) AnsiChar[]
  497. inetHTTPAttrContentLengthUntruncated = Succ(inetHTTPAttrContentLocation); // (R) UInt32
  498. inetHTTPAttrContentVersion = Succ(inetHTTPAttrContentLengthUntruncated); // (R) UInt32, actual content version. Represented
  499. // as 2 low bytes. Lowest byte is minor version,
  500. // next higher byte is major version.
  501. inetHTTPAttrContentCacheID = Succ(inetHTTPAttrContentVersion); // (R) UInt32, cacheID for this item
  502. inetHTTPAttrReqSize = Succ(inetHTTPAttrContentCacheID); // (R) UInt32 size of request sent
  503. (********************************************************************
  504. * Structure of our Internet events. This structure is a superset of
  505. * the regular event type. Note that we use the first 2 user events
  506. * for the Internet Library so any app that uses this library must be
  507. * to use user event IDs greater than inetLastEvent.
  508. *
  509. * library refNum in it....
  510. ********************************************************************)
  511. const
  512. inetSockReadyEvent = firstINetLibEvent;
  513. inetSockStatusChangeEvent = firstINetLibEvent + 1;
  514. inetLastEvent = firstINetLibEvent + 1;
  515. type
  516. iNetEventGeneric = record
  517. datum: array [0..7] of UInt16;
  518. end;
  519. inetSockReady = record
  520. sockH: MemHandle; // socket MemHandle
  521. context: UInt32; // application defined
  522. inputReady: Boolean; // true if ready for reads
  523. outputReady: Boolean; // true if ready for writes
  524. end;
  525. inetSockStatusChange = record
  526. sockH: MemHandle; // socket MemHandle
  527. context: UInt32; // application defined
  528. status: UInt16; // new status
  529. sockErr: Err; // socket err, if any
  530. end;
  531. INetEventType = record
  532. eType: UInt16;
  533. penDown: Boolean;
  534. reserved: UInt8;
  535. screenX: Int16;
  536. screenY: Int16;
  537. case Integer of
  538. 0: (inetGeneric: inetEventGeneric);
  539. 1: (inetSockReady: inetSockReady);
  540. 2: (inetSockStatusChange: inetSockStatusChange);
  541. end;
  542. (********************************************************************
  543. * Commands for INetLibWirelessIndicatorCmd (and INetLibWiCmd)
  544. ********************************************************************)
  545. type
  546. WiCmdEnum = Enum;
  547. const
  548. wiCmdInit = 0;
  549. wiCmdClear = Succ(wiCmdInit);
  550. wiCmdSetEnabled = Succ(wiCmdClear);
  551. wiCmdDraw = Succ(wiCmdSetEnabled);
  552. wiCmdEnabled = Succ(wiCmdDraw);
  553. wiCmdSetLocation = Succ(wiCmdEnabled);
  554. wiCmdEras = Succ(wiCmdSetLocation);
  555. (********************************************************************
  556. * INet Library functions.
  557. ********************************************************************)
  558. type
  559. INetLibTrapNumberEnum = Enum;
  560. const
  561. inetLibTrapSettingGet = sysLibTrapCustom;
  562. inetLibTrapSettingSet = Succ(inetLibTrapSettingGet);
  563. inetLibTrapGetEvent = Succ(inetLibTrapSettingSet);
  564. inetLibTrapURLOpen = Succ(inetLibTrapGetEvent);
  565. inetLibTrapSockRead = Succ(inetLibTrapURLOpen);
  566. inetLibTrapSockWrite = Succ(inetLibTrapSockRead);
  567. inetLibTrapSockOpen = Succ(inetLibTrapSockWrite);
  568. inetLibTrapSockClose = Succ(inetLibTrapSockOpen);
  569. inetLibTrapSockStatus = Succ(inetLibTrapSockClose);
  570. inetLibTrapSockSettingGet = Succ(inetLibTrapSockStatus);
  571. inetLibTrapSockSettingSet = Succ(inetLibTrapSockSettingGet);
  572. inetLibTrapSockConnect = Succ(inetLibTrapSockSettingSet);
  573. // Utilities
  574. inetLibTrapURLCrack = Succ(inetLibTrapSockConnect);
  575. inetLibTrapURLsAdd = Succ(inetLibTrapURLCrack);
  576. inetLibTrapURLsCompare = Succ(inetLibTrapURLsAdd);
  577. inetLibTrapURLGetInfo = Succ(inetLibTrapURLsCompare);
  578. // HTTP calls
  579. inetLibTrapSockHTTPReqCreate = Succ(inetLibTrapURLGetInfo);
  580. inetLibTrapSockHTTPAttrSet = Succ(inetLibTrapSockHTTPReqCreate);
  581. inetLibTrapSockHTTPReqSend = Succ(inetLibTrapSockHTTPAttrSet);
  582. inetLibTrapSockHTTPAttrGet = Succ(inetLibTrapSockHTTPReqSend);
  583. // Mail traps
  584. inetLibTrapSockMailReqCreate = Succ(inetLibTrapSockHTTPAttrGet);
  585. inetLibTrapSockMailAttrSet = Succ(inetLibTrapSockMailReqCreate);
  586. inetLibTrapSockMailReqAdd = Succ(inetLibTrapSockMailAttrSet);
  587. inetLibTrapSockMailReqSend = Succ(inetLibTrapSockMailReqAdd);
  588. inetLibTrapSockMailAttrGet = Succ(inetLibTrapSockMailReqSend);
  589. inetLibTrapSockMailQueryProgress = Succ(inetLibTrapSockMailAttrGet);
  590. // Cache calls
  591. inetLibTrapCacheList = Succ(inetLibTrapSockMailQueryProgress);
  592. inetLibTrapCacheGetObject = Succ(inetLibTrapCacheList);
  593. // Config calls
  594. inetLibConfigMakeActive_ = Succ(inetLibTrapCacheGetObject);
  595. inetLibConfigList_ = Succ(inetLibConfigMakeActive_);
  596. inetLibConfigIndexFromName_ = Succ(inetLibConfigList_);
  597. inetLibConfigDelete_ = Succ(inetLibConfigIndexFromName_);
  598. inetLibConfigSaveAs_ = Succ(inetLibConfigDelete_);
  599. inetLibConfigRename_ = Succ(inetLibConfigSaveAs_);
  600. inetLibConfigAliasSet_ = Succ(inetLibConfigRename_);
  601. inetLibConfigAliasGet_ = Succ(inetLibConfigAliasSet_);
  602. //old wireless Indicator
  603. inetLibTrapWiCmd = Succ(inetLibConfigAliasGet_);
  604. // File Calls
  605. inetLibTrapSockFileGetByIndex = Succ(inetLibTrapWiCmd);
  606. inetLibTrapCheckAntennaState = Succ(inetLibTrapSockFileGetByIndex);
  607. inetLibTrapCTPSend = Succ(inetLibTrapCheckAntennaState);
  608. // Additional Cache calls
  609. inetLibTrapCachePurge = Succ(inetLibTrapCTPSend);
  610. // new wireless Indicator
  611. inetLibTrapWirelessIndicatorCmd = Succ(inetLibTrapCachePurge);
  612. // Additional Cache calls
  613. inetLibTrapCacheGetObjectV2 = Succ(inetLibTrapWirelessIndicatorCmd);
  614. inetLibTrapIndexedCacheFind = Succ(inetLibTrapCacheGetObjectV2);
  615. inetLibTrapPrepareCacheForHistory = Succ(inetLibTrapIndexedCacheFind);
  616. //This should be at the END ***********
  617. inetLibTrapLast = Succ(inetLibTrapPrepareCacheForHistory);
  618. (********************************************************************
  619. * Structure of cache entry
  620. * Used as a parameter to INetLibCacheList. If urlP or titleP are NULL,
  621. * the corresponding length fields will be updated with the desired lengths
  622. ********************************************************************)
  623. type
  624. INetCacheEntryType = record
  625. urlP: ^UInt8;
  626. urlLen: UInt16;
  627. titleP: ^UInt8;
  628. titleLen: UInt16;
  629. lastViewed: UInt32; // seconds since 1/1/1904
  630. firstViewed: UInt32; // seconds since 1/1/1904
  631. end;
  632. INetCacheEntryP = ^INetCacheEntryType;
  633. (********************************************************************
  634. * Structure for INetLibCacheGetObject. This structure is filled in with info
  635. * about a cache entry.
  636. ********************************************************************)
  637. type
  638. INetCacheInfoType = record
  639. recordH: MemHandle;
  640. contentType: INetContentTypeEnum;
  641. encodingType: INetCompressionTypeEnum;
  642. uncompressedDataSize: UInt32;
  643. flags: UInt8;
  644. reserved: UInt8;
  645. dataOffset: UInt16; // offset to content
  646. dataLength: UInt16; // size of content
  647. urlOffset: UInt16; // offset to URL
  648. viewTime: UInt32; // time last viewed
  649. createTime: UInt32; // time entry was created
  650. murlOffset: UInt16; // offset to master URL
  651. serverBits1: UInt32; // Bits sent by the server
  652. end;
  653. INetCacheInfoPtr = ^INetCacheInfoType;
  654. //--------------------------------------------------
  655. // Library initialization, shutdown, sleep and wake
  656. //--------------------------------------------------
  657. function INetLibOpen(libRefnum: UInt16; config: UInt16; flags: UInt32;
  658. cacheRef: DmOpenRef; cacheSize: UInt32; var inetHP: MemHandle): Err; syscall sysLibTrapOpen;
  659. function INetLibClose(libRefnum: UInt16; inetH: MemHandle): Err; syscall sysLibTrapClose;
  660. function INetLibSleep(libRefnum: UInt16): Err; syscall sysLibTrapSleep;
  661. function INetLibWake(libRefnum: UInt16): Err; syscall sysLibTrapWake;
  662. //--------------------------------------------------
  663. // Settings
  664. //--------------------------------------------------
  665. function INetLibSettingGet(libRefnum: UInt16; inetH: MemHandle; setting: UInt16 {INetSettingEnum};
  666. bufP: Pointer; var bufLenP: UInt16): Err; syscall inetLibTrapSettingGet;
  667. function INetLibSettingSet(libRefnum: UInt16; inetH: MemHandle; setting: UInt16 {INetSettingEnum};
  668. bufP: Pointer; bufLen: UInt16): Err; syscall inetLibTrapSettingSet;
  669. //--------------------------------------------------
  670. // Event Management
  671. //--------------------------------------------------
  672. procedure INetLibGetEvent(libRefnum: UInt16; inetH: MemHandle; var eventP: INetEventType; timeout: Int32); syscall inetLibTrapGetEvent;
  673. //--------------------------------------------------
  674. // High level calls
  675. //--------------------------------------------------
  676. function INetLibURLOpen(libRefnum: UInt16; inetH: MemHandle; var urlP, cacheIndexURLP: UInt8;
  677. var sockHP: MemHandle; timeout: Int32; flags: UInt16): Err; syscall inetLibTrapURLOpen;
  678. function INetLibCTPSend(libRefnum: UInt16; inetH: MemHandle; var sockHP: MemHandle;
  679. var writeP: UInt8; writelen: UInt32; timeout: Int32; ctpCommand: UInt16): Err; syscall inetLibTrapCTPSend;
  680. function INetLibSockClose(libRefnum: UInt16; socketH: MemHandle): Err; syscall inetLibTrapSockClose;
  681. //--------------------------------------------------
  682. // Read/Write
  683. //--------------------------------------------------
  684. function INetLibSockRead(libRefnum: UInt16; sockH: MemHandle; bufP: Pointer;
  685. reqBytes: UInt32; var actBytesP: UInt32; timeout: Int32): Err; syscall inetLibTrapSockRead;
  686. function INetLibSockWrite(libRefnum: UInt16; sockH: MemHandle; bufP: Pointer;
  687. reqBytes: UInt32; var actBytesP: UInt32; timeout: Int32): Err; syscall inetLibTrapSockWrite;
  688. //--------------------------------------------------
  689. // Low level Socket calls
  690. //--------------------------------------------------
  691. function INetLibSockOpen(libRefnum: UInt16; inetH: MemHandle;
  692. scheme: UInt16 {INetSchemEnum}; var sockHP: MemHandle): Err; syscall inetLibTrapSockOpen;
  693. function INetLibSockStatus(libRefnum: UInt16; socketH: MemHandle; var statusP: UInt16;
  694. var sockErrP: Err; var inputReadyP, outputReadyP: Boolean): Err; syscall inetLibTrapSockStatus;
  695. function INetLibSockSettingGet(libRefnum: UInt16; socketH: MemHandle; setting: UInt16 {INetSockSettingEnum};
  696. bufP: Pointer; var bufLenP: UInt16): Err; syscall inetLibTrapSockSettingGet;
  697. function INetLibSockSettingSet(libRefnum: UInt16; socketH: MemHandle; setting: UInt16 {INetSockSettingEnum};
  698. bufP: Pointer; bufLen: UInt16): Err; syscall inetLibTrapSockSettingSet;
  699. function INetLibSockConnect(libRefnum: UInt16; sockH: MemHandle; var hostnameP: UInt8;
  700. port: UInt16; timeou: Int32): Err; syscall inetLibTrapSockConnect;
  701. //--------------------------------------------------
  702. // HTTP specific calls
  703. //--------------------------------------------------
  704. function INetLibSockHTTPReqCreate(libRefnum: UInt16; sockH: MemHandle; var verbP, resNameP, refererP: UInt8): Err; syscall inetLibTrapSockHTTPReqCreate;
  705. function INetLibSockHTTPAttrSet(libRefnum: UInt16; sockH: MemHandle; attr: UInt16 {inetHTTPAttrEnum};
  706. attrIndex: UInt16; var bufP: UInt8; bufLen, flags: UInt16): Err; syscall inetLibTrapSockHTTPAttrSet;
  707. function INetLibSockHTTPReqSend(libRefnum: UInt16; sockH: MemHandle; writeP: Pointer;
  708. writeLen: UInt32; timeout: Int32): Err; syscall inetLibTrapSockHTTPReqSend;
  709. function INetLibSockHTTPAttrGet(libRefnum: UInt16; sockH: MemHandle; attr: UInt16 {inetHTTPAttrEnum};
  710. attrIndex: UInt16; bufP: Pointer; var bufLenP: UInt32): Err; syscall inetLibTrapSockHTTPAttrGet;
  711. //--------------------------------------------------
  712. // Utilities
  713. //--------------------------------------------------
  714. function INetLibURLCrack(libRefnum: UInt16; var urlTextP: UInt8; var urlP: INetURLType): Err; syscall inetLibTrapURLCrack;
  715. function INetLibURLsAdd(libRefnum: UInt16; baseURLStr, embeddedURLStr, resultURLStr: PAnsiChar; var resultLenP: UInt16): Err; syscall inetLibTrapURLsAdd;
  716. function INetLibURLsCompare(libRefnum: UInt16; URLStr1, URLStr2: PAnsiChar): Int16; syscall inetLibTrapURLsCompare;
  717. function INetLibURLGetInfo(libRefnum: UInt16; inetH: MemHandle; var urlTextP: UInt8; var urlInfoP: INetURLInfoType): Err; syscall inetLibTrapURLGetInfo;
  718. type
  719. int = SmallInt;
  720. function INetLibWiCmd(refNum: UInt16; cmd: UInt16 {WiCmdEnum}; enableOrX, y: int): Boolean; syscall inetLibTrapWiCmd;
  721. function INetLibWirelessIndicatorCmd(refNum: UInt16; inetH: MemHandle; {WiCmdEnum} cmd: UInt16; enableOrX, y: int): Boolean; syscall inetLibTrapWirelessIndicatorCmd;
  722. function INetLibCheckAntennaState(refNum: UInt16): Err; syscall inetLibTrapCheckAntennaState;
  723. //--------------------------------------------------
  724. // Cache interface
  725. //--------------------------------------------------
  726. function INetLibCacheList(libRefnum: UInt16; inetH: MemHandle; var cacheIndexURLP: UInt8;
  727. var indexP: UInt16; var uidP: UInt32; cacheP: INetCacheEntryP): Err; syscall inetLibTrapCacheList;
  728. function INetLibCacheGetObject(libRefnum: UInt16; clientParamH: MemHandle; var urlTextP: UInt8;
  729. uniqueID: UInt32; cacheInfoP: INetCacheInfoPtr): Err; syscall inetLibTrapCacheGetObject;
  730. function INetLibCachePurge(libRefnum: UInt16; clientParamH: MemHandle; var urlTextP: UInt8; uniqueID: UInt32): Err; syscall inetLibTrapCachePurge;
  731. function INetLibCacheGetObjectV2(libRefnum: UInt16; clientParamH: MemHandle; var urlTextP: UInt8; uniqueID: UInt32;
  732. rcIndex: UInt16; cacheInfoP: INetCacheInfoPtr; cacheEntryP: INetCacheEntryP): Err; syscall inetLibTrapCacheGetObjectV2;
  733. function INetLibIndexedCacheFind(libRefnum: UInt16; cacheDBRef: DmOpenRef; var dataP: UInt8; lookFor: Int16; var indexP: UInt16;
  734. order: Int16; var cacheIdP: UInt32): Err; syscall inetLibTrapIndexedCacheFind;
  735. function INetLibPrepareCacheForHistory(libRefnum: UInt16; clientParamH: MemHandle): Err; syscall inetLibTrapPrepareCacheForHistory;
  736. //--------------------------------------------------
  737. // Configuration Calls
  738. //--------------------------------------------------
  739. function INetLibConfigMakeActive(refNum: UInt16; inetH: MemHandle; configIndex: UInt16): Err; syscall inetLibConfigMakeActive_;
  740. function INetLibConfigList(refNum: UInt16; var nameArray{[]}: INetConfigNameType; var arrayEntriesP: UInt16): Err; syscall inetLibConfigList_;
  741. function INetLibConfigIndexFromName(refNum: UInt16; nameP: INetConfigNamePtr; var indexP: UInt16): Err; syscall inetLibConfigIndexFromName_;
  742. function INetLibConfigDelete(refNum: UInt16; index: UInt16): Err; syscall inetLibConfigDelete_;
  743. function INetLibConfigSaveAs(refNum: UInt16; inetH: MemHandle; nameP: INetConfigNamePtr): Err; syscall inetLibConfigSaveAs_;
  744. function INetLibConfigRename(refNum: UInt16; index: UInt16; newNameP: INetConfigNamePtr): Err; syscall inetLibConfigRename_;
  745. function INetLibConfigAliasSet(refNum: UInt16; configIndex, aliasToIndex: UInt16): Err; syscall inetLibConfigAliasSet_;
  746. function INetLibConfigAliasGet(refNum: UInt16; aliasIndex: UInt16; var indexP: UInt16; var isAnotherAliasP: Boolean): Err; syscall inetLibConfigAliasGet_;
  747. //--------------------------------------------------
  748. // File specific calls
  749. //--------------------------------------------------
  750. function INetLibSockFileGetByIndex(libRefnum: UInt16; sockH: MemHandle; index: UInt32;
  751. var handleP: MemHandle; var offsetP, lengthP: UInt32): Err; syscall inetLibTrapSockFileGetByIndex;
  752. implementation
  753. end.