CGDataProviderCreateDirectAccess

Creates a direct-access data provider.

Declaration

CGDataProviderRef CGDataProviderCreateDirectAccess (
   void *info,
   size_t size,
   const CGDataProviderDirectAccessCallbacks *callbacks
);

Parameters

info

A pointer to data of any type or NULL. When Core Graphics calls the functions specified in the callbacks parameter, it sends each of the functions this pointer.

size

A value that specifies the number of bytes that the data provider contains.

callbacks

A pointer to a CGDataProviderDirectAccessCallbacks structure that specifies the callback functions you implement to handle the data provider’s basic memory management. For a complete description, see CGDataProviderDirectAccessCallbacks.

Return Value

A new data provider. You are responsible for releasing this object using CGDataProviderRelease.

Overview

You use this function to create a direct-access data provider that uses callback functions to read data from your program in a single block.

See Also

CGDataProvider Miscellaneous Functions

CGDataProviderCreate

Creates a sequential-access data provider.

CGDataProviderCreateWithData

Creates a direct-access data provider that uses data your program supplies.

CGDataProviderCreateWithURL

Creates a direct-access data provider that uses a URL to supply data.

CGDataProviderCreateWithFilename

Creates a direct-access data provider that uses a file to supply data.

CGDataProviderCreateWithCFData

Creates a data provider that reads from a CFData object.

CGDataProviderGetTypeID

Returns the Core Foundation type identifier for data providers.

CGDataProviderCopyData

Returns a copy of the provider’s data.

CGDataProviderRelease

Decrements the retain count of a data provider.

CGDataProviderRetain

Increments the retain count of a data provider.

CGDataProviderCreateSequential

Creates a sequential-access data provider.

CGDataProviderCreateDirect

Creates a direct-access data provider.