MDQueryGetIndexOfResult(_:_:)
Returns the current index of the given result.
Declaration
func MDQueryGetIndexOfResult(_ query: MDQuery!, _ result: UnsafeRawPointer!) -> CFIndexParameters
- query:
The query.
- result:
The result object to search for. If a custom create-result function has been set and this parameter is not a valid result object that the provided callbacks can handle, the behavior is undefined. If a custom create-result function has not been set this parameter must be a valid MDItemRef.
Return Value
The index of the given result, or kCFNotFound if the value is not one of the query's existing results. If you provided a custom result creation function result, the result will be objects created by that function.
Discussion
If a result-create function has been set, and the equal callback is non-NULL, it will be used to test the query's results against the candidate result.
Note that the index of a result can change over time if the query allows live-updates.