ADC Home > Reference Library > Reference > Graphics & Imaging > Hardware & Drivers > Image Capture Device Modules Reference

 


ICADevice.h

Includes:
<ImageCapture/ICAApplication.h>
<AvailabilityMacros.h>

Overview

ICADevice.h defines structures and functions that are used by native Image Capture device modules.



Functions

ICDDisposeObject
A function to dispose an object.
ICDDisposeProperty
A function to dispose a property.
ICDNewObject
A function to create a new object.
ICDNewProperty
A function to create a new property.

ICDDisposeObject


A function to dispose an object.

extern ICAError ICDDisposeObject( 
    ICD_DisposeObjectPB *pb, 
    ICDCompletion completion );  
Parameters
pb
An ICD_DisposeObjectPB structure.
completion
A pointer to a callback function that conforms to the interface of ICDCompletion. Pass NULL to make a synchronous call.
Return Value

Returns an error code. If the function is called asynchronously, it returns 0 if the the call is accepted for asynchronous processing and returns an error code in the header passed to the callback function.

Discussion

Call this function to dispose an object.

Availability
Introduced in Mac OS X v10.0.

ICDDisposeProperty


A function to dispose a property.

extern ICAError ICDDisposeProperty( 
    ICD_DisposePropertyPB *pb, 
    ICDCompletion completion );  
Parameters
pb
An ICD_DisposePropertyPB structure.
completion
A pointer to a callback function that conforms to the interface of ICDCompletion. Pass NULL to make a synchronous call.
Return Value

Returns an error code. If the function is called asynchronously, it returns 0 if the the call is accepted for asynchronous processing and returns an error code in the header passed to the callback function.

Discussion

Call this function to dispose a property.

Availability
Introduced in Mac OS X v10.0.

ICDNewObject


A function to create a new object.

extern ICAError ICDNewObject( 
    ICD_NewObjectPB *pb, 
    ICDCompletion completion );  
Parameters
pb
An ICD_NewObjectPB structure.
completion
A pointer to a callback function that conforms to the interface of ICDCompletion. Pass NULL to make a synchronous call.
Return Value

Returns an error code. If the function is called asynchronously, it returns 0 if the the call is accepted for asynchronous processing and returns an error code in the header passed to the callback function.

Discussion

Call this function to create a new object.

Availability
Introduced in Mac OS X v10.0.

ICDNewProperty


A function to create a new property.

extern ICAError ICDNewProperty( 
    ICD_NewPropertyPB *pb, 
    ICDCompletion completion );  
Parameters
pb
An ICD_NewPropertyPB structure.
completion
A pointer to a callback function that conforms to the interface of ICDCompletion. Pass NULL to make a synchronous call.
Return Value

Returns an error code. If the function is called asynchronously, it returns 0 if the the call is accepted for asynchronous processing and returns an error code in the header passed to the callback function.

Discussion

Call this function to create a new property.

Availability
Introduced in Mac OS X v10.0.

Typedefs


ICD_DisposeObjectPB


typedef struct ICD_DisposeObjectPB { 
    ICDHeader header; 
    ICAObject object; 
} ICD_DisposeObjectPB;  
Fields
header
The function returns error code in the err field of this structure. The refcon field of this structure is used to pass a pointer to the callback function if ICDDisposeObject is called asynchronously.
object
Object to be disposed.
Discussion

Parameter block passed to function ICDDisposeObject.


ICD_DisposePropertyPB


typedef struct ICD_DisposePropertyPB { 
    ICDHeader header; 
    ICAProperty property; 
} ICD_DisposePropertyPB;  
Fields
header
The function returns error code in the err field of this structure. The refcon field of this structure is used to pass a pointer to the callback function if ICDDisposeProperty is called asynchronously.
property
Property to be disposed.
Discussion

Parameter block passed to function ICDDisposeProperty.


ICD_NewObjectPB


typedef struct ICD_NewObjectPB { 
    ICDHeader header; 
    ICAObject parentObject; 
    ICAObjectInfo objectInfo; 
    ICAObject object; 
} ICD_NewObjectPB;  
Fields
header
The function returns error code in the err field of this structure. The refcon field of this structure is used to pass a pointer to the callback function if ICDNewObject is called asynchronously.
parentObject
Parent object of the new object.
objectInfo
ICAObjectInfo struct filled with information about the new object.
object
New object.
Discussion

Parameter block passed to function ICDNewObject.


ICD_NewPropertyPB


typedef struct ICD_NewPropertyPB { 
    ICDHeader header; 
    ICAObject object; 
    ICAPropertyInfo propertyInfo; 
    ICAProperty property; 
} ICD_NewPropertyPB;  
Fields
header
The function returns error code in the err field of this structure. The refcon field of this structure is used to pass a pointer to the callback function if ICDNewProperty is called asynchronously.
object
Object for which the property will be created.
propertyInfo
ICAPropertyInfo struct filled with information about the new property.
property
New property.
Discussion

Parameter block passed to function ICDNewProperty.


ICDCompletion


See Also:
void
typedef CALLBACK_API_C( void,
    ICDCompletion )(
    ICDHeader *pb);  
Parameters
pb
The parameter pb is a pointer to the parameter block passed to the API.
Discussion

Type of callback function used by APIs defined in ICADevices.h.


ICDHeader


typedef struct ICDHeader { 
    ICAError err; 
    unsigned long refcon; 
} ICDHeader;  
Fields
err
Error returned by an API. -->
refcon
An arbitrary refcon value passed to the callback. <--
Discussion

This is the first field in all parameter blocks used by APIs defined in ICADevices.h. Type of parameter passed to a callback function used by APIs defined in ICADevices.h. The parameter for the completion proc should to be casted to an appropriate type such as ICD_NewObjectPB* for it to be useful.


void


See Also:
ICDCompletion
typedef CALLBACK_API_C( void,
    ICDCompletion )(
    ICDHeader *pb);  
Fields
pb
The parameter pb is a pointer to the parameter block passed to the API.
Discussion

Type of callback function used by APIs defined in ICADevices.h.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.
Last Updated: 2008-03-11