| Derived from | CFTypeRef |
| Framework | AddressBook/AddressBook.h |
| Declared in | ABRecord.h |
The ABRecord opaque type (objects of which are known as a records) provides a common interface to the records in the Address Book database. It defines common properties for all records. A property is a field in a record such as the first or last name of a person record.
Each record in the Address Book database has a unique ID, which you obtain using the ABRecordGetRecordID function.
Returns an appropriate, human-friendly name for the record.
CFStringRef ABRecordCopyCompositeName ( ABRecordRef record );
The record whose name to return.
For group records: The value of the group name property (kABGroupNameProperty).
For person records: The concatenated value of these properties: Prefix, Suffix, Organization, First name, and Last name.
ABRecord.hReturns the value of a record property.
CFTypeRef ABRecordCopyValue ( ABRecordRef record, ABPropertyID property );
The record containing the property in question.
The property of record whose value to return. See properties in “Constants” in ABPerson Reference and “Constants” in ABGroup Reference.
The value of property in record.
ABRecord.hReturns the unique ID of a record.
ABRecordID ABRecordGetRecordID ( ABRecordRef record );
The record whose ID to return.
The unique ID of record when the record exists in the Address Book database.
kABRecordInvalidID when the record hasn’t been saved to the database.
ABRecord.hReturns the type of a record.
ABRecordType ABRecordGetRecordType ( ABRecordRef record );
The record whose type to return.
The record type of record, which can be one of these:
kABPersonType for person records
kABGroupType for group records.
ABRecord.hRemoves the value of a record property.
bool ABRecordRemoveValue ( ABRecordRef record, ABPropertyID property, CFErrorRef *error );
The record with the property in question.
The property, in record, whose value to remove. See properties in “Constants” in ABPerson Reference and “Constants” in ABGroup Reference.
On failure, information about its cause.
true on success, false otherwise.
ABRecord.hSets the value of a record property.
bool ABRecordSetValue ( ABRecordRef record, ABPropertyID property, CFTypeRef value, CFErrorRef *error );
The record containing the property in question.
The property whose value to set. See properties in “Constants” in ABPerson Reference and “Constants” in ABGroup Reference.
The new value. Pass NULL to remove the property from record.
On failure, information about its cause.
true when successful, false otherwise.
ABRecord.hReference to a record.
typedef CFTypeRef ABRecordRef;
ABRecord.hInteger that identifies a record.
typedef int32_t ABRecordID;
Valid record IDs are positive integers.
See “Invalid Record ID”.
ABRecord.hInteger that identifies a record property.
typedef int32_t ABPropertyID;
See properties listed in “Constants” in ABPerson Reference and “Constants” in ABGroup Reference
ABRecord.hInteger that identifies a record type.
typedef uint32_t ABRecordType;
See “Record Types”.
ABRecord.hInteger that identifies a record property type.
typedef uint16_t ABPropertyType;
ABRecord.hThese constants identify record types.
enum {
kABPersonType = 0,
kABGroupType = 1
};
kABPersonTypePerson record.
Available in iPhone OS 2.0 and later.
Declared in ABRecord.h.
kABGroupTypeGroup record.
Available in iPhone OS 2.0 and later.
Declared in ABRecord.h.
See ABRecordType.
Indicates a multivalue property.
#define kABMultiValueMask (1 << 8)
kABMultiValueMaskIndicates a multivalue property.
Available in iPhone OS 2.0 and later.
Declared in ABRecord.h.
These constants identify record property types.
enum {
kABInvalidPropertyType = 0x0,
kABStringPropertyType = 0x1,
kABIntegerPropertyType = 0x2,
kABRealPropertyType = 0x3,
kABDateTimePropertyType = 0x4,
kABDictionaryPropertyType = 0x5,
kABMultiStringPropertyType = kABMultiValueMask | kABStringPropertyType
kABMultiIntegerPropertyType = kABMultiValueMask | kABIntegerPropertyType
kABMultiRealPropertyType = kABMultiValueMask | kABRealPropertyType
kABMultiDateTimePropertyType = kABMultiValueMask | kABDateTimePropertyType
kABMultiDictionaryPropertyType = kABMultiValueMask | kABDictionaryPropertyType
};
kABInvalidPropertyTypeInvalid property.
Available in iPhone OS 2.0 and later.
Declared in ABRecord.h.
kABStringPropertyTypeString property. Returned as CFStringRef object.
Available in iPhone OS 2.0 and later.
Declared in ABRecord.h.
kABIntegerPropertyTypeInteger property. Returned as a CFNumberRef object.
Available in iPhone OS 2.0 and later.
Declared in ABRecord.h.
kABRealPropertyTypeReal property. Returned as a CFNumberRef object.
Available in iPhone OS 2.0 and later.
Declared in ABRecord.h.
kABDateTimePropertyTypeDate-time property. Returned as a CFDateRef object.
Available in iPhone OS 2.0 and later.
Declared in ABRecord.h.
kABDictionaryPropertyTypeDictionary property. Returned as a CFDictionaryRef object.
Available in iPhone OS 2.0 and later.
Declared in ABRecord.h.
kABMultiStringPropertyTypeMultistring property. Returned as an ABMultiValueIdentifier of CFStringRef objects.
Available in iPhone OS 2.0 and later.
Declared in ABRecord.h.
kABMultiIntegerPropertyTypeMultiinteger property. Returned as an ABMultiValueIdentifier of CFNumberRef objects.
Available in iPhone OS 2.0 and later.
Declared in ABRecord.h.
kABMultiRealPropertyTypeMultireal property. Returned as an ABMultiValueIdentifier of CFNumberRef objects.
Available in iPhone OS 2.0 and later.
Declared in ABRecord.h.
kABMultiDateTimePropertyTypeMulti–date-time property. Returned as an ABMultiValueIdentifier of CFDateRef objects.
Available in iPhone OS 2.0 and later.
Declared in ABRecord.h.
kABMultiDictionaryPropertyTypeMultidictionary property. Returned as an ABMultiValueIdentifier of CFDictionaryRef objects.
Available in iPhone OS 2.0 and later.
Declared in ABRecord.h.
See ABPropertyType.
These macros identify invalid for record and property identifiers.
#define kABRecordInvalidID -1 #define kABPropertyInvalidID -1
kABRecordInvalidIDRecords with this ID have not been saved to the Address Book database.
Available in iPhone OS 2.0 and later.
Declared in ABRecord.h.
kABPropertyInvalidIDIndicates an invalid value for a property ID.
Available in iPhone OS 3.0 and later.
Declared in ABRecord.h.
Last updated: 2009-05-27