| Framework | AddressBook/AddressBook.h |
| Declared in | ABGroup.h |
The ABGroup opaque type (objects of which are known as groups) can contain other groups or persons records. Persons may belong to multiple groups, and groups may belong to other groups, as long as the relationship does not cause a circular reference.
The only predefined property of a group is its name. However, similar to person records, you can add properties to group records. Groups not only help to organize person records, but allow you to create email distribution lists.
ABGroupAddMember
ABGroupRemoveMember
ABGroupCopyArrayOfAllMembers
ABGroupCopyArrayOfAllMembersWithSortOrdering
Returns the group with a given record ID.
ABRecordRef ABAddressBookGetGroupWithRecordID ( ABAddressBookRef addressBook, ABRecordID recordID );
The address book in which to look for the record.
The record ID for which to search addressBook.
If found, the group with recordID as its identifier; otherwise, NULL.
ABGroup.hAdds a record to a group.
bool ABGroupAddMember ( ABRecordRef group, ABRecordRef person, CFErrorRef *error );
The group to which to add record.
The record to add to group.
On error, information about the cause.
true when person is added to group, false otherwise.
ABGroup.hReturns the records in a group.
CFArrayRef ABGroupCopyArrayOfAllMembers ( ABRecordRef group );
The group whose records to return.
Array containing the records in group.
ABGroup.hReturns the records in a group, using a sort ordering.
CFArrayRef ABGroupCopyArrayOfAllMembersWithSortOrdering ( ABRecordRef group, ABPersonSortOrdering sortOrdering );
The group whose records to return.
The order in which you want the returned records. See “Sort Order” in ABPerson Reference.
Array containing the records in group using sortOrdering.
ABGroup.hCreates a group record.
ABRecordRef ABGroupCreate ( void );
New, empty group.
ABGroup.hRemoves a record from a group.
bool ABGroupRemoveMember ( ABRecordRef group, ABRecordRef member, CFErrorRef *error );
The group from which to remove record.
The record to remove from group.
On error, information about the cause.
true when record is removed from group, false otherwise.
ABGroup.hThis constant identify the properties of groups.
const int kABGroupNameProperty;
Last updated: 2009-05-15