1 {
2 // ABAddressBookC.h
3 // AddressBook Framework
4 //
5 // Copyright (c) 2003-2007 Apple Inc. All rights reserved.
6 //
7 //
8 }
9 { Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
10 { Pascal Translation Updated: Gorazd Krosl, <gorazd_1957@yahoo.ca>, November 2009 }
11 { Pascal Translation Updated: Gale R Paeper, <gpaeper@empirenet.com>, 2018 }
12
13 {
14 Modified for use with Free Pascal
15 Version 308
16 Please report any bugs to <gpc@microbizz.nl>
17 }
18
19 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
20 {$mode macpas}
21 {$modeswitch cblocks}
22 {$packenum 1}
23 {$macro on}
24 {$inline on}
25 {$calling mwpascal}
26
27 unit ABAddressBook;
28 interface
29 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
30 {$setc GAP_INTERFACES_VERSION := $0308}
31
32 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
33 {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
34 {$endc}
35
36 {$ifc defined CPUPOWERPC and defined CPUI386}
37 {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
38 {$endc}
39 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
40 {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
41 {$endc}
42
43 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
44 {$setc __ppc__ := 1}
45 {$elsec}
46 {$setc __ppc__ := 0}
47 {$endc}
48 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
49 {$setc __ppc64__ := 1}
50 {$elsec}
51 {$setc __ppc64__ := 0}
52 {$endc}
53 {$ifc not defined __i386__ and defined CPUI386}
54 {$setc __i386__ := 1}
55 {$elsec}
56 {$setc __i386__ := 0}
57 {$endc}
58 {$ifc not defined __x86_64__ and defined CPUX86_64}
59 {$setc __x86_64__ := 1}
60 {$elsec}
61 {$setc __x86_64__ := 0}
62 {$endc}
63 {$ifc not defined __arm__ and defined CPUARM}
64 {$setc __arm__ := 1}
65 {$elsec}
66 {$setc __arm__ := 0}
67 {$endc}
68 {$ifc not defined __arm64__ and defined CPUAARCH64}
69 {$setc __arm64__ := 1}
70 {$elsec}
71 {$setc __arm64__ := 0}
72 {$endc}
73
74 {$ifc defined cpu64}
75 {$setc __LP64__ := 1}
76 {$elsec}
77 {$setc __LP64__ := 0}
78 {$endc}
79
80
81 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
82 {$error Conflicting definitions for __ppc__ and __i386__}
83 {$endc}
84
85 {$ifc defined __ppc__ and __ppc__}
86 {$setc TARGET_CPU_PPC := TRUE}
87 {$setc TARGET_CPU_PPC64 := FALSE}
88 {$setc TARGET_CPU_X86 := FALSE}
89 {$setc TARGET_CPU_X86_64 := FALSE}
90 {$setc TARGET_CPU_ARM := FALSE}
91 {$setc TARGET_CPU_ARM64 := FALSE}
92 {$setc TARGET_OS_MAC := TRUE}
93 {$setc TARGET_OS_IPHONE := FALSE}
94 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
95 {$setc TARGET_OS_EMBEDDED := FALSE}
96 {$elifc defined __ppc64__ and __ppc64__}
97 {$setc TARGET_CPU_PPC := FALSE}
98 {$setc TARGET_CPU_PPC64 := TRUE}
99 {$setc TARGET_CPU_X86 := FALSE}
100 {$setc TARGET_CPU_X86_64 := FALSE}
101 {$setc TARGET_CPU_ARM := FALSE}
102 {$setc TARGET_CPU_ARM64 := FALSE}
103 {$setc TARGET_OS_MAC := TRUE}
104 {$setc TARGET_OS_IPHONE := FALSE}
105 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
106 {$setc TARGET_OS_EMBEDDED := FALSE}
107 {$elifc defined __i386__ and __i386__}
108 {$setc TARGET_CPU_PPC := FALSE}
109 {$setc TARGET_CPU_PPC64 := FALSE}
110 {$setc TARGET_CPU_X86 := TRUE}
111 {$setc TARGET_CPU_X86_64 := FALSE}
112 {$setc TARGET_CPU_ARM := FALSE}
113 {$setc TARGET_CPU_ARM64 := FALSE}
114 {$ifc defined iphonesim}
115 {$setc TARGET_OS_MAC := FALSE}
116 {$setc TARGET_OS_IPHONE := TRUE}
117 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
118 {$elsec}
119 {$setc TARGET_OS_MAC := TRUE}
120 {$setc TARGET_OS_IPHONE := FALSE}
121 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
122 {$endc}
123 {$setc TARGET_OS_EMBEDDED := FALSE}
124 {$elifc defined __x86_64__ and __x86_64__}
125 {$setc TARGET_CPU_PPC := FALSE}
126 {$setc TARGET_CPU_PPC64 := FALSE}
127 {$setc TARGET_CPU_X86 := FALSE}
128 {$setc TARGET_CPU_X86_64 := TRUE}
129 {$setc TARGET_CPU_ARM := FALSE}
130 {$setc TARGET_CPU_ARM64 := FALSE}
131 {$ifc defined iphonesim}
132 {$setc TARGET_OS_MAC := FALSE}
133 {$setc TARGET_OS_IPHONE := TRUE}
134 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
135 {$elsec}
136 {$setc TARGET_OS_MAC := TRUE}
137 {$setc TARGET_OS_IPHONE := FALSE}
138 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
139 {$endc}
140 {$setc TARGET_OS_EMBEDDED := FALSE}
141 {$elifc defined __arm__ and __arm__}
142 {$setc TARGET_CPU_PPC := FALSE}
143 {$setc TARGET_CPU_PPC64 := FALSE}
144 {$setc TARGET_CPU_X86 := FALSE}
145 {$setc TARGET_CPU_X86_64 := FALSE}
146 {$setc TARGET_CPU_ARM := TRUE}
147 {$setc TARGET_CPU_ARM64 := FALSE}
148 {$setc TARGET_OS_MAC := FALSE}
149 {$setc TARGET_OS_IPHONE := TRUE}
150 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
151 {$setc TARGET_OS_EMBEDDED := TRUE}
152 {$elifc defined __arm64__ and __arm64__}
153 {$setc TARGET_CPU_PPC := FALSE}
154 {$setc TARGET_CPU_PPC64 := FALSE}
155 {$setc TARGET_CPU_X86 := FALSE}
156 {$setc TARGET_CPU_X86_64 := FALSE}
157 {$setc TARGET_CPU_ARM := FALSE}
158 {$setc TARGET_CPU_ARM64 := TRUE}
159 {$ifc defined ios}
160 {$setc TARGET_OS_MAC := FALSE}
161 {$setc TARGET_OS_IPHONE := TRUE}
162 {$setc TARGET_OS_EMBEDDED := TRUE}
163 {$elsec}
164 {$setc TARGET_OS_MAC := TRUE}
165 {$setc TARGET_OS_IPHONE := FALSE}
166 {$setc TARGET_OS_EMBEDDED := FALSE}
167 {$endc}
168 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
169 {$elsec}
170 {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
171 {$endc}
172
173 {$ifc defined __LP64__ and __LP64__ }
174 {$setc TARGET_CPU_64 := TRUE}
175 {$elsec}
176 {$setc TARGET_CPU_64 := FALSE}
177 {$endc}
178
179 {$ifc defined FPC_BIG_ENDIAN}
180 {$setc TARGET_RT_BIG_ENDIAN := TRUE}
181 {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
182 {$elifc defined FPC_LITTLE_ENDIAN}
183 {$setc TARGET_RT_BIG_ENDIAN := FALSE}
184 {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
185 {$elsec}
186 {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
187 {$endc}
188 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
189 {$setc CALL_NOT_IN_CARBON := FALSE}
190 {$setc OLDROUTINENAMES := FALSE}
191 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
192 {$setc OPAQUE_UPP_TYPES := TRUE}
193 {$setc OTCARBONAPPLICATION := TRUE}
194 {$setc OTKERNEL := FALSE}
195 {$setc PM_USE_SESSION_APIS := TRUE}
196 {$setc TARGET_API_MAC_CARBON := TRUE}
197 {$setc TARGET_API_MAC_OS8 := FALSE}
198 {$setc TARGET_API_MAC_OSX := TRUE}
199 {$setc TARGET_CARBON := TRUE}
200 {$setc TARGET_CPU_68K := FALSE}
201 {$setc TARGET_CPU_MIPS := FALSE}
202 {$setc TARGET_CPU_SPARC := FALSE}
203 {$setc TARGET_OS_UNIX := FALSE}
204 {$setc TARGET_OS_WIN32 := FALSE}
205 {$setc TARGET_RT_MAC_68881 := FALSE}
206 {$setc TARGET_RT_MAC_CFM := FALSE}
207 {$setc TARGET_RT_MAC_MACHO := TRUE}
208 {$setc TYPED_FUNCTION_POINTERS := TRUE}
209 {$setc TYPE_BOOL := FALSE}
210 {$setc TYPE_EXTENDED := FALSE}
211 {$setc TYPE_LONGLONG := TRUE}
212 uses MacTypes,ABTypedefs,ABGlobals,CFBase,CFArray,CFDictionary,CFData;
213 {$endc} {not MACOSALLINCLUDE}
214
215
216 {$ifc TARGET_OS_MAC}
217
218 {$ALIGN POWER}
219
220
221
222 type
223 ABRecordRef = UnivPtr;
224 ABPersonRef = ^__ABPerson; { an opaque type }
225 __ABPerson = record end;
226 ABGroupRef = ^__ABGroup; { an opaque type }
227 __ABGroup = record end;
228 ABSearchElementRef = ^__ABSearchElementRef; { an opaque type }
229 __ABSearchElementRef = record end;
230 ABAddressBookRef = ^__ABAddressBookRef; { an opaque type }
231 __ABAddressBookRef = record end;
232 ABMultiValueRef = ^__ABMultiValue; { an opaque type }
233 __ABMultiValue = record end;
234 ABMutableMultiValueRef = ^__ABMultiValue; { an opaque type }
235
236 // --------------------------------------------------------------------------------
237 // LSOpenCFURLRef support
238 // --------------------------------------------------------------------------------
239 // An application can open the Contacts app and select (and edit) a specific
240 // person by using the LSOpenCFURLRef API.
241 //
242 // To launch (or bring to front) the Contacts app and select a given person
243 //
244 // CFStringRef uniqueId = ABRecordCopyUniqueId(aPerson);
245 // CFStringRef urlString = CFStringCreateWithFormat(NULL, CFSTR(addressbook://%@), uniqueId);
246 // CFURLRef urlRef = CFURLCreateWithString(NULL, urlString, NULL);
247 // LSOpenCFURLRef(urlRef, NULL);
248 // CFRelease(uniqueId);
249 // CFRelease(urlRef);
250 // CFRelease(urlString);
251 //
252 // To launch (or bring to front) the Contacts app and edit a given person
253 //
254 // CFStringRef uniqueId = ABRecordCopyUniqueId(aPerson);
255 // CFStringRef urlString = CFStringCreateWithFormat(NULL, CFSTR(addressbook://%@?edit), uniqueId);
256 // CFURLRef urlRef = CFURLCreateWithString(NULL, urlString, NULL);
257 // LSOpenCFURLRef(urlRef, NULL);
258 // CFRelease(uniqueId);
259 // CFRelease(urlRef);
260 // CFRelease(urlString);
261
262 // --------------------------------------------------------------------------------
263 // AddressBook
264 // --------------------------------------------------------------------------------
265
266 // --- There is only one Address Book
ABGetSharedAddressBooknull267 function ABGetSharedAddressBook: ABAddressBookRef; external name '_ABGetSharedAddressBook';
268
269 // --- Searching
ABCopyArrayOfMatchingRecordsnull270 function ABCopyArrayOfMatchingRecords( addressBook: ABAddressBookRef; search: ABSearchElementRef ): CFArrayRef; external name '_ABCopyArrayOfMatchingRecords';
271
272 // --- Saving
ABSavenull273 function ABSave( addressBook: ABAddressBookRef ): CBool; external name '_ABSave';
ABHasUnsavedChangesnull274 function ABHasUnsavedChanges( addressBook: ABAddressBookRef ): CBool; external name '_ABHasUnsavedChanges';
275
276 // --- Me
ABGetMenull277 function ABGetMe( addressBook: ABAddressBookRef ): ABPersonRef; external name '_ABGetMe'; // Not retain???
278 procedure ABSetMe( addressBook: ABAddressBookRef; moi: ABPersonRef ); external name '_ABSetMe';
279
280 // Returns the record class Name for a particular uniqueId
ABCopyRecordTypeFromUniqueIdnull281 function ABCopyRecordTypeFromUniqueId( addressBook: ABAddressBookRef; uniqueId: CFStringRef ): CFStringRef; external name '_ABCopyRecordTypeFromUniqueId';
282 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
283
284 // --- Properties
285 // Property names must be unique for a record type
ABAddPropertiesAndTypesnull286 function ABAddPropertiesAndTypes( addressBook: ABAddressBookRef; recordType: CFStringRef; propertiesAndTypes: CFDictionaryRef ): CFIndex; external name '_ABAddPropertiesAndTypes';
ABRemovePropertiesnull287 function ABRemoveProperties( addressBook: ABAddressBookRef; recordType: CFStringRef; properties: CFArrayRef ): CFIndex; external name '_ABRemoveProperties';
ABCopyArrayOfPropertiesForRecordTypenull288 function ABCopyArrayOfPropertiesForRecordType( addressBook: ABAddressBookRef; recordType: CFStringRef ): CFArrayRef; external name '_ABCopyArrayOfPropertiesForRecordType';
ABTypeOfPropertynull289 function ABTypeOfProperty( addressBook: ABAddressBookRef; recordType: CFStringRef; proprty: CFStringRef ): ABPropertyType; external name '_ABTypeOfProperty';
290
291 // --- Records (Person, Group)
ABCopyRecordForUniqueIdnull292 function ABCopyRecordForUniqueId( addressBook: ABAddressBookRef; uniqueId: CFStringRef ): ABRecordRef; external name '_ABCopyRecordForUniqueId';
ABAddRecordnull293 function ABAddRecord( addressBook: ABAddressBookRef; recrd: ABRecordRef ): CBool; external name '_ABAddRecord';
ABRemoveRecordnull294 function ABRemoveRecord( addressBook: ABAddressBookRef; recrd: ABRecordRef ): CBool; external name '_ABRemoveRecord';
295
296 // --- People
ABCopyArrayOfAllPeoplenull297 function ABCopyArrayOfAllPeople( addressBook: ABAddressBookRef ): CFArrayRef; external name '_ABCopyArrayOfAllPeople'; // Array of ABPerson
298
299 // --- Groups
ABCopyArrayOfAllGroupsnull300 function ABCopyArrayOfAllGroups( addressBook: ABAddressBookRef ): CFArrayRef; external name '_ABCopyArrayOfAllGroups'; // Array of ABGroup
301
302 // --------------------------------------------------------------------------------
303 // ABRecord
304 // --------------------------------------------------------------------------------
305
ABRecordCreateCopynull306 function ABRecordCreateCopy( recrd: ABRecordRef ): ABRecordRef; external name '_ABRecordCreateCopy';
307 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
308
ABRecordCopyRecordTypenull309 function ABRecordCopyRecordType( recrd: ABRecordRef ): CFStringRef; external name '_ABRecordCopyRecordType';
310
311 // --- Property value
ABRecordCopyValuenull312 function ABRecordCopyValue( recrd: ABRecordRef; proprty: CFStringRef ): CFTypeRef; external name '_ABRecordCopyValue';
313 // returns a CFDictionary for multi-value properties
ABRecordSetValuenull314 function ABRecordSetValue( recrd: ABRecordRef; proprty: CFStringRef; value: CFTypeRef ): CBool; external name '_ABRecordSetValue';
315 // takes a CFDictionary for multi-value properties
ABRecordRemoveValuenull316 function ABRecordRemoveValue( recrd: ABRecordRef; proprty: CFStringRef ): CBool; external name '_ABRecordRemoveValue';
317 // is the record read only
ABRecordIsReadOnlynull318 function ABRecordIsReadOnly( recrd: ABRecordRef ): CBool; external name '_ABRecordIsReadOnly';
319 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
320
321 // ---- Unique ID access convenience
ABRecordCopyUniqueIdnull322 function ABRecordCopyUniqueId( recrd: ABRecordRef ): CFStringRef; external name '_ABRecordCopyUniqueId';
323
324 // --------------------------------------------------------------------------------
325 // ABPerson
326 // --------------------------------------------------------------------------------
327
ABPersonCreatenull328 function ABPersonCreate: ABPersonRef; external name '_ABPersonCreate';
329
ABPersonCreateWithVCardRepresentationnull330 function ABPersonCreateWithVCardRepresentation( vCard: CFDataRef ): ABPersonRef; external name '_ABPersonCreateWithVCardRepresentation';
ABPersonCopyVCardRepresentationnull331 function ABPersonCopyVCardRepresentation( person: ABPersonRef ): CFDataRef; external name '_ABPersonCopyVCardRepresentation';
332
ABPersonCopyParentGroupsnull333 function ABPersonCopyParentGroups( person: ABPersonRef ): CFArrayRef; external name '_ABPersonCopyParentGroups'; // Groups this person belongs to
334
335 // --- Search elements
ABPersonCreateSearchElementnull336 function ABPersonCreateSearchElement( proprty: CFStringRef; labl: CFStringRef; key: CFStringRef; value: CFTypeRef; comparison: ABSearchComparison ): ABSearchElementRef; external name '_ABPersonCreateSearchElement';
337
338 // --------------------------------------------------------------------------------
339 // ABGroups
340 // --------------------------------------------------------------------------------
341
ABGroupCreatenull342 function ABGroupCreate: ABGroupRef; external name '_ABGroupCreate';
343
344 // --- Dealing with Persons
ABGroupCopyArrayOfAllMembersnull345 function ABGroupCopyArrayOfAllMembers( group: ABGroupRef ): CFArrayRef; external name '_ABGroupCopyArrayOfAllMembers';
ABGroupAddMembernull346 function ABGroupAddMember( group: ABGroupRef; personToAdd: ABPersonRef ): CBool; external name '_ABGroupAddMember';
ABGroupRemoveMembernull347 function ABGroupRemoveMember( group: ABGroupRef; personToRemove: ABPersonRef ): CBool; external name '_ABGroupRemoveMember';
348
349 // --- Dealing with Groups
ABGroupCopyArrayOfAllSubgroupsnull350 function ABGroupCopyArrayOfAllSubgroups( group: ABGroupRef ): CFArrayRef; external name '_ABGroupCopyArrayOfAllSubgroups';
ABGroupAddGroupnull351 function ABGroupAddGroup( group: ABGroupRef; groupToAdd: ABGroupRef ): CBool; external name '_ABGroupAddGroup';
ABGroupRemoveGroupnull352 function ABGroupRemoveGroup( group: ABGroupRef; groupToRemove: ABGroupRef ): CBool; external name '_ABGroupRemoveGroup';
353
354 // --- Dealing with Parents
ABGroupCopyParentGroupsnull355 function ABGroupCopyParentGroups( group: ABGroupRef ): CFArrayRef; external name '_ABGroupCopyParentGroups';
356
357 // --- Distribution list
ABGroupSetDistributionIdentifiernull358 function ABGroupSetDistributionIdentifier( group: ABGroupRef; person: ABPersonRef; proprty: CFStringRef; identifier: CFStringRef ): CBool; external name '_ABGroupSetDistributionIdentifier';
ABGroupCopyDistributionIdentifiernull359 function ABGroupCopyDistributionIdentifier( group: ABGroupRef; person: ABPersonRef; proprty: CFStringRef ): CFStringRef; external name '_ABGroupCopyDistributionIdentifier';
360
361 // --- Search elements
ABGroupCreateSearchElementnull362 function ABGroupCreateSearchElement( proprty: CFStringRef; labl: CFStringRef; key: CFStringRef; value: CFTypeRef; comparison: ABSearchComparison ): ABSearchElementRef; external name '_ABGroupCreateSearchElement';
363
364 // --------------------------------------------------------------------------------
365 // ABSearchElement
366 // --------------------------------------------------------------------------------
367
ABSearchElementCreateWithConjunctionnull368 function ABSearchElementCreateWithConjunction( conjunction: ABSearchConjunction; childrenSearchElement: CFArrayRef ): ABSearchElementRef; external name '_ABSearchElementCreateWithConjunction';
369
ABSearchElementMatchesRecordnull370 function ABSearchElementMatchesRecord( searchElement: ABSearchElementRef; recrd: ABRecordRef ): CBool; external name '_ABSearchElementMatchesRecord';
371
372 // --------------------------------------------------------------------------------
373 // ABMultiValue
374 // --------------------------------------------------------------------------------
375
ABMultiValueCreatenull376 function ABMultiValueCreate: ABMultiValueRef; external name '_ABMultiValueCreate';
ABMultiValueCountnull377 function ABMultiValueCount( multiValue: ABMultiValueRef ): CFIndex; external name '_ABMultiValueCount';
ABMultiValueCopyValueAtIndexnull378 function ABMultiValueCopyValueAtIndex( multiValue: ABMultiValueRef; index: CFIndex ): CFTypeRef; external name '_ABMultiValueCopyValueAtIndex';
ABMultiValueCopyLabelAtIndexnull379 function ABMultiValueCopyLabelAtIndex( multiValue: ABMultiValueRef; index: CFIndex ): CFStringRef; external name '_ABMultiValueCopyLabelAtIndex';
ABMultiValueCopyPrimaryIdentifiernull380 function ABMultiValueCopyPrimaryIdentifier( multiValue: ABMultiValueRef ): CFStringRef; external name '_ABMultiValueCopyPrimaryIdentifier';
ABMultiValueIndexForIdentifiernull381 function ABMultiValueIndexForIdentifier( multiValue: ABMultiValueRef; identifier: CFStringRef ): CFIndex; external name '_ABMultiValueIndexForIdentifier';
ABMultiValueCopyIdentifierAtIndexnull382 function ABMultiValueCopyIdentifierAtIndex( multiValue: ABMultiValueRef; index: CFIndex ): CFStringRef; external name '_ABMultiValueCopyIdentifierAtIndex';
ABMultiValuePropertyTypenull383 function ABMultiValuePropertyType( multiValue: ABMultiValueRef ): ABPropertyType; external name '_ABMultiValuePropertyType';
ABMultiValueCreateCopynull384 function ABMultiValueCreateCopy( multiValue: ABMultiValueRef ): ABMultiValueRef; external name '_ABMultiValueCreateCopy';
385
386 // --------------------------------------------------------------------------------
387 // ABMutableMultiValue
388 // --------------------------------------------------------------------------------
389
ABMultiValueCreateMutablenull390 function ABMultiValueCreateMutable: ABMutableMultiValueRef; external name '_ABMultiValueCreateMutable';
ABMultiValueAddnull391 function ABMultiValueAdd( multiValue: ABMutableMultiValueRef; value: CFTypeRef; labl: CFStringRef; var outIdentifier: CFStringRef ): CBool; external name '_ABMultiValueAdd';
ABMultiValueInsertnull392 function ABMultiValueInsert( multiValue: ABMutableMultiValueRef; value: CFTypeRef; labl: CFStringRef; index: CFIndex; var outIdentifier: CFStringRef ): CBool; external name '_ABMultiValueInsert';
ABMultiValueRemovenull393 function ABMultiValueRemove( multiValue: ABMutableMultiValueRef; index: CFIndex ): CBool; external name '_ABMultiValueRemove';
ABMultiValueReplaceValuenull394 function ABMultiValueReplaceValue( multiValue: ABMutableMultiValueRef; value: CFTypeRef; index: CFIndex ): CBool; external name '_ABMultiValueReplaceValue';
ABMultiValueReplaceLabelnull395 function ABMultiValueReplaceLabel( multiValue: ABMutableMultiValueRef; labl: CFStringRef; index: CFIndex ): CBool; external name '_ABMultiValueReplaceLabel';
ABMultiValueSetPrimaryIdentifiernull396 function ABMultiValueSetPrimaryIdentifier( multiValue: ABMutableMultiValueRef; identifier: CFStringRef ): CBool; external name '_ABMultiValueSetPrimaryIdentifier';
ABMultiValueCreateMutableCopynull397 function ABMultiValueCreateMutableCopy( multiValue: ABMultiValueRef ): ABMutableMultiValueRef; external name '_ABMultiValueCreateMutableCopy';
398
399 // --------------------------------------------------------------------------------
400 // Localization of properties or labels
401 // --------------------------------------------------------------------------------
402
ABCopyLocalizedPropertyOrLabelnull403 function ABCopyLocalizedPropertyOrLabel( labelOrProperty: CFStringRef ): CFStringRef; external name '_ABCopyLocalizedPropertyOrLabel';
404
405 // --- Address formatting
ABCreateFormattedAddressFromDictionarynull406 function ABCreateFormattedAddressFromDictionary( addressBook: ABAddressBookRef; address: CFDictionaryRef ): CFStringRef; external name '_ABCreateFormattedAddressFromDictionary';
407 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
ABCopyDefaultCountryCodenull408 function ABCopyDefaultCountryCode( addressBook: ABAddressBookRef ): CFStringRef; external name '_ABCopyDefaultCountryCode';
409 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
410
411 // --------------------------------------------------------------------------------
412 // Person Image Loading
413 // --------------------------------------------------------------------------------
414
ABPersonSetImageDatanull415 function ABPersonSetImageData( person: ABPersonRef; imageData: CFDataRef ): CBool; external name '_ABPersonSetImageData';
ABPersonCopyImageDatanull416 function ABPersonCopyImageData( person: ABPersonRef ): CFDataRef; external name '_ABPersonCopyImageData';
417
418 type
419 ABImageClientCallback = procedure( imageData: CFDataRef; tag: CFIndex; refcon: UnivPtr );
420
ABBeginLoadingImageDataForClientnull421 function ABBeginLoadingImageDataForClient( person: ABPersonRef; callback: ABImageClientCallback; refcon: UnivPtr ): CFIndex; external name '_ABBeginLoadingImageDataForClient';
422 procedure ABCancelLoadingImageDataForTag( tag: CFIndex ); external name '_ABCancelLoadingImageDataForTag';
423
424 {$endc} {TARGET_OS_MAC}
425 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
426
427 end.
428 {$endc} {not MACOSALLINCLUDE}
429