Function

ODQueryScheduleWithRunLoop

Retrieves results from a query asynchronously by scheduling the query in a run loop.

Declaration

void ODQueryScheduleWithRunLoop(ODQueryRef query, CFRunLoopRef runLoop, CFStringRef runLoopMode);

Parameters

inQuery

The query.

inRunLoop

The run loop.

inRunLoopMode

The mode of the run loop.

Discussion

This function spawns a new thread to execute the query in inRunLoop. When the query is complete, the query’s callback function is called with both inResults and inError set to NULL. To remove an incomplete query from its run loop, call ODQueryUnscheduleFromRunLoop.

See Also

Working with Queries

ODQueryCopyResults

Returns results from a query synchronously.

ODQueryCreateWithNode

Creates a query with a node using provided parameters.

ODQueryCreateWithNodeType

Creates a query for a particular node type using provided parameters.

ODQueryGetTypeID

Returns the type ID for an Open Directory query.

ODQuerySetCallback

Sets the callback for an asynchronous query.

ODQuerySetDispatchQueue

Retrieves results from a query asynchronously by adding the query to a dispatch queue.

ODQuerySynchronize

Restarts a query, disposing of any results it has obtained.

ODQueryUnscheduleFromRunLoop

Removes a query from a specified run loop.