ABMutableMultiValue Reference

Derived from
CFTypeRef
Framework
AddressBook/AddressBook.h
Declared in
ABMultiValue.h

Overview

The ABMutableMultiValue opaque type (whose objects are known as mutable multivalues) implements a mutable multivalue property—that is, a property whose value set can be modified. This opaque type extends the capabilities of ABMultiValue.

Functions by Task

Creating Properties

Getting Properties

Managing Property Values

Functions

ABMultiValueAddValueAndLabel

Adds a value and its corresponding label to a multivalue property.

bool ABMultiValueAddValueAndLabel (
   ABMutableMultiValueRef multiValue,
   CFTypeRef value,
   CFStringRef label,
   ABMultiValueIdentifier *outIdentifier
);
Parameters
multiValue

The multivalue property to add value and label to.

value

The value to add to multiValue.

label

The label for value.

outIdentifier

The address at which to place the identifier of the added value. Pass NULL to ignore the identifier.

Return Value

true when value is added to multiValue successfully, false otherwise.

Discussion

This function performs no type checking. It allows the addition of values whose type does not match the type declared for multiValue.

Availability
  • Available in iOS 2.0 and later.
Related Sample Code
Declared In
ABMultiValue.h

ABMultiValueCreateMutable

Returns a new, empty, mutable multivalue property.

ABMutableMultiValueRef ABMultiValueCreateMutable (
   ABPropertyType type
);
Parameters
type

The type of the values that the new property will contain.

Return Value

An empty multivalue property whose values will be of type type.

Availability
  • Available in iOS 2.0 and later.
Related Sample Code
Declared In
ABMultiValue.h

ABMultiValueCreateMutableCopy

Returns a mutable copy of a multivalue property.

ABMutableMultiValueRef ABMultiValueCreateMutableCopy (
   ABMultiValueRef multiValue
);
Parameters
multiValue

The multivalue property being copied.

Return Value

A mutable copy of multiValue.

Availability
  • Available in iOS 2.0 and later.
Declared In
ABMultiValue.h

ABMultiValueInsertValueAndLabelAtIndex

Inserts a value and a label into a multivalue property.

bool ABMultiValueInsertValueAndLabelAtIndex (
   ABMutableMultiValueRef multiValue,
   CFTypeRef value,
   CFStringRef label,
   CFIndex index,
   ABMultiValueIdentifier *outIdentifier
);
Parameters
multiValue

The multivalue property into which to insert value.

value

The value to insert.

label

The label to insert.

index

The location, in multiValue, at which to insert value and label.

Raises an exception when out of bounds.

outIdentifier

On output, the identifier of the added value.

Return Value

true when value and label are inserted successfully into multiValue, false otherwise.

Discussion

This function performs no type checking. It allows the insertion of values whose type does not match the type declared for multiValue.

This function takes an index. If you have an identifier, use the ABMultiValueGetIndexForIdentifier function to get the corresponding index.

Availability
  • Available in iOS 2.0 and later.
Declared In
ABMultiValue.h

ABMultiValueRemoveValueAndLabelAtIndex

Removes a value from a multivalue property.

bool ABMultiValueRemoveValueAndLabelAtIndex (
   ABMutableMultiValueRef multiValue,
   CFIndex index
);
Parameters
multiValue

The multivalue property from which to remove the value at index.

index

The location, in multiValue, of the value being removed.

Raises an exception when out of bounds.

Return Value

true when successful, false otherwise.

Discussion

This function takes an index. If you have an identifier, use the ABMultiValueGetIndexForIdentifier function to get the corresponding index.

Availability
  • Available in iOS 2.0 and later.
Declared In
ABMultiValue.h

ABMultiValueReplaceLabelAtIndex

Replaces a label in a multivalue property with another label.

bool ABMultiValueReplaceLabelAtIndex (
   ABMutableMultiValueRef multiValue,
   CFStringRef label,
   CFIndex index
);
Parameters
multiValue

The multivalue property containing the label to replace.

label

The new label.

index

The location, in multiValue, of the label to replace.

Raises an exception when out of bounds.

Return Value

true when successful, false otherwise.

Discussion

This function takes an index. If you have an identifier, use the ABMultiValueGetIndexForIdentifier function to get the corresponding index.

Availability
  • Available in iOS 2.0 and later.
Declared In
ABMultiValue.h

ABMultiValueReplaceValueAtIndex

Replaces a value in a multivalue property with another value.

bool ABMultiValueReplaceValueAtIndex (
   ABMutableMultiValueRef multiValue,
   CFTypeRef value,
   CFIndex index
);
Parameters
multiValue

The multivalue property containing the value to replace.

value

The new value.

index

The location, in multiValue, of the value to replace.

Raises an exception when out of bounds.

Return Value

true when successful, false otherwise.

Discussion

This function takes an index. If you have an identifier, use the ABMultiValueGetIndexForIdentifier function to get the corresponding index.

Availability
  • Available in iOS 2.0 and later.
Declared In
ABMultiValue.h

Data Types

ABMutableMultiValueRef

Reference to a mutable multivalue property.

typedef CFTypeRef ABMutableMultiValueRef;
Availability
  • Available in iOS 2.0 and later.
Declared In
ABMultiValue.h