|
|
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 );
pbA pointer to an ICACloseSessionPB parameter block.
completionA 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 );
paramsA pointer to ICACopyObjectDataPB struct <--
completionProcA 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 );
pbA pointer to an ICACopyObjectPropertyDictionaryPB parameter block.
completionA 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 );
pbA pointer to an ICACopyObjectThumbnailPB parameter block.
completionA 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 );
pbA pointer to an ICADownloadFilePB parameter block.
completionA 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 );
pbA pointer to an ICAGetDeviceListPB parameter block.
completionA 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 );
pbA pointer to an ICAImportImagePB parameter block.
completionA 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 );
pbA pointer to an ICALoadDeviceModulePB parameter block.
completionA 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 );
pbA pointer to an ICAObjectSendMessagePB parameter block.
completionA 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 );
pbA pointer to an ICAOpenSessionPB parameter block.
completionA 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 );
paramsA pointer to ICARegisterForEventNotificationPB struct <--
completionProcA 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 );
pbA pointer to an ICAScannerCloseSessionPB parameter block.
completionA 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 );
pbA pointer to an ICAScannerGetParametersPB parameter block.
completionA 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 );
pbA pointer to an ICAScannerInitializePB parameter block.
completionA 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 );
pbA pointer to an ICAScannerOpenSessionPB parameter block.
completionA 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 );
pbA pointer to an ICAScannerSetParametersPB parameter block.
completionA 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 );
pbA pointer to an ICAScannerStartPB parameter block.
completionA 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 );
pbA pointer to an ICAScannerStatusPB parameter block.
completionA 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 );
optionsSet 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 );
pbA pointer to an ICAUnloadDeviceModulePB parameter block.
completionA 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 );
pbA pointer to an ICAUploadFilePB parameter block.
completionA 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;
headerSee description for ICAHeader. <->
sessionIDA 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;
headerSee description for ICAHeader. <->
objectA file object. <--
startByteStarting byte offset of the data in the file object. <--
requestedSizeRequested data size in bytes. <--
dataA 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;
headerSee description for ICAHeader. <->
objectAn object whose properties are being requested. <--
theDictA 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;
headerSee description for ICAHeader. <->
objectAn object whose thumbail is being requested. <--
thumbnailFormatOne of the format values defined above. <--
thumbnailDataA 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;
headerSee description for ICAHeader. <->
objectThe file object. <--
dirFSRefFSRef of destination directiory. <--
flagsAny combination of flag values defined above. <--
fileTypeFour-char code indicating the type of file. <--
fileCreatorFour-char code indicating with the creator of the file. <--
rotationAngleRotation angle in steps of 90 degress. <--
fileFSRefA 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;
headerSee description for ICAHeader. <-->
objectThe device list object, if ICAGetDeviceList returns successfully. -->
ICAHeader |
typedef struct ICAHeader { ICAError err; unsigned long refcon; } ICAHeader;
errError returned by an API. -->
refconAn 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;
headerSee description for ICAHeader. <->
deviceObjectObject 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. <--
flagsOne or more flags (combined with an OR operator) defined in ImportImage flags enum. <--
supportedFileTypesAn 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. <--
filterProcSpecify a filter proc to that will be called for each file before it is displayed in the user interface. <--
importedImagesReturns 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;
headerSee 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;
messageTypeA message type. e.g., kICAMessageCameraCaptureNewImage. <--
startByteOffset in dataPtr from where data access for read/write should occur. <--
dataPtrA pointer to a data buffer. <--
dataSizeSize of data. <--
dataTypeType of data. <--
ICAObjectInfo |
typedef struct ICAObjectInfo { OSType objectType; OSType objectSubtype; } ICAObjectInfo;
objectTypeAn object type, e.g., kICAFile.
objectSubtypeAn object subtype, e.g., kICAFileImage.
ICAObjectSendMessagePB |
typedef struct ICAObjectSendMessagePB { ICAHeader header; ICAObject object; ICAMessage message; UInt32 result; } ICAObjectSendMessagePB;
headerSee description for ICAHeader. <-->
objectA target object for the message sent by ICAObjectSendMessage. <--
messageOne of the messages define above. <--
resultA message specific result is returned here. -->
ICAOpenSessionPB |
typedef struct ICAOpenSessionPB { ICAHeader header; ICAObject deviceObject; ICASessionID sessionID; } ICAOpenSessionPB;
headerSee description for ICAHeader. <->
deviceObjectA camera object. <--
sessionIDA 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;
dataLengthData length in bytes
containerTypePTP container type
eventCodePTP event code
transactionIDPTP transaction ID
paramsPTP 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;
commandCodePTP command code (including vendor specific) <--
resultCodePTP response code -->
numOfInputParamsNumber of valid parameters to be sent to device <--
numOfOutputParamsNumber of valid parameters expected from device <--
paramsPTP parameters (command specific / optional) <->
dataUsageModeOne of (kICACameraPassThruSend, kICACameraPassThruReceive, kICACameraPassThruNotUsed) <--
flagsNot used currently
dataSizeSize of data block <->
dataData block <->
ICARegisterForEventNotificationPB |
typedef struct ICARegisterForEventNotificationPB { ICAHeader header; ICAObject objectOfInterest; CFArrayRef eventsOfInterest; ICANotification notificationProc; CFDictionaryRef options; } ICARegisterForEventNotificationPB;
headerSee description for ICAHeader. <->
objectOfInterestAn object about which notifications are requested. <--
eventsOfInterestAn array of notification types of interest. <--
notificationProcA callback function to receive the notifications. <--
optionsSet 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;
headerSee description for ICAHeader. <->
sessionIDA session ID of the session to be closed. <--
ICAScannerGetParametersPB |
typedef struct ICAScannerGetParametersPB { ICAHeader header; ICAScannerSessionID sessionID; CFMutableDictionaryRef theDict; } ICAScannerGetParametersPB;
headerSee description for ICAHeader. <->
sessionIDA session ID of the scanner whose parameters are being fetched. <--
theDictA dictionary containing the parameters. -->
ICAScannerInitializePB |
typedef struct ICAScannerInitializePB { ICAHeader header; ICAScannerSessionID sessionID; } ICAScannerInitializePB;
headerSee description for ICAHeader. <->
sessionIDA session ID of the scanner to be initialized. <--
ICAScannerOpenSessionPB |
typedef struct ICAScannerOpenSessionPB { ICAHeader header; ICAObject object; ICAScannerSessionID sessionID; } ICAScannerOpenSessionPB;
headerSee description for ICAHeader. <->
objectA scanner object. <--
sessionIDA session ID of the opened session. -->
ICAScannerSetParametersPB |
typedef struct ICAScannerSetParametersPB { ICAHeader header; ICAScannerSessionID sessionID; CFMutableDictionaryRef theDict; } ICAScannerSetParametersPB;
headerSee description for ICAHeader. <->
sessionIDA session ID of the scanner whose parameters are being set. <--
theDictA dictionary containing the parameters. <--
ICAScannerStartPB |
typedef struct ICAScannerStartPB { ICAHeader header; ICAScannerSessionID sessionID; } ICAScannerStartPB;
headerSee description for ICAHeader. <->
sessionIDA session ID of the scanner that should start scanning. <--
ICAScannerStatusPB |
typedef struct ICAScannerStatusPB { ICAHeader header; ICAScannerSessionID sessionID; UInt32 status; } ICAScannerStatusPB;
headerSee description for ICAHeader. <->
sessionIDA session ID of the scanner whose status is being fetched. <--
statusA status value. -->
ICAUnloadDeviceModulePB |
typedef struct ICAUnloadDeviceModulePB { ICAHeader header; ICAObject deviceObject; } ICAUnloadDeviceModulePB;
headerSee description for ICAHeader. <->
deviceObject<-- A device ICAObject.
ICAUploadFilePB |
typedef struct ICAUploadFilePB { ICAHeader header; ICAObject parentObject; FSRef *fileFSRef; UInt32 flags; } ICAUploadFilePB;
headerSee 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 ' };
kICAButtonScanScan button.
kICAButtonCopyCopy button.
kICAButtonEMailEmail button.
kICAButtonWebWeb 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' };
kICATypeUInt8UInt8.
kICATypeUInt16UInt16.
kICATypeUInt32UInt32.
kICATypeUInt64UInt64.
kICATypeSInt16SInt16.
kICATypeSInt32SInt32.
kICATypeSInt64SInt64.
kICATypeFloatfloat.
kICATypeFixedIEEE 32-bit floating point.
kICATypeBooleanBoolean.
kICATypeStringChar string.
kICATypeDatavoid *.
kICATypeThumbnailICAThumbnail.
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 };
kICACommunicationErrAn error occurred in communication between different components of Image Capture framework.
kICADeviceNotFoundErrThe specified device is not found.
kICADeviceNotOpenErrThe specified device is not open.
kICAFileCorruptedErrEncountered a corrupt file.
kICAIOPendingErrThere is a pending I/O.
kICAInvalidObjectErrThe specified object is invalid.
kICAInvalidPropertyErrThe specified property is invalid.
kICAIndexOutOfRangeErrThe specified index is out of range.
kICAPropertyTypeNotFoundErrA property with the specified property type is not found.
kICACannotYieldDeviceThe device module cannot yield the specified device to the requestor.
kICADataTypeNotFoundErrData with the specified data type is not found.
kICADeviceMemoryAllocationErrThe device module encountered a memory allocation error.
kICADeviceInternalErrThe device module encountered an unspecifed error.
kICADeviceInvalidParamErrAt least one of the parameters passed to the device module is invalid.
kICADeviceAlreadyOpenErrThe specified device is already open.
kICADeviceLocationIDNotFoundErrThe specified USB Location ID is not found.
kICADeviceGUIDNotFoundErrThe specified FireWire GUID is not found.
kICADeviceIOServicePathNotFoundErrThe specified IOService path is not found.
kICAFrameworkInternalErrImage Capture Framework encountered an error.
kICAExtensionInternalErrImage Capture Extension encountered an error.
kICAInvalidSessionErrThe 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 };
kDeleteAfterDownloadDelete file after a successful download.
kCreateCustomIconCreate a custom icon for Finder.
kAddMetaDataToFinderCommentAdd basic metadata to finder comment field.
kAdjustCreationDateSet creation date of the downloaded file same as the creation date for the file as reported by the device.
kSetFileTypeAndCreatorSet 4-char file type and creator code.
kRotateImageRotate the image.
kDontEmbedColorSyncProfileEmbed 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 };
kICACameraPassThruSendUse this constant when sending data to a device using a pass-through command.
kICACameraPassThruReceiveUse this constant when receiving data from a device using a pass-through command.
kICACameraPassThruNotUsedUse 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' };
kICAMessageConnectConnect to device.
kICAMessageDisconnectDisconnect device.
kICAMessageResetReset device.
kICAMessageCheckDeviceCheck device.
kICAMessageCameraReadClockRead clock from device.
kICAMessageGetLastButtonPressedGet last button pressed on the device (scanner).
kICAMessageGetEventDataGet data associated with an event.
kICAMessageDeviceYieldYield 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' };
kICADeviceObject is a device supported by Image Capture framework.
kICADeviceCameraObject is a camera.
kICADeviceScannerObject is a scanner.
kICADeviceMFPObject is a multi-function peripheral.
kICADevicePhoneObject is a camera phone.
kICADevicePDAObject is a personal digital assistant.
kICADeviceOtherObject is a device supported by Image Capture framework, but of unknown subtype.
kICAListObject is a device list.
kICADirectoryObject is a directory.
kICAFileObject is a file.
kICAFileImageObject is an image file.
kICAFileMovieObject is a movie file.
kICAFileAudioObject is an audio file.
kICAFileFirmwareObject is a firmware file.
kICAFileOtherObject 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' };
kICAPropertyGeneric 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.
kICAPropertyImageWidthImage width.
kICAPropertyImageHeightImage height.
kICAPropertyImageBitDepthImage bit-depth.
kICAPropertyImageDPIImage DPI.
kICAPropertyImageExposureTimeImage exposure time.
kICAPropertyImageFNumberImage f-Number.
kICAPropertyImageDateOriginalOriginal date & time of an object; value associated with this property is a null-terminated string conforming to format "YYYY:MM:DD hh:mm:ss".
kICAPropertyImageDateDigitizedDigitized date & time of an object; value associated with this property is a null-terminated string conforming to format "YYYY:MM:DD hh:mm:ss".
kICAPropertyImageShutterSpeedShutter speed used to capture an image.
kICAPropertyImageApertureAperture used to capture an image.
kICAPropertyImageFlashIndicates whether flash was used to capture an image.
kICAPropertyColorSpaceColor space used to represent an image.
kICAPropertyImageFilenameFilename of an image.
kICAPropertyImageSizeSize of an image in bytes.
kICAPropertyImageDataData of an image.
kICAPropertyImageThumbnailThumbnail of an image.
kICAPropertyColorSyncProfileColorSync profile associated with an image.
Definition of ICAProperties
ImportImage flags. |
enum { kICAAllowMultipleImages = 0x00000001, kICADownloadAndReturnPathArray = 0x00000002 };
kICAAllowMultipleImagesUse this constant to allow users to select multiple images in the Import Image dialog.
kICADownloadAndReturnPathArrayUse 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 };
kICAPBVersionVersion 1 parameter block.
Parameter block version.
PropertyInfo flag values |
enum { kICAFlagReadWriteAccess = 1L << 0, kICAFlagReadAccess = 1L << 1 };
kICAFlagReadWriteAccessAccess for read and write.
kICAFlagReadAccessAccess for read only.
Values for PropertyInfo flag.
Thumbnail formats. |
enum { kICAThumbnailFormatJPEG = 'jpeg', kICAThumbnailFormatTIFF = 'tiff', kICAThumbnailFormatPNG = 'png ' };
kICAThumbnailFormatJPEGUse this constant to receive a thumbnail in JPEG format.
kICAThumbnailFormatTIFFUse this constant to receive a thumbnail in TIFF format.
kICAThumbnailFormatPNGUse 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 };
kICAUploadFileAsIsUse this constant to upload a file as is.
kICAUploadFileScaleToFitUse 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