| Derived from | |
| Framework | AddressBook/ABAddressBookC.h |
| Companion guide | |
| Declared in | ABAddressBookC.h ABTypedefs.h |
ABSearchElement is used to specify a search query for records in the Address Book database.
You can create a simple query by creating an ABSearchElement
object using either the ABGroupCreateSearchElement or ABPersonCreateSearchElement function
for the corresponding record. Then you use the ABAddressBook ABCopyArrayOfMatchingValues function,
passing the ABSearchElement as the parameter, to query the database.
ABSearchElement also provides a function for creating compound
queries. Use the ABSearchElementCreateWithConjunction function
to combine two simple or complex queries into a compound query using
either the kABSearchAnd or kABSearchOr conjunction constants.
Use the ABSearchElementMatchesRecord function
to test whether or not a specific record matches a query.
The ABSearchElement opaque type is “toll-free bridged”
with its Objective-C counterpart. This means that the ABSearchElementRef type
is interchangeable in function or method calls with instances of
the ABSearchElement class.
Returns a compound search element created by combining the search elements in an array with the given conjunction.
ABSearchElementRef ABSearchElementCreateWithConjunction ( ABSearchConjunction conjunction, CFArrayRef childrenSearchElement );
The conjunction used to join the search elements
in children. Can be either kABSearchAnd or kABSearchOr.
An array containing ABSearchElement objects
to be joined using conjunction. If NULL this
function raises an exception.
A new compound search element joining the search elements in children using conjunction. You are responsible for releasing this object.
ABAddressBookC.h
Tests whether or not a record matches a search element.
bool ABSearchElementMatchesRecord ( ABSearchElementRef searchElement, ABRecordRef record );
The search element containing the query you wish to test record with.
The record you wish to test.
Returns true if
the record parameter satisfies the
conditions in the searchElement, false otherwise.
ABAddressBookC.hA reference to an ABSearchElement object.
typedef struct __ABSearchElementRef *ABSearchElementRef;
ABAddressBookC.hConstants used to specify the type of comparison being made.
enum ABSearchComparison { kABEqual, kABNotEqual, kABLessThan, kABLessThanOrEqual, kABGreaterThan, kABGreaterThanOrEqual, kABEqualCaseInsensitive, kABContainsSubString, kABContainsSubStringCaseInsensitive, kABPrefixMatch, kABPrefixMatchCaseInsensitive, kABBitsInBitFieldMatch, kABDoesNotContainSubString, kABDoesNotContainSubStringCaseInsensitive, kABNotEqualCaseInsensitive, kABSuffixMatch, kABSuffixMatchCaseInsensitive, kABWithinIntervalAroundToday, kABWithinIntervalAroundTodayYearless, kABNotWithinIntervalAroundToday, kABNotWithinIntervalAroundTodayYearless, kABWithinIntervalFromToday, kABWithinIntervalFromTodayYearless, kABNotWithinIntervalFromToday, kABNotWithinIntervalFromTodayYearless };
kABEqualSearch for elements that are equal to the value.
Available in Mac OS X v10.2 and later.
Declared in ABTypedefs.h
kABNotEqualSearch for elements that are not equal to the value.
Available in Mac OS X v10.2 and later.
Declared in ABTypedefs.h
kABNotEqualCaseInsensitiveSearch for elements that are not equal to the value, ignoring case.
Available in Mac OS X v10.4 and later.
Declared in ABTypedefs.h
kABLessThanSearch for elements that are less than the value.
Available in Mac OS X v10.2 and later.
Declared in ABTypedefs.h
kABLessThanOrEqualSearch for elements that are less than or equal to the value.
Available in Mac OS X v10.2 and later.
Declared in ABTypedefs.h
kABGreaterThanSearch for elements that are greater than the value.
Available in Mac OS X v10.2 and later.
Declared in ABTypedefs.h
kABGreaterThanOrEqualSearch for elements that are greater than or equal to the value.
Available in Mac OS X v10.2 and later.
Declared in ABTypedefs.h
kABEqualCaseInsensitiveSearch for elements that are equal to the value, ignoring case.
Available in Mac OS X v10.2 and later.
Declared in ABTypedefs.h
kABContainsSubStringSearch for elements that contain the value.
Available in Mac OS X v10.2 and later.
Declared in ABTypedefs.h
kABContainsSubStringCaseInsensitiveSearch for elements that contain the value, ignoring case.
Available in Mac OS X v10.2 and later.
Declared in ABTypedefs.h
kABPrefixMatchSearch for elements that begin with the value.
Available in Mac OS X v10.2 and later.
Declared in ABTypedefs.h
kABPrefixMatchCaseInsensitiveSearch for elements that begin with the value, ignoring case.
Available in Mac OS X v10.2 and later.
Declared in ABTypedefs.h
kABSuffixMatchSearch for elements that end with the value.
Available in Mac OS X v10.4 and later.
Declared in ABTypedefs.h
kABSuffixMatchCaseInsensitiveSearch for elements that end with the value, ignoring case.
Available in Mac OS X v10.4 and later.
Declared in ABTypedefs.h
kABBitsInBitFieldMatchSearch for elements that match the bits in ABPersonFlags.
Available in Mac OS X v10.3 and later.
Declared in ABTypedefs.h
kABDoesNotContainSubStringSearch for elements that do not contain the value.
Available in Mac OS X v10.4 and later.
Declared in ABTypedefs.h
kABDoesNotContainSubStringCaseInsensitiveSearch for elements that do not contain the value, ignoring case.
Available in Mac OS X v10.4 and later.
Declared in ABTypedefs.h
kABWithinIntervalAroundTodaySearch for elements that are within a time interval (in seconds) forward or backward from today.
Available in Mac OS X v10.4 and later.
Declared in ABTypedefs.h
kABWithinIntervalAroundTodayYearlessSearch for elements that are within a time interval (in seconds) forward or backward from this day in any year.
Available in Mac OS X v10.4 and later.
Declared in ABTypedefs.h
kABNotWithinIntervalAroundTodaySearch for elements that are not within a time interval (in seconds) forward or backward from today.
Available in Mac OS X v10.4 and later.
Declared in ABTypedefs.h
kABNotWithinIntervalAroundTodayYearlessSearch for elements that are not within a time interval (in seconds) forward or backward from this day in any year.
Available in Mac OS X v10.4 and later.
Declared in ABTypedefs.h
kABWithinIntervalFromTodaySearch for elements that are within a time interval (in seconds) forward from today.
Available in Mac OS X v10.4 and later.
Declared in ABTypedefs.h
kABWithinIntervalFromTodayYearlessSearch for elements that are within a time interval (in seconds) forward from this day in any year.
Available in Mac OS X v10.4 and later.
Declared in ABTypedefs.h
kABNotWithinIntervalFromTodaySearch for elements that are not within a time interval (in seconds) forward from today.
Available in Mac OS X v10.4 and later.
Declared in ABTypedefs.h
kABNotWithinIntervalFromTodayYearlessSearch for elements that are not within a time interval (in seconds) forward from this day in any year.
Available in Mac OS X v10.4 and later.
Declared in ABTypedefs.h
These constants are used in a call to the ABGroupCreateSearchElement or ABPersonCreateSearchElement function
to specify the type of comparison being made.
Constants used to create compound search elements.
enum ABSearchConjunction { kABSearchAnd = 0, kABSearchOr = 1 };
kABSearchAndJoin the search elements together with the AND operand.
Available in Mac OS X v10.2 and later.
Declared in ABTypedefs.h
kABSearchOrJoin the search elements together with the OR operand.
Available in Mac OS X v10.2 and later.
Declared in ABTypedefs.h
These constants are used to create compound search elements
with the ABSearchElementCreateWithConjunction function.
Last updated: 2005-04-29