ABSource Reference
| Framework | AddressBook/AddressBook.h |
| Declared in | ABSource.h |
Overview
Sources of contact information are represented by instances of the ABRecordRef opaque type, whose record type is kABSourceType. Examples of sources include the local address book database, CardDAV servers, and social networking sites.
Not all sources support groups. Each record in the address book database can belong to only one source. Folders from Exchange accounts are represented in the address book database as sources.
Functions
ABAddressBookCopyArrayOfAllSources
Returns an array of all sources in the address book.
CFArrayRef ABAddressBookCopyArrayOfAllSources ( ABAddressBookRef addressBook );
Parameters
- addressBook
The address book whose source records are being returned.
Return Value
Array containing the source records in addressBook.
Availability
- Available in iOS 4.0 and later.
Declared In
ABSource.hABAddressBookCopyDefaultSource
Returns the default source.
ABRecordRef ABAddressBookCopyDefaultSource ( ABAddressBookRef addressBook );
Parameters
- addressBook
The address book whose default source is being returned.
Return Value
The default source record.
Discussion
This is the source used when creating new records if no source is specified.
Availability
- Available in iOS 4.0 and later.
Declared In
ABSource.hABAddressBookGetSourceWithRecordID
Returns the source record with the given record ID.
ABRecordRef ABAddressBookGetSourceWithRecordID ( ABAddressBookRef addressBook, ABRecordID sourceID );
Parameters
- addressBook
The address book in which to search for recordID.
- sourceID
The record identifier to seek in addressBook.
Return Value
If found, the source record with recordID as its identifier, otherwise NULL.
Availability
- Available in iOS 4.0 and later.
Declared In
ABSource.hData Types
ABSourceType
Indicates a source type. See “Source Properties.”
typedef int ABSourceType;
Availability
- Available in iOS 4.0 and later.
Declared In
ABSource.hConstants
Searchable Sources
Indicates that a source is searchable.
#define kABSourceTypeSearchableMask 0x01000000
Constants
kABSourceTypeSearchableMaskIndicates that a source is searchable.
Available in iOS 4.0 and later.
Declared in
ABSource.h.
Source Types
These constants identify the type of a source.
enum {
kABSourceTypeLocal = 0x0,
kABSourceTypeExchange = 0x1,
kABSourceTypeExchangeGAL = kABSourceTypeExchange | kABSourceTypeSearchableMask,
kABSourceTypeMobileMe = 0x2,
kABSourceTypeLDAP = 0x3 | kABSourceTypeSearchableMask,
kABSourceTypeCardDAV = 0x4,
kABSourceTypeCardDAVSearch = kABSourceTypeCardDAV | kABSourceTypeSearchableMask,
};
typedef int ABSourceType;
Constants
kABSourceTypeLocalLocal address book database.
Available in iOS 4.0 and later.
Declared in
ABSource.h.kABSourceTypeExchangeExchange server.
Available in iOS 4.0 and later.
Declared in
ABSource.h.kABSourceTypeExchangeGALExchange Global Address List.
Available in iOS 4.0 and later.
Declared in
ABSource.h.kABSourceTypeMobileMeMobileMe.
Available in iOS 4.0 and later.
Declared in
ABSource.h.kABSourceTypeLDAPLDAP server.
Available in iOS 4.0 and later.
Declared in
ABSource.h.kABSourceTypeCardDAVCardDAV server.
Available in iOS 4.0 and later.
Declared in
ABSource.h.kABSourceTypeCardDAVSearchSearchable CardDAV server.
Available in iOS 4.0 and later.
Declared in
ABSource.h.
Source Properties
These constants identify source properties.
const ABPropertyID kABSourceNameProperty; const ABPropertyID kABSourceTypeProperty;
Constants
kABSourceNamePropertyThe name of the source. Type:
kABStringPropertyType.Available in iOS 4.0 and later.
Declared in
ABSource.h.kABSourceTypePropertyThe type of the source. Type:
ABSourceTypeAvailable in iOS 4.0 and later.
Declared in
ABSource.h.
© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-03-29)