Derived from | CFTypeRef |
Framework | AddressBook/AddressBook.h |
Declared in | ABRecord.h |
The ABRecord
opaque type (whose objects are known as 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 is being returned.
For person records: The concatenated value of these properties: Prefix, Suffix, Organization, First name, and Last name.
For group records: The value of the group name property (kABGroupNameProperty
).
The behavior of this function is not defined for source records.
ABRecord.h
Returns 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 is being returned. See properties in “Constants” in ABPerson Reference and “Constants” in ABGroup Reference.
The value of property in record.
ABRecord.h
Returns the unique ID of a record.
ABRecordID ABRecordGetRecordID ( ABRecordRef record );
The record whose ID is being returned.
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.h
Returns the type of a record.
ABRecordType ABRecordGetRecordType ( ABRecordRef record );
The record whose type is being returned.
The record type of record, which can be one of these:
kABPersonType
for person records
kABGroupType
for group records.
kABSourceType for source records.
ABRecord.h
Removes 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 is being removed. See properties in “Constants” in ABPerson Reference and “Constants” in ABGroup Reference.
On failure, information about its cause.
true
on success, false
otherwise.
ABRecord.h
Sets 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 is being 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.h
Reference to a record.
typedef CFTypeRef ABRecordRef;
ABRecord.h
Integer that identifies a record.
typedef int32_t ABRecordID;
ABRecord.h
Integer that identifies a record property.
typedef int32_t ABPropertyID;
See properties listed in “Constants” in ABPerson Reference and “Constants” in ABGroup Reference
ABRecord.h
Integer that identifies a record type.
typedef uint32_t ABRecordType;
See “Record Types”
.
ABRecord.h
Integer that identifies a record property type.
typedef uint16_t ABPropertyType;
ABRecord.h
These constants identify record types.
enum {     kABPersonType = 0,     kABGroupType  = 1 };
kABPersonType
Person record.
Available in iOS 2.0 and later.
Declared in ABRecord.h
.
kABGroupType
Group record.
Available in iOS 2.0 and later.
Declared in ABRecord.h
.
See ABRecordType
.
Indicates a multivalue property.
#define kABMultiValueMask (1 << 8)
kABMultiValueMask
Indicates a multivalue property.
Available in iOS 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 };
kABInvalidPropertyType
Invalid property.
Available in iOS 2.0 and later.
Declared in ABRecord.h
.
kABStringPropertyType
String property. Returned as a CFStringRef
object.
Available in iOS 2.0 and later.
Declared in ABRecord.h
.
kABIntegerPropertyType
Integer property. Returned as a CFNumberRef
object.
Available in iOS 2.0 and later.
Declared in ABRecord.h
.
kABRealPropertyType
Real property. Returned as a CFNumberRef
object.
Available in iOS 2.0 and later.
Declared in ABRecord.h
.
kABDateTimePropertyType
Date-time property. Returned as a CFDateRef
object.
Available in iOS 2.0 and later.
Declared in ABRecord.h
.
kABDictionaryPropertyType
Dictionary property. Returned as a CFDictionaryRef
object.
Available in iOS 2.0 and later.
Declared in ABRecord.h
.
kABMultiStringPropertyType
Multistring property. Returned as an ABMultiValueIdentifier
of CFStringRef
objects.
Available in iOS 2.0 and later.
Declared in ABRecord.h
.
kABMultiIntegerPropertyType
Multiinteger property. Returned as an ABMultiValueIdentifier
of CFNumberRef
objects.
Available in iOS 2.0 and later.
Declared in ABRecord.h
.
kABMultiRealPropertyType
Multireal property. Returned as an ABMultiValueIdentifier
of CFNumberRef
objects.
Available in iOS 2.0 and later.
Declared in ABRecord.h
.
kABMultiDateTimePropertyType
Multi–date-time property. Returned as an ABMultiValueIdentifier
of CFDateRef
objects.
Available in iOS 2.0 and later.
Declared in ABRecord.h
.
kABMultiDictionaryPropertyType
Multidictionary property. Returned as an ABMultiValueIdentifier
of CFDictionaryRef
objects.
Available in iOS 2.0 and later.
Declared in ABRecord.h
.
See ABPropertyType
.
These macros identify invalid values for record and property identifiers.
#define kABRecordInvalidID -1 #define kABPropertyInvalidID -1
kABRecordInvalidID
Records with this ID have not been saved to the Address Book database.
Available in iOS 2.0 and later.
Declared in ABRecord.h
.
kABPropertyInvalidID
Indicates an invalid value for a property ID.
Available in iOS 3.0 and later.
Declared in ABRecord.h
.
Last updated: 2010-05-18