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.

ICDNewObject

A function to create a new object.


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.

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.

Typedefs

ICD_DisposeObjectPB
ICD_NewObjectPB
ICDCompletion
ICDHeader
void

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_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.


ICDCompletion


See Also:

void

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.


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 It's good, but... Not helpful...

 

Last Updated: 2009-08-12