/*
* ABPerson.h
* AddressBook
*
* Copyright (c) 2010-2015 Apple Inc. All rights reserved.
*
* An ABPerson corresponds to a contact such as a person or organization.
*
*/
// ABPersonCreate creates a new person in the default source
@available(iOS, introduced=2.0, deprecated=9.0, message="use [[CNMutableContact alloc] init]")
public func ABPersonCreate() -> Unmanaged<ABRecord>!
@available(iOS, introduced=2.0, deprecated=9.0, message="use [[CNMutableContact alloc] init] and [CNSaveRequest addContact:toContainerWithIdentifier:]")
public func ABPersonCreateInSource(source: ABRecord!) -> Unmanaged<ABRecord>!
@available(iOS, introduced=2.0, deprecated=9.0, message="use [CNContactStore containersMatchingPredicate:[CNContainer predicateForContainerOfContactWithIdentifier:] error:]")
public func ABPersonCopySource(person: ABRecord!) -> Unmanaged<ABRecord>!
// Returns an array of all the linked people, including the person passed in. If the person is not linked, returns an array with the person passed in.
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContactFetchRequest with predicate = [CNContact predicateForContactsLinkedToContact:] and unifyResults = NO")
public func ABPersonCopyArrayOfAllLinkedPeople(person: ABRecord!) -> Unmanaged<CFArray>!
@available(iOS, introduced=2.0, deprecated=9.0)
public func ABPersonGetTypeOfProperty(property: ABPropertyID) -> ABPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use [CNContact localizedStringForKey:]")
public func ABPersonCopyLocalizedPropertyName(property: ABPropertyID) -> Unmanaged<CFString>!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContactSortOrder")
public typealias ABPersonSortOrdering = UInt32
public var kABPersonSortByFirstName: Int { get } // deprecated, use CNContactSortOrderGivenName
public var kABPersonSortByLastName: Int { get } // deprecated, use CNContactSortOrderFamilyName"
@available(iOS, introduced=2.0, deprecated=9.0, message="use [[CNContactsUserDefaults sharedDefaults] sortOrder]")
public func ABPersonGetSortOrdering() -> ABPersonSortOrdering
@available(iOS, introduced=2.0, deprecated=9.0)
public typealias ABPersonCompositeNameFormat = UInt32
public var kABPersonCompositeNameFormatFirstNameFirst: Int { get } // deprecated
public var kABPersonCompositeNameFormatLastNameFirst: Int { get } // deprecated
// Composite Names
@available(iOS, introduced=2.0, deprecated=9.0)
public func ABPersonGetCompositeNameFormat() -> ABPersonCompositeNameFormat
@available(iOS, introduced=2.0, deprecated=9.0)
public func ABPersonGetCompositeNameFormatForRecord(record: ABRecord!) -> ABPersonCompositeNameFormat
@available(iOS, introduced=2.0, deprecated=9.0)
public func ABPersonCopyCompositeNameDelimiterForRecord(record: ABRecord!) -> Unmanaged<CFString>!
// Images
@available(iOS, introduced=2.0, deprecated=9.0)
public struct ABPersonImageFormat : RawRepresentable, Equatable {
public init(_ rawValue: UInt32)
public init(rawValue: UInt32)
public var rawValue: UInt32
}
public var kABPersonImageFormatThumbnail: ABPersonImageFormat { get } // deprecated
public var kABPersonImageFormatOriginalSize: ABPersonImageFormat { get } // deprecated
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNMutableContact.imageData")
public func ABPersonSetImageData(person: ABRecord!, _ imageData: CFData!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>) -> Bool
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.imageData")
public func ABPersonCopyImageData(person: ABRecord!) -> Unmanaged<CFData>!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.imageData or CNContact.thumbnailImageData")
public func ABPersonCopyImageDataWithFormat(person: ABRecord!, _ format: ABPersonImageFormat) -> Unmanaged<CFData>!
@available(iOS, introduced=2.0, deprecated=9.0)
public func ABPersonHasImageData(person: ABRecord!) -> Bool
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNMutableContact.imageData = nil")
public func ABPersonRemoveImageData(person: ABRecord!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>) -> Bool
// Sorting
@available(iOS, introduced=2.0, deprecated=9.0, message="use [CNContact comparatorForNameSortOrder:]")
public func ABPersonComparePeopleByName(person1: ABRecord!, _ person2: ABRecord!, _ ordering: ABPersonSortOrdering) -> CFComparisonResult
// Finding people
@available(iOS, introduced=2.0, deprecated=9.0, message="use count of fetch results for CNContactFetchRequest with predicate = nil")
public func ABAddressBookGetPersonCount(addressBook: ABAddressBook!) -> CFIndex
@available(iOS, introduced=2.0, deprecated=9.0, message="use [CNContactStore unifiedContactWithIdentifier:keysToFetch:error:]")
public func ABAddressBookGetPersonWithRecordID(addressBook: ABAddressBook!, _ recordID: ABRecordID) -> Unmanaged<ABRecord>!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContactFetchRequest with predicate = nil")
public func ABAddressBookCopyArrayOfAllPeople(addressBook: ABAddressBook!) -> Unmanaged<CFArray>!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContactFetchRequest with predicate = [CNContact predicateForContactsInContainerWithIdentifier:] and unifyResults = NO")
public func ABAddressBookCopyArrayOfAllPeopleInSource(addressBook: ABAddressBook!, _ source: ABRecord!) -> Unmanaged<CFArray>!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContactFetchRequest with predicate = [CNContact predicateForContactsInContainerWithIdentifier:] and unifyResults = NO and sortOrder")
public func ABAddressBookCopyArrayOfAllPeopleInSourceWithSortOrdering(addressBook: ABAddressBook!, _ source: ABRecord!, _ sortOrdering: ABPersonSortOrdering) -> Unmanaged<CFArray>!
@available(iOS, introduced=2.0, deprecated=9.0, message="use [CNContactStore unifiedContactsMatchingPredicate:[CNContact predicateForContactsMatchingName:] keysToFetch: error:]")
public func ABAddressBookCopyPeopleWithName(addressBook: ABAddressBook!, _ name: CFString!) -> Unmanaged<CFArray>!
// VCard
// Creates an array of people from a vcard representation. Source is optional. The people
// will be created in the source given as the first argument, or the default source if NULL.
@available(iOS, introduced=2.0, deprecated=9.0, message="use [CNContactVCardSerialization contactsWithData:error:]")
public func ABPersonCreatePeopleInSourceWithVCardRepresentation(source: ABRecord!, _ vCardData: CFData!) -> Unmanaged<CFArray>!
// Creates a vCard representation of the people passed in.
@available(iOS, introduced=2.0, deprecated=9.0, message="use [CNContactVCardSerialization dataWithContacts:error:]")
public func ABPersonCreateVCardRepresentationWithPeople(people: CFArray!) -> Unmanaged<CFData>!
// Generic labels
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelWork")
public let kABWorkLabel: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelHome")
public let kABHomeLabel: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelOther")
public let kABOtherLabel: CFString!
// Property keys
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.givenName")
public let kABPersonFirstNameProperty: ABPropertyID // First name - kABStringPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.familyName")
public let kABPersonLastNameProperty: ABPropertyID // Last name - kABStringPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.middleName")
public let kABPersonMiddleNameProperty: ABPropertyID // Middle name - kABStringPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.namePrefix")
public let kABPersonPrefixProperty: ABPropertyID // Prefix ("Sir" "Duke" "General") - kABStringPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.nameSuffix")
public let kABPersonSuffixProperty: ABPropertyID // Suffix ("Jr." "Sr." "III") - kABStringPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.nickname")
public let kABPersonNicknameProperty: ABPropertyID // Nickname - kABStringPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.phoneticGivenName")
public let kABPersonFirstNamePhoneticProperty: ABPropertyID // First name Phonetic - kABStringPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.phoneticFamilyName")
public let kABPersonLastNamePhoneticProperty: ABPropertyID // Last name Phonetic - kABStringPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.phoneticMiddleName")
public let kABPersonMiddleNamePhoneticProperty: ABPropertyID // Middle name Phonetic - kABStringPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.organizationName")
public let kABPersonOrganizationProperty: ABPropertyID // Company name - kABStringPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.departmentName")
public let kABPersonDepartmentProperty: ABPropertyID // Department name - kABStringPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.jobTitle")
public let kABPersonJobTitleProperty: ABPropertyID // Job Title - kABStringPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.emailAddresses")
public let kABPersonEmailProperty: ABPropertyID // Email(s) - kABMultiStringPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.birthday")
public let kABPersonBirthdayProperty: ABPropertyID // Birthday associated with this person - kABDateTimePropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.note")
public let kABPersonNoteProperty: ABPropertyID // Note - kABStringPropertyType
@available(iOS, introduced=2.0, deprecated=9.0)
public let kABPersonCreationDateProperty: ABPropertyID // Creation Date (when first saved)
@available(iOS, introduced=2.0, deprecated=9.0)
public let kABPersonModificationDateProperty: ABPropertyID // Last saved date
// Addresses
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.postalAddresses")
public let kABPersonAddressProperty: ABPropertyID // Street address - kABMultiDictionaryPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNPostalAddress.street")
public let kABPersonAddressStreetKey: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNPostalAddress.city")
public let kABPersonAddressCityKey: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNPostalAddress.state")
public let kABPersonAddressStateKey: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNPostalAddress.postalCode")
public let kABPersonAddressZIPKey: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNPostalAddress.country")
public let kABPersonAddressCountryKey: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNPostalAddress.ISOCountryCode")
public let kABPersonAddressCountryCodeKey: CFString!
/*
* kABPersonAddressCountryCodeKey code must be in the form of 2 character iso 3166 country codes
*
* eg:
* fr = France
* us = United States
* etc.
*
*/
// Dates
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.dates")
public let kABPersonDateProperty: ABPropertyID // Dates associated with this person - kABMultiDatePropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelDateAnniversary")
public let kABPersonAnniversaryLabel: CFString!
// Kind
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.contactType")
public let kABPersonKindProperty: ABPropertyID // Person/Organization - kABIntegerPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContactTypePerson")
public let kABPersonKindPerson: CFNumber!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContactTypeOrganization")
public let kABPersonKindOrganization: CFNumber!
// Phone numbers
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.phoneNumbers")
public let kABPersonPhoneProperty: ABPropertyID // Generic phone number - kABMultiStringPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelPhoneNumberMobile")
public let kABPersonPhoneMobileLabel: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelPhoneNumberiPhone")
public let kABPersonPhoneIPhoneLabel: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelPhoneNumberMain")
public let kABPersonPhoneMainLabel: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelPhoneNumberHomeFax")
public let kABPersonPhoneHomeFAXLabel: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelPhoneNumberWorkFax")
public let kABPersonPhoneWorkFAXLabel: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelPhoneNumberOtherFax")
public let kABPersonPhoneOtherFAXLabel: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelPhoneNumberPager")
public let kABPersonPhonePagerLabel: CFString!
// IM
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.instantMessageAddresses")
public let kABPersonInstantMessageProperty: ABPropertyID // Instant Messaging - kABMultiDictionaryPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNInstantMessageAddress.service")
public let kABPersonInstantMessageServiceKey: CFString! // Service ("Yahoo", "Jabber", etc.)
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNInstantMessageServiceYahoo")
public let kABPersonInstantMessageServiceYahoo: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNInstantMessageServiceJabber")
public let kABPersonInstantMessageServiceJabber: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNInstantMessageServiceMSN")
public let kABPersonInstantMessageServiceMSN: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNInstantMessageServiceICQ")
public let kABPersonInstantMessageServiceICQ: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNInstantMessageServiceAIM")
public let kABPersonInstantMessageServiceAIM: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNInstantMessageServiceQQ")
public let kABPersonInstantMessageServiceQQ: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNInstantMessageServiceGoogleTalk")
public let kABPersonInstantMessageServiceGoogleTalk: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNInstantMessageServiceSkype")
public let kABPersonInstantMessageServiceSkype: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNInstantMessageServiceFacebook")
public let kABPersonInstantMessageServiceFacebook: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNInstantMessageServiceGaduGadu")
public let kABPersonInstantMessageServiceGaduGadu: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNInstantMessageAddress.username")
public let kABPersonInstantMessageUsernameKey: CFString! // Username
// URLs
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.urlAddresses")
public let kABPersonURLProperty: ABPropertyID // URL - kABMultiStringPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelURLAddressHomePage")
public let kABPersonHomePageLabel: CFString! // Home Page
// Related names
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.contactRelations")
public let kABPersonRelatedNamesProperty: ABPropertyID // Names - kABMultiStringPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelContactRelationFather")
public let kABPersonFatherLabel: CFString! // Father
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelContactRelationMother")
public let kABPersonMotherLabel: CFString! // Mother
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelContactRelationParent")
public let kABPersonParentLabel: CFString! // Parent
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelContactRelationBrother")
public let kABPersonBrotherLabel: CFString! // Brother
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelContactRelationSister")
public let kABPersonSisterLabel: CFString! // Sister
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelContactRelationChild")
public let kABPersonChildLabel: CFString! // Child
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelContactRelationFriend")
public let kABPersonFriendLabel: CFString! // Friend
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelContactRelationSpouse")
public let kABPersonSpouseLabel: CFString! // Spouse
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelContactRelationPartner")
public let kABPersonPartnerLabel: CFString! // Partner
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelContactRelationAssistant")
public let kABPersonAssistantLabel: CFString! // Assistant
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNLabelContactRelationManager")
public let kABPersonManagerLabel: CFString! // Manager
// Social Profile
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.socialProfiles")
public let kABPersonSocialProfileProperty: ABPropertyID // kABMultiDictionaryPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNSocialProfile.urlString")
public let kABPersonSocialProfileURLKey: CFString! // string representation of a url for the social profile
// the following properties are optional
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNSocialProfile.service")
public let kABPersonSocialProfileServiceKey: CFString! // string representing the name of the service (Twitter, Facebook, LinkedIn, etc.)
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNSocialProfile.username")
public let kABPersonSocialProfileUsernameKey: CFString! // string representing the user visible name
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNSocialProfile.userIdentifier")
public let kABPersonSocialProfileUserIdentifierKey: CFString! // string representing the service specific identifier (optional)
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNSocialProfileServiceTwitter")
public let kABPersonSocialProfileServiceTwitter: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNSocialProfileServiceSinaWeibo")
public let kABPersonSocialProfileServiceSinaWeibo: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNSocialProfileServiceGameCenter")
public let kABPersonSocialProfileServiceGameCenter: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNSocialProfileServiceFacebook")
public let kABPersonSocialProfileServiceFacebook: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNSocialProfileServiceMySpace")
public let kABPersonSocialProfileServiceMyspace: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNSocialProfileServiceLinkedIn")
public let kABPersonSocialProfileServiceLinkedIn: CFString!
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNSocialProfileServiceFlickr")
public let kABPersonSocialProfileServiceFlickr: CFString!
// Alternate birthday
@available(iOS, introduced=2.0, deprecated=9.0, message="use CNContact.nonGregorianBirthday")
public let kABPersonAlternateBirthdayProperty: ABPropertyID // kABDictionaryPropertyType
@available(iOS, introduced=2.0, deprecated=9.0, message="use NSDateComponents.calendar")
public let kABPersonAlternateBirthdayCalendarIdentifierKey: CFString! // string representing the calendar identifier for CFCalendarRef
@available(iOS, introduced=2.0, deprecated=9.0, message="use NSDateComponents.era")
public let kABPersonAlternateBirthdayEraKey: CFString! // CFNumberRef - kCFNumberNSIntegerType
@available(iOS, introduced=2.0, deprecated=9.0, message="use NSDateComponents.year")
public let kABPersonAlternateBirthdayYearKey: CFString! // CFNumberRef - kCFNumberNSIntegerType
@available(iOS, introduced=2.0, deprecated=9.0, message="use NSDateComponents.month")
public let kABPersonAlternateBirthdayMonthKey: CFString! // CFNumberRef - kCFNumberNSIntegerType
@available(iOS, introduced=2.0, deprecated=9.0, message="use NSDateComponents.isLeapMonth")
public let kABPersonAlternateBirthdayIsLeapMonthKey: CFString! // CFNumberRef - kCFNumberCharType (aka NSNumber Bool type)
@available(iOS, introduced=2.0, deprecated=9.0, message="use NSDateComponents.day")
public let kABPersonAlternateBirthdayDayKey: CFString! // CFNumberRef - kCFNumberNSIntegerType