Function

ABPersonCreateSearchElement

Returns a search element object that specifies a query for records of this type.

Declaration

ABSearchElementRef ABPersonCreateSearchElement(CFStringRef property, CFStringRef label, CFStringRef key, CFTypeRef value, ABSearchComparison comparison);

Parameters

property

The name of the property to search on. It cannot be NULL. For a full list of the properties, see Person Properties and Common Properties in ABRecord.

label

The label name for a multi-value list. If property does not have multiple values, pass NULL. If property does have multiple values, pass NULL to search all the values.

key

The key name for a dictionary. If property is not a dictionary, pass NULL. If property is a dictionary, pass NULL to search all keys.

value

The value you are searching for. It cannot be NULL

comparison

Specifies the type of comparison to perform, such as kABEqual or kABPrefixMatchCaseInsensitive. For a full list, see ABSearchComparison.

Return Value

A search element object that specifies a query according to the above parameters. You are responsible for releasing this object.

Discussion

Use the ABAddressBook ABCopyArrayOfMatchingRecords function to actually perform the query. Also, see ABSearchElement C for more functions that create compound queries.

See Also

People

ABCopyArrayOfAllPeople

Returns an array of all the people in the Address Book database.

ABGetMe

Returns the ABPerson object for the logged-in user.

ABPersonCopyImageData

Returns data that contains a picture of a person.

ABPersonCopyParentGroups

Returns an array of groups that a person belongs to.

ABPersonCopyVCardRepresentation

Returns the vCard representation of the person as a data object in vCard format.

ABPersonCreate

Returns a newly created person object.

ABPersonCreateWithVCardRepresentation

Returns a new ABPerson object initialized with the given data in vCard format.

ABPersonSetImageData

Sets the image for this person to the given data.

ABSetMe

Sets the record that represents the logged-in user.