|
ICAApplication.h |
Includes: |
ICAApplication.h defines structures and functions that are used by clients of Image Capture framework.
Use this API to close a session on a camera device. For a scanner device use the ICAScannerCloseSession API.
Use this API to get a copy of data associated with a file object.
Use this API to get a CFDictionaryRef containing all the properties for an object specified in the object field of the ICACopyObjectPropertyDictionaryPB struct.
Use this API to get a thumbnail associated with an object.
Use this API to download a file to disk.
Fetches the object at the top of the object heirarchy.
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.
Use this API to load a device module.
Use this API to send a message to a device object.
Use this API to open a session on a camera device. For a scanner device use the ICAScannerOpenSession API.
Use this API to register with Image Capture framework to receive notification about events of interest.
Use this API to close a session on a scanner device. For a camera device use the ICACloseSession API.
Use this API to get information about the scanner such as resolution, scanning area, etc.
Use this API to initialize a scanner device.
Use this API to open a session on a scanner device. For a camera device use the ICAOpenSession API.
Use this API to specify scan parameters that will be used when a scan is initiated via an ICAScannerStart.
Use this API start a scan based on the parameters that were specified in a previous ICAScannerSetParameters call.
Use this API to get information about the current status of the scanner.
Use this API to display a device browser user interface from any Image Capture client application.
Uset this API to unload a device module.
Use this API to upload a file to a device that supports this capability.
ICACloseSession |
Use this API to close a session on a camera device. For a scanner device use the ICAScannerCloseSession API.
extern ICAError ICACloseSession( ICACloseSessionPB *pb, ICACompletion completion );
pb
A pointer to an ICACloseSessionPB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICACloseSession
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
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.
ICACopyObjectData |
Use this API to get a copy of data associated with a file object.
extern ICAError ICACopyObjectData( ICACopyObjectDataPB *params, ICACompletion completionProc );
params
A pointer to ICACopyObjectDataPB struct <--
completionProc
A pointer to a completion routine that will be invoked at the completion of this function. Set this parameter to NULL to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
Use this API to get a copy of data associated with a file object. This API should be used in place of ICAGetPropertyData.
ICACopyObjectPropertyDictionary |
Use this API to get a CFDictionaryRef containing all the properties for an object specified in the object field of the ICACopyObjectPropertyDictionaryPB struct.
extern ICAError ICACopyObjectPropertyDictionary( ICACopyObjectPropertyDictionaryPB *pb, ICACompletion completion );
pb
A pointer to an ICACopyObjectPropertyDictionaryPB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICACopyObjectPropertyDictionary
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
This API is the preferred way to get to any ICAObject related property data.
Example: void CopyObjectPropertyDictionary() { OSErr err; ICACopyObjectPropertyDictionaryPB pb = {}; pb.object = <#ICAObject object#>; err = ICACopyObjectPropertyDictionary( &pb, NULL ); if ( noErr != err) { // handle error } else { // Make sure to release the returned dictionary // pb.theDict // CFDictionaryRef * } }
ICACopyObjectThumbnail |
Use this API to get a thumbnail associated with an object.
extern ICAError ICACopyObjectThumbnail( ICACopyObjectThumbnailPB *pb, ICACompletion completion );
pb
A pointer to an ICACopyObjectThumbnailPB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICACopyObjectThumbnail
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
This is the recommended way to get the thumbnail of an object. Getting the thumbnail using ICAGetPropertyData is deprecaed in 10.5.
Example: void CopyObjectThumbnail() { OSErr err; ICACopyObjectThumbnailPB pb = {}; pb.object = <#ICAObject object#>; pb.thumbnailFormat = <#OSType thumbnailFormat#>; err = ICACopyObjectThumbnail( &pb, NULL ); if ( noErr != err ) { // handle error } else { // Make sure to release the thumbnailData // pb.thumbnailData // CFDataRef * } }
ICADownloadFile |
Use this API to download a file to disk.
extern ICAError ICADownloadFile( ICADownloadFilePB *pb, ICACompletion completion );
pb
A pointer to an ICADownloadFilePB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICADownloadFile
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
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.
Example: void DownloadFile() { OSErr err; ICADownloadFilePB pb = {}; pb.flags = <#UInt32 flags#>; pb.rotationAngle = <#Fixed rotationAngle#>; pb.object = <#ICAObject object#>; pb.fileCreator = <#OSType fileCreator#>; pb.dirFSRef = <#FSRef * dirFSRef#>; pb.fileType = <#OSType fileType#>; err = ICADownloadFile( &pb, NULL ); if ( noErr != err ) { // handle error } else { // pb.fileFSRef // FSRef * } }
ICAGetDeviceList |
Fetches the object at the top of the object heirarchy.
extern ICAError ICAGetDeviceList( ICAGetDeviceListPB *pb, ICACompletion completion );
pb
A pointer to an ICAGetDeviceListPB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICAGetDeviceList
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
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 ICAGetDeviceList
function fetches this object in the object
field of parameter pb
. Children of the device list object can be accessed by passing the device list object to functions ICAGetChildCount()
and ICAGetNthChild()
.
Example: ICAObject GetDeviceList() { ICAGetDeviceListPB getDeviceListPB = {}; ICAObject deviceList = 0; OSErr err; err = ICAGetDeviceList( &getDeviceListPB, nil ); if ( noErr == err ) { deviceList = getDeviceListPB.object; } return deviceList; }
ICAImportImage |
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.
extern ICAError ICAImportImage( ICAImportImagePB *pb, ICACompletion completion );
pb
A pointer to an ICAImportImagePB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICAImportImage
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
Use this API to add Image Capture support to an application.
Example: void ImportImage() { OSErr err; CFArrayRef imagesArray = NULL; ICAImportImagePB pb = {}; pb.deviceObject = 0; pb.flags = 0; pb.supportedFileTypes = (CFArrayRef)[NSArray arrayWithObjects: @"tif", @"tiff", @"jpg", NULL]; pb.importedImages = &imagesArray; err = ICAImportImage(&pb, NULL); if ( noErr != err ) { // handle error } else { // Process the importedImages array // pb.importedImages // CFArrayRef * } }
ICALoadDeviceModule |
Use this API to load a device module.
extern ICAError ICALoadDeviceModule( ICALoadDeviceModulePB *pb, ICACompletion completion );
pb
A pointer to an ICALoadDeviceModulePB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICALoadDeviceModule
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
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.
ICAObjectSendMessage |
Use this API to send a message to a device object.
extern ICAError ICAObjectSendMessage( ICAObjectSendMessagePB *pb, ICACompletion completion );
pb
A pointer to an ICAObjectSendMessagePB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICAObjectSendMessage
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
Use this API to send a message to a device object. All devices do not respond to all the messages defined above.
ICAOpenSession |
Use this API to open a session on a camera device. For a scanner device use the ICAScannerOpenSession API.
extern ICAError ICAOpenSession( ICAOpenSessionPB *pb, ICACompletion completion );
pb
A pointer to an ICAOpenSessionPB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICAOpenSession
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
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.
ICARegisterForEventNotification |
Use this API to register with Image Capture framework to receive notification about events of interest.
extern ICAError ICARegisterForEventNotification( ICARegisterForEventNotificationPB *params, ICACompletion completionProc );
params
A pointer to ICARegisterForEventNotificationPB struct <--
completionProc
A pointer to a completion routine that will be invoked at the completion of this function. Set this parameter to NULL to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
ICAScannerCloseSession |
Use this API to close a session on a scanner device. For a camera device use the ICACloseSession API.
extern ICAError ICAScannerCloseSession( ICAScannerCloseSessionPB *pb, ICACompletion completion );
pb
A pointer to an ICAScannerCloseSessionPB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICAScannerCloseSession
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
This API closes an open session, allowing other clients to work with the scanner.
ICAScannerGetParameters |
Use this API to get information about the scanner such as resolution, scanning area, etc.
extern ICAError ICAScannerGetParameters( ICAScannerGetParametersPB *pb, ICACompletion completion );
pb
A pointer to an ICAScannerGetParametersPB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICAScannerGetParameters
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
Use this API to get information about the scanner such as resolution, scanning area, etc.
ICAScannerInitialize |
Use this API to initialize a scanner device.
extern ICAError ICAScannerInitialize( ICAScannerInitializePB *pb, ICACompletion completion );
pb
A pointer to an ICAScannerInitializePB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICAScannerInitialize
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
After opening a session on a scanner device, use this API to set an initial state for the scanner.
ICAScannerOpenSession |
Use this API to open a session on a scanner device. For a camera device use the ICAOpenSession API.
extern ICAError ICAScannerOpenSession( ICAScannerOpenSessionPB *pb, ICACompletion completion );
pb
A pointer to an ICAScannerOpenSessionPB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICAScannerOpenSession
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
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.
ICAScannerSetParameters |
Use this API to specify scan parameters that will be used when a scan is initiated via an ICAScannerStart.
extern ICAError ICAScannerSetParameters( ICAScannerSetParametersPB *pb, ICACompletion completion );
pb
A pointer to an ICAScannerSetParametersPB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICAScannerSetParameters
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
Use this API to specify scan parameters that will be used when a scan is initiated via an ICAScannerStart.
ICAScannerStart |
Use this API start a scan based on the parameters that were specified in a previous ICAScannerSetParameters call.
extern ICAError ICAScannerStart( ICAScannerStartPB *pb, ICACompletion completion );
pb
A pointer to an ICAScannerStartPB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICAScannerStart
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
Use this API start a scan based on the parameters that were specified in a previous ICAScannerSetParameters call.
ICAScannerStatus |
Use this API to get information about the current status of the scanner.
extern ICAError ICAScannerStatus( ICAScannerStatusPB *pb, ICACompletion completion );
pb
A pointer to an ICAScannerStatusPB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICAScannerStatus
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
Use this API to get information about the current status of the scanner.
ICAShowDeviceBrowser |
Use this API to display a device browser user interface from any Image Capture client application.
extern ICAError ICAShowDeviceBrowser( CFDictionaryRef options );
options
Set options to NULL to display the device browser with default settings. <-- This parameter is intended for future use.
Returns an error code defined in ICAApplication.h
The device browser user interface allows the user to do the following: - enable and disable sharing of locally connected cameras and scanners. - connect to or disconnect from cameras and scanners shared by other computers. - configure WiFi capable cameras for use over the WiFi network.
ICAUnloadDeviceModule |
Uset this API to unload a device module.
extern ICAError ICAUnloadDeviceModule( ICAUnloadDeviceModulePB *pb, ICACompletion completion );
pb
A pointer to an ICAUnloadDeviceModulePB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICAUnloadDeviceModule
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
The device module providing this object will be unloaded, if this is the last device object provided by the device module.
ICAUploadFile |
Use this API to upload a file to a device that supports this capability.
extern ICAError ICAUploadFile( ICAUploadFilePB *pb, ICACompletion completion );
pb
A pointer to an ICAUploadFilePB
parameter block.
completion
A pointer to a completion routine that will be invoked at the completion of ICAUploadFile
function. Set this parameter to NULL
to invoke this API synchronously.
Returns an error code defined in ICAApplication.h
The device choses an appropriate destination location for the uploaded image and sends a kICANotificationTypeObjectAdded notification.
Example: void UploadFile() { OSErr err; ICAUploadFilePB pb = {}; pb.fileFSRef = <#FSRef * fileFSRef#>; pb.flags = <#UInt32 flags#>; pb.parentObject = <#ICAObject parentObject#>; err = ICAUploadFile( &pb, NULL ); if ( noErr != err ) { // handle error } else { // no return value(s) } }
This key may be present in the property dictionary of a device if the device has a user-assigned name.
kICAUserAssignedDeviceNameKey |
This key may be present in the property dictionary of a device if the device has a user-assigned name.
extern const CFStringRef kICAUserAssignedDeviceNameKey;
Value is of type CFStringRef.
ICACloseSessionPB |
typedef struct ICACloseSessionPB { ICAHeader header; ICASessionID sessionID; } ICACloseSessionPB;
header
See description for ICAHeader. <->
sessionID
A session ID of the session to be closed. <--
ICACopyObjectDataPB |
typedef struct ICACopyObjectDataPB { ICAHeader header; ICAObject object; size_t startByte; size_t requestedSize; CFDataRef *data; } ICACopyObjectDataPB;
header
See description for ICAHeader. <->
object
A file object. <--
startByte
Starting byte offset of the data in the file object. <--
requestedSize
Requested data size in bytes. <--
data
A pointer to CFDataRef in which the data will be returned. --> It is the responsibility fo the caller to release this object.
ICACopyObjectPropertyDictionaryPB |
typedef struct ICACopyObjectPropertyDictionaryPB { ICAHeader header; ICAObject object; CFDictionaryRef *theDict; } ICACopyObjectPropertyDictionaryPB;
header
See description for ICAHeader. <->
object
An object whose properties are being requested. <--
theDict
A dictionary to hold the properties. This must be released by the caller. -->
ICACopyObjectThumbnailPB |
typedef struct ICACopyObjectThumbnailPB { ICAHeader header; ICAObject object; OSType thumbnailFormat; CFDataRef *thumbnailData; } ICACopyObjectThumbnailPB;
header
See description for ICAHeader. <->
object
An object whose thumbail is being requested. <--
thumbnailFormat
One of the format values defined above. <--
thumbnailData
A pointer to a CFDataRef holding the thumbnail data. The returned CFDataRef must be released by the caller. -->
ICADownloadFilePB |
typedef struct ICADownloadFilePB { ICAHeader header; ICAObject object; FSRef *dirFSRef; UInt32 flags; OSType fileType; OSType fileCreator; Fixed rotationAngle; FSRef *fileFSRef; } ICADownloadFilePB;
header
See description for ICAHeader. <->
object
The file object. <--
dirFSRef
FSRef of destination directiory. <--
flags
Any combination of flag values defined above. <--
fileType
Four-char code indicating the type of file. <--
fileCreator
Four-char code indicating with the creator of the file. <--
rotationAngle
Rotation angle in steps of 90 degress. <--
fileFSRef
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. -->
ICAGetDeviceListPB |
typedef struct ICAGetDeviceListPB { ICAHeader header; ICAObject object; } ICAGetDeviceListPB;
header
See description for ICAHeader. <-->
object
The device list object, if ICAGetDeviceList returns successfully. -->
ICAHeader |
typedef struct ICAHeader { ICAError err; unsigned long refcon; } ICAHeader;
err
Error returned by an API. -->
refcon
An arbitrary refcon value passed to the callback. <--
This is the first field in all parameter blocks used by APIs defined in ICAApplication.h. Type of parameter passed to a callback function used by APIs defined in ICAApplication.h. The parameter for the completion proc should to be casted to an appropriate type such as ICAGetChildCountPB* for it to be useful.
ICAImportImagePB |
typedef struct ICAImportImagePB { ICAHeader header; ICAObject deviceObject; UInt32 flags; CFArrayRef supportedFileTypes; ICAImportFilterProc filterProc; CFArrayRef *importedImages; } ICAImportImagePB;
header
See description for ICAHeader. <->
deviceObject
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\xD5s 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. <--
flags
One or more flags (combined with an OR operator) defined in ImportImage flags enum. <--
supportedFileTypes
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. <--
filterProc
Specify a filter proc to that will be called for each file before it is displayed in the user interface. <--
importedImages
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. -->
ICALoadDeviceModulePB |
typedef struct ICALoadDeviceModulePB { ICAHeader header; CFDictionaryRef paramDictionary; } ICALoadDeviceModulePB;
header
See description for ICAHeader. <->
paramDictionary
<-- 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.
ICAMessage |
typedef struct ICAMessage { OSType messageType; UInt32 startByte; void *dataPtr; UInt32 dataSize; OSType dataType; } ICAMessage;
messageType
A message type. e.g., kICAMessageCameraCaptureNewImage. <--
startByte
Offset in dataPtr from where data access for read/write should occur. <--
dataPtr
A pointer to a data buffer. <--
dataSize
Size of data. <--
dataType
Type of data. <--
ICAObjectInfo |
typedef struct ICAObjectInfo { OSType objectType; OSType objectSubtype; } ICAObjectInfo;
objectType
An object type, e.g., kICAFile.
objectSubtype
An object subtype, e.g., kICAFileImage.
ICAObjectSendMessagePB |
typedef struct ICAObjectSendMessagePB { ICAHeader header; ICAObject object; ICAMessage message; UInt32 result; } ICAObjectSendMessagePB;
header
See description for ICAHeader. <-->
object
A target object for the message sent by ICAObjectSendMessage. <--
message
One of the messages define above. <--
result
A message specific result is returned here. -->
ICAOpenSessionPB |
typedef struct ICAOpenSessionPB { ICAHeader header; ICAObject deviceObject; ICASessionID sessionID; } ICAOpenSessionPB;
header
See description for ICAHeader. <->
deviceObject
A camera object. <--
sessionID
A session ID of the opened session. -->
ICAPTPEventDataset |
typedef struct ICAPTPEventDataset { UInt32 dataLength; UInt16 containerType; // should be 0x0004 for event UInt16 eventCode; UInt32 transactionID; UInt32 params[3]; // up to 3 params. # of params = (dataLength - 12)/4 } ICAPTPEventDataset;
dataLength
Data length in bytes
containerType
PTP container type
eventCode
PTP event code
transactionID
PTP transaction ID
params
PTP params. The number of params should be (dataLength - 12)/4
ICAPTPPassThroughPB |
typedef struct ICAPTPPassThroughPB { UInt32 commandCode; UInt32 resultCode; UInt32 numOfInputParams; UInt32 numOfOutputParams; UInt32 params[4]; UInt32 dataUsageMode; UInt32 flags; UInt32 dataSize; UInt8 data[1]; } ICAPTPPassThroughPB;
commandCode
PTP command code (including vendor specific) <--
resultCode
PTP response code -->
numOfInputParams
Number of valid parameters to be sent to device <--
numOfOutputParams
Number of valid parameters expected from device <--
params
PTP parameters (command specific / optional) <->
dataUsageMode
One of (kICACameraPassThruSend, kICACameraPassThruReceive, kICACameraPassThruNotUsed) <--
flags
Not used currently
dataSize
Size of data block <->
data
Data block <->
ICARegisterForEventNotificationPB |
typedef struct ICARegisterForEventNotificationPB { ICAHeader header; ICAObject objectOfInterest; CFArrayRef eventsOfInterest; ICANotification notificationProc; CFDictionaryRef options; } ICARegisterForEventNotificationPB;
header
See description for ICAHeader. <->
objectOfInterest
An object about which notifications are requested. <--
eventsOfInterest
An array of notification types of interest. <--
notificationProc
A callback function to receive the notifications. <--
options
Set options to NULL. This parameter is intended for future use. <--
Use this parameter structure to specify a set of events associated with an object about which notifications should be sent to the specified notification function.
ICAScannerCloseSessionPB |
typedef struct ICAScannerCloseSessionPB { ICAHeader header; ICAScannerSessionID sessionID; } ICAScannerCloseSessionPB;
header
See description for ICAHeader. <->
sessionID
A session ID of the session to be closed. <--
ICAScannerGetParametersPB |
typedef struct ICAScannerGetParametersPB { ICAHeader header; ICAScannerSessionID sessionID; CFMutableDictionaryRef theDict; } ICAScannerGetParametersPB;
header
See description for ICAHeader. <->
sessionID
A session ID of the scanner whose parameters are being fetched. <--
theDict
A dictionary containing the parameters. -->
ICAScannerInitializePB |
typedef struct ICAScannerInitializePB { ICAHeader header; ICAScannerSessionID sessionID; } ICAScannerInitializePB;
header
See description for ICAHeader. <->
sessionID
A session ID of the scanner to be initialized. <--
ICAScannerOpenSessionPB |
typedef struct ICAScannerOpenSessionPB { ICAHeader header; ICAObject object; ICAScannerSessionID sessionID; } ICAScannerOpenSessionPB;
header
See description for ICAHeader. <->
object
A scanner object. <--
sessionID
A session ID of the opened session. -->
ICAScannerSetParametersPB |
typedef struct ICAScannerSetParametersPB { ICAHeader header; ICAScannerSessionID sessionID; CFMutableDictionaryRef theDict; } ICAScannerSetParametersPB;
header
See description for ICAHeader. <->
sessionID
A session ID of the scanner whose parameters are being set. <--
theDict
A dictionary containing the parameters. <--
ICAScannerStartPB |
typedef struct ICAScannerStartPB { ICAHeader header; ICAScannerSessionID sessionID; } ICAScannerStartPB;
header
See description for ICAHeader. <->
sessionID
A session ID of the scanner that should start scanning. <--
ICAScannerStatusPB |
typedef struct ICAScannerStatusPB { ICAHeader header; ICAScannerSessionID sessionID; UInt32 status; } ICAScannerStatusPB;
header
See description for ICAHeader. <->
sessionID
A session ID of the scanner whose status is being fetched. <--
status
A status value. -->
ICAUnloadDeviceModulePB |
typedef struct ICAUnloadDeviceModulePB { ICAHeader header; ICAObject deviceObject; } ICAUnloadDeviceModulePB;
header
See description for ICAHeader. <->
deviceObject
<-- A device ICAObject.
ICAUploadFilePB |
typedef struct ICAUploadFilePB { ICAHeader header; ICAObject parentObject; FSRef *fileFSRef; UInt32 flags; } ICAUploadFilePB;
header
See description for ICAHeader. <->
parentObject
<-> An ICAObject corresponding to a folder on the device. The device will store the uploaded file inside this folder if possible.
fileFSRef
<-- An FSRef for the file to be uploaded to the device.
flags
<-- One of the flags defined above.
Button types |
enum { kICAButtonScan = 'scan', kICAButtonCopy = 'copy', kICAButtonEMail = 'mail', kICAButtonWeb = 'web ' };
kICAButtonScan
Scan button.
kICAButtonCopy
Copy button.
kICAButtonEMail
Email button.
kICAButtonWeb
Web button.
Buttons types associated with buttons on a scanner.
Data types |
enum { kICATypeUInt8 = 'ui08', kICATypeUInt16 = 'ui16', kICATypeUInt32 = 'ui32', kICATypeUInt64 = 'ui64', kICATypeSInt16 = 'si16', kICATypeSInt32 = 'si32', kICATypeSInt64 = 'si64', kICATypeFloat = 'floa', kICATypeFixed = 'sing', kICATypeBoolean = 'bool', kICATypeString = 'TEXT', kICATypeData = 'data', kICATypeThumbnail = 'thum' };
kICATypeUInt8
UInt8.
kICATypeUInt16
UInt16.
kICATypeUInt32
UInt32.
kICATypeUInt64
UInt64.
kICATypeSInt16
SInt16.
kICATypeSInt32
SInt32.
kICATypeSInt64
SInt64.
kICATypeFloat
float.
kICATypeFixed
IEEE 32-bit floating point.
kICATypeBoolean
Boolean.
kICATypeString
Char string.
kICATypeData
void *.
kICATypeThumbnail
ICAThumbnail.
Definition of data types; these are mapped to AppleEvent types.
Error codes |
enum { kICACommunicationErr = -9900, kICADeviceNotFoundErr = -9901, kICADeviceNotOpenErr = -9902, kICAFileCorruptedErr = -9903, kICAIOPendingErr = -9904, kICAInvalidObjectErr = -9905, kICAInvalidPropertyErr = -9906, kICAIndexOutOfRangeErr = -9907, kICAPropertyTypeNotFoundErr = -9908, kICACannotYieldDevice = -9909, kICADataTypeNotFoundErr = -9910, kICADeviceMemoryAllocationErr = -9911, kICADeviceInternalErr = -9912, kICADeviceInvalidParamErr = -9913, kICADeviceAlreadyOpenErr = -9914, kICADeviceLocationIDNotFoundErr = -9915, kICADeviceGUIDNotFoundErr = -9916, kICADeviceIOServicePathNotFoundErr = -9917, kICADeviceUnsupportedErr = -9918, kICAFrameworkInternalErr = -9919, kICAExtensionInternalErr = -9920, kICAInvalidSessionErr = -9921 };
kICACommunicationErr
An error occurred in communication between different components of Image Capture framework.
kICADeviceNotFoundErr
The specified device is not found.
kICADeviceNotOpenErr
The specified device is not open.
kICAFileCorruptedErr
Encountered a corrupt file.
kICAIOPendingErr
There is a pending I/O.
kICAInvalidObjectErr
The specified object is invalid.
kICAInvalidPropertyErr
The specified property is invalid.
kICAIndexOutOfRangeErr
The specified index is out of range.
kICAPropertyTypeNotFoundErr
A property with the specified property type is not found.
kICACannotYieldDevice
The device module cannot yield the specified device to the requestor.
kICADataTypeNotFoundErr
Data with the specified data type is not found.
kICADeviceMemoryAllocationErr
The device module encountered a memory allocation error.
kICADeviceInternalErr
The device module encountered an unspecifed error.
kICADeviceInvalidParamErr
At least one of the parameters passed to the device module is invalid.
kICADeviceAlreadyOpenErr
The specified device is already open.
kICADeviceLocationIDNotFoundErr
The specified USB Location ID is not found.
kICADeviceGUIDNotFoundErr
The specified FireWire GUID is not found.
kICADeviceIOServicePathNotFoundErr
The specified IOService path is not found.
kICAFrameworkInternalErr
Image Capture Framework encountered an error.
kICAExtensionInternalErr
Image Capture Extension encountered an error.
kICAInvalidSessionErr
The specified session is not valid.
Definition of error codes returned by Image Capture framework
Flag to use with ICADownloadFile |
enum { kDeleteAfterDownload = 0x00000001, kCreateCustomIcon = 0x00000002, kAddMetaDataToFinderComment = 0x00000004, kAdjustCreationDate = 0x00000008, kSetFileTypeAndCreator = 0x00000010, //kEmbedColorSyncProfile = 0x00000020, kRotateImage = 0x00000040, kDontEmbedColorSyncProfile = 0x00000080 };
kDeleteAfterDownload
Delete file after a successful download.
kCreateCustomIcon
Create a custom icon for Finder.
kAddMetaDataToFinderComment
Add basic metadata to finder comment field.
kAdjustCreationDate
Set creation date of the downloaded file same as the creation date for the file as reported by the device.
kSetFileTypeAndCreator
Set 4-char file type and creator code.
kRotateImage
Rotate the image.
kDontEmbedColorSyncProfile
Embed ColorSync profile to the image if one was not already embedded.
Use any combination of these values when downloading a file.
Flags associated with Image Capture PassThru commands. |
enum { kICACameraPassThruSend = 0, kICACameraPassThruReceive = 1, kICACameraPassThruNotUsed = 2 };
kICACameraPassThruSend
Use this constant when sending data to a device using a pass-through command.
kICACameraPassThruReceive
Use this constant when receiving data from a device using a pass-through command.
kICACameraPassThruNotUsed
Use this constant when using a pass-through command that doesn't involve sending or receiving data.
Flag values that can be used in ICAUploadFilePB parameter block.
ICAMessage types |
enum { kICAMessageConnect = 'open', kICAMessageDisconnect = 'clos', kICAMessageReset = 'rese', kICAMessageCheckDevice = 'chkd', kICAMessageCameraReadClock = 'rclk', kICAMessageGetLastButtonPressed = 'btn?', kICAMessageGetEventData = 'mged', kICAMessageDeviceYield = 'yiel', kICAMessageCameraPassThrough = 'pass', kICAMessageScannerOverviewSelectionChanged = 'area' };
kICAMessageConnect
Connect to device.
kICAMessageDisconnect
Disconnect device.
kICAMessageReset
Reset device.
kICAMessageCheckDevice
Check device.
kICAMessageCameraReadClock
Read clock from device.
kICAMessageGetLastButtonPressed
Get last button pressed on the device (scanner).
kICAMessageGetEventData
Get data associated with an event.
kICAMessageDeviceYield
Yield device. Image Capture framework yields a device so that the sender of the message can directly communicate with the device.
Definition of ICAMessage types.
ICAObject types and subtypes |
enum { kICADevice = 'icdv', kICADeviceCamera = 'cmra', kICADeviceScanner = 'scan', kICADeviceMFP = 'mfp ', kICADevicePhone = 'phon', kICADevicePDA = 'pda ', kICADeviceOther = 'doth', kICAList = 'objl', kICADirectory = 'dire', kICAFile = 'file', kICAFileImage = 'imag', kICAFileMovie = 'moov', kICAFileAudio = 'audo', kICAFileFirmware = 'firm', kICAFileOther = 'othe' };
kICADevice
Object is a device supported by Image Capture framework.
kICADeviceCamera
Object is a camera.
kICADeviceScanner
Object is a scanner.
kICADeviceMFP
Object is a multi-function peripheral.
kICADevicePhone
Object is a camera phone.
kICADevicePDA
Object is a personal digital assistant.
kICADeviceOther
Object is a device supported by Image Capture framework, but of unknown subtype.
kICAList
Object is a device list.
kICADirectory
Object is a directory.
kICAFile
Object is a file.
kICAFileImage
Object is an image file.
kICAFileMovie
Object is a movie file.
kICAFileAudio
Object is an audio file.
kICAFileFirmware
Object is a firmware file.
kICAFileOther
Object is a generic file.
Definition of ICAObject types and subtypes
ICAProperty types |
enum { kICAProperty = 'prop', kICAPropertyImageWidth = '0100', kICAPropertyImageHeight = '0101', kICAPropertyImageBitDepth = '0102', kICAPropertyImageDPI = '011A', kICAPropertyImageExposureTime = '829A', kICAPropertyImageFNumber = '829D', kICAPropertyImageDateOriginal = '9003', kICAPropertyImageDateDigitized = '9004', kICAPropertyImageShutterSpeed = '9201', kICAPropertyImageAperture = '9202', kICAPropertyImageFlash = '9209', kICAPropertyColorSpace = 'A001', kICAPropertyImageFilename = 'ifil', kICAPropertyImageSize = 'isiz', kICAPropertyImageData = 'idat', kICAPropertyImageThumbnail = 'thum', kICAPropertyColorSyncProfile = 'prof' };
kICAProperty
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.
kICAPropertyImageWidth
Image width.
kICAPropertyImageHeight
Image height.
kICAPropertyImageBitDepth
Image bit-depth.
kICAPropertyImageDPI
Image DPI.
kICAPropertyImageExposureTime
Image exposure time.
kICAPropertyImageFNumber
Image f-Number.
kICAPropertyImageDateOriginal
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".
kICAPropertyImageDateDigitized
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".
kICAPropertyImageShutterSpeed
Shutter speed used to capture an image.
kICAPropertyImageAperture
Aperture used to capture an image.
kICAPropertyImageFlash
Indicates whether flash was used to capture an image.
kICAPropertyColorSpace
Color space used to represent an image.
kICAPropertyImageFilename
Filename of an image.
kICAPropertyImageSize
Size of an image in bytes.
kICAPropertyImageData
Data of an image.
kICAPropertyImageThumbnail
Thumbnail of an image.
kICAPropertyColorSyncProfile
ColorSync profile associated with an image.
Definition of ICAProperties
ImportImage flags. |
enum { kICAAllowMultipleImages = 0x00000001, kICADownloadAndReturnPathArray = 0x00000002 };
kICAAllowMultipleImages
Use this constant to allow users to select multiple images in the Import Image dialog.
kICADownloadAndReturnPathArray
Use this constant to download the images to a temporary location and return an array of paths to the downloaded images.
Flag values that can be used in ICAImportImagePB parameter block.
Parameter block version |
enum { kICAPBVersion = 0x00010000 };
kICAPBVersion
Version 1 parameter block.
Parameter block version.
PropertyInfo flag values |
enum { kICAFlagReadWriteAccess = 1L << 0, kICAFlagReadAccess = 1L << 1 };
kICAFlagReadWriteAccess
Access for read and write.
kICAFlagReadAccess
Access for read only.
Values for PropertyInfo flag.
Thumbnail formats. |
enum { kICAThumbnailFormatJPEG = 'jpeg', kICAThumbnailFormatTIFF = 'tiff', kICAThumbnailFormatPNG = 'png ' };
kICAThumbnailFormatJPEG
Use this constant to receive a thumbnail in JPEG format.
kICAThumbnailFormatTIFF
Use this constant to receive a thumbnail in TIFF format.
kICAThumbnailFormatPNG
Use this constant to receive a thumbnail in PNG format.
Format alues that can be used in ICACopyObjectThumbnailPB parameter block.
Upload file option flags. |
enum { kICAUploadFileAsIs = 0x00000000, kICAUploadFileScaleToFit = 0x00000001 };
kICAUploadFileAsIs
Use this constant to upload a file as is.
kICAUploadFileScaleToFit
Use this constant to upload a file after scaling to fit a specified bounding rect.
Flag values that can be used in ICAUploadFilePB parameter block.
Last Updated: 2009-08-12