InternetConfig.pas 60 KB

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