Function

ABGroupSetDistributionIdentifier

Assigning a specific distribution identifier for a person’s multi-value list property so that the group can be used as a distribution list (mailing list, in the case of an email property).

Declaration

bool ABGroupSetDistributionIdentifier(ABGroupRef group, ABPersonRef person, CFStringRef property, CFStringRef identifier);

Parameters

group

The group that person belongs to.

person

The person whose distribution identifier for property you wish to change. If NULL, this function raises an exception.

property

The multi-value list property whose distribution identifier you wish to change.

identifier

The new distribution identifier, a label used by a multi-value list such as kABAddressHomeLabel for a kABAddressProperty. Pass NULL to reset the distribution identifier to its default, a multi-value list’s primary identifier.

Return Value

true if successful, false otherwise.

Discussion

The default distribution identifier is a multi-value list’s primary identifier. Use this function if you need to change the distribution identifier for a particular person. For example, if the default identifier is a person’s home email but you want to use John’s work email, invoke this function passing kABEmailWorkLabel as the identifier parameter, kABEmailProperty as the property parameter, and John’s person object as the person parameter.

See Also

Groups

ABCopyArrayOfAllGroups

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

ABGroupAddGroup

Adds a subgroup to another group.

ABGroupAddMember

Adds a person to a group.

ABGroupCopyArrayOfAllMembers

Returns an array of persons in a group.

ABGroupCopyArrayOfAllSubgroups

Returns an array containing a group’s subgroups.

ABGroupCopyDistributionIdentifier

Returns the distribution identifier for the given property and person.

ABGroupCopyParentGroups

Returns an array containing a group’s parents—the groups that a group belongs to.

ABGroupCreate

Returns a new ABGroup object.

ABGroupCreateSearchElement

Creates an ABSearchElement object that specifies a query for ABGroup records.

ABGroupRemoveGroup

Removes a subgroup from a group.

ABGroupRemoveMember

Removes a person from a group.