ICAApplication.pas 91 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090
  1. //------------------------------------------------------------------------------------------------------------------------------
  2. //
  3. // ImageCapture/ICAApplication.h
  4. //
  5. // Copyright (c) 2004-2007 Apple Inc. All rights reserved.
  6. //
  7. //------------------------------------------------------------------------------------------------------------------------------
  8. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  9. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2012 }
  10. {
  11. Modified for use with Free Pascal
  12. Version 308
  13. Please report any bugs to <[email protected]>
  14. }
  15. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$calling mwpascal}
  21. unit ICAApplication;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  24. {$setc GAP_INTERFACES_VERSION := $0308}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  40. {$setc __ppc64__ := 1}
  41. {$elsec}
  42. {$setc __ppc64__ := 0}
  43. {$endc}
  44. {$ifc not defined __i386__ and defined CPUI386}
  45. {$setc __i386__ := 1}
  46. {$elsec}
  47. {$setc __i386__ := 0}
  48. {$endc}
  49. {$ifc not defined __x86_64__ and defined CPUX86_64}
  50. {$setc __x86_64__ := 1}
  51. {$elsec}
  52. {$setc __x86_64__ := 0}
  53. {$endc}
  54. {$ifc not defined __arm__ and defined CPUARM}
  55. {$setc __arm__ := 1}
  56. {$elsec}
  57. {$setc __arm__ := 0}
  58. {$endc}
  59. {$ifc not defined __arm64__ and defined CPUAARCH64}
  60. {$setc __arm64__ := 1}
  61. {$elsec}
  62. {$setc __arm64__ := 0}
  63. {$endc}
  64. {$ifc defined cpu64}
  65. {$setc __LP64__ := 1}
  66. {$elsec}
  67. {$setc __LP64__ := 0}
  68. {$endc}
  69. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  70. {$error Conflicting definitions for __ppc__ and __i386__}
  71. {$endc}
  72. {$ifc defined __ppc__ and __ppc__}
  73. {$setc TARGET_CPU_PPC := TRUE}
  74. {$setc TARGET_CPU_PPC64 := FALSE}
  75. {$setc TARGET_CPU_X86 := FALSE}
  76. {$setc TARGET_CPU_X86_64 := FALSE}
  77. {$setc TARGET_CPU_ARM := FALSE}
  78. {$setc TARGET_CPU_ARM64 := FALSE}
  79. {$setc TARGET_OS_MAC := TRUE}
  80. {$setc TARGET_OS_IPHONE := FALSE}
  81. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  82. {$setc TARGET_OS_EMBEDDED := FALSE}
  83. {$elifc defined __ppc64__ and __ppc64__}
  84. {$setc TARGET_CPU_PPC := FALSE}
  85. {$setc TARGET_CPU_PPC64 := TRUE}
  86. {$setc TARGET_CPU_X86 := FALSE}
  87. {$setc TARGET_CPU_X86_64 := FALSE}
  88. {$setc TARGET_CPU_ARM := FALSE}
  89. {$setc TARGET_CPU_ARM64 := FALSE}
  90. {$setc TARGET_OS_MAC := TRUE}
  91. {$setc TARGET_OS_IPHONE := FALSE}
  92. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  93. {$setc TARGET_OS_EMBEDDED := FALSE}
  94. {$elifc defined __i386__ and __i386__}
  95. {$setc TARGET_CPU_PPC := FALSE}
  96. {$setc TARGET_CPU_PPC64 := FALSE}
  97. {$setc TARGET_CPU_X86 := TRUE}
  98. {$setc TARGET_CPU_X86_64 := FALSE}
  99. {$setc TARGET_CPU_ARM := FALSE}
  100. {$setc TARGET_CPU_ARM64 := FALSE}
  101. {$ifc defined(iphonesim)}
  102. {$setc TARGET_OS_MAC := FALSE}
  103. {$setc TARGET_OS_IPHONE := TRUE}
  104. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  105. {$elsec}
  106. {$setc TARGET_OS_MAC := TRUE}
  107. {$setc TARGET_OS_IPHONE := FALSE}
  108. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  109. {$endc}
  110. {$setc TARGET_OS_EMBEDDED := FALSE}
  111. {$elifc defined __x86_64__ and __x86_64__}
  112. {$setc TARGET_CPU_PPC := FALSE}
  113. {$setc TARGET_CPU_PPC64 := FALSE}
  114. {$setc TARGET_CPU_X86 := FALSE}
  115. {$setc TARGET_CPU_X86_64 := TRUE}
  116. {$setc TARGET_CPU_ARM := FALSE}
  117. {$setc TARGET_CPU_ARM64 := FALSE}
  118. {$ifc defined(iphonesim)}
  119. {$setc TARGET_OS_MAC := FALSE}
  120. {$setc TARGET_OS_IPHONE := TRUE}
  121. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  122. {$elsec}
  123. {$setc TARGET_OS_MAC := TRUE}
  124. {$setc TARGET_OS_IPHONE := FALSE}
  125. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  126. {$endc}
  127. {$setc TARGET_OS_EMBEDDED := FALSE}
  128. {$elifc defined __arm__ and __arm__}
  129. {$setc TARGET_CPU_PPC := FALSE}
  130. {$setc TARGET_CPU_PPC64 := FALSE}
  131. {$setc TARGET_CPU_X86 := FALSE}
  132. {$setc TARGET_CPU_X86_64 := FALSE}
  133. {$setc TARGET_CPU_ARM := TRUE}
  134. {$setc TARGET_CPU_ARM64 := FALSE}
  135. { will require compiler define when/if other Apple devices with ARM cpus ship }
  136. {$setc TARGET_OS_MAC := FALSE}
  137. {$setc TARGET_OS_IPHONE := TRUE}
  138. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  139. {$setc TARGET_OS_EMBEDDED := TRUE}
  140. {$elifc defined __arm64__ and __arm64__}
  141. {$setc TARGET_CPU_PPC := FALSE}
  142. {$setc TARGET_CPU_PPC64 := FALSE}
  143. {$setc TARGET_CPU_X86 := FALSE}
  144. {$setc TARGET_CPU_X86_64 := FALSE}
  145. {$setc TARGET_CPU_ARM := FALSE}
  146. {$setc TARGET_CPU_ARM64 := TRUE}
  147. { will require compiler define when/if other Apple devices with ARM cpus ship }
  148. {$setc TARGET_OS_MAC := FALSE}
  149. {$setc TARGET_OS_IPHONE := TRUE}
  150. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  151. {$setc TARGET_OS_EMBEDDED := TRUE}
  152. {$elsec}
  153. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  154. {$endc}
  155. {$ifc defined __LP64__ and __LP64__ }
  156. {$setc TARGET_CPU_64 := TRUE}
  157. {$elsec}
  158. {$setc TARGET_CPU_64 := FALSE}
  159. {$endc}
  160. {$ifc defined FPC_BIG_ENDIAN}
  161. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  162. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  163. {$elifc defined FPC_LITTLE_ENDIAN}
  164. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  165. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  166. {$elsec}
  167. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  168. {$endc}
  169. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  170. {$setc CALL_NOT_IN_CARBON := FALSE}
  171. {$setc OLDROUTINENAMES := FALSE}
  172. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  173. {$setc OPAQUE_UPP_TYPES := TRUE}
  174. {$setc OTCARBONAPPLICATION := TRUE}
  175. {$setc OTKERNEL := FALSE}
  176. {$setc PM_USE_SESSION_APIS := TRUE}
  177. {$setc TARGET_API_MAC_CARBON := TRUE}
  178. {$setc TARGET_API_MAC_OS8 := FALSE}
  179. {$setc TARGET_API_MAC_OSX := TRUE}
  180. {$setc TARGET_CARBON := TRUE}
  181. {$setc TARGET_CPU_68K := FALSE}
  182. {$setc TARGET_CPU_MIPS := FALSE}
  183. {$setc TARGET_CPU_SPARC := FALSE}
  184. {$setc TARGET_OS_UNIX := FALSE}
  185. {$setc TARGET_OS_WIN32 := FALSE}
  186. {$setc TARGET_RT_MAC_68881 := FALSE}
  187. {$setc TARGET_RT_MAC_CFM := FALSE}
  188. {$setc TARGET_RT_MAC_MACHO := TRUE}
  189. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  190. {$setc TYPE_BOOL := FALSE}
  191. {$setc TYPE_EXTENDED := FALSE}
  192. {$setc TYPE_LONGLONG := TRUE}
  193. uses MacTypes,AEDataModel,Files,CFBase,CFArray,CFData,CFDictionary;
  194. {$endc} {not MACOSALLINCLUDE}
  195. {$ifc TARGET_OS_MAC}
  196. {$ALIGN MAC68K}
  197. //------------------------------------------------------------------------------------------------------------------------------
  198. {!
  199. @header
  200. ICAApplication.h
  201. @discussion
  202. ICAApplication.h defines structures and functions that are used by clients of Image Capture framework.
  203. }
  204. //------------------------------------------------------------------------------------------------------------------------------
  205. type
  206. ICAError = OSErr;
  207. //------------------------------------------------------------------------------------------------------ Parameter block version
  208. {!
  209. @enum Parameter block version
  210. @discussion
  211. Parameter block version.
  212. @constant kICAPBVersion
  213. Version 1 parameter block.
  214. }
  215. const
  216. kICAPBVersion = $00010000;
  217. //------------------------------------------------------------------------------------------------------------------ Error codes
  218. // Image Capture error code range = -9900 to -9949
  219. {!
  220. @enum Error codes
  221. @discussion
  222. Definition of error codes returned by Image Capture framework
  223. @constant kICACommunicationErr
  224. An error occurred in communication between different components of Image Capture framework.
  225. @constant kICADeviceNotFoundErr
  226. The specified device is not found.
  227. @constant kICADeviceNotOpenErr
  228. The specified device is not open.
  229. @constant kICAFileCorruptedErr
  230. Encountered a corrupt file.
  231. @constant kICAIOPendingErr
  232. There is a pending I/O.
  233. @constant kICAInvalidObjectErr
  234. The specified object is invalid.
  235. @constant kICAInvalidPropertyErr
  236. The specified property is invalid.
  237. @constant kICAIndexOutOfRangeErr
  238. The specified index is out of range.
  239. @constant kICAPropertyTypeNotFoundErr
  240. A property with the specified property type is not found.
  241. @constant kICACannotYieldDevice
  242. The device module cannot yield the specified device to the requestor.
  243. @constant kICADataTypeNotFoundErr
  244. Data with the specified data type is not found.
  245. @constant kICADeviceMemoryAllocationErr
  246. The device module encountered a memory allocation error.
  247. @constant kICADeviceInternalErr
  248. The device module encountered an unspecifed error.
  249. @constant kICADeviceInvalidParamErr
  250. At least one of the parameters passed to the device module is invalid.
  251. @constant kICADeviceAlreadyOpenErr
  252. The specified device is already open.
  253. @constant kICADeviceLocationIDNotFoundErr
  254. The specified USB Location ID is not found.
  255. @constant kICADeviceGUIDNotFoundErr
  256. The specified FireWire GUID is not found.
  257. @constant kICADeviceIOServicePathNotFoundErr
  258. The specified IOService path is not found.
  259. @constant kICAFrameworkInternalErr
  260. Image Capture Framework encountered an error.
  261. @constant kICAExtensionInternalErr
  262. Image Capture Extension encountered an error.
  263. @constant kICAInvalidSessionErr
  264. The specified session is not valid.
  265. }
  266. const
  267. kICACommunicationErr = -9900;
  268. kICADeviceNotFoundErr = -9901;
  269. kICADeviceNotOpenErr = -9902;
  270. kICAFileCorruptedErr = -9903;
  271. kICAIOPendingErr = -9904;
  272. kICAInvalidObjectErr = -9905;
  273. kICAInvalidPropertyErr = -9906;
  274. kICAIndexOutOfRangeErr = -9907;
  275. kICAPropertyTypeNotFoundErr = -9908;
  276. kICACannotYieldDevice = -9909;
  277. kICADataTypeNotFoundErr = -9910;
  278. kICADeviceMemoryAllocationErr = -9911;
  279. kICADeviceInternalErr = -9912;
  280. kICADeviceInvalidParamErr = -9913;
  281. kICADeviceAlreadyOpenErr = -9914;
  282. kICADeviceLocationIDNotFoundErr = -9915;
  283. kICADeviceGUIDNotFoundErr = -9916;
  284. kICADeviceIOServicePathNotFoundErr = -9917;
  285. kICADeviceUnsupportedErr = -9918;
  286. kICAFrameworkInternalErr = -9919;
  287. kICAExtensionInternalErr = -9920;
  288. kICAInvalidSessionErr = -9921;
  289. //------------------------------------------------------------------------------------------------- ICAObject types and subtypes
  290. {!
  291. @enum ICAObject types and subtypes
  292. @discussion
  293. Definition of ICAObject types and subtypes
  294. @constant kICADevice
  295. Object is a device supported by Image Capture framework.
  296. @constant kICADeviceCamera
  297. Object is a camera.
  298. @constant kICADeviceScanner
  299. Object is a scanner.
  300. @constant kICADeviceMFP
  301. Object is a multi-function peripheral.
  302. @constant kICADevicePhone
  303. Object is a camera phone.
  304. @constant kICADevicePDA
  305. Object is a personal digital assistant.
  306. @constant kICADeviceOther
  307. Object is a device supported by Image Capture framework, but of unknown subtype.
  308. @constant kICAList
  309. Object is a device list.
  310. @constant kICADirectory
  311. Object is a directory.
  312. @constant kICAFile
  313. Object is a file.
  314. @constant kICAFileImage
  315. Object is an image file.
  316. @constant kICAFileMovie
  317. Object is a movie file.
  318. @constant kICAFileAudio
  319. Object is an audio file.
  320. @constant kICAFileFirmware
  321. Object is a firmware file.
  322. @constant kICAFileOther
  323. Object is a generic file.
  324. }
  325. const
  326. kICADevice = FourCharCode('icdv');
  327. kICADeviceCamera = FourCharCode('cmra');
  328. kICADeviceScanner = FourCharCode('scan');
  329. kICADeviceMFP = FourCharCode('mfp ');
  330. kICADevicePhone = FourCharCode('phon');
  331. kICADevicePDA = FourCharCode('pda ');
  332. kICADeviceOther = FourCharCode('doth');
  333. kICAList = FourCharCode('objl');
  334. kICADirectory = FourCharCode('dire');
  335. kICAFile = FourCharCode('file');
  336. kICAFileImage = FourCharCode('imag');
  337. kICAFileMovie = FourCharCode('moov');
  338. kICAFileAudio = FourCharCode('audo');
  339. kICAFileFirmware = FourCharCode('firm');
  340. kICAFileOther = FourCharCode('othe');
  341. //------------------------------------------------------------------------------------------------------------ ICAProperty types
  342. {!
  343. @enum ICAProperty types
  344. @discussion
  345. Definition of ICAProperties
  346. @constant kICAProperty
  347. Generic property type; for images, refer to 'Digital Still Camera Image File Format Standard' Exif Version 2.1 section 2.6.4. and 2.6.5.
  348. @constant kICAPropertyImageWidth
  349. Image width.
  350. @constant kICAPropertyImageHeight
  351. Image height.
  352. @constant kICAPropertyImageBitDepth
  353. Image bit-depth.
  354. @constant kICAPropertyImageDPI
  355. Image DPI.
  356. @constant kICAPropertyImageExposureTime
  357. Image exposure time.
  358. @constant kICAPropertyImageFNumber
  359. Image f-Number.
  360. @constant kICAPropertyImageDateOriginal
  361. Original date & time of an object; value associated with this property is a null-terminated string conforming to format "YYYY:MM:DD hh:mm:ss".
  362. @constant kICAPropertyImageDateDigitized
  363. Digitized date & time of an object; value associated with this property is a null-terminated string conforming to format "YYYY:MM:DD hh:mm:ss".
  364. @constant kICAPropertyImageShutterSpeed
  365. Shutter speed used to capture an image.
  366. @constant kICAPropertyImageAperture
  367. Aperture used to capture an image.
  368. @constant kICAPropertyImageFlash
  369. Indicates whether flash was used to capture an image.
  370. @constant kICAPropertyColorSpace
  371. Color space used to represent an image.
  372. @constant kICAPropertyImageFilename
  373. Filename of an image.
  374. @constant kICAPropertyImageSize
  375. Size of an image in bytes.
  376. @constant kICAPropertyImageData
  377. Data of an image.
  378. @constant kICAPropertyImageThumbnail
  379. Thumbnail of an image.
  380. @constant kICAPropertyColorSyncProfile
  381. ColorSync profile associated with an image.
  382. }
  383. const
  384. kICAProperty = FourCharCode('prop');
  385. kICAPropertyImageWidth = FourCharCode('0100');
  386. kICAPropertyImageHeight = FourCharCode('0101');
  387. kICAPropertyImageBitDepth = FourCharCode('0102');
  388. kICAPropertyImageDPI = FourCharCode('011A');
  389. kICAPropertyImageExposureTime = FourCharCode('829A');
  390. kICAPropertyImageFNumber = FourCharCode('829D');
  391. kICAPropertyImageDateOriginal = FourCharCode('9003');
  392. kICAPropertyImageDateDigitized = FourCharCode('9004');
  393. kICAPropertyImageShutterSpeed = FourCharCode('9201');
  394. kICAPropertyImageAperture = FourCharCode('9202');
  395. kICAPropertyImageFlash = FourCharCode('9209');
  396. kICAPropertyColorSpace = FourCharCode('A001');
  397. kICAPropertyImageFilename = FourCharCode('ifil');
  398. kICAPropertyImageSize = FourCharCode('isiz');
  399. kICAPropertyImageData = FourCharCode('idat');
  400. kICAPropertyImageThumbnail = FourCharCode('thum');
  401. kICAPropertyColorSyncProfile = FourCharCode('prof');
  402. //------------------------------------------------------------------------------------------------------------------- Data types
  403. {!
  404. @enum Data types
  405. @discussion
  406. Definition of data types; these are mapped to AppleEvent types.
  407. @constant kICATypeUInt8
  408. UInt8.
  409. @constant kICATypeUInt16
  410. UInt16.
  411. @constant kICATypeUInt32
  412. UInt32.
  413. @constant kICATypeUInt64
  414. UInt64.
  415. @constant kICATypeSInt16
  416. SInt16.
  417. @constant kICATypeSInt32
  418. SInt32.
  419. @constant kICATypeSInt64
  420. SInt64.
  421. @constant kICATypeFloat
  422. float.
  423. @constant kICATypeFixed
  424. IEEE 32-bit floating point.
  425. @constant kICATypeBoolean
  426. Boolean.
  427. @constant kICATypeString
  428. Char string.
  429. @constant kICATypeData
  430. void *.
  431. @constant kICATypeThumbnail
  432. ICAThumbnail.
  433. }
  434. const
  435. kICATypeUInt8 = FourCharCode('ui08');
  436. kICATypeUInt16 = FourCharCode('ui16');
  437. kICATypeUInt32 = FourCharCode('ui32');
  438. kICATypeUInt64 = FourCharCode('ui64');
  439. kICATypeSInt16 = FourCharCode('si16');
  440. kICATypeSInt32 = FourCharCode('si32');
  441. kICATypeSInt64 = FourCharCode('si64');
  442. kICATypeFloat = FourCharCode('floa');
  443. kICATypeFixed = FourCharCode('sing');
  444. kICATypeBoolean = FourCharCode('bool');
  445. kICATypeString = FourCharCode('TEXT');
  446. kICATypeData = FourCharCode('data');
  447. kICATypeThumbnail = FourCharCode('thum');
  448. //----------------------------------------------------------------------------------------------------- PropertyInfo flag values
  449. {!
  450. @enum PropertyInfo flag values
  451. @discussion
  452. Values for PropertyInfo flag.
  453. @constant kICAFlagReadWriteAccess
  454. Access for read and write.
  455. @constant kICAFlagReadAccess
  456. Access for read only.
  457. }
  458. const
  459. kICAFlagReadWriteAccess = 1 shl 0;
  460. kICAFlagReadAccess = 1 shl 1;
  461. //----------------------------------------------------------------------------------------------------------------- Button types
  462. {!
  463. @enum Button types
  464. @discussion
  465. Buttons types associated with buttons on a scanner.
  466. @constant kICAButtonScan
  467. Scan button.
  468. @constant kICAButtonCopy
  469. Copy button.
  470. @constant kICAButtonEMail
  471. Email button.
  472. @constant kICAButtonWeb
  473. Web button.
  474. }
  475. const
  476. kICAButtonScan = FourCharCode('scan');
  477. kICAButtonCopy = FourCharCode('copy');
  478. kICAButtonEMail = FourCharCode('mail');
  479. kICAButtonWeb = FourCharCode('web ');
  480. //------------------------------------------------------------------------ Flags associated with Image Capture PassThru commands
  481. {!
  482. @enum Flags associated with Image Capture PassThru commands.
  483. @discussion
  484. Flag values that can be used in ICAUploadFilePB parameter block.
  485. @constant kICACameraPassThruSend
  486. Use this constant when sending data to a device using a pass-through command.
  487. @constant kICACameraPassThruReceive
  488. Use this constant when receiving data from a device using a pass-through command.
  489. @constant kICACameraPassThruNotUsed
  490. Use this constant when using a pass-through command that doesn't involve sending or receiving data.
  491. }
  492. const
  493. kICACameraPassThruSend = 0;
  494. kICACameraPassThruReceive = 1;
  495. kICACameraPassThruNotUsed = 2;
  496. //---------------------------------------------------------------------------------------------------------- ICAPTPPassThroughPB
  497. {!
  498. @struct ICAPTPPassThroughPB
  499. @field commandCode
  500. PTP command code (including vendor specific) <--
  501. @field resultCode
  502. PTP response code -->
  503. @field numOfInputParams
  504. Number of valid parameters to be sent to device <--
  505. @field numOfOutputParams
  506. Number of valid parameters expected from device <--
  507. @field params
  508. PTP parameters (command specific / optional) <->
  509. @field dataUsageMode
  510. One of (kICACameraPassThruSend, kICACameraPassThruReceive, kICACameraPassThruNotUsed) <--
  511. @field flags
  512. Not used currently
  513. @field dataSize
  514. Size of data block <->
  515. @field data
  516. Data block <->
  517. }
  518. type
  519. ICAPTPPassThroughPBPtr = ^ICAPTPPassThroughPB;
  520. ICAPTPPassThroughPB = record
  521. commandCode: UInt32;
  522. resultCode: UInt32;
  523. numOfInputParams: UInt32;
  524. numOfOutputParams: UInt32;
  525. params: array [0..4-1] of UInt32;
  526. dataUsageMode: UInt32;
  527. flags: UInt32;
  528. dataSize: UInt32;
  529. data: array [0..1-1] of UInt8;
  530. end;
  531. //----------------------------------------------------------------------------------------------------------- ICAPTPEventDataset
  532. {!
  533. @struct ICAPTPEventDataset
  534. @field dataLength
  535. Data length in bytes
  536. @field containerType
  537. PTP container type
  538. @field eventCode
  539. PTP event code
  540. @field transactionID
  541. PTP transaction ID
  542. @field params
  543. PTP params. The number of params should be (dataLength - 12)/4
  544. }
  545. type
  546. ICAPTPEventDatasetPtr = ^ICAPTPEventDataset;
  547. ICAPTPEventDataset = record
  548. dataLength: UInt32;
  549. containerType: UInt16; // should be 0x0004 for event
  550. eventCode: UInt16;
  551. transactionID: UInt32;
  552. params: array [0..3-1] of UInt32; // up to 3 params. # of params = (dataLength - 12)/4
  553. end;
  554. //------------------------------------------------------------------------------------- Keys used in object property dictionary
  555. { Keys used in object property dictionary }
  556. //#pragma mark -
  557. //#pragma mark TODO: document the data types of values for these keys
  558. // Keys returned by ICACopyObjectDictionary() for deviceList object returned by ICAGetDeviceList()
  559. var kICADevicesArrayKey: CFStringRef; external name '_kICADevicesArrayKey'; (* attribute const *)
  560. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  561. var kICAObjectKey: CFStringRef; external name '_kICAObjectKey'; (* attribute const *)
  562. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  563. var kICAObjectNameKey: CFStringRef; external name '_kICAObjectNameKey'; (* attribute const *)
  564. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  565. var kICAUSBVendorIDKey: CFStringRef; external name '_kICAUSBVendorIDKey'; (* attribute const *)
  566. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  567. var kICAUSBProductIDKey: CFStringRef; external name '_kICAUSBProductIDKey'; (* attribute const *)
  568. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  569. var kICADeviceTypeKey: CFStringRef; external name '_kICADeviceTypeKey'; (* attribute const *)
  570. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  571. var kICAExecutableArchitectureKey: CFStringRef; external name '_kICAExecutableArchitectureKey'; (* attribute const *)
  572. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  573. var kICARemoteDeviceKey: CFStringRef; external name '_kICARemoteDeviceKey'; (* attribute const *)
  574. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  575. var kICADeviceSharedKey: CFStringRef; external name '_kICADeviceSharedKey'; (* attribute const *)
  576. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  577. var kICADeviceWebSharedKey: CFStringRef; external name '_kICADeviceWebSharedKey'; (* attribute const *)
  578. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  579. var kICADeviceUsedKey: CFStringRef; external name '_kICADeviceUsedKey'; (* attribute const *)
  580. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  581. var kICABonjourServiceTypeKey: CFStringRef; external name '_kICABonjourServiceTypeKey'; (* attribute const *)
  582. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  583. var kICABonjourServiceNameKey: CFStringRef; external name '_kICABonjourServiceNameKey'; (* attribute const *)
  584. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  585. var kICABonjourTXTRecordKey: CFStringRef; external name '_kICABonjourTXTRecordKey'; (* attribute const *)
  586. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  587. var kICADeviceCapabilitiesKey: CFStringRef; external name '_kICADeviceCapabilitiesKey'; (* attribute const *)
  588. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  589. var kICALockStatusKey: CFStringRef; external name '_kICALockStatusKey'; (* attribute const *)
  590. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  591. var kICADataPropertyKey: CFStringRef; external name '_kICADataPropertyKey'; (* attribute const *)
  592. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  593. var kICADataTypeKey: CFStringRef; external name '_kICADataTypeKey'; (* attribute const *)
  594. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  595. var kICADataSizeKey: CFStringRef; external name '_kICADataSizeKey'; (* attribute const *)
  596. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  597. var kICAThumbnailPropertyKey: CFStringRef; external name '_kICAThumbnailPropertyKey'; (* attribute const *)
  598. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  599. var kICAThumbnailSizeKey: CFStringRef; external name '_kICAThumbnailSizeKey'; (* attribute const *)
  600. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  601. var kICARawKey: CFStringRef; external name '_kICARawKey'; (* attribute const *)
  602. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  603. var kICAMediaHeightKey: CFStringRef; external name '_kICAMediaHeightKey'; (* attribute const *)
  604. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // value is a number
  605. var kICAMediaWidthKey: CFStringRef; external name '_kICAMediaWidthKey'; (* attribute const *)
  606. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // value is a number
  607. var kICACreationDateStringKey: CFStringRef; external name '_kICACreationDateStringKey'; (* attribute const *)
  608. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  609. var kICAModificationDateStringKey: CFStringRef; external name '_kICAModificationDateStringKey'; (* attribute const *)
  610. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  611. var kMetaDataDictionaryKey: CFStringRef; external name '_kMetaDataDictionaryKey'; (* attribute const *)
  612. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  613. var kICAMediaDurationInSecondsKey: CFStringRef; external name '_kICAMediaDurationInSecondsKey'; (* attribute const *)
  614. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  615. var kICADeviceTypeCamera: CFStringRef; external name '_kICADeviceTypeCamera'; (* attribute const *)
  616. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  617. var kICADeviceTypeScanner: CFStringRef; external name '_kICADeviceTypeScanner'; (* attribute const *)
  618. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  619. {
  620. In addition to the above, the following keys may also be present in the object property dictionay:
  621. kICAUSBLocationIDKey
  622. kICAFireWireGUIDKey
  623. }
  624. { Transport types }
  625. var kICAUSBTransportType: CFStringRef; external name '_kICAUSBTransportType'; (* attribute const *)
  626. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  627. var kICAFireWireTransportType: CFStringRef; external name '_kICAFireWireTransportType'; (* attribute const *)
  628. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  629. var kICABluetoothTransportType: CFStringRef; external name '_kICABluetoothTransportType'; (* attribute const *)
  630. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  631. var kICATCPIPTransportType: CFStringRef; external name '_kICATCPIPTransportType'; (* attribute const *)
  632. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  633. var kICASCSITransportType: CFStringRef; external name '_kICASCSITransportType'; (* attribute const *)
  634. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  635. var kICATWAINTransportType: CFStringRef; external name '_kICATWAINTransportType'; (* attribute const *)
  636. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  637. { Keys used for paramDictionary in ICALoadDeviceModulePB}
  638. var kICADeviceBrowserDeviceRefKey: CFStringRef; external name '_kICADeviceBrowserDeviceRefKey'; (* attribute const *)
  639. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  640. var kICADeviceModulePathKey: CFStringRef; external name '_kICADeviceModulePathKey'; (* attribute const *)
  641. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  642. var kICADeviceIconPathKey: CFStringRef; external name '_kICADeviceIconPathKey'; (* attribute const *)
  643. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  644. var kICATransportTypeKey: CFStringRef; external name '_kICATransportTypeKey'; (* attribute const *)
  645. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  646. var kICABluetoothAddressKey: CFStringRef; external name '_kICABluetoothAddressKey'; (* attribute const *)
  647. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  648. var kICAUSBLocationIDKey: CFStringRef; external name '_kICAUSBLocationIDKey'; (* attribute const *)
  649. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  650. var kICAFireWireGUIDKey: CFStringRef; external name '_kICAFireWireGUIDKey'; (* attribute const *)
  651. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  652. var kICAIOServicePathKey: CFStringRef; external name '_kICAIOServicePathKey'; (* attribute const *)
  653. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  654. var kICAIPAddressKey: CFStringRef; external name '_kICAIPAddressKey'; (* attribute const *)
  655. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  656. var kICAIPPortKey: CFStringRef; external name '_kICAIPPortKey'; (* attribute const *)
  657. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  658. var kICAIPNameKey: CFStringRef; external name '_kICAIPNameKey'; (* attribute const *)
  659. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  660. var kICAIPGUIDKey: CFStringRef; external name '_kICAIPGUIDKey'; (* attribute const *)
  661. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  662. var kICATWAINDSPathKey: CFStringRef; external name '_kICATWAINDSPathKey'; (* attribute const *)
  663. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  664. {!
  665. @const
  666. kICAUserAssignedDeviceNameKey
  667. @abstract
  668. This key may be present in the property dictionary of a device if the device has a user-assigned name.
  669. @discussion
  670. Value is of type CFStringRef.
  671. }
  672. var kICAUserAssignedDeviceNameKey: CFStringRef; external name '_kICAUserAssignedDeviceNameKey'; (* attribute const *)
  673. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  674. //-------------------------------------------------------------------------------------------------------------------- ICAHeader
  675. {!
  676. @struct ICAHeader
  677. @discussion
  678. This is the first field in all parameter blocks used by APIs defined in ICAApplication.h.
  679. Type of parameter passed to a callback function used by APIs defined in ICAApplication.h.
  680. The parameter for the completion proc should to be casted to an appropriate type such as ICAGetChildCountPB* for it to be useful.
  681. @field err
  682. Error returned by an API. -->
  683. @field refcon
  684. An arbitrary refcon value passed to the callback. <--
  685. }
  686. type
  687. ICAHeaderPtr = ^ICAHeader;
  688. ICAHeader = record
  689. err: ICAError;
  690. refcon: UNSIGNEDLONG;
  691. end;
  692. //--------------------------------------------------------------------------------------------------------------- Callback procs
  693. type
  694. ICACompletion = procedure( var pb: ICAHeader );
  695. type
  696. ICAImportFilterProc = function( imageInfo: CFDictionaryRef; refcon: UNSIGNEDLONG ): Boolean;
  697. type
  698. ICANotificationProc = procedure( notificationType: CFStringRef; notificationDictionary: CFDictionaryRef );
  699. //------------------------------------------------------------------------------------------------------------------- Object IDs
  700. type
  701. ICAObject = UInt32;
  702. ICAProperty = UInt32;
  703. ICAConnectionID = UInt32;
  704. ICASessionID = UInt32;
  705. ICAScannerSessionID = ICASessionID;
  706. ICAEventDataCookie = UInt32;
  707. //#pragma mark -
  708. //#pragma mark General APIs
  709. //--------------------------------------------------------------------------------------------------------------- ICAImportImage
  710. {!
  711. @struct ICAObjectInfo
  712. @field objectType
  713. An object type, e.g., kICAFile.
  714. @field objectSubtype
  715. An object subtype, e.g., kICAFileImage.
  716. }
  717. type
  718. ICAObjectInfoPtr = ^ICAObjectInfo;
  719. ICAObjectInfo = record
  720. objectType: OSType;
  721. objectSubtype: OSType;
  722. end;
  723. {!
  724. @enum ImportImage flags.
  725. @discussion
  726. Flag values that can be used in ICAImportImagePB parameter block.
  727. @constant kICAAllowMultipleImages
  728. Use this constant to allow users to select multiple images in the Import Image dialog.
  729. @constant kICADownloadAndReturnPathArray
  730. Use this constant to download the images to a temporary location and return an array of paths to the downloaded images.
  731. }
  732. const
  733. kICAAllowMultipleImages = $00000001;
  734. kICADownloadAndReturnPathArray = $00000002;
  735. {!
  736. @struct ICAImportImagePB
  737. @field header
  738. See description for ICAHeader. <->
  739. @field deviceObject
  740. Object ID of a camera or scanner device. Set this to NULL to ge the default behavior: (a) if no device is connected, a panel saying that thereÕs no device connected is displayed, (b) if a single device is connected, an appropriate user interface to access that device will be displayed, (c) if several devices are connected, a device selector panel will be displayed. <--
  741. @field flags
  742. One or more flags (combined with an OR operator) defined in ImportImage flags enum. <--
  743. @field supportedFileTypes
  744. An array of file extension strings such as "jpg", "tif", etc., that are of interest to the calling application. Set to NULL to display all files. <--
  745. @field filterProc
  746. Specify a filter proc to that will be called for each file before it is displayed in the user interface. <--
  747. @field importedImages
  748. Returns an array of CFDataRefs for the imported images if the kICADownloadAndReturnPathArray flag is not specified. Otherwise returns an array of CFStringRefs holding the paths of the images that are downloaded. The caller should provide a pointer to a CFArrayRef object initialized to NULL. The caller is responsible for released the array returned by this function. -->
  749. }
  750. type
  751. ICAImportImagePBPtr = ^ICAImportImagePB;
  752. ICAImportImagePB = record
  753. header: ICAHeader;
  754. deviceObject: ICAObject;
  755. flags: UInt32;
  756. supportedFileTypes: CFArrayRef;
  757. filterProc: ICAImportFilterProc;
  758. importedImages: CFArrayRefPtr;
  759. end;
  760. {!
  761. @function ICAImportImage
  762. @abstract
  763. This API displays a Common User Interface panel similar to the user interface of Image Capture Application. This allows the user to work a camera or a scanner.
  764. @discussion
  765. Use this API to add Image Capture support to an application.
  766. <pre>
  767. @textblock
  768. Example:
  769. void ImportImage()
  770. (
  771. OSErr err;
  772. CFArrayRef imagesArray = NULL;
  773. ICAImportImagePB pb = ();
  774. pb.deviceObject = 0;
  775. pb.flags = 0;
  776. pb.supportedFileTypes = (CFArrayRef)[NSArray arrayWithObjects: @"tif", @"tiff", @"jpg", NULL];
  777. pb.importedImages = &imagesArray;
  778. err = ICAImportImage(&pb, NULL);
  779. if ( noErr != err )
  780. (
  781. // handle error
  782. )
  783. else
  784. (
  785. // Process the importedImages array
  786. // pb.importedImages // CFArrayRef *
  787. )
  788. )
  789. @/textblock
  790. </pre>
  791. @param pb
  792. A pointer to an <code><b>ICAImportImagePB</b></code> parameter block.
  793. @param completion
  794. A pointer to a completion routine that will be invoked at the completion of <code><b>ICAImportImage</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  795. @result
  796. Returns an error code defined in ICAApplication.h
  797. }
  798. function ICAImportImage( var pb: ICAImportImagePB; completion: ICACompletion ): ICAError; external name '_ICAImportImage';
  799. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  800. //--------------------------------------------------------------------------------------------------------- ICAShowDeviceBrowser
  801. {!
  802. @function ICAShowDeviceBrowser
  803. @abstract
  804. Use this API to display a device browser user interface from any Image Capture client application.
  805. @discussion
  806. The device browser user interface allows the user to do the following:
  807. - enable and disable sharing of locally connected cameras and scanners.
  808. - connect to or disconnect from cameras and scanners shared by other computers.
  809. - configure WiFi capable cameras for use over the WiFi network.
  810. @param options
  811. Set options to NULL to display the device browser with default settings. <--
  812. This parameter is intended for future use.
  813. @result
  814. Returns an error code defined in ICAApplication.h
  815. }
  816. function ICAShowDeviceBrowser( options: CFDictionaryRef ): ICAError; external name '_ICAShowDeviceBrowser';
  817. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  818. //---------------------------------------------------------------------------------------------- ICARegisterForEventNotification
  819. // Function prototype for an Image Capture notification callback proc
  820. type
  821. ICANotification = procedure( notificationType: CFStringRef; notificationDictionary: CFDictionaryRef );
  822. { The Image Capture notification callabck function will be called with a notificationDictionary that may
  823. contain one or more key-value pairs as defined below:
  824. Key Value Type Comments
  825. kICANotificationICAObjectKey CFNumberRef An object associated with the notification.
  826. kICANotificationDeviceICAObjectKey CFNumberRef A device object associated with the notification.
  827. kICANotificationClassKey CFStringRef See below.
  828. kICANotificationTypeKey CFStringRef See below.
  829. kICANotificationRawEventKey CFNumberRef The unprocesssed event code sent by a device.
  830. kICANotificationDataKey CFDataRef Data associated with the event.
  831. kICANotificationDataSizeKey CFNumberRef Size of data associated with the event. This is used if the data is
  832. not sent with the notification. [Needed for backward compatiblity with pre-Leopard device modules].
  833. kICANotificationDataCookieKey CFNumberRef A token identifying the data associated with this event.
  834. This data can be retrieved by calling ICAObjectSendMessage with messageType set to kICAMessageGetEventData, dataType set to value of kICANotificationDataCookieKeyand dataSize set to value of kICANotificationDataSizeKey.
  835. The following keys are present if the value of kICANotificationDataKey represents image data. The values of these
  836. keys are CFNumbers representing the width, height, bytes per row, start row, and number of rows of the image:
  837. kICANotificationImageKey CFDictionaryRef A dictionary that describes an Image associated
  838. with the notification.
  839. kICANotificationImageDataKey CFDataRef Image data
  840. kICANotificationImageWidthKey CFNumberRef Image width in pixels
  841. kICANotificationImageHeightKey CFNumberRef Image height in pixels
  842. kICANotificationImageBytesPerRowKey CFNumberRef Bytes per row in image
  843. kICANotificationImageStartRowKey CFNumberRef Starting row number of the image.
  844. kICANotificationImageNumberOfRowsKey CFNumberRef Number of rows of image data sent in this notification.
  845. }
  846. // Possible values for kICANotificationTypeKey:
  847. var kICANotificationTypeObjectAdded: CFStringRef; external name '_kICANotificationTypeObjectAdded'; (* attribute const *)
  848. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  849. var kICANotificationTypeObjectRemoved: CFStringRef; external name '_kICANotificationTypeObjectRemoved'; (* attribute const *)
  850. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  851. var kICANotificationTypeObjectInfoChanged: CFStringRef; external name '_kICANotificationTypeObjectInfoChanged'; (* attribute const *)
  852. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  853. var kICANotificationTypeStoreAdded: CFStringRef; external name '_kICANotificationTypeStoreAdded'; (* attribute const *)
  854. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  855. var kICANotificationTypeStoreRemoved: CFStringRef; external name '_kICANotificationTypeStoreRemoved'; (* attribute const *)
  856. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  857. var kICANotificationTypeStoreFull: CFStringRef; external name '_kICANotificationTypeStoreFull'; (* attribute const *)
  858. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  859. var kICANotificationTypeStoreInfoChanged: CFStringRef; external name '_kICANotificationTypeStoreInfoChanged'; (* attribute const *)
  860. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  861. var kICANotificationTypeDeviceAdded: CFStringRef; external name '_kICANotificationTypeDeviceAdded'; (* attribute const *)
  862. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  863. var kICANotificationTypeDeviceRemoved: CFStringRef; external name '_kICANotificationTypeDeviceRemoved'; (* attribute const *)
  864. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  865. var kICANotificationTypeDeviceInfoChanged: CFStringRef; external name '_kICANotificationTypeDeviceInfoChanged'; (* attribute const *)
  866. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  867. var kICANotificationTypeDevicePropertyChanged: CFStringRef; external name '_kICANotificationTypeDevicePropertyChanged'; (* attribute const *)
  868. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  869. var kICANotificationTypeDeviceWasReset: CFStringRef; external name '_kICANotificationTypeDeviceWasReset'; (* attribute const *)
  870. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  871. var kICANotificationTypeDeviceStatusInfo: CFStringRef; external name '_kICANotificationTypeDeviceStatusInfo'; (* attribute const *)
  872. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  873. var kICANotificationTypeDeviceStatusError: CFStringRef; external name '_kICANotificationTypeDeviceStatusError'; (* attribute const *)
  874. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  875. var kICANotificationTypeCaptureComplete: CFStringRef; external name '_kICANotificationTypeCaptureComplete'; (* attribute const *)
  876. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  877. var kICANotificationTypeRequestObjectTransfer: CFStringRef; external name '_kICANotificationTypeRequestObjectTransfer'; (* attribute const *)
  878. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  879. var kICANotificationTypeTransactionCanceled: CFStringRef; external name '_kICANotificationTypeTransactionCanceled'; (* attribute const *)
  880. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  881. var kICANotificationTypeUnreportedStatus: CFStringRef; external name '_kICANotificationTypeUnreportedStatus'; (* attribute const *)
  882. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  883. var kICANotificationTypeProprietary: CFStringRef; external name '_kICANotificationTypeProprietary'; (* attribute const *)
  884. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  885. var kICANotificationTypeDeviceConnectionProgress: CFStringRef; external name '_kICANotificationTypeDeviceConnectionProgress'; (* attribute const *)
  886. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  887. var kICANotificationTypeDownloadProgressStatus: CFStringRef; external name '_kICANotificationTypeDownloadProgressStatus'; (* attribute const *)
  888. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  889. var kICANotificationTypeScanProgressStatus: CFStringRef; external name '_kICANotificationTypeScanProgressStatus'; (* attribute const *)
  890. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  891. var kICANotificationTypeScannerSessionClosed: CFStringRef; external name '_kICANotificationTypeScannerSessionClosed'; (* attribute const *)
  892. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  893. var kICANotificationTypeScannerScanDone: CFStringRef; external name '_kICANotificationTypeScannerScanDone'; (* attribute const *)
  894. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  895. var kICANotificationTypeScannerPageDone: CFStringRef; external name '_kICANotificationTypeScannerPageDone'; (* attribute const *)
  896. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  897. var kICANotificationTypeScannerButtonPressed: CFStringRef; external name '_kICANotificationTypeScannerButtonPressed'; (* attribute const *)
  898. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  899. var kICANotificationTypeScannerOverviewOverlayAvailable: CFStringRef; external name '_kICANotificationTypeScannerOverviewOverlayAvailable'; (* attribute const *)
  900. (* AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER *)
  901. // Possible keys in the notification dictionary:
  902. var kICAErrorKey: CFStringRef; external name '_kICAErrorKey'; (* attribute const *)
  903. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  904. var kICARefconKey: CFStringRef; external name '_kICARefconKey'; (* attribute const *)
  905. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  906. var kICANotificationICAObjectKey: CFStringRef; external name '_kICANotificationICAObjectKey'; (* attribute const *)
  907. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  908. var kICANotificationDeviceICAObjectKey: CFStringRef; external name '_kICANotificationDeviceICAObjectKey'; (* attribute const *)
  909. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  910. var kICANotificationDeviceListICAObjectKey: CFStringRef; external name '_kICANotificationDeviceListICAObjectKey'; (* attribute const *)
  911. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  912. var kICANotificationClassKey: CFStringRef; external name '_kICANotificationClassKey'; (* attribute const *)
  913. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  914. var kICANotificationTypeKey: CFStringRef; external name '_kICANotificationTypeKey'; (* attribute const *)
  915. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  916. var kICANotificationRawEventKey: CFStringRef; external name '_kICANotificationRawEventKey'; (* attribute const *)
  917. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  918. var kICANotificationDataKey: CFStringRef; external name '_kICANotificationDataKey'; (* attribute const *)
  919. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  920. var kICANotificationDataSizeKey: CFStringRef; external name '_kICANotificationDataSizeKey'; (* attribute const *)
  921. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  922. var kICANotificationDataCookieKey: CFStringRef; external name '_kICANotificationDataCookieKey'; (* attribute const *)
  923. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  924. var kICANotificationImageKey: CFStringRef; external name '_kICANotificationImageKey'; (* attribute const *)
  925. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  926. var kICANotificationImageWidthKey: CFStringRef; external name '_kICANotificationImageWidthKey'; (* attribute const *)
  927. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  928. var kICANotificationImageHeightKey: CFStringRef; external name '_kICANotificationImageHeightKey'; (* attribute const *)
  929. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  930. var kICANotificationImageBytesPerRowKey: CFStringRef; external name '_kICANotificationImageBytesPerRowKey'; (* attribute const *)
  931. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  932. var kICANotificationImageStartRowKey: CFStringRef; external name '_kICANotificationImageStartRowKey'; (* attribute const *)
  933. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  934. var kICANotificationImageNumberOfRowsKey: CFStringRef; external name '_kICANotificationImageNumberOfRowsKey'; (* attribute const *)
  935. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  936. var kICANotificationImageDataKey: CFStringRef; external name '_kICANotificationImageDataKey'; (* attribute const *)
  937. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  938. var kICANotificationImageDataSizeKey: CFStringRef; external name '_kICANotificationImageDataSizeKey'; (* attribute const *)
  939. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  940. var kICANotificationDataIsBigEndianKey: CFStringRef; external name '_kICANotificationDataIsBigEndianKey'; (* attribute const *)
  941. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  942. var kICANotificationScannerDocumentNameKey: CFStringRef; external name '_kICANotificationScannerDocumentNameKey'; (* attribute const *)
  943. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  944. var kICANotificationScannerButtonTypeKey: CFStringRef; external name '_kICANotificationScannerButtonTypeKey'; (* attribute const *)
  945. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  946. var kICANotificationNumerOfImagesRemainingKey: CFStringRef; external name '_kICANotificationNumerOfImagesRemainingKey'; (* attribute const *)
  947. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  948. var kICANotificationPercentDownloadedKey: CFStringRef; external name '_kICANotificationPercentDownloadedKey'; (* attribute const *)
  949. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  950. var kICANotificationSubTypeKey: CFStringRef; external name '_kICANotificationSubTypeKey'; (* attribute const *)
  951. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  952. var kICANotificationSubTypeWarmUpStarted: CFStringRef; external name '_kICANotificationSubTypeWarmUpStarted'; (* attribute const *)
  953. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  954. var kICANotificationSubTypeWarmUpDone: CFStringRef; external name '_kICANotificationSubTypeWarmUpDone'; (* attribute const *)
  955. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  956. var kICANotificationVendorErrorCodeKey: CFStringRef; external name '_kICANotificationVendorErrorCodeKey'; (* attribute const *)
  957. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  958. var kICANotificationSubTypePerformOverviewScan: CFStringRef; external name '_kICANotificationSubTypePerformOverviewScan'; (* attribute const *)
  959. (* AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER *)
  960. var kICANotificationSubTypeDocumentLoaded: CFStringRef; external name '_kICANotificationSubTypeDocumentLoaded'; (* attribute const *)
  961. (* AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER *)
  962. var kICANotificationSubTypeDocumentNotLoaded: CFStringRef; external name '_kICANotificationSubTypeDocumentNotLoaded'; (* attribute const *)
  963. (* AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER *)
  964. // Possible values in the notification dictionary:
  965. // ...
  966. // Possible values for kICANotificationClassKey
  967. var kICANotificationClassPTPStandard: CFStringRef; external name '_kICANotificationClassPTPStandard'; (* attribute const *)
  968. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  969. var kICANotificationClassPTPVendor: CFStringRef; external name '_kICANotificationClassPTPVendor'; (* attribute const *)
  970. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  971. var kICANotificationClassProprietary: CFStringRef; external name '_kICANotificationClassProprietary'; (* attribute const *)
  972. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  973. // Device Properties
  974. var kICADevicePropUndefined: CFStringRef; external name '_kICADevicePropUndefined'; (* attribute const *)
  975. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  976. var kICADevicePropBatteryLevel: CFStringRef; external name '_kICADevicePropBatteryLevel'; (* attribute const *)
  977. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  978. var kICADevicePropFunctionalMode: CFStringRef; external name '_kICADevicePropFunctionalMode'; (* attribute const *)
  979. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  980. var kICADevicePropImageSize: CFStringRef; external name '_kICADevicePropImageSize'; (* attribute const *)
  981. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  982. var kICADevicePropCompressionSetting: CFStringRef; external name '_kICADevicePropCompressionSetting'; (* attribute const *)
  983. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  984. var kICADevicePropWhiteBalance: CFStringRef; external name '_kICADevicePropWhiteBalance'; (* attribute const *)
  985. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  986. var kICADevicePropRGBGain: CFStringRef; external name '_kICADevicePropRGBGain'; (* attribute const *)
  987. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  988. var kICADevicePropFNumber: CFStringRef; external name '_kICADevicePropFNumber'; (* attribute const *)
  989. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  990. var kICADevicePropFocalLength: CFStringRef; external name '_kICADevicePropFocalLength'; (* attribute const *)
  991. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  992. var kICADevicePropFocusDistance: CFStringRef; external name '_kICADevicePropFocusDistance'; (* attribute const *)
  993. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  994. var kICADevicePropFocusMode: CFStringRef; external name '_kICADevicePropFocusMode'; (* attribute const *)
  995. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  996. var kICADevicePropExposureMeteringMode: CFStringRef; external name '_kICADevicePropExposureMeteringMode'; (* attribute const *)
  997. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  998. var kICADevicePropFlashMode: CFStringRef; external name '_kICADevicePropFlashMode'; (* attribute const *)
  999. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1000. var kICADevicePropExposureTime: CFStringRef; external name '_kICADevicePropExposureTime'; (* attribute const *)
  1001. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1002. var kICADevicePropExposureProgramMode: CFStringRef; external name '_kICADevicePropExposureProgramMode'; (* attribute const *)
  1003. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1004. var kICADevicePropExposureIndex: CFStringRef; external name '_kICADevicePropExposureIndex'; (* attribute const *)
  1005. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1006. var kICADevicePropExposureBiasCompensation: CFStringRef; external name '_kICADevicePropExposureBiasCompensation'; (* attribute const *)
  1007. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1008. var kICADevicePropDateTime: CFStringRef; external name '_kICADevicePropDateTime'; (* attribute const *)
  1009. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1010. var kICADevicePropCaptureDelay: CFStringRef; external name '_kICADevicePropCaptureDelay'; (* attribute const *)
  1011. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1012. var kICADevicePropStillCaptureMode: CFStringRef; external name '_kICADevicePropStillCaptureMode'; (* attribute const *)
  1013. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1014. var kICADevicePropContrast: CFStringRef; external name '_kICADevicePropContrast'; (* attribute const *)
  1015. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1016. var kICADevicePropSharpness: CFStringRef; external name '_kICADevicePropSharpness'; (* attribute const *)
  1017. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1018. var kICADevicePropDigitalZoom: CFStringRef; external name '_kICADevicePropDigitalZoom'; (* attribute const *)
  1019. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1020. var kICADevicePropEffectMode: CFStringRef; external name '_kICADevicePropEffectMode'; (* attribute const *)
  1021. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1022. var kICADevicePropBurstNumber: CFStringRef; external name '_kICADevicePropBurstNumber'; (* attribute const *)
  1023. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1024. var kICADevicePropBurstInterval: CFStringRef; external name '_kICADevicePropBurstInterval'; (* attribute const *)
  1025. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1026. var kICADevicePropTimelapseNumber: CFStringRef; external name '_kICADevicePropTimelapseNumber'; (* attribute const *)
  1027. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1028. var kICADevicePropTimelapseInterval: CFStringRef; external name '_kICADevicePropTimelapseInterval'; (* attribute const *)
  1029. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1030. var kICADevicePropFocusMeteringMode: CFStringRef; external name '_kICADevicePropFocusMeteringMode'; (* attribute const *)
  1031. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1032. var kICADevicePropUploadURL: CFStringRef; external name '_kICADevicePropUploadURL'; (* attribute const *)
  1033. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1034. var kICADevicePropArtist: CFStringRef; external name '_kICADevicePropArtist'; (* attribute const *)
  1035. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1036. var kICADevicePropCopyrightInfo: CFStringRef; external name '_kICADevicePropCopyrightInfo'; (* attribute const *)
  1037. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1038. {!
  1039. @struct ICARegisterForEventNotificationPB
  1040. @discussion
  1041. Use this parameter structure to specify a set of events associated with an object
  1042. about which notifications should be sent to the specified notification function.
  1043. @field header
  1044. See description for ICAHeader. <->
  1045. @field objectOfInterest
  1046. An object about which notifications are requested. <--
  1047. @field eventsOfInterest
  1048. An array of notification types of interest. <--
  1049. @field notificationProc
  1050. A callback function to receive the notifications. <--
  1051. @field options
  1052. Set options to NULL. This parameter is intended for future use. <--
  1053. }
  1054. type
  1055. ICARegisterForEventNotificationPBPtr = ^ICARegisterForEventNotificationPB;
  1056. ICARegisterForEventNotificationPB = record
  1057. header: ICAHeader;
  1058. objectOfInterest: ICAObject;
  1059. eventsOfInterest: CFArrayRef;
  1060. notificationProc: ICANotification;
  1061. options: CFDictionaryRef;
  1062. end;
  1063. {!
  1064. @function ICARegisterForEventNotification
  1065. @abstract
  1066. Use this API to register with Image Capture framework to receive
  1067. notification about events of interest.
  1068. @param params
  1069. A pointer to ICARegisterForEventNotificationPB struct <--
  1070. @param completionProc
  1071. A pointer to a completion routine that will be invoked at the completion of
  1072. this function. Set this parameter to NULL to invoke this API synchronously.
  1073. @result
  1074. Returns an error code defined in ICAApplication.h
  1075. }
  1076. function ICARegisterForEventNotification( var params: ICARegisterForEventNotificationPB; completionProc: ICACompletion ): ICAError; external name '_ICARegisterForEventNotification';
  1077. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1078. //---------------------------------------------------------------------------------------------------------- ICASendNotification
  1079. // This parameter block is used with 'ICDSendNotification' and 'ICDSendNotificationAndWaitForReply' APIs defined
  1080. // in ICADevices.framework
  1081. type
  1082. ICASendNotificationPBPtr = ^ICASendNotificationPB;
  1083. ICASendNotificationPB = record
  1084. header: ICAHeader;
  1085. notificationDictionary: CFMutableDictionaryRef;
  1086. replyCode: UInt32;
  1087. end;
  1088. function ICASendNotification( var pb: ICASendNotificationPB ): ICAError; external name '_ICASendNotification';
  1089. (* DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER *)
  1090. function ICASendNotificationAndWaitForReply( var pb: ICASendNotificationPB ): ICAError; external name '_ICASendNotificationAndWaitForReply';
  1091. (* DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER *)
  1092. //#pragma mark -
  1093. //#pragma mark Object related APIs
  1094. //------------------------------------------------------------------------------------------------------------- ICAGetDeviceList
  1095. {!
  1096. @struct ICAGetDeviceListPB
  1097. @field header
  1098. See description for ICAHeader. <-->
  1099. @field object
  1100. The device list object, if ICAGetDeviceList returns successfully. -->
  1101. }
  1102. type
  1103. ICAGetDeviceListPBPtr = ^ICAGetDeviceListPB;
  1104. ICAGetDeviceListPB = record
  1105. header: ICAHeader;
  1106. objct: ICAObject;
  1107. end;
  1108. {!
  1109. @function ICAGetDeviceList
  1110. @abstract
  1111. Fetches the object at the top of the object heirarchy.
  1112. @discussion
  1113. Image Capture framework presents cameras and scanners, their contents and their capabilities as a heirarchy of objects and their properties. The device list object is at the top of the heirarchy of objects. The <b><code>ICAGetDeviceList</b></code> function fetches this object in the <code><b>object</b></code> field of parameter <code><b>pb</b></code>. Children of the device list object can be accessed by passing the device list object to functions <code><b>ICAGetChildCount()</b></code> and <code>ICAGetNthChild()</code>.
  1114. <pre>
  1115. @textblock
  1116. Example:
  1117. ICAObject GetDeviceList()
  1118. (
  1119. ICAGetDeviceListPB getDeviceListPB = ();
  1120. ICAObject deviceList = 0;
  1121. OSErr err;
  1122. err = ICAGetDeviceList( &getDeviceListPB, nil );
  1123. if ( noErr == err )
  1124. (
  1125. deviceList = getDeviceListPB.object;
  1126. )
  1127. return deviceList;
  1128. )
  1129. @/textblock
  1130. </pre>
  1131. @param pb
  1132. A pointer to an <code><b>ICAGetDeviceListPB</b></code> parameter block.
  1133. @param completion
  1134. A pointer to a completion routine that will be invoked at the completion of <code><b>ICAGetDeviceList</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  1135. @result
  1136. Returns an error code defined in ICAApplication.h
  1137. }
  1138. function ICAGetDeviceList( var pb: ICAGetDeviceListPB; completion: ICACompletion ): ICAError; external name '_ICAGetDeviceList';
  1139. (* DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER *)
  1140. //---------------------------------------------------------------------------------------------- ICACopyObjectPropertyDictionary
  1141. {!
  1142. @struct ICACopyObjectPropertyDictionaryPB
  1143. @field header
  1144. See description for ICAHeader. <->
  1145. @field object
  1146. An object whose properties are being requested. <--
  1147. @field theDict
  1148. A dictionary to hold the properties. This must be released by the caller. -->
  1149. }
  1150. type
  1151. ICACopyObjectPropertyDictionaryPBPtr = ^ICACopyObjectPropertyDictionaryPB;
  1152. ICACopyObjectPropertyDictionaryPB = record
  1153. header: ICAHeader;
  1154. objct: ICAObject;
  1155. theDict: CFDictionaryRefPtr;
  1156. end;
  1157. {!
  1158. @function ICACopyObjectPropertyDictionary
  1159. @abstract
  1160. Use this API to get a CFDictionaryRef containing all the properties for an object specified in the object field of the ICACopyObjectPropertyDictionaryPB struct.
  1161. @discussion
  1162. This API is the preferred way to get to any ICAObject related property data.
  1163. <pre>
  1164. @textblock
  1165. Example:
  1166. void CopyObjectPropertyDictionary()
  1167. (
  1168. OSErr err;
  1169. ICACopyObjectPropertyDictionaryPB pb = ();
  1170. pb.object = <#ICAObject object#>;
  1171. err = ICACopyObjectPropertyDictionary( &pb, NULL );
  1172. if ( noErr != err)
  1173. (
  1174. // handle error
  1175. )
  1176. else
  1177. (
  1178. // Make sure to release the returned dictionary
  1179. // pb.theDict // CFDictionaryRef *
  1180. )
  1181. )
  1182. @/textblock
  1183. </pre>
  1184. @param pb
  1185. A pointer to an <code><b>ICACopyObjectPropertyDictionaryPB</b></code> parameter block.
  1186. @param completion
  1187. A pointer to a completion routine that will be invoked at the completion of <code><b>ICACopyObjectPropertyDictionary</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  1188. @result
  1189. Returns an error code defined in ICAApplication.h
  1190. }
  1191. function ICACopyObjectPropertyDictionary( var pb: ICACopyObjectPropertyDictionaryPB; completion: ICACompletion ): ICAError; external name '_ICACopyObjectPropertyDictionary';
  1192. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1193. //------------------------------------------------------------------------------------------------------- ICACopyObjectThumbnail
  1194. {!
  1195. @enum Thumbnail formats.
  1196. @discussion
  1197. Format alues that can be used in ICACopyObjectThumbnailPB parameter block.
  1198. @constant kICAThumbnailFormatJPEG
  1199. Use this constant to receive a thumbnail in JPEG format.
  1200. @constant kICAThumbnailFormatTIFF
  1201. Use this constant to receive a thumbnail in TIFF format.
  1202. @constant kICAThumbnailFormatPNG
  1203. Use this constant to receive a thumbnail in PNG format.
  1204. }
  1205. const
  1206. kICAThumbnailFormatJPEG = FourCharCode('jpeg');
  1207. kICAThumbnailFormatTIFF = FourCharCode('tiff');
  1208. kICAThumbnailFormatPNG = FourCharCode('png ');
  1209. {!
  1210. @struct ICACopyObjectThumbnailPB
  1211. @field header
  1212. See description for ICAHeader. <->
  1213. @field object
  1214. An object whose thumbail is being requested. <--
  1215. @field thumbnailFormat
  1216. One of the format values defined above. <--
  1217. @field thumbnailData
  1218. A pointer to a CFDataRef holding the thumbnail data. The returned CFDataRef must be released by the caller. -->
  1219. }
  1220. type
  1221. ICACopyObjectThumbnailPBPtr = ^ICACopyObjectThumbnailPB;
  1222. ICACopyObjectThumbnailPB = record
  1223. header: ICAHeader;
  1224. objct: ICAObject;
  1225. thumbnailFormat: OSType;
  1226. thumbnailData: CFDataRefPtr;
  1227. end;
  1228. {!
  1229. @function ICACopyObjectThumbnail
  1230. @abstract
  1231. Use this API to get a thumbnail associated with an object.
  1232. @discussion
  1233. This is the recommended way to get the thumbnail of an object. Getting the thumbnail using ICAGetPropertyData is deprecaed in 10.5.
  1234. <pre>
  1235. @textblock
  1236. Example:
  1237. void CopyObjectThumbnail()
  1238. (
  1239. OSErr err;
  1240. ICACopyObjectThumbnailPB pb = ();
  1241. pb.object = <#ICAObject object#>;
  1242. pb.thumbnailFormat = <#OSType thumbnailFormat#>;
  1243. err = ICACopyObjectThumbnail( &pb, NULL );
  1244. if ( noErr != err )
  1245. (
  1246. // handle error
  1247. )
  1248. else
  1249. (
  1250. // Make sure to release the thumbnailData
  1251. // pb.thumbnailData // CFDataRef *
  1252. )
  1253. )
  1254. @/textblock
  1255. </pre>
  1256. @param pb
  1257. A pointer to an <code><b>ICACopyObjectThumbnailPB</b></code> parameter block.
  1258. @param completion
  1259. A pointer to a completion routine that will be invoked at the completion of <code><b>ICACopyObjectThumbnail</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  1260. @result
  1261. Returns an error code defined in ICAApplication.h
  1262. }
  1263. function ICACopyObjectThumbnail( var pb: ICACopyObjectThumbnailPB; completion: ICACompletion ): ICAError; external name '_ICACopyObjectThumbnail';
  1264. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1265. //------------------------------------------------------------------------------------------------------------ ICACopyObjectData
  1266. {!
  1267. @struct ICACopyObjectDataPB
  1268. @field header
  1269. See description for ICAHeader. <->
  1270. @field object
  1271. A file object. <--
  1272. @field startByte
  1273. Starting byte offset of the data in the file object. <--
  1274. @field requestedSize
  1275. Requested data size in bytes. <--
  1276. @field data
  1277. A pointer to CFDataRef in which the data will be returned. -->
  1278. It is the responsibility fo the caller to release this object.
  1279. }
  1280. type
  1281. ICACopyObjectDataPBPtr = ^ICACopyObjectDataPB;
  1282. ICACopyObjectDataPB = record
  1283. header: ICAHeader;
  1284. objct: ICAObject;
  1285. startByte: size_t;
  1286. requestedSize: size_t;
  1287. data: CFDataRefPtr;
  1288. end;
  1289. {!
  1290. @function ICACopyObjectData
  1291. @abstract
  1292. Use this API to get a copy of data associated with a file object.
  1293. @discussion
  1294. Use this API to get a copy of data associated with a file object. This API should be used in place of ICAGetPropertyData.
  1295. @param params
  1296. A pointer to ICACopyObjectDataPB struct <--
  1297. @param completionProc
  1298. A pointer to a completion routine that will be invoked at the completion of
  1299. this function. Set this parameter to NULL to invoke this API synchronously.
  1300. @result
  1301. Returns an error code defined in ICAApplication.h
  1302. }
  1303. function ICACopyObjectData( var params: ICACopyObjectDataPB; completionProc: ICACompletion ): ICAError; external name '_ICACopyObjectData';
  1304. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1305. //--------------------------------------------------------------------------------------------------------- ICAObjectSendMessage
  1306. {!
  1307. @struct ICAMessage
  1308. @field messageType
  1309. A message type. e.g., kICAMessageCameraCaptureNewImage. <--
  1310. @field startByte
  1311. Offset in dataPtr from where data access for read/write should occur. <--
  1312. @field dataPtr
  1313. A pointer to a data buffer. <--
  1314. @field dataSize
  1315. Size of data. <--
  1316. @field dataType
  1317. Type of data. <--
  1318. }
  1319. type
  1320. ICAMessagePtr = ^ICAMessage;
  1321. ICAMessage = record
  1322. messageType: OSType;
  1323. startByte: UInt32;
  1324. dataPtr: UnivPtr;
  1325. dataSize: UInt32;
  1326. dataType: OSType;
  1327. end;
  1328. {!
  1329. @enum ICAMessage types
  1330. @discussion
  1331. Definition of ICAMessage types.
  1332. @constant kICAMessageConnect
  1333. Connect to device.
  1334. @constant kICAMessageDisconnect
  1335. Disconnect device.
  1336. @constant kICAMessageReset
  1337. Reset device.
  1338. @constant kICAMessageCheckDevice
  1339. Check device.
  1340. @constant kICAMessageCameraReadClock
  1341. Read clock from device.
  1342. @constant kICAMessageGetLastButtonPressed
  1343. Get last button pressed on the device (scanner).
  1344. @constant kICAMessageGetEventData
  1345. Get data associated with an event.
  1346. @constant kICAMessageDeviceYield
  1347. Yield device. Image Capture framework yields a device so that the sender of the message can directly communicate with the device.
  1348. }
  1349. const
  1350. kICAMessageConnect = FourCharCode('open');
  1351. kICAMessageDisconnect = FourCharCode('clos');
  1352. kICAMessageReset = FourCharCode('rese');
  1353. kICAMessageCheckDevice = FourCharCode('chkd');
  1354. kICAMessageCameraReadClock = FourCharCode('rclk');
  1355. kICAMessageGetLastButtonPressed = FourCharCode('btn?');
  1356. kICAMessageGetEventData = FourCharCode('mged');
  1357. kICAMessageDeviceYield = FourCharCode('yiel');
  1358. kICAMessageCameraPassThrough = FourCharCode('pass');
  1359. kICAMessageScannerOverviewSelectionChanged = FourCharCode('area');
  1360. {!
  1361. @struct ICAObjectSendMessagePB
  1362. @field header
  1363. See description for ICAHeader. <-->
  1364. @field object
  1365. A target object for the message sent by ICAObjectSendMessage. <--
  1366. @field message
  1367. One of the messages define above. <--
  1368. @field result
  1369. A message specific result is returned here. -->
  1370. }
  1371. type
  1372. ICAObjectSendMessagePBPtr = ^ICAObjectSendMessagePB;
  1373. ICAObjectSendMessagePB = record
  1374. header: ICAHeader;
  1375. objct: ICAObject;
  1376. message: ICAMessage;
  1377. result: UInt32;
  1378. end;
  1379. {!
  1380. @function ICAObjectSendMessage
  1381. @abstract
  1382. Use this API to send a message to a device object.
  1383. @discussion
  1384. Use this API to send a message to a device object. All devices do not respond to all the messages defined above.
  1385. @param pb
  1386. A pointer to an <code><b>ICAObjectSendMessagePB</b></code> parameter block.
  1387. @param completion
  1388. A pointer to a completion routine that will be invoked at the completion of <code><b>ICAObjectSendMessage</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  1389. @result
  1390. Returns an error code defined in ICAApplication.h
  1391. }
  1392. function ICAObjectSendMessage( var pb: ICAObjectSendMessagePB; completion: ICACompletion ): ICAError; external name '_ICAObjectSendMessage';
  1393. (* DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER *)
  1394. //-------------------------------------------------------------------------------------------------------------- ICADownloadFile
  1395. {!
  1396. @enum Flag to use with ICADownloadFile
  1397. @discussion
  1398. Use any combination of these values when downloading a file.
  1399. @constant kDeleteAfterDownload
  1400. Delete file after a successful download.
  1401. @constant kCreateCustomIcon
  1402. Create a custom icon for Finder.
  1403. @constant kAddMetaDataToFinderComment
  1404. Add basic metadata to finder comment field.
  1405. @constant kAdjustCreationDate
  1406. Set creation date of the downloaded file same as the creation date for the file as reported by the device.
  1407. @constant kSetFileTypeAndCreator
  1408. Set 4-char file type and creator code.
  1409. @constant kRotateImage
  1410. Rotate the image.
  1411. @constant kDontEmbedColorSyncProfile
  1412. Embed ColorSync profile to the image if one was not already embedded.
  1413. }
  1414. const
  1415. kDeleteAfterDownload = $00000001;
  1416. kCreateCustomIcon = $00000002;
  1417. kAddMetaDataToFinderComment = $00000004;
  1418. kAdjustCreationDate = $00000008;
  1419. kSetFileTypeAndCreator = $00000010;
  1420. //kEmbedColorSyncProfile = 0x00000020,
  1421. kRotateImage = $00000040;
  1422. kDontEmbedColorSyncProfile = $00000080;
  1423. {!
  1424. @struct ICADownloadFilePB
  1425. @field header
  1426. See description for ICAHeader. <->
  1427. @field object
  1428. The file object. <--
  1429. @field dirFSRef
  1430. FSRef of destination directiory. <--
  1431. @field flags
  1432. Any combination of flag values defined above. <--
  1433. @field fileType
  1434. Four-char code indicating the type of file. <--
  1435. @field fileCreator
  1436. Four-char code indicating with the creator of the file. <--
  1437. @field rotationAngle
  1438. Rotation angle in steps of 90 degress. <--
  1439. @field fileFSRef
  1440. A pointer to FSRef struct to hold the FSRef of downloaded file. Set this to NULL if the FSRef of downloaded file is not of interest. -->
  1441. }
  1442. type
  1443. ICADownloadFilePBPtr = ^ICADownloadFilePB;
  1444. ICADownloadFilePB = record
  1445. header: ICAHeader;
  1446. objct: ICAObject;
  1447. dirFSRef: FSRefPtr;
  1448. flags: UInt32;
  1449. fileType: OSType;
  1450. fileCreator: OSType;
  1451. rotationAngle: Fixed;
  1452. fileFSRef: FSRefPtr;
  1453. end;
  1454. {!
  1455. @function ICADownloadFile
  1456. @abstract
  1457. Use this API to download a file to disk.
  1458. @discussion
  1459. This API is a convenient way to download a file to disk. To receive the image data in memory use ICACopyObjectData. Using ICAGetPropertyData is not recommend for this purpose since ICAGetPropertyData is Deprecated in 10.5.
  1460. <pre>
  1461. @textblock
  1462. Example:
  1463. void DownloadFile()
  1464. (
  1465. OSErr err;
  1466. ICADownloadFilePB pb = ();
  1467. pb.flags = <#UInt32 flags#>;
  1468. pb.rotationAngle = <#Fixed rotationAngle#>;
  1469. pb.object = <#ICAObject object#>;
  1470. pb.fileCreator = <#OSType fileCreator#>;
  1471. pb.dirFSRef = <#FSRef * dirFSRef#>;
  1472. pb.fileType = <#OSType fileType#>;
  1473. err = ICADownloadFile( &pb, NULL );
  1474. if ( noErr != err )
  1475. (
  1476. // handle error
  1477. )
  1478. else
  1479. (
  1480. // pb.fileFSRef // FSRef *
  1481. )
  1482. )
  1483. @/textblock
  1484. </pre>
  1485. @param pb
  1486. A pointer to an <code><b>ICADownloadFilePB</b></code> parameter block.
  1487. @param completion
  1488. A pointer to a completion routine that will be invoked at the completion of <code><b>ICADownloadFile</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  1489. @result
  1490. Returns an error code defined in ICAApplication.h
  1491. }
  1492. function ICADownloadFile( var pb: ICADownloadFilePB; completion: ICACompletion ): ICAError; external name '_ICADownloadFile';
  1493. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1494. //---------------------------------------------------------------------------------------------------------------- ICAUploadFile
  1495. {!
  1496. @enum Upload file option flags.
  1497. @discussion
  1498. Flag values that can be used in ICAUploadFilePB parameter block.
  1499. @constant kICAUploadFileAsIs
  1500. Use this constant to upload a file as is.
  1501. @constant kICAUploadFileScaleToFit
  1502. Use this constant to upload a file after scaling to fit a specified bounding rect.
  1503. }
  1504. const
  1505. kICAUploadFileAsIs = $00000000;
  1506. kICAUploadFileScaleToFit = $00000001;
  1507. {!
  1508. @struct ICAUploadFilePB
  1509. @field header
  1510. See description for ICAHeader. <->
  1511. @field parentObject <->
  1512. An ICAObject corresponding to a folder on the device. The device will store the uploaded file inside this folder if possible.
  1513. @field fileFSRef <--
  1514. An FSRef for the file to be uploaded to the device.
  1515. @field flags <--
  1516. One of the flags defined above.
  1517. }
  1518. type
  1519. ICAUploadFilePBPtr = ^ICAUploadFilePB;
  1520. ICAUploadFilePB = record
  1521. header: ICAHeader;
  1522. parentObject: ICAObject;
  1523. fileFSRef: FSRefPtr;
  1524. flags: UInt32;
  1525. end;
  1526. {!
  1527. @function ICAUploadFile
  1528. @abstract
  1529. Use this API to upload a file to a device that supports this capability.
  1530. @discussion
  1531. The device choses an appropriate destination location for the uploaded image and sends a kICANotificationTypeObjectAdded notification.
  1532. <pre>
  1533. @textblock
  1534. Example:
  1535. void UploadFile()
  1536. (
  1537. OSErr err;
  1538. ICAUploadFilePB pb = ();
  1539. pb.fileFSRef = <#FSRef * fileFSRef#>;
  1540. pb.flags = <#UInt32 flags#>;
  1541. pb.parentObject = <#ICAObject parentObject#>;
  1542. err = ICAUploadFile( &pb, NULL );
  1543. if ( noErr != err )
  1544. (
  1545. // handle error
  1546. )
  1547. else
  1548. (
  1549. // no return value(s)
  1550. )
  1551. )
  1552. @/textblock
  1553. </pre>
  1554. @param pb
  1555. A pointer to an <code><b>ICAUploadFilePB</b></code> parameter block.
  1556. @param completion
  1557. A pointer to a completion routine that will be invoked at the completion of <code><b>ICAUploadFile</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  1558. @result
  1559. Returns an error code defined in ICAApplication.h
  1560. }
  1561. function ICAUploadFile( var pb: ICAUploadFilePB; completion: ICACompletion ): ICAError; external name '_ICAUploadFile';
  1562. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1563. //#pragma mark -
  1564. //#pragma mark Device related APIs
  1565. //---------------------------------------------------------------------------------------------------------- ICALoadDeviceModule
  1566. { struct ICALoadDeviceModulePB
  1567. Legal Key-Value pairs for populating paramDictionary:
  1568. Key Value Comment
  1569. kICADeviceModulePathKey CFStringRef Path to the device module bundle that needs to be launched.
  1570. kICATransportTypeKey CFStringRef Should be one of the six predifined transport types.
  1571. kICABluetoothAddressKey CFStringRef Bluetooth device address string formatted as "00-11-22-33-44-55".
  1572. kICAUSBLocationIDKey CFNumberRef (kCFNumberLongType) 32 bit USB location ID.
  1573. kICAFireWireGUIDKey CFNumberRef (kCFNumberLongLongType) 64 bit FireWire GUID.
  1574. kICAIOServicePathKey CFStringRef IO service path to the device obtained from the IO registry.
  1575. kICAIPAddressKey CFStringRef IP address of the device. This can be a host address ("camera.apple.com"),
  1576. ipv4 address ('192.168.123.10") or ipv6 address ("3ff3:0000:0000:0000:0123:4567:89ab:cdef")
  1577. kICAIPPortKey CFNumberRef (kCFNumberLongType) IP port number of the device.
  1578. kICAIPNameKey CFStringRef Human readable device name.
  1579. kICAIPGUIDKey CFStringRef 16 byte GUID string of the device formatted as "01234567-89ab-cdef-0123-456789abcdef".
  1580. kICATWAINDSPathKey CFStringRef Path to TWAIN DS bundle. }
  1581. {!
  1582. @struct ICALoadDeviceModulePB
  1583. @field header
  1584. See description for ICAHeader. <->
  1585. @field paramDictionary <--
  1586. A parameter dictionary with sufficient key-value pairs to load a device module. This dictionary itself or the information provided in this dictionary will be sent to the device module.
  1587. }
  1588. type
  1589. ICALoadDeviceModulePBPtr = ^ICALoadDeviceModulePB;
  1590. ICALoadDeviceModulePB = record
  1591. header: ICAHeader;
  1592. paramDictionary: CFDictionaryRef;
  1593. end;
  1594. {!
  1595. @function ICALoadDeviceModule
  1596. @abstract
  1597. Use this API to load a device module.
  1598. @discussion
  1599. Typically, connecting a FireWire or an USB device will automatically load an appropriate device module. This API is needed only for loading a device module manually for devices that do not use a hot-plug interface, such as Bluetooth, SCSI, or TCP/IP.
  1600. @param pb
  1601. A pointer to an <code><b>ICALoadDeviceModulePB</b></code> parameter block.
  1602. @param completion
  1603. A pointer to a completion routine that will be invoked at the completion of <code><b>ICALoadDeviceModule</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  1604. @result
  1605. Returns an error code defined in ICAApplication.h
  1606. }
  1607. function ICALoadDeviceModule( var pb: ICALoadDeviceModulePB; completion: ICACompletion ): ICAError; external name '_ICALoadDeviceModule';
  1608. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1609. //--------------------------------------------------------------------------------------------------------- ICAUnloadDeviceModule
  1610. {!
  1611. @struct ICAUnloadDeviceModulePB
  1612. @field header
  1613. See description for ICAHeader. <->
  1614. @field deviceObject <--
  1615. A device ICAObject.
  1616. }
  1617. type
  1618. ICAUnloadDeviceModulePBPtr = ^ICAUnloadDeviceModulePB;
  1619. ICAUnloadDeviceModulePB = record
  1620. header: ICAHeader;
  1621. deviceObject: ICAObject;
  1622. end;
  1623. {!
  1624. @function ICAUnloadDeviceModule
  1625. @abstract
  1626. Uset this API to unload a device module.
  1627. @discussion
  1628. The device module providing this object will be unloaded, if this is the last device object provided by the device module.
  1629. @param pb
  1630. A pointer to an <code><b>ICAUnloadDeviceModulePB</b></code> parameter block.
  1631. @param completion
  1632. A pointer to a completion routine that will be invoked at the completion of <code><b>ICAUnloadDeviceModule</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  1633. @result
  1634. Returns an error code defined in ICAApplication.h
  1635. }
  1636. function ICAUnloadDeviceModule( var pb: ICAUnloadDeviceModulePB; completion: ICACompletion ): ICAError; external name '_ICAUnloadDeviceModule';
  1637. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1638. //--------------------------------------------------------------------------------------------------------------- ICAOpenSession
  1639. {!
  1640. @struct ICAOpenSessionPB
  1641. @field header
  1642. See description for ICAHeader. <->
  1643. @field deviceObject
  1644. A camera object. <--
  1645. @field sessionID
  1646. A session ID of the opened session. -->
  1647. }
  1648. type
  1649. ICAOpenSessionPBPtr = ^ICAOpenSessionPB;
  1650. ICAOpenSessionPB = record
  1651. header: ICAHeader;
  1652. deviceObject: ICAObject;
  1653. sessionID: ICASessionID;
  1654. end;
  1655. {!
  1656. @function ICAOpenSession
  1657. @abstract
  1658. Use this API to open a session on a camera device. For a scanner device use the ICAScannerOpenSession API.
  1659. @discussion
  1660. This API gets a session ID for a open session on a camera device. Since access to cameras is generally not be session-based, this API generall will not fail. If the camera has open session, the device module controlling the camera will continue to control it during fast-user-switching.
  1661. @param pb
  1662. A pointer to an <code><b>ICAOpenSessionPB</b></code> parameter block.
  1663. @param completion
  1664. A pointer to a completion routine that will be invoked at the completion of <code><b>ICAOpenSession</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  1665. @result
  1666. Returns an error code defined in ICAApplication.h
  1667. }
  1668. function ICAOpenSession( var pb: ICAOpenSessionPB; completion: ICACompletion ): ICAError; external name '_ICAOpenSession';
  1669. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1670. //-------------------------------------------------------------------------------------------------------------- ICACloseSession
  1671. {!
  1672. @struct ICACloseSessionPB
  1673. @field header
  1674. See description for ICAHeader. <->
  1675. @field sessionID
  1676. A session ID of the session to be closed. <--
  1677. }
  1678. type
  1679. ICACloseSessionPBPtr = ^ICACloseSessionPB;
  1680. ICACloseSessionPB = record
  1681. header: ICAHeader;
  1682. sessionID: ICASessionID;
  1683. end;
  1684. {!
  1685. @function ICACloseSession
  1686. @abstract
  1687. Use this API to close a session on a camera device. For a scanner device use the ICAScannerCloseSession API.
  1688. @discussion
  1689. This API closes an open session on a camera device. If the camera does not have any open sessions, the device module controlling the camera is free to give it up during fast-user-switching.
  1690. @param pb
  1691. A pointer to an <code><b>ICACloseSessionPB</b></code> parameter block.
  1692. @param completion
  1693. A pointer to a completion routine that will be invoked at the completion of <code><b>ICACloseSession</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  1694. @result
  1695. Returns an error code defined in ICAApplication.h
  1696. }
  1697. function ICACloseSession( var pb: ICACloseSessionPB; completion: ICACompletion ): ICAError; external name '_ICACloseSession';
  1698. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1699. //-------------------------------------------------------------------------------------------------------- ICAScannerOpenSession
  1700. {!
  1701. @struct ICAScannerOpenSessionPB
  1702. @field header
  1703. See description for ICAHeader. <->
  1704. @field object
  1705. A scanner object. <--
  1706. @field sessionID
  1707. A session ID of the opened session. -->
  1708. }
  1709. type
  1710. ICAScannerOpenSessionPBPtr = ^ICAScannerOpenSessionPB;
  1711. ICAScannerOpenSessionPB = record
  1712. header: ICAHeader;
  1713. objct: ICAObject;
  1714. sessionID: ICAScannerSessionID;
  1715. end;
  1716. {!
  1717. @function ICAScannerOpenSession
  1718. @abstract
  1719. Use this API to open a session on a scanner device. For a camera device use the ICAOpenSession API.
  1720. @discussion
  1721. For a given scanner, this API returns a unique session ID that allows you to work with the device. This API will fail, if a session is already open.
  1722. @param pb
  1723. A pointer to an <code><b>ICAScannerOpenSessionPB</b></code> parameter block.
  1724. @param completion
  1725. A pointer to a completion routine that will be invoked at the completion of <code><b>ICAScannerOpenSession</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  1726. @result
  1727. Returns an error code defined in ICAApplication.h
  1728. }
  1729. function ICAScannerOpenSession( var pb: ICAScannerOpenSessionPB; completion: ICACompletion ): ICAError; external name '_ICAScannerOpenSession';
  1730. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1731. //------------------------------------------------------------------------------------------------------- ICAScannerCloseSession
  1732. {!
  1733. @struct ICAScannerCloseSessionPB
  1734. @field header
  1735. See description for ICAHeader. <->
  1736. @field sessionID
  1737. A session ID of the session to be closed. <--
  1738. }
  1739. type
  1740. ICAScannerCloseSessionPBPtr = ^ICAScannerCloseSessionPB;
  1741. ICAScannerCloseSessionPB = record
  1742. header: ICAHeader;
  1743. sessionID: ICAScannerSessionID;
  1744. end;
  1745. {!
  1746. @function ICAScannerCloseSession
  1747. @abstract
  1748. Use this API to close a session on a scanner device. For a camera device use the ICACloseSession API.
  1749. @discussion
  1750. This API closes an open session, allowing other clients to work with the scanner.
  1751. @param pb
  1752. A pointer to an <code><b>ICAScannerCloseSessionPB</b></code> parameter block.
  1753. @param completion
  1754. A pointer to a completion routine that will be invoked at the completion of <code><b>ICAScannerCloseSession</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  1755. @result
  1756. Returns an error code defined in ICAApplication.h
  1757. }
  1758. function ICAScannerCloseSession( var pb: ICAScannerCloseSessionPB; completion: ICACompletion ): ICAError; external name '_ICAScannerCloseSession';
  1759. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1760. //--------------------------------------------------------------------------------------------------------- ICAScannerInitialize
  1761. {!
  1762. @struct ICAScannerInitializePB
  1763. @field header
  1764. See description for ICAHeader. <->
  1765. @field sessionID
  1766. A session ID of the scanner to be initialized. <--
  1767. }
  1768. type
  1769. ICAScannerInitializePBPtr = ^ICAScannerInitializePB;
  1770. ICAScannerInitializePB = record
  1771. header: ICAHeader;
  1772. sessionID: ICAScannerSessionID;
  1773. end;
  1774. {!
  1775. @function ICAScannerInitialize
  1776. @abstract
  1777. Use this API to initialize a scanner device.
  1778. @discussion
  1779. After opening a session on a scanner device, use this API to set an initial state for the scanner.
  1780. @param pb
  1781. A pointer to an <code><b>ICAScannerInitializePB</b></code> parameter block.
  1782. @param completion
  1783. A pointer to a completion routine that will be invoked at the completion of <code><b>ICAScannerInitialize</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  1784. @result
  1785. Returns an error code defined in ICAApplication.h
  1786. }
  1787. function ICAScannerInitialize( var pb: ICAScannerInitializePB; completion: ICACompletion ): ICAError; external name '_ICAScannerInitialize';
  1788. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1789. //------------------------------------------------------------------------------------------------------ ICAScannerGetParameters
  1790. {!
  1791. @struct ICAScannerGetParametersPB
  1792. @field header
  1793. See description for ICAHeader. <->
  1794. @field sessionID
  1795. A session ID of the scanner whose parameters are being fetched. <--
  1796. @field theDict
  1797. A dictionary containing the parameters. -->
  1798. }
  1799. type
  1800. ICAScannerGetParametersPBPtr = ^ICAScannerGetParametersPB;
  1801. ICAScannerGetParametersPB = record
  1802. header: ICAHeader;
  1803. sessionID: ICAScannerSessionID;
  1804. theDict: CFMutableDictionaryRef;
  1805. end;
  1806. {!
  1807. @function ICAScannerGetParameters
  1808. @abstract
  1809. Use this API to get information about the scanner such as resolution, scanning area, etc.
  1810. @discussion
  1811. Use this API to get information about the scanner such as resolution, scanning area, etc.
  1812. @param pb
  1813. A pointer to an <code><b>ICAScannerGetParametersPB</b></code> parameter block.
  1814. @param completion
  1815. A pointer to a completion routine that will be invoked at the completion of <code><b>ICAScannerGetParameters</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  1816. @result
  1817. Returns an error code defined in ICAApplication.h
  1818. }
  1819. function ICAScannerGetParameters( var pb: ICAScannerGetParametersPB; completion: ICACompletion ): ICAError; external name '_ICAScannerGetParameters';
  1820. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1821. //------------------------------------------------------------------------------------------------------ ICAScannerSetParameters
  1822. {!
  1823. @struct ICAScannerSetParametersPB
  1824. @field header
  1825. See description for ICAHeader. <->
  1826. @field sessionID
  1827. A session ID of the scanner whose parameters are being set. <--
  1828. @field theDict
  1829. A dictionary containing the parameters. <--
  1830. }
  1831. type
  1832. ICAScannerSetParametersPBPtr = ^ICAScannerSetParametersPB;
  1833. ICAScannerSetParametersPB = record
  1834. header: ICAHeader;
  1835. sessionID: ICAScannerSessionID;
  1836. theDict: CFMutableDictionaryRef;
  1837. end;
  1838. {!
  1839. @function ICAScannerSetParameters
  1840. @abstract
  1841. Use this API to specify scan parameters that will be used when a scan is initiated via an ICAScannerStart.
  1842. @discussion
  1843. Use this API to specify scan parameters that will be used when a scan is initiated via an ICAScannerStart.
  1844. @param pb
  1845. A pointer to an <code><b>ICAScannerSetParametersPB</b></code> parameter block.
  1846. @param completion
  1847. A pointer to a completion routine that will be invoked at the completion of <code><b>ICAScannerSetParameters</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  1848. @result
  1849. Returns an error code defined in ICAApplication.h
  1850. }
  1851. function ICAScannerSetParameters( var pb: ICAScannerSetParametersPB; completion: ICACompletion ): ICAError; external name '_ICAScannerSetParameters';
  1852. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1853. //------------------------------------------------------------------------------------------------------------- ICAScannerStatus
  1854. {!
  1855. @struct ICAScannerStatusPB
  1856. @field header
  1857. See description for ICAHeader. <->
  1858. @field sessionID
  1859. A session ID of the scanner whose status is being fetched. <--
  1860. @field status
  1861. A status value. -->
  1862. }
  1863. type
  1864. ICAScannerStatusPBPtr = ^ICAScannerStatusPB;
  1865. ICAScannerStatusPB = record
  1866. header: ICAHeader;
  1867. sessionID: ICAScannerSessionID;
  1868. status: UInt32;
  1869. end;
  1870. {!
  1871. @function ICAScannerStatus
  1872. @abstract
  1873. Use this API to get information about the current status of the scanner.
  1874. @discussion
  1875. Use this API to get information about the current status of the scanner.
  1876. @param pb
  1877. A pointer to an <code><b>ICAScannerStatusPB</b></code> parameter block.
  1878. @param completion
  1879. A pointer to a completion routine that will be invoked at the completion of <code><b>ICAScannerStatus</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  1880. @result
  1881. Returns an error code defined in ICAApplication.h
  1882. }
  1883. function ICAScannerStatus( var pb: ICAScannerStatusPB; completion: ICACompletion ): ICAError; external name '_ICAScannerStatus';
  1884. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1885. //-------------------------------------------------------------------------------------------------------------- ICAScannerStart
  1886. {!
  1887. @struct ICAScannerStartPB
  1888. @field header
  1889. See description for ICAHeader. <->
  1890. @field sessionID
  1891. A session ID of the scanner that should start scanning. <--
  1892. }
  1893. type
  1894. ICAScannerStartPBPtr = ^ICAScannerStartPB;
  1895. ICAScannerStartPB = record
  1896. header: ICAHeader;
  1897. sessionID: ICAScannerSessionID;
  1898. end;
  1899. {!
  1900. @function ICAScannerStart
  1901. @abstract
  1902. Use this API start a scan based on the parameters that were specified in a previous ICAScannerSetParameters call.
  1903. @discussion
  1904. Use this API start a scan based on the parameters that were specified in a previous ICAScannerSetParameters call.
  1905. @param pb
  1906. A pointer to an <code><b>ICAScannerStartPB</b></code> parameter block.
  1907. @param completion
  1908. A pointer to a completion routine that will be invoked at the completion of <code><b>ICAScannerStart</b></code> function. Set this parameter to <code><b>NULL</b></code> to invoke this API synchronously.
  1909. @result
  1910. Returns an error code defined in ICAApplication.h
  1911. }
  1912. function ICAScannerStart( var pb: ICAScannerStartPB; completion: ICACompletion ): ICAError; external name '_ICAScannerStart';
  1913. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  1914. //------------------------------------------------------------------------------------------------------------------------------
  1915. //------------------------------------------------------------------------------------------------------------------------------
  1916. //------------------------------------------------------------------------------------------------------------------------------
  1917. {$endc} {TARGET_OS_MAC}
  1918. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  1919. end.
  1920. {$endc} {not MACOSALLINCLUDE}