| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AddressBook.framework |
| Availability | Available in Mac OS X v10.2 and later. |
| Companion guide | |
| Declared in | ABSearchElement.h ABTypedefs.h |
| Related sample code |
TABSearchElement class is used to specify a search query for records in the Address Book database.
The ABSearchElement class is “toll-free bridged” with its procedural C opaque-type 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.
+ (ABSearchElement *)searchElementForConjunction:(ABSearchConjunction)conjunction children:(NSArray *)children
The logical operator with which to combine the search elements.
An array of search elements to be combined.
A compound search element, created by combining the given search elements with the given conjunction
The objects in the children array must be ABSearchElement objects. The conjunction can be kABSearchAnd or kABSearchOr. If children is nil or empty, this method raises an exception.
+ searchElementForProperty:label:key:value:comparison: (ABPerson)+ searchElementForProperty:label:key:value:comparison: (ABGroup)– recordsMatchingSearchElement: (ABAddressBook)ABSearchElement.hTests whether or not a record matches a search element.
- (BOOL)matchesRecord:(ABRecord *)record
The record to be tested against the search object.
YES if the record argument satisfies the conditions in the search element; otherwise, NO.
If record is nil, this method raises an exception.
+ searchElementForProperty:label:key:value:comparison: (ABPerson)+ searchElementForProperty:label:key:value:comparison: (ABGroup)+ searchElementForConjunction:children:ABSearchElement.hLogical operators used to combine search elements.
enum _ABSearchConjunction { kABSearchAnd, kABSearchOr }; typedef CFIndex ABSearchConjunction;
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 by the searchElementForConjunction:children: method.
Comparisons used to construct search elements.
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 }; typedef CFIndex ABSearchComparison;
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.
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.
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.
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.
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.
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 by the ABPerson method searchElementForProperty:label:key:value:comparison: and the ABGroup method searchElementForProperty:label:key:value:comparison:
Last updated: 2009-07-24