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