Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3066 lines
97 KiB

  1. /*
  2. File: InternetConfig.h
  3. Contains: Internet Config interfaces
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1999-2001 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. /*
  11. IMPORTANT NOTES ABOUT THE C HEADERS
  12. -----------------------------------
  13. o When you see the parameter 'y *x', you should be aware that
  14. you *cannot pass in nil*. In future this restriction may be eased,
  15. especially for the attr parameter to ICGetPref. Parameters where nil
  16. is legal are declared using the explicit pointer type, ie 'yPtr x'.
  17. o Strings are *Pascal* strings. This means that they must be word aligned.
  18. MPW and Think C do this automatically. The last time I checked, Metrowerks
  19. C does not. If it still doesn't, then IMHO it's a bug in their compiler
  20. and you should report it to them. [IC 1.4 and later no longer require
  21. word aligned strings. You can ignore this warning if you require IC 1.4
  22. or greater.]
  23. */
  24. /***********************************************************************************************/
  25. #ifndef __INTERNETCONFIG__
  26. #define __INTERNETCONFIG__
  27. #ifndef __ALIASES__
  28. #include <Aliases.h>
  29. #endif
  30. #ifndef __COMPONENTS__
  31. #include <Components.h>
  32. #endif
  33. #ifndef __AEDATAMODEL__
  34. #include <AEDataModel.h>
  35. #endif
  36. #if PRAGMA_ONCE
  37. #pragma once
  38. #endif
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42. #if PRAGMA_IMPORT
  43. #pragma import on
  44. #endif
  45. #if PRAGMA_STRUCT_ALIGN
  46. #pragma options align=mac68k
  47. #elif PRAGMA_STRUCT_PACKPUSH
  48. #pragma pack(push, 2)
  49. #elif PRAGMA_STRUCT_PACK
  50. #pragma pack(2)
  51. #endif
  52. /************************************************************************************************
  53. IC error codes
  54. ************************************************************************************************/
  55. enum {
  56. icPrefNotFoundErr = -666, /* preference not found (duh!) */
  57. icPermErr = -667, /* cannot set preference */
  58. icPrefDataErr = -668, /* problem with preference data */
  59. icInternalErr = -669, /* hmm, this is not good */
  60. icTruncatedErr = -670, /* more data was present than was returned */
  61. icNoMoreWritersErr = -671, /* you cannot begin a write session because someone else is already doing it */
  62. icNothingToOverrideErr = -672, /* no component for the override component to capture */
  63. icNoURLErr = -673, /* no URL found */
  64. icConfigNotFoundErr = -674, /* no configuration was found */
  65. icConfigInappropriateErr = -675, /* incorrect manufacturer code */
  66. icProfileNotFoundErr = -676, /* profile not found */
  67. icTooManyProfilesErr = -677 /* too many profiles in database */
  68. };
  69. /************************************************************************************************
  70. IC versions (not necessarily, but historically, from a component)
  71. ************************************************************************************************/
  72. enum {
  73. kICComponentInterfaceVersion0 = 0x00000000, /* IC >= 1.0 */
  74. kICComponentInterfaceVersion1 = 0x00010000, /* IC >= 1.1 */
  75. kICComponentInterfaceVersion2 = 0x00020000, /* IC >= 1.2 */
  76. kICComponentInterfaceVersion3 = 0x00030000, /* IC >= 2.0 */
  77. kICComponentInterfaceVersion4 = 0x00040000, /* IC >= 2.5 */
  78. kICComponentInterfaceVersion = kICComponentInterfaceVersion4 /* current version number is 4 */
  79. };
  80. /************************************************************************************************
  81. opaque type for preference reference
  82. ************************************************************************************************/
  83. typedef struct OpaqueICInstance* ICInstance;
  84. /************************************************************************************************
  85. a record that specifies a folder, an array of such records, and a pointer to such an array
  86. ************************************************************************************************/
  87. struct ICDirSpec {
  88. short vRefNum;
  89. long dirID;
  90. };
  91. typedef struct ICDirSpec ICDirSpec;
  92. typedef ICDirSpec ICDirSpecArray[4];
  93. typedef ICDirSpecArray * ICDirSpecArrayPtr;
  94. /************************************************************************************************
  95. preference attributes type, bit number constants, and mask constants
  96. ************************************************************************************************/
  97. typedef UInt32 ICAttr;
  98. enum {
  99. kICAttrLockedBit = 0,
  100. kICAttrVolatileBit = 1
  101. };
  102. enum {
  103. kICAttrNoChange = (unsigned long)0xFFFFFFFF, /* pass this to ICSetPref to tell it not to change the attributes */
  104. kICAttrLockedMask = 0x00000001,
  105. kICAttrVolatileMask = 0x00000002
  106. };
  107. /************************************************************************************************
  108. permissions for use with ICBegin
  109. ************************************************************************************************/
  110. typedef UInt8 ICPerm;
  111. enum {
  112. icNoPerm = 0,
  113. icReadOnlyPerm = 1,
  114. icReadWritePerm = 2
  115. };
  116. /************************************************************************************************
  117. a reference to an instance's current configuration
  118. ************************************************************************************************/
  119. #if CALL_NOT_IN_CARBON
  120. struct ICConfigRef {
  121. OSType manufacturer;
  122. /* other private data follows */
  123. };
  124. typedef struct ICConfigRef ICConfigRef;
  125. typedef ICConfigRef * ICConfigRefPtr;
  126. typedef ICConfigRefPtr * ICConfigRefHandle;
  127. #endif /* CALL_NOT_IN_CARBON */
  128. /************************************************************************************************
  129. profile IDs
  130. ************************************************************************************************/
  131. typedef long ICProfileID;
  132. typedef ICProfileID * ICProfileIDPtr;
  133. enum {
  134. kICNilProfileID = 0
  135. };
  136. /************************************************************************************************
  137. other constants
  138. ************************************************************************************************/
  139. enum {
  140. kICNoUserInteractionBit = 0
  141. };
  142. enum {
  143. kICNoUserInteractionMask = 0x00000001
  144. };
  145. enum {
  146. kICFileType = FOUR_CHAR_CODE('ICAp'),
  147. kICCreator = FOUR_CHAR_CODE('ICAp')
  148. };
  149. /************************************************************************************************
  150. Apple event constants
  151. ************************************************************************************************/
  152. enum {
  153. kInternetEventClass = FOUR_CHAR_CODE('GURL'),
  154. kAEGetURL = FOUR_CHAR_CODE('GURL'),
  155. kAEFetchURL = FOUR_CHAR_CODE('FURL'),
  156. keyAEAttaching = FOUR_CHAR_CODE('Atch')
  157. };
  158. /* AERegistry.i defines a compatible keyAEDestination */
  159. enum {
  160. kICEditPreferenceEventClass = FOUR_CHAR_CODE('ICAp'),
  161. kICEditPreferenceEvent = FOUR_CHAR_CODE('ICAp'),
  162. keyICEditPreferenceDestination = FOUR_CHAR_CODE('dest')
  163. };
  164. /************************************************************************************************
  165. constants for use with ICGetVersion
  166. ************************************************************************************************/
  167. enum {
  168. kICComponentVersion = 0, /* Return a component version, comparable to kICComponentInterfaceVersion */
  169. kICNumVersion = 1 /* Return a NumVersion structure */
  170. };
  171. /************************************************************************************************
  172. types and constants for use with kICDocumentFont, et. al.
  173. ************************************************************************************************/
  174. struct ICFontRecord {
  175. short size;
  176. Style face;
  177. char pad;
  178. Str255 font;
  179. };
  180. typedef struct ICFontRecord ICFontRecord;
  181. typedef ICFontRecord * ICFontRecordPtr;
  182. typedef ICFontRecordPtr * ICFontRecordHandle;
  183. /************************************************************************************************
  184. types and constants for use with kICCharacterSet, et. al.
  185. ************************************************************************************************/
  186. struct ICCharTable {
  187. unsigned char netToMac[256];
  188. unsigned char macToNet[256];
  189. };
  190. typedef struct ICCharTable ICCharTable;
  191. typedef ICCharTable * ICCharTablePtr;
  192. typedef ICCharTablePtr * ICCharTableHandle;
  193. /************************************************************************************************
  194. types and constants for use with kICHelper, et. al.
  195. ************************************************************************************************/
  196. struct ICAppSpec {
  197. OSType fCreator;
  198. Str63 name;
  199. };
  200. typedef struct ICAppSpec ICAppSpec;
  201. typedef ICAppSpec * ICAppSpecPtr;
  202. typedef ICAppSpecPtr * ICAppSpecHandle;
  203. struct ICAppSpecList {
  204. short numberOfItems;
  205. ICAppSpec appSpecs[1];
  206. };
  207. typedef struct ICAppSpecList ICAppSpecList;
  208. typedef ICAppSpecList * ICAppSpecListPtr;
  209. typedef ICAppSpecListPtr * ICAppSpecListHandle;
  210. /************************************************************************************************
  211. types and constants for use with kICDownloadFolder, et. al.
  212. ************************************************************************************************/
  213. #if !OLDROUTINENAMES
  214. struct ICFileSpec {
  215. Str31 volName;
  216. long volCreationDate;
  217. FSSpec fss;
  218. AliasRecord alias;
  219. /* plus extra data, aliasSize 0 means no alias manager present when*/
  220. /* ICFileSpecification was created*/
  221. };
  222. typedef struct ICFileSpec ICFileSpec;
  223. typedef ICFileSpec * ICFileSpecPtr;
  224. typedef ICFileSpecPtr * ICFileSpecHandle;
  225. #else
  226. struct ICFileSpec {
  227. Str31 vol_name;
  228. long vol_creation_date;
  229. FSSpec fss;
  230. AliasRecord alias;
  231. };
  232. typedef struct ICFileSpec ICFileSpec;
  233. typedef ICFileSpec * ICFileSpecPtr;
  234. typedef ICFileSpecPtr * ICFileSpecHandle;
  235. #endif /* !OLDROUTINENAMES */
  236. enum {
  237. kICFileSpecHeaderSize = sizeof(ICFileSpec) - sizeof(AliasRecord)
  238. };
  239. /************************************************************************************************
  240. types and constants for use with ICMapFilename, et. al.
  241. ************************************************************************************************/
  242. typedef long ICMapEntryFlags;
  243. typedef short ICFixedLength;
  244. #if !OLDROUTINENAMES
  245. struct ICMapEntry {
  246. short totalLength;
  247. ICFixedLength fixedLength;
  248. short version;
  249. OSType fileType;
  250. OSType fileCreator;
  251. OSType postCreator;
  252. ICMapEntryFlags flags;
  253. /* variable part starts here*/
  254. Str255 extension;
  255. Str255 creatorAppName;
  256. Str255 postAppName;
  257. Str255 MIMEType;
  258. Str255 entryName;
  259. };
  260. typedef struct ICMapEntry ICMapEntry;
  261. typedef ICMapEntry * ICMapEntryPtr;
  262. typedef ICMapEntryPtr * ICMapEntryHandle;
  263. #else
  264. struct ICMapEntry {
  265. short total_length;
  266. ICFixedLength fixed_length;
  267. short version;
  268. OSType file_type;
  269. OSType file_creator;
  270. OSType post_creator;
  271. ICMapEntryFlags flags;
  272. Str255 extension;
  273. Str255 creator_app_name;
  274. Str255 post_app_name;
  275. Str255 MIME_type;
  276. Str255 entry_name;
  277. };
  278. typedef struct ICMapEntry ICMapEntry;
  279. typedef ICMapEntry * ICMapEntryPtr;
  280. typedef ICMapEntryPtr * ICMapEntryHandle;
  281. #endif /* !OLDROUTINENAMES */
  282. enum {
  283. kICMapFixedLength = 22 /* number in fixedLength field*/
  284. };
  285. enum {
  286. kICMapBinaryBit = 0, /* file should be transfered in binary as opposed to text mode*/
  287. kICMapResourceForkBit = 1, /* the resource fork of the file is significant*/
  288. kICMapDataForkBit = 2, /* the data fork of the file is significant*/
  289. kICMapPostBit = 3, /* post process using post fields*/
  290. kICMapNotIncomingBit = 4, /* ignore this mapping for incoming files*/
  291. kICMapNotOutgoingBit = 5 /* ignore this mapping for outgoing files*/
  292. };
  293. enum {
  294. kICMapBinaryMask = 0x00000001, /* file should be transfered in binary as opposed to text mode*/
  295. kICMapResourceForkMask = 0x00000002, /* the resource fork of the file is significant*/
  296. kICMapDataForkMask = 0x00000004, /* the data fork of the file is significant*/
  297. kICMapPostMask = 0x00000008, /* post process using post fields*/
  298. kICMapNotIncomingMask = 0x00000010, /* ignore this mapping for incoming files*/
  299. kICMapNotOutgoingMask = 0x00000020 /* ignore this mapping for outgoing files*/
  300. };
  301. /************************************************************************************************
  302. types and constants for use with kICServices, et. al.
  303. ************************************************************************************************/
  304. typedef short ICServiceEntryFlags;
  305. struct ICServiceEntry {
  306. Str255 name;
  307. short port;
  308. ICServiceEntryFlags flags;
  309. };
  310. typedef struct ICServiceEntry ICServiceEntry;
  311. typedef ICServiceEntry * ICServiceEntryPtr;
  312. typedef ICServiceEntryPtr * ICServiceEntryHandle;
  313. enum {
  314. kICServicesTCPBit = 0,
  315. kICServicesUDPBit = 1 /* both bits can be set, which means the service is both TCP and UDP, eg daytime*/
  316. };
  317. enum {
  318. kICServicesTCPMask = 0x00000001,
  319. kICServicesUDPMask = 0x00000002 /* both bits can be set, which means the service is both TCP and UDP, eg daytime*/
  320. };
  321. struct ICServices {
  322. short count;
  323. ICServiceEntry services[1];
  324. };
  325. typedef struct ICServices ICServices;
  326. typedef ICServices * ICServicesPtr;
  327. typedef ICServicesPtr * ICServicesHandle;
  328. /************************************************************************************************
  329. default file name, for internal use, overridden by a component resource
  330. ************************************************************************************************/
  331. #if CALL_NOT_IN_CARBON
  332. #define kICDefaultFileName "\pInternet Preferences"
  333. #endif /* CALL_NOT_IN_CARBON */
  334. /************************************************************************************************
  335. keys
  336. ************************************************************************************************/
  337. /*
  338. key reserved for use by Internet Config
  339. */
  340. #define kICReservedKey "\pkICReservedKey"
  341. /*
  342. STR# -- formatted, list of Archie servers
  343. */
  344. #define kICArchieAll "\pArchieAll"
  345. /*
  346. PString -- formatted, preferred Archie server
  347. */
  348. #define kICArchiePreferred "\pArchiePreferred"
  349. /*
  350. ICCharTable -- Mac-to-Net and Net-to-Mac character translation
  351. */
  352. #define kICCharacterSet "\pCharacterSet"
  353. /*
  354. ICFontRecord -- font used for proportional text
  355. */
  356. #define kICDocumentFont "\pDocumentFont"
  357. /*
  358. ICFileSpec -- where to put newly downloaded files
  359. */
  360. #define kICDownloadFolder "\pDownloadFolder"
  361. /*
  362. PString -- user@host.domain, email address of user, ie return address
  363. */
  364. #define kICEmail "\pEmail"
  365. /*
  366. PString -- host.domain, default FTP server
  367. */
  368. #define kICFTPHost "\pFTPHost"
  369. /*
  370. PString -- second level FTP proxy authorisation
  371. */
  372. #define kICFTPProxyAccount "\pFTPProxyAccount"
  373. /*
  374. PString -- host.domain
  375. */
  376. #define kICFTPProxyHost "\pFTPProxyHost"
  377. /*
  378. PString -- scrambled, password for FTPProxyUser
  379. */
  380. #define kICFTPProxyPassword "\pFTPProxyPassword"
  381. /*
  382. PString -- first level FTP proxy authorisation
  383. */
  384. #define kICFTPProxyUser "\pFTPProxyUser"
  385. /*
  386. PString -- host.domain, default finger server
  387. */
  388. #define kICFingerHost "\pFingerHost"
  389. /*
  390. PString -- host.domain, default Gopher server
  391. */
  392. #define kICGopherHost "\pGopherHost"
  393. /*
  394. PString -- host.domain, see note in Prog Docs
  395. */
  396. #define kICGopherProxy "\pGopherProxy"
  397. /*
  398. PString -- host.domain
  399. */
  400. #define kICHTTPProxyHost "\pHTTPProxyHost"
  401. /*
  402. ICAppSpec -- helpers for URL schemes
  403. */
  404. #define kICHelper "\pHelper�"
  405. /*
  406. PString -- description for URL scheme
  407. */
  408. #define kICHelperDesc "\pHelperDesc�"
  409. /*
  410. ICAppSpecList -- list of common helpers for URL schemes
  411. */
  412. #define kICHelperList "\pHelperList�"
  413. /*
  414. PString -- host.domain, Internet Relay Chat server
  415. */
  416. #define kICIRCHost "\pIRCHost"
  417. /*
  418. STR# -- formatted, list of Info-Mac servers
  419. */
  420. #define kICInfoMacAll "\pInfoMacAll"
  421. /*
  422. PString -- formatted, preferred Info-Mac server
  423. */
  424. #define kICInfoMacPreferred "\pInfoMacPreferred"
  425. /*
  426. PString -- string LDAP thing
  427. */
  428. #define kICLDAPSearchbase "\pLDAPSearchbase"
  429. /*
  430. PString -- host.domain
  431. */
  432. #define kICLDAPServer "\pLDAPServer"
  433. /*
  434. ICFontRecord -- font used for lists of items (eg news article lists)
  435. */
  436. #define kICListFont "\pListFont"
  437. /*
  438. PString -- host for MacSearch queries
  439. */
  440. #define kICMacSearchHost "\pMacSearchHost"
  441. /*
  442. PString -- user@host.domain, account from which to fetch mail
  443. */
  444. #define kICMailAccount "\pMailAccount"
  445. /*
  446. TEXT -- extra headers for mail messages
  447. */
  448. #define kICMailHeaders "\pMailHeaders"
  449. /*
  450. PString -- scrambled, password for MailAccount
  451. */
  452. #define kICMailPassword "\pMailPassword"
  453. /*
  454. ICMapEntries -- file type mapping, see documentation
  455. */
  456. #define kICMapping "\pMapping"
  457. /*
  458. PString -- host.domain, NNTP server
  459. */
  460. #define kICNNTPHost "\pNNTPHost"
  461. /*
  462. PString -- host.domain, Network Time Protocol (NTP)
  463. */
  464. #define kICNTPHost "\pNTPHost"
  465. /*
  466. Boolean
  467. */
  468. #define kICNewMailDialog "\pNewMailDialog"
  469. /*
  470. Boolean -- how to announce new mail
  471. */
  472. #define kICNewMailFlashIcon "\pNewMailFlashIcon"
  473. /*
  474. Boolean
  475. */
  476. #define kICNewMailPlaySound "\pNewMailPlaySound"
  477. /*
  478. PString
  479. */
  480. #define kICNewMailSoundName "\pNewMailSoundName"
  481. /*
  482. PString -- scrambled, password for NewsAuthUsername
  483. */
  484. #define kICNewsAuthPassword "\pNewsAuthPassword"
  485. /*
  486. PString -- user name for authorised news servers
  487. */
  488. #define kICNewsAuthUsername "\pNewsAuthUsername"
  489. /*
  490. TEXT -- extra headers for news messages
  491. */
  492. #define kICNewsHeaders "\pNewsHeaders"
  493. /*
  494. STR# -- list of domains not to be proxied
  495. */
  496. #define kICNoProxyDomains "\pNoProxyDomains"
  497. /*
  498. PString -- for X-Organization string
  499. */
  500. #define kICOrganization "\pOrganization"
  501. /*
  502. PString -- host.domain, default Ph server
  503. */
  504. #define kICPhHost "\pPhHost"
  505. /*
  506. TEXT -- default response for finger servers
  507. */
  508. #define kICPlan "\pPlan"
  509. /*
  510. ICFontRecord -- font used to print ScreenFont
  511. */
  512. #define kICPrinterFont "\pPrinterFont"
  513. /*
  514. PString -- used to quote responses in news and mail
  515. */
  516. #define kICQuotingString "\pQuotingString"
  517. /*
  518. PString -- real name of user
  519. */
  520. #define kICRealName "\pRealName"
  521. /*
  522. PString -- RTSP Proxy Host
  523. */
  524. #define kICRTSPProxyHost "\pRTSPProxyHost"
  525. /*
  526. PString -- host.domain, SMTP server
  527. */
  528. #define kICSMTPHost "\pSMTPHost"
  529. /*
  530. ICFontRecord -- font used for monospaced text (eg news articles)
  531. */
  532. #define kICScreenFont "\pScreenFont"
  533. /*
  534. ICServices -- TCP and IP port-to-name mapping
  535. */
  536. #define kICServices "\pServices"
  537. /*
  538. TEXT -- append to news and mail messages
  539. */
  540. #define kICSignature "\pSignature"
  541. /*
  542. TEXT -- preferred mailing address
  543. */
  544. #define kICSnailMailAddress "\pSnailMailAddress"
  545. /*
  546. PString -- host.domain, remember that host.domain format allows ":port" and " port"
  547. */
  548. #define kICSocksHost "\pSocksHost"
  549. /*
  550. PString -- host.domain, default Telnet address
  551. */
  552. #define kICTelnetHost "\pTelnetHost"
  553. /*
  554. STR# -- formatted, list of UMich servers
  555. */
  556. #define kICUMichAll "\pUMichAll"
  557. /*
  558. PString -- formatted, preferred UMich server
  559. */
  560. #define kICUMichPreferred "\pUMichPreferred"
  561. /*
  562. Boolean
  563. */
  564. #define kICUseFTPProxy "\pUseFTPProxy"
  565. /*
  566. Boolean
  567. */
  568. #define kICUseGopherProxy "\pUseGopherProxy"
  569. /*
  570. Boolean
  571. */
  572. #define kICUseHTTPProxy "\pUseHTTPProxy"
  573. /*
  574. Boolean -- use PASV command for FTP transfers
  575. */
  576. #define kICUsePassiveFTP "\pUsePassiveFTP"
  577. /*
  578. Boolean
  579. */
  580. #define kICUseRTSPProxy "\pUseRTSPProxy"
  581. /*
  582. Boolean
  583. */
  584. #define kICUseSocks "\pUseSocks"
  585. /*
  586. PString -- no idea
  587. */
  588. #define kICWAISGateway "\pWAISGateway"
  589. /*
  590. PString -- URL, users default WWW page
  591. */
  592. #define kICWWWHomePage "\pWWWHomePage"
  593. /*
  594. RGBColor -- background colour for web pages
  595. */
  596. #define kICWebBackgroundColour "\pWebBackgroundColour"
  597. /*
  598. RGBColor -- colour for read links
  599. */
  600. #define kICWebReadColor "\p646F6777�WebReadColor"
  601. /*
  602. PString -- URL, users default search page
  603. */
  604. #define kICWebSearchPagePrefs "\pWebSearchPagePrefs"
  605. /*
  606. RGBColor -- colour for normal text
  607. */
  608. #define kICWebTextColor "\pWebTextColor"
  609. /*
  610. Boolean -- whether to underline links
  611. */
  612. #define kICWebUnderlineLinks "\p646F6777�WebUnderlineLinks"
  613. /*
  614. RGBColor -- colour for unread links
  615. */
  616. #define kICWebUnreadColor "\p646F6777�WebUnreadColor"
  617. /*
  618. PString -- host.domain, default whois server
  619. */
  620. #define kICWhoisHost "\pWhoisHost"
  621. /************************************************************************************************
  622. FUNCTIONS
  623. What do the annotations after each API mean?
  624. --------------------------------------------
  625. [r1] Requires IC 1.1 or higher.
  626. [r2] Requires IC 1.2 or higher.
  627. [r3] Requires IC 2.0 or higher.
  628. [r4] Requires IC 2.5 or higher.
  629. IMPORTANT:
  630. In IC 2.5, instances automatically use the default configuration.
  631. You no longer need to configure an instance explicitly, except
  632. if your code might run with an older version of IC. So the following
  633. notes only apply to IC 2.0 and earlier.
  634. [c1] You must have specified a configuration before calling this routine.
  635. [c2] You must have specified the default configuration before calling this
  636. routine.
  637. [c3] You do not need to specify a configuration before calling this routine.
  638. [b1] You must be inside a Begin/End pair when calling this routine.
  639. [b2] You must be inside a Begin/End read/write pair when calling this routine.
  640. [b3] You do not need to be inside a Begin/End pair when calling this routine.
  641. [b4] If you are getting or setting multiple preferences, you should make this
  642. call inside a Begin/End pair. If you do not make this call inside a Begin/End
  643. pair, the call will automatically do it for you.
  644. [b5] It is illegal to call this routine inside a Begin/End pair.
  645. ************************************************************************************************/
  646. /* ***** Starting Up and Shutting Down ***** */
  647. /*
  648. * ICStart()
  649. *
  650. * Availability:
  651. * Non-Carbon CFM: in InternetConfig 2.5 and later
  652. * CarbonLib: in CarbonLib 1.0.2 and later
  653. * Mac OS X: in version 10.0 and later
  654. */
  655. EXTERN_API( OSStatus )
  656. ICStart(
  657. ICInstance * inst,
  658. OSType signature);
  659. /* Call this at application initialisation. Set signature to a value
  660. * which has been regsitered with DTS to allow for future expansion
  661. * of the IC system. Returns inst as a connection to the IC system.
  662. */
  663. /*
  664. * ICStop()
  665. *
  666. * Availability:
  667. * Non-Carbon CFM: in InternetConfig 2.5 and later
  668. * CarbonLib: in CarbonLib 1.0.2 and later
  669. * Mac OS X: in version 10.0 and later
  670. */
  671. EXTERN_API( OSStatus )
  672. ICStop(ICInstance inst);
  673. /* [b5]
  674. * Call this at application initialisation, after which inst
  675. * is no longer valid connection to IC.
  676. */
  677. /*
  678. * ICGetVersion()
  679. *
  680. * Availability:
  681. * Non-Carbon CFM: in InternetConfig 2.5 and later
  682. * CarbonLib: in CarbonLib 1.0.2 and later
  683. * Mac OS X: in version 10.0 and later
  684. */
  685. EXTERN_API( OSStatus )
  686. ICGetVersion(
  687. ICInstance inst,
  688. long whichVersion,
  689. UInt32 * version) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0032, 0x7000, 0xA82A);
  690. /* [r4] [c3] [b3]
  691. * Returns the version of Internet Config. Pass kICComponentVersion
  692. * to get the version as previously returned by GetComponenVerson.
  693. * Pass kICNumVersion to get a NumVersion structure.
  694. */
  695. /* ***** Specifying a Configuration ***** */
  696. #if CALL_NOT_IN_CARBON
  697. /*
  698. * ICFindConfigFile()
  699. *
  700. * Availability:
  701. * Non-Carbon CFM: in InternetConfig 2.5 and later
  702. * CarbonLib: not available
  703. * Mac OS X: not available
  704. */
  705. EXTERN_API( OSStatus )
  706. ICFindConfigFile(
  707. ICInstance inst,
  708. short count,
  709. ICDirSpecArrayPtr folders) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0002, 0x7000, 0xA82A);
  710. /* [b5]
  711. * Call to configure this connection to IC.
  712. * Set count as the number of valid elements in folders.
  713. * Set folders to a pointer to the folders to search.
  714. * Setting count to 0 and folders to nil is OK.
  715. * Searches the specified folders and then the Preferences folder
  716. * in a unspecified manner.
  717. */
  718. /*
  719. * ICFindUserConfigFile()
  720. *
  721. * Availability:
  722. * Non-Carbon CFM: in InternetConfig 2.5 and later
  723. * CarbonLib: not available
  724. * Mac OS X: not available
  725. */
  726. EXTERN_API( OSStatus )
  727. ICFindUserConfigFile(
  728. ICInstance inst,
  729. ICDirSpec * where) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000E, 0x7000, 0xA82A);
  730. /* [r1] [b5]
  731. * Similar to ICFindConfigFile except that it only searches the folder
  732. * specified in where. If the input parameters are valid the routine
  733. * will always successful configure the instance, creating an
  734. * empty configuration if necessary
  735. * For use with double-clickable preference files.
  736. */
  737. /*
  738. * ICGeneralFindConfigFile()
  739. *
  740. * Availability:
  741. * Non-Carbon CFM: in InternetConfig 2.5 and later
  742. * CarbonLib: not available
  743. * Mac OS X: not available
  744. */
  745. EXTERN_API( OSStatus )
  746. ICGeneralFindConfigFile(
  747. ICInstance inst,
  748. Boolean searchPrefs,
  749. Boolean canCreate,
  750. short count,
  751. ICDirSpecArrayPtr folders) FIVEWORDINLINE(0x2F3C, 0x000A, 0x001E, 0x7000, 0xA82A);
  752. /* [r2] [b5]
  753. * Call to configure this connection to IC.
  754. * This routine acts as a more general replacement for
  755. * ICFindConfigFile and ICFindUserConfigFile.
  756. * Set search_prefs to true if you want it to search the preferences folder.
  757. * Set can_create to true if you want it to be able to create a new config.
  758. * Set count as the number of valid elements in folders.
  759. * Set folders to a pointer to the folders to search.
  760. * Setting count to 0 and folders to nil is OK.
  761. * Searches the specified folders and then optionally the Preferences folder
  762. * in a unspecified manner.
  763. */
  764. /*
  765. * ICChooseConfig()
  766. *
  767. * Availability:
  768. * Non-Carbon CFM: in InternetConfig 2.5 and later
  769. * CarbonLib: not available
  770. * Mac OS X: not available
  771. */
  772. EXTERN_API( OSStatus )
  773. ICChooseConfig(ICInstance inst) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0021, 0x7000, 0xA82A);
  774. /* [r2] [b5]
  775. * Requests the user to choose a configuration, typically using some
  776. * sort of modal dialog. If the user cancels the dialog the configuration
  777. * state will be unaffected.
  778. */
  779. /*
  780. * ICChooseNewConfig()
  781. *
  782. * Availability:
  783. * Non-Carbon CFM: in InternetConfig 2.5 and later
  784. * CarbonLib: not available
  785. * Mac OS X: not available
  786. */
  787. EXTERN_API( OSStatus )
  788. ICChooseNewConfig(ICInstance inst) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0022, 0x7000, 0xA82A);
  789. /* [r2] [b5]
  790. * Requests the user to create a new configuration, typically using some
  791. * sort of modal dialog. If the user cancels the dialog the configuration
  792. * state will be unaffected.
  793. */
  794. #endif /* CALL_NOT_IN_CARBON */
  795. /*
  796. * ICGetConfigName()
  797. *
  798. * Availability:
  799. * Non-Carbon CFM: in InternetConfig 2.5 and later
  800. * CarbonLib: in CarbonLib 1.0.2 and later
  801. * Mac OS X: in version 10.0 and later
  802. */
  803. EXTERN_API( OSStatus )
  804. ICGetConfigName(
  805. ICInstance inst,
  806. Boolean longname,
  807. Str255 name) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0023, 0x7000, 0xA82A);
  808. /* [r2] [c1] [b3]
  809. * Returns a string that describes the current configuration at a user
  810. * level. Set longname to true if you want a long name, up to 255
  811. * characters, or false if you want a short name, typically about 32
  812. * characters.
  813. * The returned string is for user display only. If you rely on the
  814. * exact format of it, you will conflict with any future IC
  815. * implementation that doesn't use explicit preference files.
  816. */
  817. #if CALL_NOT_IN_CARBON
  818. /*
  819. * ICGetConfigReference()
  820. *
  821. * Availability:
  822. * Non-Carbon CFM: in InternetConfig 2.5 and later
  823. * CarbonLib: not available
  824. * Mac OS X: not available
  825. */
  826. EXTERN_API( OSStatus )
  827. ICGetConfigReference(
  828. ICInstance inst,
  829. ICConfigRefHandle ref) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001F, 0x7000, 0xA82A);
  830. /* [r2] [c1] [b3]
  831. * Returns a self-contained reference to the instance's current
  832. * configuration.
  833. * ref must be a valid non-nil handle and it will be resized to fit the
  834. * resulting data.
  835. */
  836. /*
  837. * ICSetConfigReference()
  838. *
  839. * Availability:
  840. * Non-Carbon CFM: in InternetConfig 2.5 and later
  841. * CarbonLib: not available
  842. * Mac OS X: not available
  843. */
  844. EXTERN_API( OSStatus )
  845. ICSetConfigReference(
  846. ICInstance inst,
  847. ICConfigRefHandle ref,
  848. long flags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0020, 0x7000, 0xA82A);
  849. /* [r2] [b5]
  850. * Reconfigures the instance using a configuration reference that was
  851. * got using ICGetConfigReference reference. Set the
  852. * icNoUserInteraction_bit in flags if you require that this routine
  853. * not present a modal dialog. Other flag bits are reserved and should
  854. * be set to zero.
  855. * ref must not be nil.
  856. */
  857. /* ***** Private Routines *****
  858. *
  859. * If you are calling these routines, you are most probably doing something
  860. * wrong. Please read the documentation for more details.
  861. */
  862. /*
  863. * ICSpecifyConfigFile()
  864. *
  865. * Availability:
  866. * Non-Carbon CFM: in InternetConfig 2.5 and later
  867. * CarbonLib: not available
  868. * Mac OS X: not available
  869. */
  870. EXTERN_API( OSStatus )
  871. ICSpecifyConfigFile(
  872. ICInstance inst,
  873. FSSpec * config) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
  874. /* [b5]
  875. * For use only by the IC application.
  876. * If you call this routine yourself, you will conflict with any
  877. * future IC implementation that doesn't use explicit preference files.
  878. */
  879. /*
  880. * ICRefreshCaches()
  881. *
  882. * Availability:
  883. * Non-Carbon CFM: in InternetConfig 2.5 and later
  884. * CarbonLib: not available
  885. * Mac OS X: not available
  886. */
  887. EXTERN_API( OSStatus )
  888. ICRefreshCaches(ICInstance inst) FIVEWORDINLINE(0x2F3C, 0x0000, 0x002F, 0x7000, 0xA82A);
  889. /* [r3] [c1] [b3]
  890. * For use only by the IC application.
  891. * If you call this routine yourself, you will conflict with any
  892. * future IC implementation that doesn't use explicit preference files.
  893. */
  894. /* ***** Getting Information ***** */
  895. #endif /* CALL_NOT_IN_CARBON */
  896. /*
  897. * ICGetSeed()
  898. *
  899. * Availability:
  900. * Non-Carbon CFM: in InternetConfig 2.5 and later
  901. * CarbonLib: in CarbonLib 1.0.2 and later
  902. * Mac OS X: in version 10.0 and later
  903. */
  904. EXTERN_API( OSStatus )
  905. ICGetSeed(
  906. ICInstance inst,
  907. long * seed) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
  908. /* [c3] [b3]
  909. * Returns the current seed for the IC prefs database.
  910. * This seed changes each time a non-volatile preference is changed.
  911. * You can poll this to determine if any cached preferences change.
  912. */
  913. /*
  914. * ICGetPerm()
  915. *
  916. * Availability:
  917. * Non-Carbon CFM: in InternetConfig 2.5 and later
  918. * CarbonLib: in CarbonLib 1.0.2 and later
  919. * Mac OS X: in version 10.0 and later
  920. */
  921. EXTERN_API( OSStatus )
  922. ICGetPerm(
  923. ICInstance inst,
  924. ICPerm * perm) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
  925. /* [c3] [b3]
  926. * Returns the access permissions currently associated with this instance.
  927. * While applications normally know what permissions they have,
  928. * this routine is designed for use by override components.
  929. */
  930. #if CALL_NOT_IN_CARBON
  931. /*
  932. * ICDefaultFileName()
  933. *
  934. * Availability:
  935. * Non-Carbon CFM: in InternetConfig 2.5 and later
  936. * CarbonLib: not available
  937. * Mac OS X: not available
  938. */
  939. EXTERN_API( OSStatus )
  940. ICDefaultFileName(
  941. ICInstance inst,
  942. Str63 name) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000B, 0x7000, 0xA82A);
  943. /* [c3] [b3]
  944. * Returns the default file name for IC preference files.
  945. * Applications should never need to call this routine.
  946. * If you rely on information returned by this routine yourself,
  947. * you may conflict with any future IC implementation that doesn't use
  948. * explicit preference files.
  949. * The component calls this routine to set up the default IC file name.
  950. * This allows this operation to be intercepted by a component that has
  951. * captured us. It currently gets it from the component resource file.
  952. * The glue version is hardwired to "Internet Preferences".
  953. */
  954. /*
  955. * ICGetComponentInstance()
  956. *
  957. * Availability:
  958. * Non-Carbon CFM: in InternetConfig 2.5 and later
  959. * CarbonLib: not available
  960. * Mac OS X: not available
  961. */
  962. EXTERN_API( OSStatus )
  963. ICGetComponentInstance(
  964. ICInstance inst,
  965. ComponentInstance * componentInst);
  966. /* [c3] [b3]
  967. * Returns noErr and the connection to the IC component,
  968. * if we're using the component.
  969. * Returns badComponenInstance and nil if we're operating with glue.
  970. */
  971. /* ***** Reading and Writing Preferences ***** */
  972. #endif /* CALL_NOT_IN_CARBON */
  973. /*
  974. * ICBegin()
  975. *
  976. * Availability:
  977. * Non-Carbon CFM: in InternetConfig 2.5 and later
  978. * CarbonLib: in CarbonLib 1.0.2 and later
  979. * Mac OS X: in version 10.0 and later
  980. */
  981. EXTERN_API( OSStatus )
  982. ICBegin(
  983. ICInstance inst,
  984. ICPerm perm) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0005, 0x7000, 0xA82A);
  985. /* [c1] [b5]
  986. * Starting reading or writing multiple preferences.
  987. * A call to this must be balanced by a call to ICEnd.
  988. * Do not call WaitNextEvent between these calls.
  989. * The perm specifies whether you intend to read or read/write.
  990. * Only one writer is allowed per instance.
  991. * Note that this may open resource files that are not closed
  992. * until you call ICEnd.
  993. */
  994. /*
  995. * ICGetPref()
  996. *
  997. * Availability:
  998. * Non-Carbon CFM: in InternetConfig 2.5 and later
  999. * CarbonLib: in CarbonLib 1.0.2 and later
  1000. * Mac OS X: in version 10.0 and later
  1001. */
  1002. EXTERN_API( OSStatus )
  1003. ICGetPref(
  1004. ICInstance inst,
  1005. ConstStr255Param key,
  1006. ICAttr * attr,
  1007. void * buf,
  1008. long * size) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0006, 0x7000, 0xA82A);
  1009. /* [c1] [b4]
  1010. * Reads the preference specified by key from the IC database to the
  1011. * buffer pointed to by buf and size.
  1012. * key must not be the empty string.
  1013. * If buf is nil then no data is returned.
  1014. * size must be non-negative.
  1015. * attr and size are always set on return. On errors (except icTruncatedErr)
  1016. * attr is set to ICattr_no_change and size is set to 0.
  1017. * size is the actual size of the data.
  1018. * attr is set to the attributes associated with the preference.
  1019. * If this routine returns icTruncatedErr then the other returned
  1020. * values are valid except that only the first size bytes have been
  1021. * return. size is adjusted to reflect the true size of the preference.
  1022. * Returns icPrefNotFound if there is no preference for the key.
  1023. */
  1024. /*
  1025. * ICSetPref()
  1026. *
  1027. * Availability:
  1028. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1029. * CarbonLib: in CarbonLib 1.0.2 and later
  1030. * Mac OS X: in version 10.0 and later
  1031. */
  1032. EXTERN_API( OSStatus )
  1033. ICSetPref(
  1034. ICInstance inst,
  1035. ConstStr255Param key,
  1036. ICAttr attr,
  1037. const void * buf,
  1038. long size) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0007, 0x7000, 0xA82A);
  1039. /* [c1] [b4]
  1040. * Sets the preference specified by key from the IC database to the
  1041. * value pointed to by buf and size.
  1042. * key must not be the empty string.
  1043. * size must be non-negative.
  1044. * If buf is nil then the preference value is not set and size is ignored.
  1045. * If buf is not nil then the preference value is set to the size
  1046. * bytes pointed to by buf.
  1047. * If attr is ICattr_no_change then the preference attributes are not set.
  1048. * Otherwise the preference attributes are set to attr.
  1049. * Returns icPermErr if the previous ICBegin was passed icReadOnlyPerm.
  1050. * Returns icPermErr if current attr is locked, new attr is locked and buf <> nil.
  1051. */
  1052. /*
  1053. * ICFindPrefHandle()
  1054. *
  1055. * Availability:
  1056. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1057. * CarbonLib: in CarbonLib 1.0.2 and later
  1058. * Mac OS X: in version 10.0 and later
  1059. */
  1060. EXTERN_API( OSStatus )
  1061. ICFindPrefHandle(
  1062. ICInstance inst,
  1063. ConstStr255Param key,
  1064. ICAttr * attr,
  1065. Handle prefh) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0024, 0x7000, 0xA82A);
  1066. /* [r2] [c1] [b4]
  1067. * This routine effectively replaces ICGetPrefHandle.
  1068. * Reads the preference specified by key from the IC database into
  1069. * a handle, prefh.
  1070. * key must not be the empty string.
  1071. * attr is set to the attributes associated with the preference.
  1072. * You must set prefh to a non-nil handle before calling this routine.
  1073. * If the preference does not exist, icPrefNotFoundErr is returned.
  1074. */
  1075. /*
  1076. * ICGetPrefHandle()
  1077. *
  1078. * Availability:
  1079. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1080. * CarbonLib: in CarbonLib 1.0.2 and later
  1081. * Mac OS X: in version 10.0 and later
  1082. */
  1083. EXTERN_API( OSStatus )
  1084. ICGetPrefHandle(
  1085. ICInstance inst,
  1086. ConstStr255Param key,
  1087. ICAttr * attr,
  1088. Handle * prefh) FIVEWORDINLINE(0x2F3C, 0x000C, 0x001A, 0x7000, 0xA82A);
  1089. /* [r1] [c1] [b4]
  1090. * This routine is now obsolete. Use ICFindPrefHandle instead.
  1091. * Reads the preference specified by key from the IC database into
  1092. * a newly created handle, prefh.
  1093. * key must not be the empty string.
  1094. * attr is set to the attributes associated with the preference.
  1095. * The incoming value of prefh is ignored.
  1096. * A new handle is created in the current heap and returned in prefh.
  1097. * If the routine returns an error, prefh is set to nil.
  1098. * If the preference does not exist, no error is returned and prefh is set
  1099. * to an empty handle.
  1100. */
  1101. /*
  1102. * ICSetPrefHandle()
  1103. *
  1104. * Availability:
  1105. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1106. * CarbonLib: in CarbonLib 1.0.2 and later
  1107. * Mac OS X: in version 10.0 and later
  1108. */
  1109. EXTERN_API( OSStatus )
  1110. ICSetPrefHandle(
  1111. ICInstance inst,
  1112. ConstStr255Param key,
  1113. ICAttr attr,
  1114. Handle prefh) FIVEWORDINLINE(0x2F3C, 0x000C, 0x001B, 0x7000, 0xA82A);
  1115. /* [r1] [c1] [b4]
  1116. * Sets the preference specified by key from the IC database to the
  1117. * value contained in prefh.
  1118. * key must not be the empty string.
  1119. * If prefh is nil then the preference value is not set.
  1120. * If buf is not nil then the preference value is set to the data
  1121. * contained in it.
  1122. * If attr is ICattr_no_change then the preference attributes are not set.
  1123. * Otherwise the preference attributes are set to attr.
  1124. * Returns icPermErr if the previous ICBegin was passed icReadOnlyPerm.
  1125. * Returns icPermErr if current attr is locked, new attr is locked and prefh <> nil.
  1126. */
  1127. /*
  1128. * ICCountPref()
  1129. *
  1130. * Availability:
  1131. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1132. * CarbonLib: in CarbonLib 1.0.2 and later
  1133. * Mac OS X: in version 10.0 and later
  1134. */
  1135. EXTERN_API( OSStatus )
  1136. ICCountPref(
  1137. ICInstance inst,
  1138. long * count) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0008, 0x7000, 0xA82A);
  1139. /* [c1] [b1]
  1140. * Counts the total number of preferences.
  1141. * If the routine returns an error, count is set to 0.
  1142. */
  1143. /*
  1144. * ICGetIndPref()
  1145. *
  1146. * Availability:
  1147. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1148. * CarbonLib: in CarbonLib 1.0.2 and later
  1149. * Mac OS X: in version 10.0 and later
  1150. */
  1151. EXTERN_API( OSStatus )
  1152. ICGetIndPref(
  1153. ICInstance inst,
  1154. long index,
  1155. Str255 key) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0009, 0x7000, 0xA82A);
  1156. /* [c1] [b1]
  1157. * Returns the key of the index'th preference.
  1158. * index must be positive.
  1159. * Returns icPrefNotFoundErr if index is greater than the total number of preferences.
  1160. * If the routine returns an error, key is undefined.
  1161. */
  1162. /*
  1163. * ICDeletePref()
  1164. *
  1165. * Availability:
  1166. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1167. * CarbonLib: in CarbonLib 1.0.2 and later
  1168. * Mac OS X: in version 10.0 and later
  1169. */
  1170. EXTERN_API( OSStatus )
  1171. ICDeletePref(
  1172. ICInstance inst,
  1173. ConstStr255Param key) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
  1174. /* [c1] [b2]
  1175. * Deletes the preference specified by key.
  1176. * key must not be the empty string.
  1177. * Returns icPrefNotFound if the preference specified by key is not present.
  1178. */
  1179. /*
  1180. * ICEnd()
  1181. *
  1182. * Availability:
  1183. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1184. * CarbonLib: in CarbonLib 1.0.2 and later
  1185. * Mac OS X: in version 10.0 and later
  1186. */
  1187. EXTERN_API( OSStatus )
  1188. ICEnd(ICInstance inst) FIVEWORDINLINE(0x2F3C, 0x0000, 0x000A, 0x7000, 0xA82A);
  1189. /* [c1] [b1]
  1190. * Terminates a preference session, as started by ICBegin.
  1191. * You must have called ICBegin before calling this routine.
  1192. */
  1193. /*
  1194. * ICGetDefaultPref()
  1195. *
  1196. * Availability:
  1197. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1198. * CarbonLib: in CarbonLib 1.0.2 and later
  1199. * Mac OS X: in version 10.0 and later
  1200. */
  1201. EXTERN_API( OSStatus )
  1202. ICGetDefaultPref(
  1203. ICInstance inst,
  1204. ConstStr255Param key,
  1205. Handle prefH) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0031, 0x7000, 0xA82A);
  1206. /* [r4] [c3] [b5]
  1207. * Returns a default preference value for the specified key. You
  1208. * must pass in a valid prefH, which is resized to fit the data.
  1209. */
  1210. /* ***** User Interface Stuff ***** */
  1211. /*
  1212. * ICEditPreferences()
  1213. *
  1214. * Availability:
  1215. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1216. * CarbonLib: in CarbonLib 1.0.2 and later
  1217. * Mac OS X: in version 10.0 and later
  1218. */
  1219. EXTERN_API( OSStatus )
  1220. ICEditPreferences(
  1221. ICInstance inst,
  1222. ConstStr255Param key) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000F, 0x7000, 0xA82A);
  1223. /* [r1] [c1] [b3]
  1224. * Instructs IC to display the user interface associated with editing
  1225. * preferences and focusing on the preference specified by key.
  1226. * If key is the empty string then no preference should be focused upon.
  1227. * You must have specified a configuration before calling this routine.
  1228. * You do not need to call ICBegin before calling this routine.
  1229. * In the current implementation this launches the IC application
  1230. * (or brings it to the front) and displays the window containing
  1231. * the preference specified by key.
  1232. * It may have a radically different implementation in future
  1233. * IC systems.
  1234. */
  1235. /* ***** URL Handling ***** */
  1236. /*
  1237. * ICLaunchURL()
  1238. *
  1239. * Availability:
  1240. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1241. * CarbonLib: in CarbonLib 1.0.2 and later
  1242. * Mac OS X: in version 10.0 and later
  1243. */
  1244. EXTERN_API( OSStatus )
  1245. ICLaunchURL(
  1246. ICInstance inst,
  1247. ConstStr255Param hint,
  1248. const void * data,
  1249. long len,
  1250. long * selStart,
  1251. long * selEnd) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0011, 0x7000, 0xA82A);
  1252. /* [r1] [c1] [b3]
  1253. * Parses a URL out of the specified text and feeds it off to the
  1254. * appropriate helper.
  1255. * hint indicates the default scheme for URLs of the form "name@address".
  1256. * If hint is the empty string then URLs of that form are not allowed.
  1257. * data points to the start of the text. It must not be nil.
  1258. * len indicates the length of the text. It must be non-negative.
  1259. * selStart and selEnd should be passed in as the current selection of
  1260. * the text. This selection is given in the same manner as TextEdit,
  1261. * ie if selStart = selEnd then there is no selection only an insertion
  1262. * point. Also selStart . selEnd and 0 . selStart . len and 0 . selEnd . len.
  1263. * selStart and selEnd are returned as the bounds of the URL. If the
  1264. * routine returns an error then these new boundaries may be
  1265. * invalid but they will be close.
  1266. * The URL is parsed out of the text and passed off to the appropriate
  1267. * helper using the GURL AppleEvent.
  1268. */
  1269. /*
  1270. * ICParseURL()
  1271. *
  1272. * Availability:
  1273. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1274. * CarbonLib: in CarbonLib 1.0.2 and later
  1275. * Mac OS X: in version 10.0 and later
  1276. */
  1277. EXTERN_API( OSStatus )
  1278. ICParseURL(
  1279. ICInstance inst,
  1280. ConstStr255Param hint,
  1281. const void * data,
  1282. long len,
  1283. long * selStart,
  1284. long * selEnd,
  1285. Handle url) FIVEWORDINLINE(0x2F3C, 0x0018, 0x0010, 0x7000, 0xA82A);
  1286. /* [r1] [c1] [b3]
  1287. * Parses a URL out of the specified text and returns it in a canonical form
  1288. * in a handle.
  1289. * hint indicates the default scheme for URLs of the form "name@address".
  1290. * If hint is the empty string then URLs of that form are not allowed.
  1291. * data points to the start of the text. It must not be nil.
  1292. * len indicates the length of the text. It must be non-negative.
  1293. * selStart and selEnd should be passed in as the current selection of
  1294. * the text. This selection is given in the same manner as TextEdit,
  1295. * ie if selStart = selEnd then there is no selection only an insertion
  1296. * point. Also selStart . selEnd and 0 . selStart . len and 0 . selEnd . len.
  1297. * selStart and selEnd are returned as the bounds of the URL. If the
  1298. * routine returns an error then these new boundaries may be
  1299. * invalid but they will be close.
  1300. * The incoming url handle must not be nil. The resulting URL is normalised
  1301. * and copied into the url handle, which is resized to fit.
  1302. */
  1303. /*
  1304. * ICCreateGURLEvent()
  1305. *
  1306. * Availability:
  1307. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1308. * CarbonLib: in CarbonLib 1.0.2 and later
  1309. * Mac OS X: in version 10.0 and later
  1310. */
  1311. EXTERN_API( OSStatus )
  1312. ICCreateGURLEvent(
  1313. ICInstance inst,
  1314. OSType helperCreator,
  1315. Handle urlH,
  1316. AppleEvent * theEvent) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0033, 0x7000, 0xA82A);
  1317. /* [r4] [c1] [b3]
  1318. * Creates a GURL Apple event, targetted at the application whose creator
  1319. * code is helperCreator, with a direct object containing the URL text from urlH.
  1320. */
  1321. /*
  1322. * ICSendGURLEvent()
  1323. *
  1324. * Availability:
  1325. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1326. * CarbonLib: in CarbonLib 1.0.2 and later
  1327. * Mac OS X: in version 10.0 and later
  1328. */
  1329. EXTERN_API( OSStatus )
  1330. ICSendGURLEvent(
  1331. ICInstance inst,
  1332. AppleEvent * theEvent) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0034, 0x7000, 0xA82A);
  1333. /* [r4] [c1] [b3]
  1334. * Sends theEvent to the target application.
  1335. */
  1336. /* ***** Mappings Routines *****
  1337. *
  1338. * Routines for interrogating mappings database.
  1339. *
  1340. * ----- High Level Routines -----
  1341. */
  1342. /*
  1343. * ICMapFilename()
  1344. *
  1345. * Availability:
  1346. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1347. * CarbonLib: in CarbonLib 1.0.2 and later
  1348. * Mac OS X: in version 10.0 and later
  1349. */
  1350. EXTERN_API( OSStatus )
  1351. ICMapFilename(
  1352. ICInstance inst,
  1353. ConstStr255Param filename,
  1354. ICMapEntry * entry) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0018, 0x7000, 0xA82A);
  1355. /* [r1] [c1] [b4]
  1356. * Takes the name of an incoming file and returns the most appropriate
  1357. * mappings database entry, based on its extension.
  1358. * filename must not be the empty string.
  1359. * Returns icPrefNotFoundErr if no suitable entry is found.
  1360. */
  1361. /*
  1362. * ICMapTypeCreator()
  1363. *
  1364. * Availability:
  1365. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1366. * CarbonLib: in CarbonLib 1.0.2 and later
  1367. * Mac OS X: in version 10.0 and later
  1368. */
  1369. EXTERN_API( OSStatus )
  1370. ICMapTypeCreator(
  1371. ICInstance inst,
  1372. OSType fType,
  1373. OSType fCreator,
  1374. ConstStr255Param filename,
  1375. ICMapEntry * entry) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0019, 0x7000, 0xA82A);
  1376. /* [r1] [c1] [b4]
  1377. * Takes the type and creator (and optionally the name) of an outgoing
  1378. * file and returns the most appropriate mappings database entry.
  1379. * The filename may be either the name of the outgoing file or
  1380. * the empty string.
  1381. * Returns icPrefNotFoundErr if no suitable entry found.
  1382. */
  1383. /* ----- Mid Level Routines ----- */
  1384. /*
  1385. * ICMapEntriesFilename()
  1386. *
  1387. * Availability:
  1388. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1389. * CarbonLib: in CarbonLib 1.0.2 and later
  1390. * Mac OS X: in version 10.0 and later
  1391. */
  1392. EXTERN_API( OSStatus )
  1393. ICMapEntriesFilename(
  1394. ICInstance inst,
  1395. Handle entries,
  1396. ConstStr255Param filename,
  1397. ICMapEntry * entry) FIVEWORDINLINE(0x2F3C, 0x000C, 0x001C, 0x7000, 0xA82A);
  1398. /* [r1] [c1] [b3]
  1399. * Takes the name of an incoming file and returns the most appropriate
  1400. * mappings database entry, based on its extension.
  1401. * entries must be a handle to a valid IC mappings database preference.
  1402. * filename must not be the empty string.
  1403. * Returns icPrefNotFoundErr if no suitable entry is found.
  1404. */
  1405. /*
  1406. * ICMapEntriesTypeCreator()
  1407. *
  1408. * Availability:
  1409. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1410. * CarbonLib: in CarbonLib 1.0.2 and later
  1411. * Mac OS X: in version 10.0 and later
  1412. */
  1413. EXTERN_API( OSStatus )
  1414. ICMapEntriesTypeCreator(
  1415. ICInstance inst,
  1416. Handle entries,
  1417. OSType fType,
  1418. OSType fCreator,
  1419. ConstStr255Param filename,
  1420. ICMapEntry * entry) FIVEWORDINLINE(0x2F3C, 0x0014, 0x001D, 0x7000, 0xA82A);
  1421. /* [r1] [c1] [b3]
  1422. * Takes the type and creator (and optionally the name) of an outgoing
  1423. * file and returns the most appropriate mappings database entry.
  1424. * entries must be a handle to a valid IC mappings database preference.
  1425. * The filename may be either the name of the outgoing file or
  1426. * the empty string.
  1427. * Returns icPrefNotFoundErr if no suitable entry found.
  1428. */
  1429. /* ----- Low Level Routines ----- */
  1430. /*
  1431. * ICCountMapEntries()
  1432. *
  1433. * Availability:
  1434. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1435. * CarbonLib: in CarbonLib 1.0.2 and later
  1436. * Mac OS X: in version 10.0 and later
  1437. */
  1438. EXTERN_API( OSStatus )
  1439. ICCountMapEntries(
  1440. ICInstance inst,
  1441. Handle entries,
  1442. long * count) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0012, 0x7000, 0xA82A);
  1443. /* [r1] [c1] [b3]
  1444. * Counts the number of entries in the mappings database.
  1445. * entries must be a handle to a valid IC mappings database preference.
  1446. * count is set to the number of entries.
  1447. */
  1448. /*
  1449. * ICGetIndMapEntry()
  1450. *
  1451. * Availability:
  1452. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1453. * CarbonLib: in CarbonLib 1.0.2 and later
  1454. * Mac OS X: in version 10.0 and later
  1455. */
  1456. EXTERN_API( OSStatus )
  1457. ICGetIndMapEntry(
  1458. ICInstance inst,
  1459. Handle entries,
  1460. long index,
  1461. long * pos,
  1462. ICMapEntry * entry) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0013, 0x7000, 0xA82A);
  1463. /* [r1] [c1] [b3]
  1464. * Gets the index'th entry in the mappings database.
  1465. * entries must be a handle to a valid IC mappings database preference.
  1466. * index must be in the range from 1 to the number of entries in the database.
  1467. * The value of pos is ignored on input. pos is set to the position of
  1468. * the index'th entry in the database and is suitable for passing back
  1469. * into ICSetMapEntry.
  1470. * Does not return any user data associated with the entry.
  1471. */
  1472. /*
  1473. * ICGetMapEntry()
  1474. *
  1475. * Availability:
  1476. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1477. * CarbonLib: in CarbonLib 1.0.2 and later
  1478. * Mac OS X: in version 10.0 and later
  1479. */
  1480. EXTERN_API( OSStatus )
  1481. ICGetMapEntry(
  1482. ICInstance inst,
  1483. Handle entries,
  1484. long pos,
  1485. ICMapEntry * entry) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0014, 0x7000, 0xA82A);
  1486. /* [r1] [c1] [b3]
  1487. * Returns the entry located at position pos in the mappings database.
  1488. * entries must be a handle to a valid IC mappings database preference.
  1489. * pos should be 0 to get the first entry. To get the subsequent entries, add
  1490. * entry.total_size to pos and iterate.
  1491. * Does not return any user data associated with the entry.
  1492. */
  1493. /*
  1494. * ICSetMapEntry()
  1495. *
  1496. * Availability:
  1497. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1498. * CarbonLib: in CarbonLib 1.0.2 and later
  1499. * Mac OS X: in version 10.0 and later
  1500. */
  1501. EXTERN_API( OSStatus )
  1502. ICSetMapEntry(
  1503. ICInstance inst,
  1504. Handle entries,
  1505. long pos,
  1506. const ICMapEntry * entry) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0015, 0x7000, 0xA82A);
  1507. /* [r1] [c1] [b3]
  1508. * Sets the entry located at position pos in the mappings database.
  1509. * entries must be a handle to a valid IC mappings database preference.
  1510. * pos should be either a value returned from ICGetIndMapEntry or a value
  1511. * calculated using ICGetMapEntry.
  1512. * entry is a var parameter purely for stack space reasons. It is not
  1513. * modified in any way.
  1514. * Any user data associated with the entry is unmodified.
  1515. */
  1516. /*
  1517. * ICDeleteMapEntry()
  1518. *
  1519. * Availability:
  1520. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1521. * CarbonLib: in CarbonLib 1.0.2 and later
  1522. * Mac OS X: in version 10.0 and later
  1523. */
  1524. EXTERN_API( OSStatus )
  1525. ICDeleteMapEntry(
  1526. ICInstance inst,
  1527. Handle entries,
  1528. long pos) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0016, 0x7000, 0xA82A);
  1529. /* [r1] [c1] [b3]
  1530. * Deletes the mappings database entry at pos.
  1531. * entries must be a handle to a valid IC mappings database preference.
  1532. * pos should be either a value returned from ICGetIndMapEntry or a value
  1533. * calculated using ICGetMapEntry.
  1534. * Also deletes any user data associated with the entry.
  1535. */
  1536. /*
  1537. * ICAddMapEntry()
  1538. *
  1539. * Availability:
  1540. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1541. * CarbonLib: in CarbonLib 1.0.2 and later
  1542. * Mac OS X: in version 10.0 and later
  1543. */
  1544. EXTERN_API( OSStatus )
  1545. ICAddMapEntry(
  1546. ICInstance inst,
  1547. Handle entries,
  1548. const ICMapEntry * entry) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0017, 0x7000, 0xA82A);
  1549. /* [r1] [c1] [b3]
  1550. * Adds an entry to the mappings database.
  1551. * entries must be a handle to a valid IC mappings database preference.
  1552. * The entry is added to the end of the entries database.
  1553. * No user data is added.
  1554. */
  1555. /* ***** Profile Management Routines ***** */
  1556. /*
  1557. * ICGetCurrentProfile()
  1558. *
  1559. * Availability:
  1560. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1561. * CarbonLib: in CarbonLib 1.0.2 and later
  1562. * Mac OS X: in version 10.0 and later
  1563. */
  1564. EXTERN_API( OSStatus )
  1565. ICGetCurrentProfile(
  1566. ICInstance inst,
  1567. ICProfileID * currentID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0025, 0x7000, 0xA82A);
  1568. /* [r3] [c1] [b3]
  1569. * Returns the profile ID of the current profile.
  1570. */
  1571. /*
  1572. * ICSetCurrentProfile()
  1573. *
  1574. * Availability:
  1575. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1576. * CarbonLib: in CarbonLib 1.0.2 and later
  1577. * Mac OS X: in version 10.0 and later
  1578. */
  1579. EXTERN_API( OSStatus )
  1580. ICSetCurrentProfile(
  1581. ICInstance inst,
  1582. ICProfileID newID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0026, 0x7000, 0xA82A);
  1583. /* [r3] [c1] [b3]
  1584. * Sets the current profile to the profile specified in newProfile.
  1585. */
  1586. /*
  1587. * ICCountProfiles()
  1588. *
  1589. * Availability:
  1590. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1591. * CarbonLib: in CarbonLib 1.0.2 and later
  1592. * Mac OS X: in version 10.0 and later
  1593. */
  1594. EXTERN_API( OSStatus )
  1595. ICCountProfiles(
  1596. ICInstance inst,
  1597. long * count) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0027, 0x7000, 0xA82A);
  1598. /* [r3] [c1] [b1]
  1599. * Returns the total number of profiles.
  1600. */
  1601. /*
  1602. * ICGetIndProfile()
  1603. *
  1604. * Availability:
  1605. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1606. * CarbonLib: in CarbonLib 1.0.2 and later
  1607. * Mac OS X: in version 10.0 and later
  1608. */
  1609. EXTERN_API( OSStatus )
  1610. ICGetIndProfile(
  1611. ICInstance inst,
  1612. long index,
  1613. ICProfileID * thisID) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0028, 0x7000, 0xA82A);
  1614. /* [r3] [c1] [b1]
  1615. * Returns the profile ID of the index'th profile. index must be positive.
  1616. * Returns icProfileNotFoundErr if index is greater than the total number
  1617. * of profiles.
  1618. */
  1619. /*
  1620. * ICGetProfileName()
  1621. *
  1622. * Availability:
  1623. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1624. * CarbonLib: in CarbonLib 1.0.2 and later
  1625. * Mac OS X: in version 10.0 and later
  1626. */
  1627. EXTERN_API( OSStatus )
  1628. ICGetProfileName(
  1629. ICInstance inst,
  1630. ICProfileID thisID,
  1631. Str255 name) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0029, 0x7000, 0xA82A);
  1632. /* [r3] [c1] [b3]
  1633. * Returns the name of a profile given its ID. The name may not uniquely
  1634. * identify the profile. [That's what the profile ID is for!] The name
  1635. * is assumed to be in the system script.
  1636. */
  1637. /*
  1638. * ICSetProfileName()
  1639. *
  1640. * Availability:
  1641. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1642. * CarbonLib: in CarbonLib 1.0.2 and later
  1643. * Mac OS X: in version 10.0 and later
  1644. */
  1645. EXTERN_API( OSStatus )
  1646. ICSetProfileName(
  1647. ICInstance inst,
  1648. ICProfileID thisID,
  1649. ConstStr255Param name) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002A, 0x7000, 0xA82A);
  1650. /* [r3] [c1] [b3]
  1651. * This routine sets the name of the specified profile. Profile names
  1652. * need not be unique. The name should be in the system script.
  1653. */
  1654. /*
  1655. * ICAddProfile()
  1656. *
  1657. * Availability:
  1658. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1659. * CarbonLib: in CarbonLib 1.0.2 and later
  1660. * Mac OS X: in version 10.0 and later
  1661. */
  1662. EXTERN_API( OSStatus )
  1663. ICAddProfile(
  1664. ICInstance inst,
  1665. ICProfileID prototypeID,
  1666. ICProfileID * newID) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002B, 0x7000, 0xA82A);
  1667. /* [r3] [c1] [b2]
  1668. * If prototypeID = kICNilProfileID, this routine
  1669. * creates a default profile, otherwise it creates a
  1670. * profile by cloning the prototype profile. The ID
  1671. * of the new profile is returned in newID.
  1672. * The new profile will be give a new, unique, name.
  1673. * This does not switch to the new profile.
  1674. */
  1675. /*
  1676. * ICDeleteProfile()
  1677. *
  1678. * Availability:
  1679. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1680. * CarbonLib: in CarbonLib 1.0.2 and later
  1681. * Mac OS X: in version 10.0 and later
  1682. */
  1683. EXTERN_API( OSStatus )
  1684. ICDeleteProfile(
  1685. ICInstance inst,
  1686. ICProfileID thisID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002C, 0x7000, 0xA82A);
  1687. /* [r3] [c1] [b2]
  1688. * This routine deletes the profile specified by
  1689. * thisID. Attempting to delete the current profile
  1690. * or the last profile will return error.
  1691. */
  1692. /************************************************************************************************
  1693. NOTHING BELOW THIS DIVIDER IS IN CARBON
  1694. ************************************************************************************************/
  1695. /* ***** Interrupt Safe Routines ***** */
  1696. #if CALL_NOT_IN_CARBON
  1697. /*
  1698. * ICRequiresInterruptSafe()
  1699. *
  1700. * Availability:
  1701. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1702. * CarbonLib: not available
  1703. * Mac OS X: not available
  1704. */
  1705. EXTERN_API( OSStatus )
  1706. ICRequiresInterruptSafe(ICInstance inst) FIVEWORDINLINE(0x2F3C, 0x0000, 0x002D, 0x7000, 0xA82A);
  1707. /* [r3] [c2] [b3]
  1708. * You must call this routine before calling GetMapEntryInterruptSafe
  1709. * to give IC chance to cache the mappings data in memory. The only
  1710. * way to clear this state is to close the instance. You can not reconfigure
  1711. * the instance after calling this routine.
  1712. */
  1713. /*
  1714. * ICGetMappingInterruptSafe()
  1715. *
  1716. * Availability:
  1717. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1718. * CarbonLib: not available
  1719. * Mac OS X: not available
  1720. */
  1721. EXTERN_API( OSStatus )
  1722. ICGetMappingInterruptSafe(
  1723. ICInstance inst,
  1724. Ptr * mappingPref,
  1725. long * mappingPrefSize) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002E, 0x7000, 0xA82A);
  1726. /* [r3] [c2] [b3]
  1727. * Returns the "Mapping" preference in an interrupt safe fashion.
  1728. * The preference returned pointer is valid until the next
  1729. * non-interrupt safe call to IC. Typically this API is used
  1730. * by software that needs to map extensions to type and creator
  1731. * at interrupt time, eg foreign file systems.
  1732. */
  1733. /*
  1734. * ICGetSeedInterruptSafe()
  1735. *
  1736. * Availability:
  1737. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1738. * CarbonLib: not available
  1739. * Mac OS X: not available
  1740. */
  1741. EXTERN_API( OSStatus )
  1742. ICGetSeedInterruptSafe(
  1743. ICInstance inst,
  1744. long * seed) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0030, 0x7000, 0xA82A);
  1745. /* [r3] [c2] [b3]
  1746. * An interrupt safe version of ICGetSeed.
  1747. */
  1748. /* ***** Starting Up and Shutting Down ***** */
  1749. /*
  1750. * ICCStart()
  1751. *
  1752. * Availability:
  1753. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1754. * CarbonLib: not available
  1755. * Mac OS X: not available
  1756. */
  1757. EXTERN_API( OSStatus )
  1758. ICCStart(
  1759. ComponentInstance * inst,
  1760. OSType creator);
  1761. /* See comment for ICCStart. */
  1762. /*
  1763. * ICCStop()
  1764. *
  1765. * Availability:
  1766. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1767. * CarbonLib: not available
  1768. * Mac OS X: not available
  1769. */
  1770. EXTERN_API( OSStatus )
  1771. ICCStop(ComponentInstance inst);
  1772. /* See comment for ICCStop. */
  1773. /*
  1774. * ICCGetVersion()
  1775. *
  1776. * Availability:
  1777. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1778. * CarbonLib: not available
  1779. * Mac OS X: not available
  1780. */
  1781. EXTERN_API( OSStatus )
  1782. ICCGetVersion(
  1783. ComponentInstance inst,
  1784. long whichVersion,
  1785. UInt32 * version) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0032, 0x7000, 0xA82A);
  1786. /* See comment for ICCGetVersion. */
  1787. /* ***** Specifying a Configuration ***** */
  1788. /*
  1789. * ICCFindConfigFile()
  1790. *
  1791. * Availability:
  1792. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1793. * CarbonLib: not available
  1794. * Mac OS X: not available
  1795. */
  1796. EXTERN_API( OSStatus )
  1797. ICCFindConfigFile(
  1798. ComponentInstance inst,
  1799. short count,
  1800. ICDirSpecArrayPtr folders) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0002, 0x7000, 0xA82A);
  1801. /* See comment for ICCFindConfigFile. */
  1802. /*
  1803. * ICCFindUserConfigFile()
  1804. *
  1805. * Availability:
  1806. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1807. * CarbonLib: not available
  1808. * Mac OS X: not available
  1809. */
  1810. EXTERN_API( OSStatus )
  1811. ICCFindUserConfigFile(
  1812. ComponentInstance inst,
  1813. ICDirSpec * where) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000E, 0x7000, 0xA82A);
  1814. /* See comment for ICCFindUserConfigFile. */
  1815. /*
  1816. * ICCGeneralFindConfigFile()
  1817. *
  1818. * Availability:
  1819. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1820. * CarbonLib: not available
  1821. * Mac OS X: not available
  1822. */
  1823. EXTERN_API( OSStatus )
  1824. ICCGeneralFindConfigFile(
  1825. ComponentInstance inst,
  1826. Boolean searchPrefs,
  1827. Boolean canCreate,
  1828. short count,
  1829. ICDirSpecArrayPtr folders) FIVEWORDINLINE(0x2F3C, 0x000A, 0x001E, 0x7000, 0xA82A);
  1830. /* See comment for ICCGeneralFindConfigFile. */
  1831. /*
  1832. * ICCChooseConfig()
  1833. *
  1834. * Availability:
  1835. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1836. * CarbonLib: not available
  1837. * Mac OS X: not available
  1838. */
  1839. EXTERN_API( OSStatus )
  1840. ICCChooseConfig(ComponentInstance inst) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0021, 0x7000, 0xA82A);
  1841. /* See comment for ICCChooseConfig. */
  1842. /*
  1843. * ICCChooseNewConfig()
  1844. *
  1845. * Availability:
  1846. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1847. * CarbonLib: not available
  1848. * Mac OS X: not available
  1849. */
  1850. EXTERN_API( OSStatus )
  1851. ICCChooseNewConfig(ComponentInstance inst) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0022, 0x7000, 0xA82A);
  1852. /* See comment for ICCChooseNewConfig. */
  1853. /*
  1854. * ICCGetConfigName()
  1855. *
  1856. * Availability:
  1857. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1858. * CarbonLib: not available
  1859. * Mac OS X: not available
  1860. */
  1861. EXTERN_API( OSStatus )
  1862. ICCGetConfigName(
  1863. ComponentInstance inst,
  1864. Boolean longname,
  1865. Str255 name) FIVEWORDINLINE(0x2F3C, 0x0006, 0x0023, 0x7000, 0xA82A);
  1866. /* See comment for ICCGetConfigName. */
  1867. /*
  1868. * ICCGetConfigReference()
  1869. *
  1870. * Availability:
  1871. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1872. * CarbonLib: not available
  1873. * Mac OS X: not available
  1874. */
  1875. EXTERN_API( OSStatus )
  1876. ICCGetConfigReference(
  1877. ComponentInstance inst,
  1878. ICConfigRefHandle ref) FIVEWORDINLINE(0x2F3C, 0x0004, 0x001F, 0x7000, 0xA82A);
  1879. /* See comment for ICCGetConfigReference. */
  1880. /*
  1881. * ICCSetConfigReference()
  1882. *
  1883. * Availability:
  1884. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1885. * CarbonLib: not available
  1886. * Mac OS X: not available
  1887. */
  1888. EXTERN_API( OSStatus )
  1889. ICCSetConfigReference(
  1890. ComponentInstance inst,
  1891. ICConfigRefHandle ref,
  1892. long flags) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0020, 0x7000, 0xA82A);
  1893. /* See comment for ICCSetConfigReference. */
  1894. /* ***** Private Routines *****
  1895. *
  1896. * If you are calling these routines, you are most probably doing something
  1897. * wrong. Please read the documentation for more details.
  1898. */
  1899. /*
  1900. * ICCSpecifyConfigFile()
  1901. *
  1902. * Availability:
  1903. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1904. * CarbonLib: not available
  1905. * Mac OS X: not available
  1906. */
  1907. EXTERN_API( OSStatus )
  1908. ICCSpecifyConfigFile(
  1909. ComponentInstance inst,
  1910. FSSpec * config) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
  1911. /* See comment for ICCSpecifyConfigFile. */
  1912. /*
  1913. * ICCRefreshCaches()
  1914. *
  1915. * Availability:
  1916. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1917. * CarbonLib: not available
  1918. * Mac OS X: not available
  1919. */
  1920. EXTERN_API( OSStatus )
  1921. ICCRefreshCaches(ComponentInstance inst) FIVEWORDINLINE(0x2F3C, 0x0000, 0x002F, 0x7000, 0xA82A);
  1922. /* See comment for ICCRefreshCaches. */
  1923. /* ***** Getting Information ***** */
  1924. /*
  1925. * ICCGetSeed()
  1926. *
  1927. * Availability:
  1928. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1929. * CarbonLib: not available
  1930. * Mac OS X: not available
  1931. */
  1932. EXTERN_API( OSStatus )
  1933. ICCGetSeed(
  1934. ComponentInstance inst,
  1935. long * seed) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
  1936. /* See comment for ICCGetSeed. */
  1937. /*
  1938. * ICCGetPerm()
  1939. *
  1940. * Availability:
  1941. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1942. * CarbonLib: not available
  1943. * Mac OS X: not available
  1944. */
  1945. EXTERN_API( OSStatus )
  1946. ICCGetPerm(
  1947. ComponentInstance inst,
  1948. ICPerm * perm) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
  1949. /* See comment for ICCGetPerm. */
  1950. /*
  1951. * ICCDefaultFileName()
  1952. *
  1953. * Availability:
  1954. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1955. * CarbonLib: not available
  1956. * Mac OS X: not available
  1957. */
  1958. EXTERN_API( OSStatus )
  1959. ICCDefaultFileName(
  1960. ComponentInstance inst,
  1961. Str63 name) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000B, 0x7000, 0xA82A);
  1962. /* See comment for ICCDefaultFileName. */
  1963. /*
  1964. * ICCGetComponentInstance()
  1965. *
  1966. * Availability:
  1967. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1968. * CarbonLib: not available
  1969. * Mac OS X: not available
  1970. */
  1971. EXTERN_API( OSStatus )
  1972. ICCGetComponentInstance(
  1973. ComponentInstance inst,
  1974. ComponentInstance * componentInst);
  1975. /* See comment for ICCGetComponentInstance. */
  1976. /* ***** Reading and Writing Preferences ***** */
  1977. /*
  1978. * ICCBegin()
  1979. *
  1980. * Availability:
  1981. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1982. * CarbonLib: not available
  1983. * Mac OS X: not available
  1984. */
  1985. EXTERN_API( OSStatus )
  1986. ICCBegin(
  1987. ComponentInstance inst,
  1988. ICPerm perm) FIVEWORDINLINE(0x2F3C, 0x0002, 0x0005, 0x7000, 0xA82A);
  1989. /* See comment for ICCBegin. */
  1990. /*
  1991. * ICCGetPref()
  1992. *
  1993. * Availability:
  1994. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1995. * CarbonLib: not available
  1996. * Mac OS X: not available
  1997. */
  1998. EXTERN_API( OSStatus )
  1999. ICCGetPref(
  2000. ComponentInstance inst,
  2001. ConstStr255Param key,
  2002. ICAttr * attr,
  2003. Ptr buf,
  2004. long * size) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0006, 0x7000, 0xA82A);
  2005. /* See comment for ICCGetPref. */
  2006. /*
  2007. * ICCSetPref()
  2008. *
  2009. * Availability:
  2010. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2011. * CarbonLib: not available
  2012. * Mac OS X: not available
  2013. */
  2014. EXTERN_API( OSStatus )
  2015. ICCSetPref(
  2016. ComponentInstance inst,
  2017. ConstStr255Param key,
  2018. ICAttr attr,
  2019. Ptr buf,
  2020. long size) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0007, 0x7000, 0xA82A);
  2021. /* See comment for ICCSetPref. */
  2022. /*
  2023. * ICCFindPrefHandle()
  2024. *
  2025. * Availability:
  2026. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2027. * CarbonLib: not available
  2028. * Mac OS X: not available
  2029. */
  2030. EXTERN_API( OSStatus )
  2031. ICCFindPrefHandle(
  2032. ComponentInstance inst,
  2033. ConstStr255Param key,
  2034. ICAttr * attr,
  2035. Handle prefh) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0024, 0x7000, 0xA82A);
  2036. /* See comment for ICCFindPrefHandle. */
  2037. /*
  2038. * ICCGetPrefHandle()
  2039. *
  2040. * Availability:
  2041. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2042. * CarbonLib: not available
  2043. * Mac OS X: not available
  2044. */
  2045. EXTERN_API( OSStatus )
  2046. ICCGetPrefHandle(
  2047. ComponentInstance inst,
  2048. ConstStr255Param key,
  2049. ICAttr * attr,
  2050. Handle * prefh) FIVEWORDINLINE(0x2F3C, 0x000C, 0x001A, 0x7000, 0xA82A);
  2051. /* See comment for ICCGetPrefHandle. */
  2052. /*
  2053. * ICCSetPrefHandle()
  2054. *
  2055. * Availability:
  2056. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2057. * CarbonLib: not available
  2058. * Mac OS X: not available
  2059. */
  2060. EXTERN_API( OSStatus )
  2061. ICCSetPrefHandle(
  2062. ComponentInstance inst,
  2063. ConstStr255Param key,
  2064. ICAttr attr,
  2065. Handle prefh) FIVEWORDINLINE(0x2F3C, 0x000C, 0x001B, 0x7000, 0xA82A);
  2066. /* See comment for ICCSetPrefHandle. */
  2067. /*
  2068. * ICCCountPref()
  2069. *
  2070. * Availability:
  2071. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2072. * CarbonLib: not available
  2073. * Mac OS X: not available
  2074. */
  2075. EXTERN_API( OSStatus )
  2076. ICCCountPref(
  2077. ComponentInstance inst,
  2078. long * count) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0008, 0x7000, 0xA82A);
  2079. /* See comment for ICCCountPref. */
  2080. /*
  2081. * ICCGetIndPref()
  2082. *
  2083. * Availability:
  2084. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2085. * CarbonLib: not available
  2086. * Mac OS X: not available
  2087. */
  2088. EXTERN_API( OSStatus )
  2089. ICCGetIndPref(
  2090. ComponentInstance inst,
  2091. long index,
  2092. Str255 key) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0009, 0x7000, 0xA82A);
  2093. /* See comment for ICCGetIndPref. */
  2094. /*
  2095. * ICCDeletePref()
  2096. *
  2097. * Availability:
  2098. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2099. * CarbonLib: not available
  2100. * Mac OS X: not available
  2101. */
  2102. EXTERN_API( OSStatus )
  2103. ICCDeletePref(
  2104. ComponentInstance inst,
  2105. ConstStr255Param key) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
  2106. /* See comment for ICCDeletePref. */
  2107. /*
  2108. * ICCEnd()
  2109. *
  2110. * Availability:
  2111. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2112. * CarbonLib: not available
  2113. * Mac OS X: not available
  2114. */
  2115. EXTERN_API( OSStatus )
  2116. ICCEnd(ComponentInstance inst) FIVEWORDINLINE(0x2F3C, 0x0000, 0x000A, 0x7000, 0xA82A);
  2117. /* See comment for ICCEnd. */
  2118. /*
  2119. * ICCGetDefaultPref()
  2120. *
  2121. * Availability:
  2122. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2123. * CarbonLib: not available
  2124. * Mac OS X: not available
  2125. */
  2126. EXTERN_API( OSStatus )
  2127. ICCGetDefaultPref(
  2128. ComponentInstance inst,
  2129. ConstStr255Param key,
  2130. Handle prefH) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0031, 0x7000, 0xA82A);
  2131. /* See comment for ICCGetDefaultPref. */
  2132. /* ***** User Interface Stuff ***** */
  2133. /*
  2134. * ICCEditPreferences()
  2135. *
  2136. * Availability:
  2137. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2138. * CarbonLib: not available
  2139. * Mac OS X: not available
  2140. */
  2141. EXTERN_API( OSStatus )
  2142. ICCEditPreferences(
  2143. ComponentInstance inst,
  2144. ConstStr255Param key) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000F, 0x7000, 0xA82A);
  2145. /* See comment for ICCEditPreferences. */
  2146. /* ***** URL Handling ***** */
  2147. /*
  2148. * ICCLaunchURL()
  2149. *
  2150. * Availability:
  2151. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2152. * CarbonLib: not available
  2153. * Mac OS X: not available
  2154. */
  2155. EXTERN_API( OSStatus )
  2156. ICCLaunchURL(
  2157. ComponentInstance inst,
  2158. ConstStr255Param hint,
  2159. Ptr data,
  2160. long len,
  2161. long * selStart,
  2162. long * selEnd) FIVEWORDINLINE(0x2F3C, 0x0014, 0x0011, 0x7000, 0xA82A);
  2163. /* See comment for ICCLaunchURL. */
  2164. /*
  2165. * ICCParseURL()
  2166. *
  2167. * Availability:
  2168. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2169. * CarbonLib: not available
  2170. * Mac OS X: not available
  2171. */
  2172. EXTERN_API( OSStatus )
  2173. ICCParseURL(
  2174. ComponentInstance inst,
  2175. ConstStr255Param hint,
  2176. Ptr data,
  2177. long len,
  2178. long * selStart,
  2179. long * selEnd,
  2180. Handle url) FIVEWORDINLINE(0x2F3C, 0x0018, 0x0010, 0x7000, 0xA82A);
  2181. /* See comment for ICCParseURL. */
  2182. /*
  2183. * ICCCreateGURLEvent()
  2184. *
  2185. * Availability:
  2186. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2187. * CarbonLib: not available
  2188. * Mac OS X: not available
  2189. */
  2190. EXTERN_API( OSStatus )
  2191. ICCCreateGURLEvent(
  2192. ComponentInstance inst,
  2193. OSType helperCreator,
  2194. Handle urlH,
  2195. AppleEvent * theEvent) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0033, 0x7000, 0xA82A);
  2196. /* See comment for ICCCreateGURLEvent. */
  2197. /*
  2198. * ICCSendGURLEvent()
  2199. *
  2200. * Availability:
  2201. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2202. * CarbonLib: not available
  2203. * Mac OS X: not available
  2204. */
  2205. EXTERN_API( OSStatus )
  2206. ICCSendGURLEvent(
  2207. ComponentInstance inst,
  2208. AppleEvent * theEvent) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0034, 0x7000, 0xA82A);
  2209. /* See comment for ICCSendGURLEvent. */
  2210. /* ***** Mappings Routines *****
  2211. *
  2212. * Routines for interrogating mappings database.
  2213. *
  2214. * ----- High Level Routines -----
  2215. */
  2216. /*
  2217. * ICCMapFilename()
  2218. *
  2219. * Availability:
  2220. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2221. * CarbonLib: not available
  2222. * Mac OS X: not available
  2223. */
  2224. EXTERN_API( OSStatus )
  2225. ICCMapFilename(
  2226. ComponentInstance inst,
  2227. ConstStr255Param filename,
  2228. ICMapEntry * entry) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0018, 0x7000, 0xA82A);
  2229. /* See comment for ICCMapFilename. */
  2230. /*
  2231. * ICCMapTypeCreator()
  2232. *
  2233. * Availability:
  2234. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2235. * CarbonLib: not available
  2236. * Mac OS X: not available
  2237. */
  2238. EXTERN_API( OSStatus )
  2239. ICCMapTypeCreator(
  2240. ComponentInstance inst,
  2241. OSType fType,
  2242. OSType fCreator,
  2243. ConstStr255Param filename,
  2244. ICMapEntry * entry) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0019, 0x7000, 0xA82A);
  2245. /* See comment for ICCMapTypeCreator. */
  2246. /* ----- Mid Level Routines ----- */
  2247. /*
  2248. * ICCMapEntriesFilename()
  2249. *
  2250. * Availability:
  2251. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2252. * CarbonLib: not available
  2253. * Mac OS X: not available
  2254. */
  2255. EXTERN_API( OSStatus )
  2256. ICCMapEntriesFilename(
  2257. ComponentInstance inst,
  2258. Handle entries,
  2259. ConstStr255Param filename,
  2260. ICMapEntry * entry) FIVEWORDINLINE(0x2F3C, 0x000C, 0x001C, 0x7000, 0xA82A);
  2261. /* See comment for ICCMapEntriesFilename. */
  2262. /*
  2263. * ICCMapEntriesTypeCreator()
  2264. *
  2265. * Availability:
  2266. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2267. * CarbonLib: not available
  2268. * Mac OS X: not available
  2269. */
  2270. EXTERN_API( OSStatus )
  2271. ICCMapEntriesTypeCreator(
  2272. ComponentInstance inst,
  2273. Handle entries,
  2274. OSType fType,
  2275. OSType fCreator,
  2276. ConstStr255Param filename,
  2277. ICMapEntry * entry) FIVEWORDINLINE(0x2F3C, 0x0014, 0x001D, 0x7000, 0xA82A);
  2278. /* See comment for ICCMapEntriesTypeCreator. */
  2279. /* ----- Low Level Routines ----- */
  2280. /*
  2281. * ICCCountMapEntries()
  2282. *
  2283. * Availability:
  2284. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2285. * CarbonLib: not available
  2286. * Mac OS X: not available
  2287. */
  2288. EXTERN_API( OSStatus )
  2289. ICCCountMapEntries(
  2290. ComponentInstance inst,
  2291. Handle entries,
  2292. long * count) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0012, 0x7000, 0xA82A);
  2293. /* See comment for ICCCountMapEntries. */
  2294. /*
  2295. * ICCGetIndMapEntry()
  2296. *
  2297. * Availability:
  2298. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2299. * CarbonLib: not available
  2300. * Mac OS X: not available
  2301. */
  2302. EXTERN_API( OSStatus )
  2303. ICCGetIndMapEntry(
  2304. ComponentInstance inst,
  2305. Handle entries,
  2306. long index,
  2307. long * pos,
  2308. ICMapEntry * entry) FIVEWORDINLINE(0x2F3C, 0x0010, 0x0013, 0x7000, 0xA82A);
  2309. /* See comment for ICCGetIndMapEntry. */
  2310. /*
  2311. * ICCGetMapEntry()
  2312. *
  2313. * Availability:
  2314. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2315. * CarbonLib: not available
  2316. * Mac OS X: not available
  2317. */
  2318. EXTERN_API( OSStatus )
  2319. ICCGetMapEntry(
  2320. ComponentInstance inst,
  2321. Handle entries,
  2322. long pos,
  2323. ICMapEntry * entry) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0014, 0x7000, 0xA82A);
  2324. /* See comment for ICCGetMapEntry. */
  2325. /*
  2326. * ICCSetMapEntry()
  2327. *
  2328. * Availability:
  2329. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2330. * CarbonLib: not available
  2331. * Mac OS X: not available
  2332. */
  2333. EXTERN_API( OSStatus )
  2334. ICCSetMapEntry(
  2335. ComponentInstance inst,
  2336. Handle entries,
  2337. long pos,
  2338. ICMapEntry * entry) FIVEWORDINLINE(0x2F3C, 0x000C, 0x0015, 0x7000, 0xA82A);
  2339. /* See comment for ICCSetMapEntry. */
  2340. /*
  2341. * ICCDeleteMapEntry()
  2342. *
  2343. * Availability:
  2344. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2345. * CarbonLib: not available
  2346. * Mac OS X: not available
  2347. */
  2348. EXTERN_API( OSStatus )
  2349. ICCDeleteMapEntry(
  2350. ComponentInstance inst,
  2351. Handle entries,
  2352. long pos) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0016, 0x7000, 0xA82A);
  2353. /* See comment for ICCDeleteMapEntry. */
  2354. /*
  2355. * ICCAddMapEntry()
  2356. *
  2357. * Availability:
  2358. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2359. * CarbonLib: not available
  2360. * Mac OS X: not available
  2361. */
  2362. EXTERN_API( OSStatus )
  2363. ICCAddMapEntry(
  2364. ComponentInstance inst,
  2365. Handle entries,
  2366. ICMapEntry * entry) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0017, 0x7000, 0xA82A);
  2367. /* See comment for ICCAddMapEntry. */
  2368. /* ***** Profile Management Routines ***** */
  2369. /*
  2370. * ICCGetCurrentProfile()
  2371. *
  2372. * Availability:
  2373. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2374. * CarbonLib: not available
  2375. * Mac OS X: not available
  2376. */
  2377. EXTERN_API( OSStatus )
  2378. ICCGetCurrentProfile(
  2379. ComponentInstance inst,
  2380. ICProfileID * currentID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0025, 0x7000, 0xA82A);
  2381. /* See comment for ICCGetCurrentProfile. */
  2382. /*
  2383. * ICCSetCurrentProfile()
  2384. *
  2385. * Availability:
  2386. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2387. * CarbonLib: not available
  2388. * Mac OS X: not available
  2389. */
  2390. EXTERN_API( OSStatus )
  2391. ICCSetCurrentProfile(
  2392. ComponentInstance inst,
  2393. ICProfileID newID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0026, 0x7000, 0xA82A);
  2394. /* See comment for ICCSetCurrentProfile. */
  2395. /*
  2396. * ICCCountProfiles()
  2397. *
  2398. * Availability:
  2399. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2400. * CarbonLib: not available
  2401. * Mac OS X: not available
  2402. */
  2403. EXTERN_API( OSStatus )
  2404. ICCCountProfiles(
  2405. ComponentInstance inst,
  2406. long * count) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0027, 0x7000, 0xA82A);
  2407. /* See comment for ICCCountProfiles. */
  2408. /*
  2409. * ICCGetIndProfile()
  2410. *
  2411. * Availability:
  2412. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2413. * CarbonLib: not available
  2414. * Mac OS X: not available
  2415. */
  2416. EXTERN_API( OSStatus )
  2417. ICCGetIndProfile(
  2418. ComponentInstance inst,
  2419. long index,
  2420. ICProfileID * thisID) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0028, 0x7000, 0xA82A);
  2421. /* See comment for ICCGetIndProfile. */
  2422. /*
  2423. * ICCGetProfileName()
  2424. *
  2425. * Availability:
  2426. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2427. * CarbonLib: not available
  2428. * Mac OS X: not available
  2429. */
  2430. EXTERN_API( OSStatus )
  2431. ICCGetProfileName(
  2432. ComponentInstance inst,
  2433. ICProfileID thisID,
  2434. Str255 name) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0029, 0x7000, 0xA82A);
  2435. /* See comment for ICCGetProfileName. */
  2436. /*
  2437. * ICCSetProfileName()
  2438. *
  2439. * Availability:
  2440. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2441. * CarbonLib: not available
  2442. * Mac OS X: not available
  2443. */
  2444. EXTERN_API( OSStatus )
  2445. ICCSetProfileName(
  2446. ComponentInstance inst,
  2447. ICProfileID thisID,
  2448. ConstStr255Param name) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002A, 0x7000, 0xA82A);
  2449. /* See comment for ICCSetProfileName. */
  2450. /*
  2451. * ICCAddProfile()
  2452. *
  2453. * Availability:
  2454. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2455. * CarbonLib: not available
  2456. * Mac OS X: not available
  2457. */
  2458. EXTERN_API( OSStatus )
  2459. ICCAddProfile(
  2460. ComponentInstance inst,
  2461. ICProfileID prototypeID,
  2462. ICProfileID * newID) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002B, 0x7000, 0xA82A);
  2463. /* See comment for ICCAddProfile. */
  2464. /*
  2465. * ICCDeleteProfile()
  2466. *
  2467. * Availability:
  2468. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2469. * CarbonLib: not available
  2470. * Mac OS X: not available
  2471. */
  2472. EXTERN_API( OSStatus )
  2473. ICCDeleteProfile(
  2474. ComponentInstance inst,
  2475. ICProfileID thisID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x002C, 0x7000, 0xA82A);
  2476. /* See comment for ICCDeleteProfile. */
  2477. /* ***** Interrupt Safe Routines ***** */
  2478. /*
  2479. * ICCRequiresInterruptSafe()
  2480. *
  2481. * Availability:
  2482. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2483. * CarbonLib: not available
  2484. * Mac OS X: not available
  2485. */
  2486. EXTERN_API( OSStatus )
  2487. ICCRequiresInterruptSafe(ComponentInstance inst) FIVEWORDINLINE(0x2F3C, 0x0000, 0x002D, 0x7000, 0xA82A);
  2488. /* See comment for ICCRequiresInterruptSafe. */
  2489. /*
  2490. * ICCGetMappingInterruptSafe()
  2491. *
  2492. * Availability:
  2493. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2494. * CarbonLib: not available
  2495. * Mac OS X: not available
  2496. */
  2497. EXTERN_API( OSStatus )
  2498. ICCGetMappingInterruptSafe(
  2499. ComponentInstance inst,
  2500. Ptr * mappingPref,
  2501. long * mappingPrefSize) FIVEWORDINLINE(0x2F3C, 0x0008, 0x002E, 0x7000, 0xA82A);
  2502. /* See comment for ICCGetMappingInterruptSafe. */
  2503. /*
  2504. * ICCGetSeedInterruptSafe()
  2505. *
  2506. * Availability:
  2507. * Non-Carbon CFM: in InternetConfig 2.5 and later
  2508. * CarbonLib: not available
  2509. * Mac OS X: not available
  2510. */
  2511. EXTERN_API( OSStatus )
  2512. ICCGetSeedInterruptSafe(
  2513. ComponentInstance inst,
  2514. long * seed) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0030, 0x7000, 0xA82A);
  2515. /* See comment for ICCGetSeedInterruptSafe. */
  2516. #endif /* CALL_NOT_IN_CARBON */
  2517. #if CALL_NOT_IN_CARBON
  2518. /************************************************************************************************
  2519. component selectors
  2520. ************************************************************************************************/
  2521. enum {
  2522. kICCStart = 0,
  2523. kICCStop = 1,
  2524. kICCGetVersion = 50,
  2525. kICCFindConfigFile = 2,
  2526. kICCFindUserConfigFile = 14,
  2527. kICCGeneralFindConfigFile = 30,
  2528. kICCChooseConfig = 33,
  2529. kICCChooseNewConfig = 34,
  2530. kICCGetConfigName = 35,
  2531. kICCGetConfigReference = 31,
  2532. kICCSetConfigReference = 32,
  2533. kICCSpecifyConfigFile = 3,
  2534. kICCRefreshCaches = 47,
  2535. kICCGetSeed = 4,
  2536. kICCGetPerm = 13,
  2537. kICCDefaultFileName = 11,
  2538. kICCBegin = 5,
  2539. kICCGetPref = 6,
  2540. kICCSetPref = 7,
  2541. kICCFindPrefHandle = 36,
  2542. kICCGetPrefHandle = 26,
  2543. kICCSetPrefHandle = 27,
  2544. kICCCountPref = 8,
  2545. kICCGetIndPref = 9,
  2546. kICCDeletePref = 12,
  2547. kICCEnd = 10,
  2548. kICCGetDefaultPref = 49,
  2549. kICCEditPreferences = 15,
  2550. kICCLaunchURL = 17,
  2551. kICCParseURL = 16,
  2552. kICCCreateGURLEvent = 51,
  2553. kICCSendGURLEvent = 52,
  2554. kICCMapFilename = 24,
  2555. kICCMapTypeCreator = 25,
  2556. kICCMapEntriesFilename = 28,
  2557. kICCMapEntriesTypeCreator = 29,
  2558. kICCCountMapEntries = 18,
  2559. kICCGetIndMapEntry = 19,
  2560. kICCGetMapEntry = 20,
  2561. kICCSetMapEntry = 21,
  2562. kICCDeleteMapEntry = 22,
  2563. kICCAddMapEntry = 23,
  2564. kICCGetCurrentProfile = 37,
  2565. kICCSetCurrentProfile = 38,
  2566. kICCCountProfiles = 39,
  2567. kICCGetIndProfile = 40,
  2568. kICCGetProfileName = 41,
  2569. kICCSetProfileName = 42,
  2570. kICCAddProfile = 43,
  2571. kICCDeleteProfile = 44,
  2572. kICCRequiresInterruptSafe = 45,
  2573. kICCGetMappingInterruptSafe = 46,
  2574. kICCGetSeedInterruptSafe = 48,
  2575. kICCFirstSelector = kICCStart,
  2576. kICCLastSelector = 52
  2577. };
  2578. /************************************************************************************************
  2579. component selector proc infos
  2580. ************************************************************************************************/
  2581. enum {
  2582. kICCStartProcInfo = 1008,
  2583. kICCStopProcInfo = 240,
  2584. kICCGetVersionProcInfo = 4080,
  2585. kICCFindConfigFileProcInfo = 3824,
  2586. kICCFindUserConfigFileProcInfo = 1008,
  2587. kICCGeneralFindConfigFileProcInfo = 58864L,
  2588. kICCChooseConfigProcInfo = 240,
  2589. kICCChooseNewConfigProcInfo = 240,
  2590. kICCGetConfigNameProcInfo = 3568,
  2591. kICCGetConfigReferenceProcInfo = 1008,
  2592. kICCSetConfigReferenceProcInfo = 4080,
  2593. kICCSpecifyConfigFileProcInfo = 1008,
  2594. kICCRefreshCachesProcInfo = 240,
  2595. kICCGetSeedProcInfo = 1008,
  2596. kICCGetPermProcInfo = 1008,
  2597. kICCDefaultFileNameProcInfo = 1008,
  2598. kICCGetComponentInstanceProcInfo = 1008,
  2599. kICCBeginProcInfo = 496,
  2600. kICCGetPrefProcInfo = 65520L,
  2601. kICCSetPrefProcInfo = 65520L,
  2602. kICCFindPrefHandleProcInfo = 16368,
  2603. kICCGetPrefHandleProcInfo = 16368,
  2604. kICCSetPrefHandleProcInfo = 16368,
  2605. kICCCountPrefProcInfo = 1008,
  2606. kICCGetIndPrefProcInfo = 4080,
  2607. kICCDeletePrefProcInfo = 1008,
  2608. kICCEndProcInfo = 240,
  2609. kICCGetDefaultPrefProcInfo = 4080,
  2610. kICCEditPreferencesProcInfo = 1008,
  2611. kICCLaunchURLProcInfo = 262128L,
  2612. kICCParseURLProcInfo = 1048560L,
  2613. kICCCreateGURLEventProcInfo = 16368,
  2614. kICCSendGURLEventProcInfo = 1008,
  2615. kICCMapFilenameProcInfo = 4080,
  2616. kICCMapTypeCreatorProcInfo = 65520L,
  2617. kICCMapEntriesFilenameProcInfo = 16368,
  2618. kICCMapEntriesTypeCreatorProcInfo = 262128L,
  2619. kICCCountMapEntriesProcInfo = 4080,
  2620. kICCGetIndMapEntryProcInfo = 65520L,
  2621. kICCGetMapEntryProcInfo = 16368,
  2622. kICCSetMapEntryProcInfo = 16368,
  2623. kICCDeleteMapEntryProcInfo = 4080,
  2624. kICCAddMapEntryProcInfo = 4080,
  2625. kICCGetCurrentProfileProcInfo = 1008,
  2626. kICCSetCurrentProfileProcInfo = 1008,
  2627. kICCCountProfilesProcInfo = 1008,
  2628. kICCGetIndProfileProcInfo = 4080,
  2629. kICCGetProfileNameProcInfo = 4080,
  2630. kICCSetProfileNameProcInfo = 4080,
  2631. kICCAddProfileProcInfo = 4080,
  2632. kICCDeleteProfileProcInfo = 1008,
  2633. kICCRequiresInterruptSafeProcInfo = 240,
  2634. kICCGetMappingInterruptSafeProcInfo = 4080,
  2635. kICCGetSeedInterruptSafeProcInfo = 1008
  2636. };
  2637. /************************************************************************************************
  2638. component identifiers
  2639. ************************************************************************************************/
  2640. enum {
  2641. kICComponentType = FOUR_CHAR_CODE('PREF'),
  2642. kICComponentSubType = FOUR_CHAR_CODE('ICAp'),
  2643. kICComponentManufacturer = FOUR_CHAR_CODE('JPQE')
  2644. };
  2645. /************************************************************************************************
  2646. The following type is now obsolete.
  2647. If you're using it, please switch to ComponentInstance or ICInstance.
  2648. ************************************************************************************************/
  2649. #if OLDROUTINENAMES
  2650. typedef ComponentInstance internetConfigurationComponent;
  2651. #endif /* OLDROUTINENAMES */
  2652. #endif /* CALL_NOT_IN_CARBON */
  2653. /************************************************************************************************
  2654. old names for stuff declared above
  2655. ************************************************************************************************/
  2656. #if OLDROUTINENAMES
  2657. typedef long ICError;
  2658. enum {
  2659. ICattr_no_change = (unsigned long)(kICAttrNoChange),
  2660. ICattr_locked_bit = kICAttrLockedBit,
  2661. ICattr_locked_mask = kICAttrLockedMask,
  2662. ICattr_volatile_bit = kICAttrVolatileBit,
  2663. ICattr_volatile_mask = kICAttrVolatileMask,
  2664. icNoUserInteraction_bit = kICNoUserInteractionBit,
  2665. icNoUserInteraction_mask = kICNoUserInteractionMask,
  2666. ICfiletype = kICFileType,
  2667. ICcreator = kICCreator
  2668. };
  2669. /*
  2670. ICFileInfo was originally used to define the format of a key.
  2671. That key was removed, but we forgot to remove ICFileInfo.
  2672. I hope to remove it entirely, but for the moment it's available
  2673. if you define OLDROUTINENAMES.
  2674. */
  2675. struct ICFileInfo {
  2676. OSType fType;
  2677. OSType fCreator;
  2678. Str63 name;
  2679. };
  2680. typedef struct ICFileInfo ICFileInfo;
  2681. typedef ICFileInfo * ICFileInfoPtr;
  2682. typedef ICFileInfoPtr * ICFileInfoHandle;
  2683. enum {
  2684. ICfile_spec_header_size = kICFileSpecHeaderSize
  2685. };
  2686. enum {
  2687. ICmap_binary_bit = kICMapBinaryBit,
  2688. ICmap_binary_mask = kICMapBinaryMask,
  2689. ICmap_resource_fork_bit = kICMapResourceForkBit,
  2690. ICmap_resource_fork_mask = kICMapResourceForkMask,
  2691. ICmap_data_fork_bit = kICMapDataForkBit,
  2692. ICmap_data_fork_mask = kICMapDataForkMask,
  2693. ICmap_post_bit = kICMapPostBit,
  2694. ICmap_post_mask = kICMapPostMask,
  2695. ICmap_not_incoming_bit = kICMapNotIncomingBit,
  2696. ICmap_not_incoming_mask = kICMapNotIncomingMask,
  2697. ICmap_not_outgoing_bit = kICMapNotOutgoingBit,
  2698. ICmap_not_outgoing_mask = kICMapNotOutgoingMask,
  2699. ICmap_fixed_length = kICMapFixedLength
  2700. };
  2701. enum {
  2702. ICservices_tcp_bit = kICServicesTCPBit,
  2703. ICservices_tcp_mask = kICServicesTCPMask,
  2704. ICservices_udp_bit = kICServicesUDPBit,
  2705. ICservices_udp_mask = kICServicesUDPMask
  2706. };
  2707. /* This definitions are a) very long, and b) don't conform
  2708. to Mac OS standards for naming constants, so I've put
  2709. them in only if you're using OLDROUTINENAMES. Please switch
  2710. to the new names given above.
  2711. */
  2712. enum {
  2713. internetConfigurationComponentType = FOUR_CHAR_CODE('PREF'), /* the component type */
  2714. internetConfigurationComponentSubType = FOUR_CHAR_CODE('ICAp'), /* the component subtype */
  2715. internetConfigurationComponentInterfaceVersion0 = 0x00000000, /* IC >= 1.0 */
  2716. internetConfigurationComponentInterfaceVersion1 = 0x00010000, /* IC >= 1.1 */
  2717. internetConfigurationComponentInterfaceVersion2 = 0x00020000, /* IC >= 1.2 */
  2718. internetConfigurationComponentInterfaceVersion3 = 0x00030000, /* IC >= 2.0 */
  2719. /* current version number is version 3 */
  2720. internetConfigurationComponentInterfaceVersion = internetConfigurationComponentInterfaceVersion3
  2721. };
  2722. #endif /* OLDROUTINENAMES */
  2723. #if PRAGMA_STRUCT_ALIGN
  2724. #pragma options align=reset
  2725. #elif PRAGMA_STRUCT_PACKPUSH
  2726. #pragma pack(pop)
  2727. #elif PRAGMA_STRUCT_PACK
  2728. #pragma pack()
  2729. #endif
  2730. #ifdef PRAGMA_IMPORT_OFF
  2731. #pragma import off
  2732. #elif PRAGMA_IMPORT
  2733. #pragma import reset
  2734. #endif
  2735. #ifdef __cplusplus
  2736. }
  2737. #endif
  2738. #endif /* __INTERNETCONFIG__ */