InternetConfig.pas 61 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817
  1. {
  2. File: HIServices/InternetConfig.h
  3. Contains: Internet Config interfaces
  4. Version: HIServices-416~44
  5. Copyright: © 1999-2008 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://bugs.freepascal.org
  9. }
  10. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  11. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2012 }
  12. {
  13. Modified for use with Free Pascal
  14. Version 308
  15. Please report any bugs to <[email protected]>
  16. }
  17. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  18. {$mode macpas}
  19. {$modeswitch cblocks}
  20. {$packenum 1}
  21. {$macro on}
  22. {$inline on}
  23. {$calling mwpascal}
  24. unit InternetConfig;
  25. interface
  26. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  27. {$setc GAP_INTERFACES_VERSION := $0308}
  28. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  29. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  30. {$endc}
  31. {$ifc defined CPUPOWERPC and defined CPUI386}
  32. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  33. {$endc}
  34. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  35. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  36. {$endc}
  37. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  38. {$setc __ppc__ := 1}
  39. {$elsec}
  40. {$setc __ppc__ := 0}
  41. {$endc}
  42. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  43. {$setc __ppc64__ := 1}
  44. {$elsec}
  45. {$setc __ppc64__ := 0}
  46. {$endc}
  47. {$ifc not defined __i386__ and defined CPUI386}
  48. {$setc __i386__ := 1}
  49. {$elsec}
  50. {$setc __i386__ := 0}
  51. {$endc}
  52. {$ifc not defined __x86_64__ and defined CPUX86_64}
  53. {$setc __x86_64__ := 1}
  54. {$elsec}
  55. {$setc __x86_64__ := 0}
  56. {$endc}
  57. {$ifc not defined __arm__ and defined CPUARM}
  58. {$setc __arm__ := 1}
  59. {$elsec}
  60. {$setc __arm__ := 0}
  61. {$endc}
  62. {$ifc not defined __arm64__ and defined CPUAARCH64}
  63. {$setc __arm64__ := 1}
  64. {$elsec}
  65. {$setc __arm64__ := 0}
  66. {$endc}
  67. {$ifc defined cpu64}
  68. {$setc __LP64__ := 1}
  69. {$elsec}
  70. {$setc __LP64__ := 0}
  71. {$endc}
  72. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  73. {$error Conflicting definitions for __ppc__ and __i386__}
  74. {$endc}
  75. {$ifc defined __ppc__ and __ppc__}
  76. {$setc TARGET_CPU_PPC := TRUE}
  77. {$setc TARGET_CPU_PPC64 := FALSE}
  78. {$setc TARGET_CPU_X86 := FALSE}
  79. {$setc TARGET_CPU_X86_64 := FALSE}
  80. {$setc TARGET_CPU_ARM := FALSE}
  81. {$setc TARGET_CPU_ARM64 := FALSE}
  82. {$setc TARGET_OS_MAC := TRUE}
  83. {$setc TARGET_OS_IPHONE := FALSE}
  84. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  85. {$setc TARGET_OS_EMBEDDED := FALSE}
  86. {$elifc defined __ppc64__ and __ppc64__}
  87. {$setc TARGET_CPU_PPC := FALSE}
  88. {$setc TARGET_CPU_PPC64 := TRUE}
  89. {$setc TARGET_CPU_X86 := FALSE}
  90. {$setc TARGET_CPU_X86_64 := FALSE}
  91. {$setc TARGET_CPU_ARM := FALSE}
  92. {$setc TARGET_CPU_ARM64 := FALSE}
  93. {$setc TARGET_OS_MAC := TRUE}
  94. {$setc TARGET_OS_IPHONE := FALSE}
  95. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  96. {$setc TARGET_OS_EMBEDDED := FALSE}
  97. {$elifc defined __i386__ and __i386__}
  98. {$setc TARGET_CPU_PPC := FALSE}
  99. {$setc TARGET_CPU_PPC64 := FALSE}
  100. {$setc TARGET_CPU_X86 := TRUE}
  101. {$setc TARGET_CPU_X86_64 := FALSE}
  102. {$setc TARGET_CPU_ARM := FALSE}
  103. {$setc TARGET_CPU_ARM64 := FALSE}
  104. {$ifc defined iphonesim}
  105. {$setc TARGET_OS_MAC := FALSE}
  106. {$setc TARGET_OS_IPHONE := TRUE}
  107. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  108. {$elsec}
  109. {$setc TARGET_OS_MAC := TRUE}
  110. {$setc TARGET_OS_IPHONE := FALSE}
  111. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  112. {$endc}
  113. {$setc TARGET_OS_EMBEDDED := FALSE}
  114. {$elifc defined __x86_64__ and __x86_64__}
  115. {$setc TARGET_CPU_PPC := FALSE}
  116. {$setc TARGET_CPU_PPC64 := FALSE}
  117. {$setc TARGET_CPU_X86 := FALSE}
  118. {$setc TARGET_CPU_X86_64 := TRUE}
  119. {$setc TARGET_CPU_ARM := FALSE}
  120. {$setc TARGET_CPU_ARM64 := FALSE}
  121. {$ifc defined iphonesim}
  122. {$setc TARGET_OS_MAC := FALSE}
  123. {$setc TARGET_OS_IPHONE := TRUE}
  124. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  125. {$elsec}
  126. {$setc TARGET_OS_MAC := TRUE}
  127. {$setc TARGET_OS_IPHONE := FALSE}
  128. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  129. {$endc}
  130. {$setc TARGET_OS_EMBEDDED := FALSE}
  131. {$elifc defined __arm__ and __arm__}
  132. {$setc TARGET_CPU_PPC := FALSE}
  133. {$setc TARGET_CPU_PPC64 := FALSE}
  134. {$setc TARGET_CPU_X86 := FALSE}
  135. {$setc TARGET_CPU_X86_64 := FALSE}
  136. {$setc TARGET_CPU_ARM := TRUE}
  137. {$setc TARGET_CPU_ARM64 := FALSE}
  138. {$setc TARGET_OS_MAC := FALSE}
  139. {$setc TARGET_OS_IPHONE := TRUE}
  140. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  141. {$setc TARGET_OS_EMBEDDED := TRUE}
  142. {$elifc defined __arm64__ and __arm64__}
  143. {$setc TARGET_CPU_PPC := FALSE}
  144. {$setc TARGET_CPU_PPC64 := FALSE}
  145. {$setc TARGET_CPU_X86 := FALSE}
  146. {$setc TARGET_CPU_X86_64 := FALSE}
  147. {$setc TARGET_CPU_ARM := FALSE}
  148. {$setc TARGET_CPU_ARM64 := TRUE}
  149. {$ifc defined ios}
  150. {$setc TARGET_OS_MAC := FALSE}
  151. {$setc TARGET_OS_IPHONE := TRUE}
  152. {$setc TARGET_OS_EMBEDDED := TRUE}
  153. {$elsec}
  154. {$setc TARGET_OS_MAC := TRUE}
  155. {$setc TARGET_OS_IPHONE := FALSE}
  156. {$setc TARGET_OS_EMBEDDED := FALSE}
  157. {$endc}
  158. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  159. {$elsec}
  160. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  161. {$endc}
  162. {$ifc defined __LP64__ and __LP64__ }
  163. {$setc TARGET_CPU_64 := TRUE}
  164. {$elsec}
  165. {$setc TARGET_CPU_64 := FALSE}
  166. {$endc}
  167. {$ifc defined FPC_BIG_ENDIAN}
  168. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  169. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  170. {$elifc defined FPC_LITTLE_ENDIAN}
  171. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  172. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  173. {$elsec}
  174. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  175. {$endc}
  176. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  177. {$setc CALL_NOT_IN_CARBON := FALSE}
  178. {$setc OLDROUTINENAMES := FALSE}
  179. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  180. {$setc OPAQUE_UPP_TYPES := TRUE}
  181. {$setc OTCARBONAPPLICATION := TRUE}
  182. {$setc OTKERNEL := FALSE}
  183. {$setc PM_USE_SESSION_APIS := TRUE}
  184. {$setc TARGET_API_MAC_CARBON := TRUE}
  185. {$setc TARGET_API_MAC_OS8 := FALSE}
  186. {$setc TARGET_API_MAC_OSX := TRUE}
  187. {$setc TARGET_CARBON := TRUE}
  188. {$setc TARGET_CPU_68K := FALSE}
  189. {$setc TARGET_CPU_MIPS := FALSE}
  190. {$setc TARGET_CPU_SPARC := FALSE}
  191. {$setc TARGET_OS_UNIX := FALSE}
  192. {$setc TARGET_OS_WIN32 := FALSE}
  193. {$setc TARGET_RT_MAC_68881 := FALSE}
  194. {$setc TARGET_RT_MAC_CFM := FALSE}
  195. {$setc TARGET_RT_MAC_MACHO := TRUE}
  196. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  197. {$setc TYPE_BOOL := FALSE}
  198. {$setc TYPE_EXTENDED := FALSE}
  199. {$setc TYPE_LONGLONG := TRUE}
  200. uses MacTypes,Files,Aliases,Components,AEDataModel;
  201. {$endc} {not MACOSALLINCLUDE}
  202. {$ifc TARGET_OS_MAC}
  203. {
  204. ***DEPRECATION NOTICE***
  205. The Internet Config APIs are officially deprecated in 10.7.
  206. You can replace your use of Internet Config APIs with LaunchServices APIs.
  207. For example, to find which application is currently preferred for a
  208. particular MIME type, use LSCopyApplicationForMIMEType().
  209. }
  210. {
  211. IMPORTANT NOTES ABOUT THE C HEADERS
  212. -----------------------------------
  213. o When you see the parameter 'y *x', you should be aware that
  214. you *cannot pass in nil*. In future this restriction may be eased,
  215. especially for the attr parameter to ICGetPref. Parameters where nil
  216. is legal are declared using the explicit pointer type, ie 'yPtr x'.
  217. o Strings are *Pascal* strings. This means that they must be word aligned.
  218. MPW and Think C do this automatically. The last time I checked, Metrowerks
  219. C does not. If it still doesn't, then IMHO it's a bug in their compiler
  220. and you should report it to them. [IC 1.4 and later no longer require
  221. word aligned strings. You can ignore this warning if you require IC 1.4
  222. or greater.]
  223. }
  224. {*********************************************************************************************}
  225. {$ALIGN MAC68K}
  226. {***********************************************************************************************
  227. IC error codes
  228. ***********************************************************************************************}
  229. const
  230. icPrefNotFoundErr = -666; { preference not found (duh!) }
  231. icPermErr = -667; { cannot set preference }
  232. icPrefDataErr = -668; { problem with preference data }
  233. icInternalErr = -669; { hmm, this is not good }
  234. icTruncatedErr = -670; { more data was present than was returned }
  235. icNoMoreWritersErr = -671; { you cannot begin a write session because someone else is already doing it }
  236. icNothingToOverrideErr = -672; { no component for the override component to capture }
  237. icNoURLErr = -673; { no URL found }
  238. icConfigNotFoundErr = -674; { no configuration was found }
  239. icConfigInappropriateErr = -675; { incorrect manufacturer code }
  240. icProfileNotFoundErr = -676; { profile not found }
  241. icTooManyProfilesErr = -677; { too many profiles in database }
  242. {***********************************************************************************************
  243. IC versions (not necessarily, but historically, from a component)
  244. ***********************************************************************************************}
  245. const
  246. kICComponentInterfaceVersion0 = $00000000; { IC >= 1.0 }
  247. kICComponentInterfaceVersion1 = $00010000; { IC >= 1.1 }
  248. kICComponentInterfaceVersion2 = $00020000; { IC >= 1.2 }
  249. kICComponentInterfaceVersion3 = $00030000; { IC >= 2.0 }
  250. kICComponentInterfaceVersion4 = $00040000; { IC >= 2.5 }
  251. kICComponentInterfaceVersion = kICComponentInterfaceVersion4; { current version number is 4 }
  252. {***********************************************************************************************
  253. opaque type for preference reference
  254. ***********************************************************************************************}
  255. type
  256. ICInstance = ^OpaqueICInstance; { an opaque type }
  257. OpaqueICInstance = record end;
  258. ICInstancePtr = ^ICInstance; { when a var xx:ICInstance parameter can be nil, it is changed to xx: ICInstancePtr }
  259. {$ifc not TARGET_CPU_64}
  260. {***********************************************************************************************
  261. a record that specifies a folder, an array of such records, and a pointer to such an array
  262. ***********************************************************************************************}
  263. type
  264. ICDirSpec = record
  265. vRefNum: SInt16;
  266. dirID: SIGNEDLONG;
  267. end;
  268. ICDirSpecPtr = ^ICDirSpec;
  269. ICDirSpecArray = array [0..3] of ICDirSpec;
  270. ICDirSpecArrayPtr = ^ICDirSpecArray;
  271. {$endc} {not TARGET_CPU_64}
  272. {***********************************************************************************************
  273. preference attributes type, bit number constants, and mask constants
  274. ***********************************************************************************************}
  275. type
  276. ICAttr = UInt32;
  277. const
  278. kICAttrLockedBit = 0;
  279. kICAttrVolatileBit = 1;
  280. const
  281. kICAttrNoChange = $FFFFFFFF; { pass this to ICSetPref to tell it not to change the attributes }
  282. kICAttrLockedMask = $00000001;
  283. kICAttrVolatileMask = $00000002;
  284. {***********************************************************************************************
  285. permissions for use with ICBegin
  286. ***********************************************************************************************}
  287. type
  288. ICPerm = UInt8;
  289. const
  290. icNoPerm = 0;
  291. icReadOnlyPerm = 1;
  292. icReadWritePerm = 2;
  293. {***********************************************************************************************
  294. profile IDs
  295. ***********************************************************************************************}
  296. type
  297. ICProfileID = SInt32;
  298. ICProfileIDPtr = ^ICProfileID;
  299. const
  300. kICNilProfileID = 0;
  301. {***********************************************************************************************
  302. other constants
  303. ***********************************************************************************************}
  304. const
  305. kICNoUserInteractionBit = 0;
  306. const
  307. kICNoUserInteractionMask = $00000001;
  308. const
  309. kICFileType = FourCharCode('ICAp');
  310. kICCreator = FourCharCode('ICAp');
  311. {***********************************************************************************************
  312. Apple event constants
  313. ***********************************************************************************************}
  314. const
  315. kInternetEventClass = FourCharCode('GURL');
  316. kAEGetURL = FourCharCode('GURL');
  317. kAEFetchURL = FourCharCode('FURL');
  318. keyAEAttaching = FourCharCode('Atch');
  319. { AERegistry.i defines a compatible keyAEDestination }
  320. const
  321. kICEditPreferenceEventClass = FourCharCode('ICAp');
  322. kICEditPreferenceEvent = FourCharCode('ICAp');
  323. keyICEditPreferenceDestination = FourCharCode('dest');
  324. {***********************************************************************************************
  325. constants for use with ICGetVersion
  326. ***********************************************************************************************}
  327. const
  328. kICComponentVersion = 0; { Return a component version, comparable to kICComponentInterfaceVersion }
  329. kICNumVersion = 1; { Return a NumVersion structure }
  330. {***********************************************************************************************
  331. types and constants for use with kICDocumentFont, et. al.
  332. ***********************************************************************************************}
  333. type
  334. ICFontRecord = record
  335. size: SInt16;
  336. face: SInt8;
  337. pad: SInt8;
  338. font: Str255;
  339. end;
  340. ICFontRecordPtr = ^ICFontRecord;
  341. type
  342. ICFontRecordHandle = ^ICFontRecordPtr;
  343. {***********************************************************************************************
  344. types and constants for use with kICCharacterSet, et. al.
  345. ***********************************************************************************************}
  346. type
  347. ICCharTable = record
  348. netToMac: packed array [0..255] of UInt8;
  349. macToNet: packed array [0..255] of UInt8;
  350. end;
  351. ICCharTablePtr = ^ICCharTable;
  352. type
  353. ICCharTableHandle = ^ICCharTablePtr;
  354. {***********************************************************************************************
  355. types and constants for use with kICHelper, et. al.
  356. ***********************************************************************************************}
  357. type
  358. ICAppSpec = record
  359. fCreator: OSType;
  360. name: Str63;
  361. end;
  362. ICAppSpecPtr = ^ICAppSpec;
  363. type
  364. ICAppSpecHandle = ^ICAppSpecPtr;
  365. ICAppSpecList = record
  366. numberOfItems: SInt16;
  367. appSpecs: array [0..0] of ICAppSpec;
  368. end;
  369. ICAppSpecListPtr = ^ICAppSpecList;
  370. type
  371. ICAppSpecListHandle = ^ICAppSpecListPtr;
  372. {***********************************************************************************************
  373. types and constants for use with kICDownloadFolder, et. al.
  374. ***********************************************************************************************}
  375. type
  376. ICFileSpec = record
  377. volName: Str31; { this field should be ignored, use the alias }
  378. volCreationDate: SInt32; { this field should be ignored, use the alias }
  379. fss: FSSpec; { this field should be ignored, use the alias }
  380. alias: AliasRecord;
  381. { plus extra data, aliasSize 0 means no alias manager present when}
  382. { ICFileSpecification was created}
  383. end;
  384. ICFileSpecPtr = ^ICFileSpec;
  385. type
  386. ICFileSpecHandle = ^ICFileSpecPtr;
  387. const
  388. kICFileSpecHeaderSize = SizeOf(ICFileSpec) - sizeof(AliasRecord);
  389. {***********************************************************************************************
  390. types and constants for use with ICMapFilename, et. al.
  391. ***********************************************************************************************}
  392. type
  393. ICMapEntryFlags = SInt32;
  394. ICFixedLength = SInt16;
  395. ICMapEntry = record
  396. totalLength: SInt16;
  397. fixedLength: ICFixedLength;
  398. version: SInt16;
  399. fileType: OSType;
  400. fileCreator: OSType;
  401. postCreator: OSType;
  402. flags: ICMapEntryFlags;
  403. { variable part starts here}
  404. extension: Str255;
  405. creatorAppName: Str255;
  406. postAppName: Str255;
  407. MIMEType: Str255;
  408. entryName: Str255;
  409. end;
  410. ICMapEntryPtr = ^ICMapEntry;
  411. type
  412. ICMapEntryHandle = ^ICMapEntryPtr;
  413. const
  414. kICMapFixedLength = 22;
  415. const
  416. kICMapBinaryBit = 0; { file should be transfered in binary as opposed to text mode}
  417. kICMapResourceForkBit = 1; { the resource fork of the file is significant}
  418. kICMapDataForkBit = 2; { the data fork of the file is significant}
  419. kICMapPostBit = 3; { post process using post fields}
  420. kICMapNotIncomingBit = 4; { ignore this mapping for incoming files}
  421. kICMapNotOutgoingBit = 5; { ignore this mapping for outgoing files}
  422. const
  423. kICMapBinaryMask = $00000001; { file should be transfered in binary as opposed to text mode}
  424. kICMapResourceForkMask = $00000002; { the resource fork of the file is significant}
  425. kICMapDataForkMask = $00000004; { the data fork of the file is significant}
  426. kICMapPostMask = $00000008; { post process using post fields}
  427. kICMapNotIncomingMask = $00000010; { ignore this mapping for incoming files}
  428. kICMapNotOutgoingMask = $00000020; { ignore this mapping for outgoing files}
  429. {***********************************************************************************************
  430. types and constants for use with kICServices, et. al.
  431. ***********************************************************************************************}
  432. type
  433. ICServiceEntryFlags = SInt16;
  434. ICServiceEntry = record
  435. name: Str255;
  436. port: SInt16;
  437. flags: ICServiceEntryFlags;
  438. end;
  439. ICServiceEntryPtr = ^ICServiceEntry;
  440. type
  441. ICServiceEntryHandle = ^ICServiceEntryPtr;
  442. const
  443. kICServicesTCPBit = 0;
  444. kICServicesUDPBit = 1; { both bits can be set, which means the service is both TCP and UDP, eg daytime}
  445. const
  446. kICServicesTCPMask = $00000001;
  447. kICServicesUDPMask = $00000002; { both bits can be set, which means the service is both TCP and UDP, eg daytime}
  448. type
  449. ICServices = record
  450. count: SInt16;
  451. services: array [0..0] of ICServiceEntry;
  452. end;
  453. ICServicesPtr = ^ICServices;
  454. type
  455. ICServicesHandle = ^ICServicesPtr;
  456. {***********************************************************************************************
  457. keys
  458. ***********************************************************************************************}
  459. {
  460. key reserved for use by Internet Config
  461. }
  462. const
  463. kICReservedKey = 'kICReservedKey';
  464. {
  465. STR# -- formatted, list of Archie servers
  466. }
  467. const
  468. kICArchieAll = 'ArchieAll';
  469. {
  470. PString -- formatted, preferred Archie server
  471. }
  472. const
  473. kICArchiePreferred = 'ArchiePreferred';
  474. {
  475. ICCharTable -- Mac-to-Net and Net-to-Mac character translation
  476. }
  477. const
  478. kICCharacterSet = 'CharacterSet';
  479. {
  480. ICFontRecord -- font used for proportional text
  481. }
  482. const
  483. kICDocumentFont = 'DocumentFont';
  484. {
  485. ICFileSpec -- where to put newly downloaded files
  486. }
  487. const
  488. kICDownloadFolder = 'DownloadFolder';
  489. {
  490. PString -- [email protected], email address of user, ie return address
  491. }
  492. const
  493. kICEmail = 'Email';
  494. {
  495. PString -- host.domain, default FTP server
  496. }
  497. const
  498. kICFTPHost = 'FTPHost';
  499. {
  500. PString -- second level FTP proxy authorisation
  501. }
  502. const
  503. kICFTPProxyAccount = 'FTPProxyAccount';
  504. {
  505. PString -- host.domain
  506. }
  507. const
  508. kICFTPProxyHost = 'FTPProxyHost';
  509. {
  510. PString -- scrambled, password for FTPProxyUser
  511. }
  512. const
  513. kICFTPProxyPassword = 'FTPProxyPassword';
  514. {
  515. PString -- first level FTP proxy authorisation
  516. }
  517. const
  518. kICFTPProxyUser = 'FTPProxyUser';
  519. {
  520. PString -- host.domain, default finger server
  521. }
  522. const
  523. kICFingerHost = 'FingerHost';
  524. {
  525. PString -- host.domain, default Gopher server
  526. }
  527. const
  528. kICGopherHost = 'GopherHost';
  529. {
  530. PString -- host.domain, see note in Prog Docs
  531. }
  532. const
  533. kICGopherProxy = 'GopherProxy';
  534. {
  535. PString -- host.domain
  536. }
  537. const
  538. kICHTTPProxyHost = 'HTTPProxyHost';
  539. {
  540. ICAppSpec -- helpers for URL schemes
  541. }
  542. const
  543. kICHelper = 'Helper¥';
  544. {
  545. PString -- description for URL scheme
  546. }
  547. const
  548. kICHelperDesc = 'HelperDesc¥';
  549. {
  550. ICAppSpecList -- list of common helpers for URL schemes
  551. }
  552. const
  553. kICHelperList = 'HelperList¥';
  554. {
  555. PString -- host.domain, Internet Relay Chat server
  556. }
  557. const
  558. kICIRCHost = 'IRCHost';
  559. {
  560. STR# -- formatted, list of Info-Mac servers
  561. }
  562. const
  563. kICInfoMacAll = 'InfoMacAll';
  564. {
  565. PString -- formatted, preferred Info-Mac server
  566. }
  567. const
  568. kICInfoMacPreferred = 'InfoMacPreferred';
  569. {
  570. PString -- string LDAP thing
  571. }
  572. const
  573. kICLDAPSearchbase = 'LDAPSearchbase';
  574. {
  575. PString -- host.domain
  576. }
  577. const
  578. kICLDAPServer = 'LDAPServer';
  579. {
  580. ICFontRecord -- font used for lists of items (eg news article lists)
  581. }
  582. const
  583. kICListFont = 'ListFont';
  584. {
  585. PString -- host for MacSearch queries
  586. }
  587. const
  588. kICMacSearchHost = 'MacSearchHost';
  589. {
  590. PString -- [email protected], account from which to fetch mail
  591. }
  592. const
  593. kICMailAccount = 'MailAccount';
  594. {
  595. TEXT -- extra headers for mail messages
  596. }
  597. const
  598. kICMailHeaders = 'MailHeaders';
  599. {
  600. PString -- scrambled, password for MailAccount
  601. }
  602. const
  603. kICMailPassword = 'MailPassword';
  604. {
  605. ICMapEntries -- file type mapping, see documentation
  606. }
  607. const
  608. kICMapping = 'Mapping';
  609. {
  610. PString -- host.domain, NNTP server
  611. }
  612. const
  613. kICNNTPHost = 'NNTPHost';
  614. {
  615. PString -- host.domain, Network Time Protocol (NTP)
  616. }
  617. const
  618. kICNTPHost = 'NTPHost';
  619. {
  620. Boolean
  621. }
  622. const
  623. kICNewMailDialog = 'NewMailDialog';
  624. {
  625. Boolean -- how to announce new mail
  626. }
  627. const
  628. kICNewMailFlashIcon = 'NewMailFlashIcon';
  629. {
  630. Boolean
  631. }
  632. const
  633. kICNewMailPlaySound = 'NewMailPlaySound';
  634. {
  635. PString
  636. }
  637. const
  638. kICNewMailSoundName = 'NewMailSoundName';
  639. {
  640. PString -- scrambled, password for NewsAuthUsername
  641. }
  642. const
  643. kICNewsAuthPassword = 'NewsAuthPassword';
  644. {
  645. PString -- user name for authorised news servers
  646. }
  647. const
  648. kICNewsAuthUsername = 'NewsAuthUsername';
  649. {
  650. TEXT -- extra headers for news messages
  651. }
  652. const
  653. kICNewsHeaders = 'NewsHeaders';
  654. {
  655. STR# -- list of domains not to be proxied
  656. }
  657. const
  658. kICNoProxyDomains = 'NoProxyDomains';
  659. {
  660. PString -- for X-Organization string
  661. }
  662. const
  663. kICOrganization = 'Organization';
  664. {
  665. PString -- host.domain, default Ph server
  666. }
  667. const
  668. kICPhHost = 'PhHost';
  669. {
  670. TEXT -- default response for finger servers
  671. }
  672. const
  673. kICPlan = 'Plan';
  674. {
  675. ICFontRecord -- font used to print ScreenFont
  676. }
  677. const
  678. kICPrinterFont = 'PrinterFont';
  679. {
  680. PString -- used to quote responses in news and mail
  681. }
  682. const
  683. kICQuotingString = 'QuotingString';
  684. {
  685. PString -- real name of user
  686. }
  687. const
  688. kICRealName = 'RealName';
  689. {
  690. PString -- RTSP Proxy Host
  691. }
  692. const
  693. kICRTSPProxyHost = 'RTSPProxyHost';
  694. {
  695. PString -- host.domain, SMTP server
  696. }
  697. const
  698. kICSMTPHost = 'SMTPHost';
  699. {
  700. ICFontRecord -- font used for monospaced text (eg news articles)
  701. }
  702. const
  703. kICScreenFont = 'ScreenFont';
  704. {
  705. ICServices -- TCP and IP port-to-name mapping
  706. }
  707. const
  708. kICServices = 'Services';
  709. {
  710. TEXT -- append to news and mail messages
  711. }
  712. const
  713. kICSignature = 'Signature';
  714. {
  715. TEXT -- preferred mailing address
  716. }
  717. const
  718. kICSnailMailAddress = 'SnailMailAddress';
  719. {
  720. PString -- host.domain, remember that host.domain format allows ":port" and " port"
  721. }
  722. const
  723. kICSocksHost = 'SocksHost';
  724. {
  725. PString -- host.domain, default Telnet address
  726. }
  727. const
  728. kICTelnetHost = 'TelnetHost';
  729. {
  730. STR# -- formatted, list of UMich servers
  731. }
  732. const
  733. kICUMichAll = 'UMichAll';
  734. {
  735. PString -- formatted, preferred UMich server
  736. }
  737. const
  738. kICUMichPreferred = 'UMichPreferred';
  739. {
  740. Boolean
  741. }
  742. const
  743. kICUseFTPProxy = 'UseFTPProxy';
  744. {
  745. Boolean
  746. }
  747. const
  748. kICUseGopherProxy = 'UseGopherProxy';
  749. {
  750. Boolean
  751. }
  752. const
  753. kICUseHTTPProxy = 'UseHTTPProxy';
  754. {
  755. Boolean -- use PASV command for FTP transfers
  756. }
  757. const
  758. kICUsePassiveFTP = 'UsePassiveFTP';
  759. {
  760. Boolean
  761. }
  762. const
  763. kICUseRTSPProxy = 'UseRTSPProxy';
  764. {
  765. Boolean
  766. }
  767. const
  768. kICUseSocks = 'UseSocks';
  769. {
  770. PString -- no idea
  771. }
  772. const
  773. kICWAISGateway = 'WAISGateway';
  774. {
  775. PString -- URL, users default WWW page
  776. }
  777. const
  778. kICWWWHomePage = 'WWWHomePage';
  779. {
  780. RGBColor -- background colour for web pages
  781. }
  782. const
  783. kICWebBackgroundColour = 'WebBackgroundColour';
  784. {
  785. RGBColor -- colour for read links
  786. }
  787. const
  788. kICWebReadColor = '646F6777¥WebReadColor';
  789. {
  790. PString -- URL, users default search page
  791. }
  792. const
  793. kICWebSearchPagePrefs = 'WebSearchPagePrefs';
  794. {
  795. RGBColor -- colour for normal text
  796. }
  797. const
  798. kICWebTextColor = 'WebTextColor';
  799. {
  800. Boolean -- whether to underline links
  801. }
  802. const
  803. kICWebUnderlineLinks = '646F6777¥WebUnderlineLinks';
  804. {
  805. RGBColor -- colour for unread links
  806. }
  807. const
  808. kICWebUnreadColor = '646F6777¥WebUnreadColor';
  809. {
  810. PString -- host.domain, default whois server
  811. }
  812. const
  813. kICWhoisHost = 'WhoisHost';
  814. {***********************************************************************************************
  815. FUNCTIONS
  816. What do the annotations after each API mean?
  817. --------------------------------------------
  818. [r1] Requires IC 1.1 or higher.
  819. [r2] Requires IC 1.2 or higher.
  820. [r3] Requires IC 2.0 or higher.
  821. [r4] Requires IC 2.5 or higher.
  822. IMPORTANT:
  823. In IC 2.5, instances automatically use the default configuration.
  824. You no longer need to configure an instance explicitly, except
  825. if your code might run with an older version of IC. So the following
  826. notes only apply to IC 2.0 and earlier.
  827. [c1] You must have specified a configuration before calling this routine.
  828. [c2] You must have specified the default configuration before calling this
  829. routine.
  830. [c3] You do not need to specify a configuration before calling this routine.
  831. [b1] You must be inside a Begin/End pair when calling this routine.
  832. [b2] You must be inside a Begin/End read/write pair when calling this routine.
  833. [b3] You do not need to be inside a Begin/End pair when calling this routine.
  834. [b4] If you are getting or setting multiple preferences, you should make this
  835. call inside a Begin/End pair. If you do not make this call inside a Begin/End
  836. pair, the call will automatically do it for you.
  837. [b5] It is illegal to call this routine inside a Begin/End pair.
  838. ***********************************************************************************************}
  839. { ***** Starting Up and Shutting Down ***** }
  840. {
  841. * ICStart() *** DEPRECATED ***
  842. *
  843. * Mac OS X threading:
  844. * Not thread safe
  845. *
  846. * Availability:
  847. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  848. * CarbonLib: in CarbonLib 1.0.2 and later
  849. * Non-Carbon CFM: in InternetConfig 2.5 and later
  850. }
  851. function ICStart( var inst: ICInstance; signature: OSType ): OSStatus; external name '_ICStart';
  852. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  853. { Call this at application initialisation. Set signature to a value
  854. * which has been regsitered with DTS to allow for future expansion
  855. * of the IC system. Returns inst as a connection to the IC system.
  856. }
  857. {
  858. * ICStop() *** DEPRECATED ***
  859. *
  860. * Mac OS X threading:
  861. * Not thread safe
  862. *
  863. * Availability:
  864. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  865. * CarbonLib: in CarbonLib 1.0.2 and later
  866. * Non-Carbon CFM: in InternetConfig 2.5 and later
  867. }
  868. function ICStop( inst: ICInstance ): OSStatus; external name '_ICStop';
  869. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  870. { [b5]
  871. * Call this at application initialisation, after which inst
  872. * is no longer valid connection to IC.
  873. }
  874. {
  875. * ICGetVersion() *** DEPRECATED ***
  876. *
  877. * Mac OS X threading:
  878. * Not thread safe
  879. *
  880. * Availability:
  881. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  882. * CarbonLib: in CarbonLib 1.0.2 and later
  883. * Non-Carbon CFM: in InternetConfig 2.5 and later
  884. }
  885. function ICGetVersion( inst: ICInstance; whichVersion: SIGNEDLONG; var version: UInt32 ): OSStatus; external name '_ICGetVersion';
  886. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  887. { [r4] [c3] [b3]
  888. * Returns the version of Internet Config. Pass kICComponentVersion
  889. * to get the version as previously returned by GetComponenVerson.
  890. * Pass kICNumVersion to get a NumVersion structure.
  891. }
  892. {
  893. * ICGetConfigName() *** DEPRECATED ***
  894. *
  895. * Mac OS X threading:
  896. * Not thread safe
  897. *
  898. * Availability:
  899. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  900. * CarbonLib: in CarbonLib 1.0.2 and later
  901. * Non-Carbon CFM: in InternetConfig 2.5 and later
  902. }
  903. function ICGetConfigName( inst: ICInstance; longname: Boolean; var name: Str255 ): OSStatus; external name '_ICGetConfigName';
  904. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  905. { [r2] [c1] [b3]
  906. * Returns a string that describes the current configuration at a user
  907. * level. Set longname to true if you want a long name, up to 255
  908. * characters, or false if you want a short name, typically about 32
  909. * characters.
  910. * The returned string is for user display only. If you rely on the
  911. * exact format of it, you will conflict with any future IC
  912. * implementation that doesn't use explicit preference files.
  913. }
  914. { ***** Getting Information ***** }
  915. {
  916. * ICGetSeed() *** DEPRECATED ***
  917. *
  918. * Mac OS X threading:
  919. * Not thread safe
  920. *
  921. * Availability:
  922. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  923. * CarbonLib: in CarbonLib 1.0.2 and later
  924. * Non-Carbon CFM: in InternetConfig 2.5 and later
  925. }
  926. function ICGetSeed( inst: ICInstance; var seed: SIGNEDLONG ): OSStatus; external name '_ICGetSeed';
  927. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  928. { [c3] [b3]
  929. * Returns the current seed for the IC prefs database.
  930. * This seed changes each time a non-volatile preference is changed.
  931. * You can poll this to determine if any cached preferences change.
  932. }
  933. {
  934. * ICGetPerm() *** DEPRECATED ***
  935. *
  936. * Mac OS X threading:
  937. * Not thread safe
  938. *
  939. * Availability:
  940. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  941. * CarbonLib: in CarbonLib 1.0.2 and later
  942. * Non-Carbon CFM: in InternetConfig 2.5 and later
  943. }
  944. function ICGetPerm( inst: ICInstance; var perm: ICPerm ): OSStatus; external name '_ICGetPerm';
  945. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  946. { [c3] [b3]
  947. * Returns the access permissions currently associated with this instance.
  948. * While applications normally know what permissions they have,
  949. * this routine is designed for use by override components.
  950. }
  951. { ***** Reading and Writing Preferences ***** }
  952. {
  953. * ICBegin() *** DEPRECATED ***
  954. *
  955. * Mac OS X threading:
  956. * Not thread safe
  957. *
  958. * Availability:
  959. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  960. * CarbonLib: in CarbonLib 1.0.2 and later
  961. * Non-Carbon CFM: in InternetConfig 2.5 and later
  962. }
  963. function ICBegin( inst: ICInstance; perm: ICPerm ): OSStatus; external name '_ICBegin';
  964. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  965. { [c1] [b5]
  966. * Starting reading or writing multiple preferences.
  967. * A call to this must be balanced by a call to ICEnd.
  968. * Do not call WaitNextEvent between these calls.
  969. * The perm specifies whether you intend to read or read/write.
  970. * Only one writer is allowed per instance.
  971. * Note that this may open resource files that are not closed
  972. * until you call ICEnd.
  973. }
  974. {
  975. * ICGetPref() *** DEPRECATED ***
  976. *
  977. * Mac OS X threading:
  978. * Not thread safe
  979. *
  980. * Availability:
  981. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  982. * CarbonLib: in CarbonLib 1.0.2 and later
  983. * Non-Carbon CFM: in InternetConfig 2.5 and later
  984. }
  985. function ICGetPref( inst: ICInstance; const (*var*) key: Str255; var attr: ICAttr; buf: UnivPtr; var size: SIGNEDLONG ): OSStatus; external name '_ICGetPref';
  986. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  987. { [c1] [b4]
  988. * Reads the preference specified by key from the IC database to the
  989. * buffer pointed to by buf and size.
  990. * key must not be the empty string.
  991. * If buf is nil then no data is returned.
  992. * size must be non-negative.
  993. * attr and size are always set on return. On errors (except icTruncatedErr)
  994. * attr is set to ICattr_no_change and size is set to 0.
  995. * size is the actual size of the data.
  996. * attr is set to the attributes associated with the preference.
  997. * If this routine returns icTruncatedErr then the other returned
  998. * values are valid except that only the first size bytes have been
  999. * return. size is adjusted to reflect the true size of the preference.
  1000. * Returns icPrefNotFound if there is no preference for the key.
  1001. }
  1002. {
  1003. * ICSetPref() *** DEPRECATED ***
  1004. *
  1005. * Mac OS X threading:
  1006. * Not thread safe
  1007. *
  1008. * Availability:
  1009. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1010. * CarbonLib: in CarbonLib 1.0.2 and later
  1011. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1012. }
  1013. function ICSetPref( inst: ICInstance; const (*var*) key: Str255; attr: ICAttr; buf: {const} UnivPtr; size: SIGNEDLONG ): OSStatus; external name '_ICSetPref';
  1014. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1015. { [c1] [b4]
  1016. * Sets the preference specified by key from the IC database to the
  1017. * value pointed to by buf and size.
  1018. * key must not be the empty string.
  1019. * size must be non-negative.
  1020. * If buf is nil then the preference value is not set and size is ignored.
  1021. * If buf is not nil then the preference value is set to the size
  1022. * bytes pointed to by buf.
  1023. * If attr is ICattr_no_change then the preference attributes are not set.
  1024. * Otherwise the preference attributes are set to attr.
  1025. * Returns icPermErr if the previous ICBegin was passed icReadOnlyPerm.
  1026. * Returns icPermErr if current attr is locked, new attr is locked and buf <> nil.
  1027. }
  1028. {
  1029. * ICFindPrefHandle() *** DEPRECATED ***
  1030. *
  1031. * Mac OS X threading:
  1032. * Not thread safe
  1033. *
  1034. * Availability:
  1035. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1036. * CarbonLib: in CarbonLib 1.0.2 and later
  1037. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1038. }
  1039. function ICFindPrefHandle( inst: ICInstance; const (*var*) key: Str255; var attr: ICAttr; prefh: Handle ): OSStatus; external name '_ICFindPrefHandle';
  1040. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1041. { [r2] [c1] [b4]
  1042. * This routine effectively replaces ICGetPrefHandle.
  1043. * Reads the preference specified by key from the IC database into
  1044. * a handle, prefh.
  1045. * key must not be the empty string.
  1046. * attr is set to the attributes associated with the preference.
  1047. * You must set prefh to a non-nil handle before calling this routine.
  1048. * If the preference does not exist, icPrefNotFoundErr is returned.
  1049. }
  1050. {
  1051. * ICGetPrefHandle() *** DEPRECATED ***
  1052. *
  1053. * Mac OS X threading:
  1054. * Not thread safe
  1055. *
  1056. * Availability:
  1057. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1058. * CarbonLib: in CarbonLib 1.0.2 and later
  1059. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1060. }
  1061. function ICGetPrefHandle( inst: ICInstance; const (*var*) key: Str255; var attr: ICAttr; var prefh: Handle ): OSStatus; external name '_ICGetPrefHandle';
  1062. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1063. { [r1] [c1] [b4]
  1064. * This routine is now obsolete. Use ICFindPrefHandle instead.
  1065. * Reads the preference specified by key from the IC database into
  1066. * a newly created handle, prefh.
  1067. * key must not be the empty string.
  1068. * attr is set to the attributes associated with the preference.
  1069. * The incoming value of prefh is ignored.
  1070. * A new handle is created in the current heap and returned in prefh.
  1071. * If the routine returns an error, prefh is set to nil.
  1072. * If the preference does not exist, no error is returned and prefh is set
  1073. * to an empty handle.
  1074. }
  1075. {
  1076. * ICSetPrefHandle() *** DEPRECATED ***
  1077. *
  1078. * Mac OS X threading:
  1079. * Not thread safe
  1080. *
  1081. * Availability:
  1082. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1083. * CarbonLib: in CarbonLib 1.0.2 and later
  1084. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1085. }
  1086. function ICSetPrefHandle( inst: ICInstance; const (*var*) key: Str255; attr: ICAttr; prefh: Handle ): OSStatus; external name '_ICSetPrefHandle';
  1087. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1088. { [r1] [c1] [b4]
  1089. * Sets the preference specified by key from the IC database to the
  1090. * value contained in prefh.
  1091. * key must not be the empty string.
  1092. * If prefh is nil then the preference value is not set.
  1093. * If prefh is not nil then the preference value is set to the data
  1094. * contained in it.
  1095. * If attr is ICattr_no_change then the preference attributes are not set.
  1096. * Otherwise the preference attributes are set to attr.
  1097. * Returns icPermErr if the previous ICBegin was passed icReadOnlyPerm.
  1098. * Returns icPermErr if current attr is locked, new attr is locked and prefh <> nil.
  1099. }
  1100. {
  1101. * ICCountPref() *** DEPRECATED ***
  1102. *
  1103. * Mac OS X threading:
  1104. * Not thread safe
  1105. *
  1106. * Availability:
  1107. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1108. * CarbonLib: in CarbonLib 1.0.2 and later
  1109. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1110. }
  1111. function ICCountPref( inst: ICInstance; var count: SIGNEDLONG ): OSStatus; external name '_ICCountPref';
  1112. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1113. { [c1] [b1]
  1114. * Counts the total number of preferences.
  1115. * If the routine returns an error, count is set to 0.
  1116. }
  1117. {
  1118. * ICGetIndPref() *** DEPRECATED ***
  1119. *
  1120. * Mac OS X threading:
  1121. * Not thread safe
  1122. *
  1123. * Availability:
  1124. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1125. * CarbonLib: in CarbonLib 1.0.2 and later
  1126. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1127. }
  1128. function ICGetIndPref( inst: ICInstance; index: SIGNEDLONG; var key: Str255 ): OSStatus; external name '_ICGetIndPref';
  1129. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1130. { [c1] [b1]
  1131. * Returns the key of the index'th preference.
  1132. * index must be positive.
  1133. * Returns icPrefNotFoundErr if index is greater than the total number of preferences.
  1134. * If the routine returns an error, key is undefined.
  1135. }
  1136. {
  1137. * ICDeletePref() *** DEPRECATED ***
  1138. *
  1139. * Mac OS X threading:
  1140. * Not thread safe
  1141. *
  1142. * Availability:
  1143. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1144. * CarbonLib: in CarbonLib 1.0.2 and later
  1145. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1146. }
  1147. function ICDeletePref( inst: ICInstance; const (*var*) key: Str255 ): OSStatus; external name '_ICDeletePref';
  1148. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1149. { [c1] [b2]
  1150. * Deletes the preference specified by key.
  1151. * key must not be the empty string.
  1152. * Returns icPrefNotFound if the preference specified by key is not present.
  1153. }
  1154. {
  1155. * ICEnd() *** DEPRECATED ***
  1156. *
  1157. * Mac OS X threading:
  1158. * Not thread safe
  1159. *
  1160. * Availability:
  1161. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1162. * CarbonLib: in CarbonLib 1.0.2 and later
  1163. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1164. }
  1165. function ICEnd( inst: ICInstance ): OSStatus; external name '_ICEnd';
  1166. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1167. { [c1] [b1]
  1168. * Terminates a preference session, as started by ICBegin.
  1169. * You must have called ICBegin before calling this routine.
  1170. }
  1171. {
  1172. * ICGetDefaultPref() *** DEPRECATED ***
  1173. *
  1174. * Mac OS X threading:
  1175. * Not thread safe
  1176. *
  1177. * Availability:
  1178. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1179. * CarbonLib: in CarbonLib 1.0.2 and later
  1180. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1181. }
  1182. function ICGetDefaultPref( inst: ICInstance; const (*var*) key: Str255; prefH: Handle ): OSStatus; external name '_ICGetDefaultPref';
  1183. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1184. { [r4] [c3] [b5]
  1185. * Returns a default preference value for the specified key. You
  1186. * must pass in a valid prefH, which is resized to fit the data.
  1187. }
  1188. { ***** User Interface Stuff ***** }
  1189. {
  1190. * ICEditPreferences() *** DEPRECATED ***
  1191. *
  1192. * Mac OS X threading:
  1193. * Not thread safe
  1194. *
  1195. * Availability:
  1196. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1197. * CarbonLib: in CarbonLib 1.0.2 and later
  1198. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1199. }
  1200. function ICEditPreferences( inst: ICInstance; const (*var*) key: Str255 ): OSStatus; external name '_ICEditPreferences';
  1201. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1202. { [r1] [c1] [b3]
  1203. * Instructs IC to display the user interface associated with editing
  1204. * preferences and focusing on the preference specified by key.
  1205. * If key is the empty string then no preference should be focused upon.
  1206. * You must have specified a configuration before calling this routine.
  1207. * You do not need to call ICBegin before calling this routine.
  1208. * In the current implementation this launches the IC application
  1209. * (or brings it to the front) and displays the window containing
  1210. * the preference specified by key.
  1211. * It may have a radically different implementation in future
  1212. * IC systems.
  1213. }
  1214. { ***** URL Handling ***** }
  1215. {
  1216. * ICLaunchURL() *** DEPRECATED ***
  1217. *
  1218. * Mac OS X threading:
  1219. * Not thread safe
  1220. *
  1221. * Availability:
  1222. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1223. * CarbonLib: in CarbonLib 1.0.2 and later
  1224. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1225. }
  1226. function ICLaunchURL( inst: ICInstance; const (*var*) hint: Str255; data: {const} UnivPtr; len: SIGNEDLONG; var selStart: SIGNEDLONG; var selEnd: SIGNEDLONG ): OSStatus; external name '_ICLaunchURL';
  1227. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1228. { [r1] [c1] [b3]
  1229. * Parses a URL out of the specified text and feeds it off to the
  1230. * appropriate helper.
  1231. * hint indicates the default scheme for URLs of the form "name@address".
  1232. * If hint is the empty string then URLs of that form are not allowed.
  1233. * data points to the start of the text. It must not be nil.
  1234. * len indicates the length of the text. It must be non-negative.
  1235. * selStart and selEnd should be passed in as the current selection of
  1236. * the text. This selection is given in the same manner as TextEdit,
  1237. * ie if selStart = selEnd then there is no selection only an insertion
  1238. * point. Also selStart ² selEnd and 0 ² selStart ² len and 0 ² selEnd ² len.
  1239. * selStart and selEnd are returned as the bounds of the URL. If the
  1240. * routine returns an error then these new boundaries may be
  1241. * invalid but they will be close.
  1242. * The URL is parsed out of the text and passed off to the appropriate
  1243. * helper using the GURL AppleEvent.
  1244. }
  1245. {
  1246. * ICParseURL() *** DEPRECATED ***
  1247. *
  1248. * Mac OS X threading:
  1249. * Not thread safe
  1250. *
  1251. * Availability:
  1252. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1253. * CarbonLib: in CarbonLib 1.0.2 and later
  1254. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1255. }
  1256. function ICParseURL( inst: ICInstance; const (*var*) hint: Str255; data: {const} UnivPtr; len: SIGNEDLONG; var selStart: SIGNEDLONG; var selEnd: SIGNEDLONG; url: Handle ): OSStatus; external name '_ICParseURL';
  1257. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1258. { [r1] [c1] [b3]
  1259. * Parses a URL out of the specified text and returns it in a canonical form
  1260. * in a handle.
  1261. * hint indicates the default scheme for URLs of the form "name@address".
  1262. * If hint is the empty string then URLs of that form are not allowed.
  1263. * data points to the start of the text. It must not be nil.
  1264. * len indicates the length of the text. It must be non-negative.
  1265. * selStart and selEnd should be passed in as the current selection of
  1266. * the text. This selection is given in the same manner as TextEdit,
  1267. * ie if selStart = selEnd then there is no selection only an insertion
  1268. * point. Also selStart ² selEnd and 0 ² selStart ² len and 0 ² selEnd ² len.
  1269. * selStart and selEnd are returned as the bounds of the URL. If the
  1270. * routine returns an error then these new boundaries may be
  1271. * invalid but they will be close.
  1272. * The incoming url handle must not be nil. The resulting URL is normalised
  1273. * and copied into the url handle, which is resized to fit.
  1274. }
  1275. {
  1276. * ICCreateGURLEvent() *** DEPRECATED ***
  1277. *
  1278. * Mac OS X threading:
  1279. * Not thread safe
  1280. *
  1281. * Availability:
  1282. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1283. * CarbonLib: in CarbonLib 1.0.2 and later
  1284. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1285. }
  1286. function ICCreateGURLEvent( inst: ICInstance; helperCreator: OSType; urlH: Handle; var theEvent: AppleEvent ): OSStatus; external name '_ICCreateGURLEvent';
  1287. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1288. { [r4] [c1] [b3]
  1289. * Creates a GURL Apple event, targetted at the application whose creator
  1290. * code is helperCreator, with a direct object containing the URL text from urlH.
  1291. }
  1292. {
  1293. * ICSendGURLEvent() *** DEPRECATED ***
  1294. *
  1295. * Mac OS X threading:
  1296. * Not thread safe
  1297. *
  1298. * Availability:
  1299. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1300. * CarbonLib: in CarbonLib 1.0.2 and later
  1301. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1302. }
  1303. function ICSendGURLEvent( inst: ICInstance; var theEvent: AppleEvent ): OSStatus; external name '_ICSendGURLEvent';
  1304. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1305. { [r4] [c1] [b3]
  1306. * Sends theEvent to the target application.
  1307. }
  1308. { ***** Mappings Routines *****
  1309. *
  1310. * Routines for interrogating mappings database.
  1311. *
  1312. * ----- High Level Routines -----
  1313. }
  1314. {
  1315. * ICMapFilename() *** DEPRECATED ***
  1316. *
  1317. * Mac OS X threading:
  1318. * Not thread safe
  1319. *
  1320. * Availability:
  1321. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1322. * CarbonLib: in CarbonLib 1.0.2 and later
  1323. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1324. }
  1325. function ICMapFilename( inst: ICInstance; const (*var*) filename: Str255; var entry: ICMapEntry ): OSStatus; external name '_ICMapFilename';
  1326. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1327. { [r1] [c1] [b4]
  1328. * Takes the name of an incoming file and returns the most appropriate
  1329. * mappings database entry, based on its extension.
  1330. * filename must not be the empty string.
  1331. * Returns icPrefNotFoundErr if no suitable entry is found.
  1332. }
  1333. {
  1334. * ICMapTypeCreator() *** DEPRECATED ***
  1335. *
  1336. * Mac OS X threading:
  1337. * Not thread safe
  1338. *
  1339. * Availability:
  1340. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1341. * CarbonLib: in CarbonLib 1.0.2 and later
  1342. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1343. }
  1344. function ICMapTypeCreator( inst: ICInstance; fType: OSType; fCreator: OSType; const (*var*) filename: Str255; var entry: ICMapEntry ): OSStatus; external name '_ICMapTypeCreator';
  1345. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1346. { [r1] [c1] [b4]
  1347. * Takes the type and creator (and optionally the name) of an outgoing
  1348. * file and returns the most appropriate mappings database entry.
  1349. * The filename may be either the name of the outgoing file or
  1350. * the empty string.
  1351. * Returns icPrefNotFoundErr if no suitable entry found.
  1352. }
  1353. { ----- Mid Level Routines ----- }
  1354. {
  1355. * ICMapEntriesFilename() *** DEPRECATED ***
  1356. *
  1357. * Mac OS X threading:
  1358. * Not thread safe
  1359. *
  1360. * Availability:
  1361. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1362. * CarbonLib: in CarbonLib 1.0.2 and later
  1363. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1364. }
  1365. function ICMapEntriesFilename( inst: ICInstance; entries: Handle; const (*var*) filename: Str255; var entry: ICMapEntry ): OSStatus; external name '_ICMapEntriesFilename';
  1366. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1367. { [r1] [c1] [b3]
  1368. * Takes the name of an incoming file and returns the most appropriate
  1369. * mappings database entry, based on its extension.
  1370. * entries must be a handle to a valid IC mappings database preference.
  1371. * filename must not be the empty string.
  1372. * Returns icPrefNotFoundErr if no suitable entry is found.
  1373. }
  1374. {
  1375. * ICMapEntriesTypeCreator() *** DEPRECATED ***
  1376. *
  1377. * Mac OS X threading:
  1378. * Not thread safe
  1379. *
  1380. * Availability:
  1381. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1382. * CarbonLib: in CarbonLib 1.0.2 and later
  1383. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1384. }
  1385. function ICMapEntriesTypeCreator( inst: ICInstance; entries: Handle; fType: OSType; fCreator: OSType; const (*var*) filename: Str255; var entry: ICMapEntry ): OSStatus; external name '_ICMapEntriesTypeCreator';
  1386. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1387. { [r1] [c1] [b3]
  1388. * Takes the type and creator (and optionally the name) of an outgoing
  1389. * file and returns the most appropriate mappings database entry.
  1390. * entries must be a handle to a valid IC mappings database preference.
  1391. * The filename may be either the name of the outgoing file or
  1392. * the empty string.
  1393. * Returns icPrefNotFoundErr if no suitable entry found.
  1394. }
  1395. { ----- Low Level Routines ----- }
  1396. {
  1397. * ICCountMapEntries() *** DEPRECATED ***
  1398. *
  1399. * Mac OS X threading:
  1400. * Not thread safe
  1401. *
  1402. * Availability:
  1403. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1404. * CarbonLib: in CarbonLib 1.0.2 and later
  1405. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1406. }
  1407. function ICCountMapEntries( inst: ICInstance; entries: Handle; var count: SIGNEDLONG ): OSStatus; external name '_ICCountMapEntries';
  1408. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1409. { [r1] [c1] [b3]
  1410. * Counts the number of entries in the mappings database.
  1411. * entries must be a handle to a valid IC mappings database preference.
  1412. * count is set to the number of entries.
  1413. }
  1414. {
  1415. * ICGetIndMapEntry() *** DEPRECATED ***
  1416. *
  1417. * Mac OS X threading:
  1418. * Not thread safe
  1419. *
  1420. * Availability:
  1421. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1422. * CarbonLib: in CarbonLib 1.0.2 and later
  1423. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1424. }
  1425. function ICGetIndMapEntry( inst: ICInstance; entries: Handle; index: SIGNEDLONG; var pos: SIGNEDLONG; var entry: ICMapEntry ): OSStatus; external name '_ICGetIndMapEntry';
  1426. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1427. { [r1] [c1] [b3]
  1428. * Gets the index'th entry in the mappings database.
  1429. * entries must be a handle to a valid IC mappings database preference.
  1430. * index must be in the range from 1 to the number of entries in the database.
  1431. * The value of pos is ignored on input. pos is set to the position of
  1432. * the index'th entry in the database and is suitable for passing back
  1433. * into ICSetMapEntry.
  1434. * Does not return any user data associated with the entry.
  1435. }
  1436. {
  1437. * ICGetMapEntry() *** DEPRECATED ***
  1438. *
  1439. * Mac OS X threading:
  1440. * Not thread safe
  1441. *
  1442. * Availability:
  1443. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1444. * CarbonLib: in CarbonLib 1.0.2 and later
  1445. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1446. }
  1447. function ICGetMapEntry( inst: ICInstance; entries: Handle; pos: SIGNEDLONG; var entry: ICMapEntry ): OSStatus; external name '_ICGetMapEntry';
  1448. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1449. { [r1] [c1] [b3]
  1450. * Returns the entry located at position pos in the mappings database.
  1451. * entries must be a handle to a valid IC mappings database preference.
  1452. * pos should be 0 to get the first entry. To get the subsequent entries, add
  1453. * entry.total_size to pos and iterate.
  1454. * Does not return any user data associated with the entry.
  1455. }
  1456. {
  1457. * ICSetMapEntry() *** DEPRECATED ***
  1458. *
  1459. * Mac OS X threading:
  1460. * Not thread safe
  1461. *
  1462. * Availability:
  1463. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1464. * CarbonLib: in CarbonLib 1.0.2 and later
  1465. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1466. }
  1467. function ICSetMapEntry( inst: ICInstance; entries: Handle; pos: SIGNEDLONG; const (*var*) entry: ICMapEntry ): OSStatus; external name '_ICSetMapEntry';
  1468. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1469. { [r1] [c1] [b3]
  1470. * Sets the entry located at position pos in the mappings database.
  1471. * entries must be a handle to a valid IC mappings database preference.
  1472. * pos should be either a value returned from ICGetIndMapEntry or a value
  1473. * calculated using ICGetMapEntry.
  1474. * entry is a var parameter purely for stack space reasons. It is not
  1475. * modified in any way.
  1476. * Any user data associated with the entry is unmodified.
  1477. }
  1478. {
  1479. * ICDeleteMapEntry() *** DEPRECATED ***
  1480. *
  1481. * Mac OS X threading:
  1482. * Not thread safe
  1483. *
  1484. * Availability:
  1485. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1486. * CarbonLib: in CarbonLib 1.0.2 and later
  1487. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1488. }
  1489. function ICDeleteMapEntry( inst: ICInstance; entries: Handle; pos: SIGNEDLONG ): OSStatus; external name '_ICDeleteMapEntry';
  1490. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1491. { [r1] [c1] [b3]
  1492. * Deletes the mappings database entry at pos.
  1493. * entries must be a handle to a valid IC mappings database preference.
  1494. * pos should be either a value returned from ICGetIndMapEntry or a value
  1495. * calculated using ICGetMapEntry.
  1496. * Also deletes any user data associated with the entry.
  1497. }
  1498. {
  1499. * ICAddMapEntry() *** DEPRECATED ***
  1500. *
  1501. * Mac OS X threading:
  1502. * Not thread safe
  1503. *
  1504. * Availability:
  1505. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1506. * CarbonLib: in CarbonLib 1.0.2 and later
  1507. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1508. }
  1509. function ICAddMapEntry( inst: ICInstance; entries: Handle; const (*var*) entry: ICMapEntry ): OSStatus; external name '_ICAddMapEntry';
  1510. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1511. { [r1] [c1] [b3]
  1512. * Adds an entry to the mappings database.
  1513. * entries must be a handle to a valid IC mappings database preference.
  1514. * The entry is added to the end of the entries database.
  1515. * No user data is added.
  1516. }
  1517. { ***** Profile Management Routines ***** }
  1518. {
  1519. * ICGetCurrentProfile() *** DEPRECATED ***
  1520. *
  1521. * Mac OS X threading:
  1522. * Not thread safe
  1523. *
  1524. * Availability:
  1525. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1526. * CarbonLib: in CarbonLib 1.0.2 and later
  1527. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1528. }
  1529. function ICGetCurrentProfile( inst: ICInstance; var currentID: ICProfileID ): OSStatus; external name '_ICGetCurrentProfile';
  1530. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1531. { [r3] [c1] [b3]
  1532. * Returns the profile ID of the current profile.
  1533. }
  1534. {
  1535. * ICSetCurrentProfile() *** DEPRECATED ***
  1536. *
  1537. * Mac OS X threading:
  1538. * Not thread safe
  1539. *
  1540. * Availability:
  1541. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1542. * CarbonLib: in CarbonLib 1.0.2 and later
  1543. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1544. }
  1545. function ICSetCurrentProfile( inst: ICInstance; newID: ICProfileID ): OSStatus; external name '_ICSetCurrentProfile';
  1546. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1547. { [r3] [c1] [b3]
  1548. * Sets the current profile to the profile specified in newProfile.
  1549. }
  1550. {
  1551. * ICCountProfiles() *** DEPRECATED ***
  1552. *
  1553. * Mac OS X threading:
  1554. * Not thread safe
  1555. *
  1556. * Availability:
  1557. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1558. * CarbonLib: in CarbonLib 1.0.2 and later
  1559. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1560. }
  1561. function ICCountProfiles( inst: ICInstance; var count: SIGNEDLONG ): OSStatus; external name '_ICCountProfiles';
  1562. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1563. { [r3] [c1] [b1]
  1564. * Returns the total number of profiles.
  1565. }
  1566. {
  1567. * ICGetIndProfile() *** DEPRECATED ***
  1568. *
  1569. * Mac OS X threading:
  1570. * Not thread safe
  1571. *
  1572. * Availability:
  1573. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1574. * CarbonLib: in CarbonLib 1.0.2 and later
  1575. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1576. }
  1577. function ICGetIndProfile( inst: ICInstance; index: SIGNEDLONG; var thisID: ICProfileID ): OSStatus; external name '_ICGetIndProfile';
  1578. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1579. { [r3] [c1] [b1]
  1580. * Returns the profile ID of the index'th profile. index must be positive.
  1581. * Returns icProfileNotFoundErr if index is greater than the total number
  1582. * of profiles.
  1583. }
  1584. {
  1585. * ICGetProfileName() *** DEPRECATED ***
  1586. *
  1587. * Mac OS X threading:
  1588. * Not thread safe
  1589. *
  1590. * Availability:
  1591. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1592. * CarbonLib: in CarbonLib 1.0.2 and later
  1593. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1594. }
  1595. function ICGetProfileName( inst: ICInstance; thisID: ICProfileID; var name: Str255 ): OSStatus; external name '_ICGetProfileName';
  1596. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1597. { [r3] [c1] [b3]
  1598. * Returns the name of a profile given its ID. The name may not uniquely
  1599. * identify the profile. [That's what the profile ID is for!] The name
  1600. * is assumed to be in the system script.
  1601. }
  1602. {
  1603. * ICSetProfileName() *** DEPRECATED ***
  1604. *
  1605. * Mac OS X threading:
  1606. * Not thread safe
  1607. *
  1608. * Availability:
  1609. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1610. * CarbonLib: in CarbonLib 1.0.2 and later
  1611. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1612. }
  1613. function ICSetProfileName( inst: ICInstance; thisID: ICProfileID; const (*var*) name: Str255 ): OSStatus; external name '_ICSetProfileName';
  1614. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1615. { [r3] [c1] [b3]
  1616. * This routine sets the name of the specified profile. Profile names
  1617. * need not be unique. The name should be in the system script.
  1618. }
  1619. {
  1620. * ICAddProfile() *** DEPRECATED ***
  1621. *
  1622. * Mac OS X threading:
  1623. * Not thread safe
  1624. *
  1625. * Availability:
  1626. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1627. * CarbonLib: in CarbonLib 1.0.2 and later
  1628. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1629. }
  1630. function ICAddProfile( inst: ICInstance; prototypeID: ICProfileID; var newID: ICProfileID ): OSStatus; external name '_ICAddProfile';
  1631. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1632. { [r3] [c1] [b2]
  1633. * If prototypeID = kICNilProfileID, this routine
  1634. * creates a default profile, otherwise it creates a
  1635. * profile by cloning the prototype profile. The ID
  1636. * of the new profile is returned in newID.
  1637. * The new profile will be give a new, unique, name.
  1638. * This does not switch to the new profile.
  1639. }
  1640. {
  1641. * ICDeleteProfile() *** DEPRECATED ***
  1642. *
  1643. * Mac OS X threading:
  1644. * Not thread safe
  1645. *
  1646. * Availability:
  1647. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.7
  1648. * CarbonLib: in CarbonLib 1.0.2 and later
  1649. * Non-Carbon CFM: in InternetConfig 2.5 and later
  1650. }
  1651. function ICDeleteProfile( inst: ICInstance; thisID: ICProfileID ): OSStatus; external name '_ICDeleteProfile';
  1652. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1653. { [r3] [c1] [b2]
  1654. * This routine deletes the profile specified by
  1655. * thisID. Attempting to delete the current profile
  1656. * or the last profile will return error.
  1657. }
  1658. {$endc} {TARGET_OS_MAC}
  1659. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  1660. end.
  1661. {$endc} {not MACOSALLINCLUDE}