1 { 2 File: LSQuarantine.h 3 4 Contains: File quarantine property keys 5 6 Copyright: (c) 2003-2012 by Apple Inc. All rights reserved. 7 8 Bugs?: For bug reports, consult the following page on 9 the World Wide Web: 10 11 http://bugs.freepascal.org 12 } 13 14 { 15 Modified for use with Free Pascal 16 Version 308 17 Please report any bugs to <gpc@microbizz.nl> 18 } 19 20 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE} 21 {$mode macpas} 22 {$modeswitch cblocks} 23 {$packenum 1} 24 {$macro on} 25 {$inline on} 26 {$calling mwpascal} 27 28 unit LSQuarantine; 29 interface 30 {$setc UNIVERSAL_INTERFACES_VERSION := $0400} 31 {$setc GAP_INTERFACES_VERSION := $0308} 32 33 {$ifc not defined USE_CFSTR_CONSTANT_MACROS} 34 {$setc USE_CFSTR_CONSTANT_MACROS := TRUE} 35 {$endc} 36 37 {$ifc defined CPUPOWERPC and defined CPUI386} 38 {$error Conflicting initial definitions for CPUPOWERPC and CPUI386} 39 {$endc} 40 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN} 41 {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN} 42 {$endc} 43 44 {$ifc not defined __ppc__ and defined CPUPOWERPC32} 45 {$setc __ppc__ := 1} 46 {$elsec} 47 {$setc __ppc__ := 0} 48 {$endc} 49 {$ifc not defined __ppc64__ and defined CPUPOWERPC64} 50 {$setc __ppc64__ := 1} 51 {$elsec} 52 {$setc __ppc64__ := 0} 53 {$endc} 54 {$ifc not defined __i386__ and defined CPUI386} 55 {$setc __i386__ := 1} 56 {$elsec} 57 {$setc __i386__ := 0} 58 {$endc} 59 {$ifc not defined __x86_64__ and defined CPUX86_64} 60 {$setc __x86_64__ := 1} 61 {$elsec} 62 {$setc __x86_64__ := 0} 63 {$endc} 64 {$ifc not defined __arm__ and defined CPUARM} 65 {$setc __arm__ := 1} 66 {$elsec} 67 {$setc __arm__ := 0} 68 {$endc} 69 {$ifc not defined __arm64__ and defined CPUAARCH64} 70 {$setc __arm64__ := 1} 71 {$elsec} 72 {$setc __arm64__ := 0} 73 {$endc} 74 75 {$ifc defined cpu64} 76 {$setc __LP64__ := 1} 77 {$elsec} 78 {$setc __LP64__ := 0} 79 {$endc} 80 81 82 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__} 83 {$error Conflicting definitions for __ppc__ and __i386__} 84 {$endc} 85 86 {$ifc defined __ppc__ and __ppc__} 87 {$setc TARGET_CPU_PPC := TRUE} 88 {$setc TARGET_CPU_PPC64 := FALSE} 89 {$setc TARGET_CPU_X86 := FALSE} 90 {$setc TARGET_CPU_X86_64 := FALSE} 91 {$setc TARGET_CPU_ARM := FALSE} 92 {$setc TARGET_CPU_ARM64 := FALSE} 93 {$setc TARGET_OS_MAC := TRUE} 94 {$setc TARGET_OS_IPHONE := FALSE} 95 {$setc TARGET_IPHONE_SIMULATOR := FALSE} 96 {$setc TARGET_OS_EMBEDDED := FALSE} 97 {$elifc defined __ppc64__ and __ppc64__} 98 {$setc TARGET_CPU_PPC := FALSE} 99 {$setc TARGET_CPU_PPC64 := TRUE} 100 {$setc TARGET_CPU_X86 := FALSE} 101 {$setc TARGET_CPU_X86_64 := FALSE} 102 {$setc TARGET_CPU_ARM := FALSE} 103 {$setc TARGET_CPU_ARM64 := FALSE} 104 {$setc TARGET_OS_MAC := TRUE} 105 {$setc TARGET_OS_IPHONE := FALSE} 106 {$setc TARGET_IPHONE_SIMULATOR := FALSE} 107 {$setc TARGET_OS_EMBEDDED := FALSE} 108 {$elifc defined __i386__ and __i386__} 109 {$setc TARGET_CPU_PPC := FALSE} 110 {$setc TARGET_CPU_PPC64 := FALSE} 111 {$setc TARGET_CPU_X86 := TRUE} 112 {$setc TARGET_CPU_X86_64 := FALSE} 113 {$setc TARGET_CPU_ARM := FALSE} 114 {$setc TARGET_CPU_ARM64 := FALSE} 115 {$ifc defined iphonesim} 116 {$setc TARGET_OS_MAC := FALSE} 117 {$setc TARGET_OS_IPHONE := TRUE} 118 {$setc TARGET_IPHONE_SIMULATOR := TRUE} 119 {$elsec} 120 {$setc TARGET_OS_MAC := TRUE} 121 {$setc TARGET_OS_IPHONE := FALSE} 122 {$setc TARGET_IPHONE_SIMULATOR := FALSE} 123 {$endc} 124 {$setc TARGET_OS_EMBEDDED := FALSE} 125 {$elifc defined __x86_64__ and __x86_64__} 126 {$setc TARGET_CPU_PPC := FALSE} 127 {$setc TARGET_CPU_PPC64 := FALSE} 128 {$setc TARGET_CPU_X86 := FALSE} 129 {$setc TARGET_CPU_X86_64 := TRUE} 130 {$setc TARGET_CPU_ARM := FALSE} 131 {$setc TARGET_CPU_ARM64 := FALSE} 132 {$ifc defined iphonesim} 133 {$setc TARGET_OS_MAC := FALSE} 134 {$setc TARGET_OS_IPHONE := TRUE} 135 {$setc TARGET_IPHONE_SIMULATOR := TRUE} 136 {$elsec} 137 {$setc TARGET_OS_MAC := TRUE} 138 {$setc TARGET_OS_IPHONE := FALSE} 139 {$setc TARGET_IPHONE_SIMULATOR := FALSE} 140 {$endc} 141 {$setc TARGET_OS_EMBEDDED := FALSE} 142 {$elifc defined __arm__ and __arm__} 143 {$setc TARGET_CPU_PPC := FALSE} 144 {$setc TARGET_CPU_PPC64 := FALSE} 145 {$setc TARGET_CPU_X86 := FALSE} 146 {$setc TARGET_CPU_X86_64 := FALSE} 147 {$setc TARGET_CPU_ARM := TRUE} 148 {$setc TARGET_CPU_ARM64 := FALSE} 149 {$setc TARGET_OS_MAC := FALSE} 150 {$setc TARGET_OS_IPHONE := TRUE} 151 {$setc TARGET_IPHONE_SIMULATOR := FALSE} 152 {$setc TARGET_OS_EMBEDDED := TRUE} 153 {$elifc defined __arm64__ and __arm64__} 154 {$setc TARGET_CPU_PPC := FALSE} 155 {$setc TARGET_CPU_PPC64 := FALSE} 156 {$setc TARGET_CPU_X86 := FALSE} 157 {$setc TARGET_CPU_X86_64 := FALSE} 158 {$setc TARGET_CPU_ARM := FALSE} 159 {$setc TARGET_CPU_ARM64 := TRUE} 160 {$ifc defined ios} 161 {$setc TARGET_OS_MAC := FALSE} 162 {$setc TARGET_OS_IPHONE := TRUE} 163 {$setc TARGET_OS_EMBEDDED := TRUE} 164 {$elsec} 165 {$setc TARGET_OS_MAC := TRUE} 166 {$setc TARGET_OS_IPHONE := FALSE} 167 {$setc TARGET_OS_EMBEDDED := FALSE} 168 {$endc} 169 {$setc TARGET_IPHONE_SIMULATOR := FALSE} 170 {$elsec} 171 {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.} 172 {$endc} 173 174 {$ifc defined __LP64__ and __LP64__ } 175 {$setc TARGET_CPU_64 := TRUE} 176 {$elsec} 177 {$setc TARGET_CPU_64 := FALSE} 178 {$endc} 179 180 {$ifc defined FPC_BIG_ENDIAN} 181 {$setc TARGET_RT_BIG_ENDIAN := TRUE} 182 {$setc TARGET_RT_LITTLE_ENDIAN := FALSE} 183 {$elifc defined FPC_LITTLE_ENDIAN} 184 {$setc TARGET_RT_BIG_ENDIAN := FALSE} 185 {$setc TARGET_RT_LITTLE_ENDIAN := TRUE} 186 {$elsec} 187 {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.} 188 {$endc} 189 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE} 190 {$setc CALL_NOT_IN_CARBON := FALSE} 191 {$setc OLDROUTINENAMES := FALSE} 192 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE} 193 {$setc OPAQUE_UPP_TYPES := TRUE} 194 {$setc OTCARBONAPPLICATION := TRUE} 195 {$setc OTKERNEL := FALSE} 196 {$setc PM_USE_SESSION_APIS := TRUE} 197 {$setc TARGET_API_MAC_CARBON := TRUE} 198 {$setc TARGET_API_MAC_OS8 := FALSE} 199 {$setc TARGET_API_MAC_OSX := TRUE} 200 {$setc TARGET_CARBON := TRUE} 201 {$setc TARGET_CPU_68K := FALSE} 202 {$setc TARGET_CPU_MIPS := FALSE} 203 {$setc TARGET_CPU_SPARC := FALSE} 204 {$setc TARGET_OS_UNIX := FALSE} 205 {$setc TARGET_OS_WIN32 := FALSE} 206 {$setc TARGET_RT_MAC_68881 := FALSE} 207 {$setc TARGET_RT_MAC_CFM := FALSE} 208 {$setc TARGET_RT_MAC_MACHO := TRUE} 209 {$setc TYPED_FUNCTION_POINTERS := TRUE} 210 {$setc TYPE_BOOL := FALSE} 211 {$setc TYPE_EXTENDED := FALSE} 212 {$setc TYPE_LONGLONG := TRUE} 213 uses MacTypes,CFBase; 214 {$endc} {not MACOSALLINCLUDE} 215 216 217 {$ifc TARGET_OS_MAC} 218 219 220 {$ALIGN POWER} 221 222 223 { 224 * The following keys may appear in a quarantine properties dictionary. To access a 225 * file's quarantine properties dictionary, fetch the kLSItemQuarantineProperties 226 * attribute using LSCopyItemAttribute() or LSCopyItemAttributes(). 227 * The quarantine property dictionary can be set using LSSetItemAttribute(). 228 * 229 * 230 * kLSQuarantineAgentNameKey - value type CFStringRef 231 * 232 * The name of the quarantining agent (application or program). When setting quarantine 233 * properties, this value is set automatically to the current process name if this key is not 234 * present in the caller's dictionary. 235 * 236 * 237 * kLSQuarantineAgentBundleIdentifierKey - value type CFStringRef 238 * 239 * The bundle identifier of the quarantining agent, if available. When setting quarantine 240 * properties, this value is set automatically if the key is not present in the caller's 241 * dictionary. The automatic value is the main bundle identifier of the current process. 242 * 243 * 244 * kLSQuarantineTimeStampKey - value type CFDateRef 245 * 246 * The date and time the item was quarantined. When setting quarantine properties, 247 * this property is set automatically to the current date and time if this key is not present 248 * in the caller's dictionary. 249 * 250 * 251 * kLSQuarantineTypeKey - value type CFStringRef 252 * 253 * A symbolic string identifying the why the item is quarantined, if available. 254 * The value is one of the following: 255 * 256 * kLSQuarantineTypeWebDownload 257 * kLSQuarantineTypeOtherDownload 258 * kLSQuarantineTypeEmailAttachment 259 * kLSQuarantineTypeInstantMessageAttachment 260 * kLSQuarantineTypeCalendarEventAttachment 261 * kLSQuarantineTypeOtherAttachment 262 * 263 * 264 * kLSQuarantineDataURLKey - value type CFURLRef 265 * 266 * The URL from which the data for the quarantined item data was actaully streamed 267 * or downloaded, if available. 268 * 269 * 270 * kLSQuarantineOriginURLKey - value type CFURLRef 271 * 272 * The URL of the resource originally hosting the quarantined item, from the user's point of 273 * view. For web downloads, this property is the URL of the web page on which the user initiated 274 * the download. For attachments, this property is the URL of the resource to which the quarantined 275 * item was attached (e.g. the email message, calendar event, etc.). The origin URL may be a file URL 276 * for local resources, or a custom URL to which the quarantining application will respond when asked 277 * to open it. The quarantining application should respond by displaying the resource to the user. 278 * Note: The origin URL should not be set to the data URL, or the quarantining application may start 279 * downloading the file again if the user choses to view the origin URL while resolving a quarantine 280 * warning. 281 * 282 } 283 { 284 * kLSQuarantineAgentNameKey 285 * 286 * Availability: 287 * Mac OS X: in version 10.5 and later in CoreServices.framework 288 * CarbonLib: not available 289 * Non-Carbon CFM: not available 290 } 291 var kLSQuarantineAgentNameKey: CFStringRef; external name '_kLSQuarantineAgentNameKey'; (* attribute const *) 292 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *) 293 { 294 * kLSQuarantineAgentBundleIdentifierKey 295 * 296 * Availability: 297 * Mac OS X: in version 10.5 and later in CoreServices.framework 298 * CarbonLib: not available 299 * Non-Carbon CFM: not available 300 } 301 var kLSQuarantineAgentBundleIdentifierKey: CFStringRef; external name '_kLSQuarantineAgentBundleIdentifierKey'; (* attribute const *) 302 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *) 303 { 304 * kLSQuarantineTimeStampKey 305 * 306 * Availability: 307 * Mac OS X: in version 10.5 and later in CoreServices.framework 308 * CarbonLib: not available 309 * Non-Carbon CFM: not available 310 } 311 var kLSQuarantineTimeStampKey: CFStringRef; external name '_kLSQuarantineTimeStampKey'; (* attribute const *) 312 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *) 313 { 314 * kLSQuarantineTypeKey 315 * 316 * Availability: 317 * Mac OS X: in version 10.5 and later in CoreServices.framework 318 * CarbonLib: not available 319 * Non-Carbon CFM: not available 320 } 321 var kLSQuarantineTypeKey: CFStringRef; external name '_kLSQuarantineTypeKey'; (* attribute const *) 322 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *) 323 { 324 * kLSQuarantineTypeWebDownload 325 * 326 * Availability: 327 * Mac OS X: in version 10.5 and later in CoreServices.framework 328 * CarbonLib: not available 329 * Non-Carbon CFM: not available 330 } 331 var kLSQuarantineTypeWebDownload: CFStringRef; external name '_kLSQuarantineTypeWebDownload'; (* attribute const *) 332 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *) 333 { 334 * kLSQuarantineTypeOtherDownload 335 * 336 * Availability: 337 * Mac OS X: in version 10.5 and later in CoreServices.framework 338 * CarbonLib: not available 339 * Non-Carbon CFM: not available 340 } 341 var kLSQuarantineTypeOtherDownload: CFStringRef; external name '_kLSQuarantineTypeOtherDownload'; (* attribute const *) 342 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *) 343 { 344 * kLSQuarantineTypeEmailAttachment 345 * 346 * Availability: 347 * Mac OS X: in version 10.5 and later in CoreServices.framework 348 * CarbonLib: not available 349 * Non-Carbon CFM: not available 350 } 351 var kLSQuarantineTypeEmailAttachment: CFStringRef; external name '_kLSQuarantineTypeEmailAttachment'; (* attribute const *) 352 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *) 353 { 354 * kLSQuarantineTypeInstantMessageAttachment 355 * 356 * Availability: 357 * Mac OS X: in version 10.5 and later in CoreServices.framework 358 * CarbonLib: not available 359 * Non-Carbon CFM: not available 360 } 361 var kLSQuarantineTypeInstantMessageAttachment: CFStringRef; external name '_kLSQuarantineTypeInstantMessageAttachment'; (* attribute const *) 362 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *) 363 { 364 * kLSQuarantineTypeCalendarEventAttachment 365 * 366 * Availability: 367 * Mac OS X: in version 10.5 and later in CoreServices.framework 368 * CarbonLib: not available 369 * Non-Carbon CFM: not available 370 } 371 var kLSQuarantineTypeCalendarEventAttachment: CFStringRef; external name '_kLSQuarantineTypeCalendarEventAttachment'; (* attribute const *) 372 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *) 373 { 374 * kLSQuarantineTypeOtherAttachment 375 * 376 * Availability: 377 * Mac OS X: in version 10.5 and later in CoreServices.framework 378 * CarbonLib: not available 379 * Non-Carbon CFM: not available 380 } 381 var kLSQuarantineTypeOtherAttachment: CFStringRef; external name '_kLSQuarantineTypeOtherAttachment'; (* attribute const *) 382 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *) 383 { 384 * kLSQuarantineOriginURLKey 385 * 386 * Availability: 387 * Mac OS X: in version 10.5 and later in CoreServices.framework 388 * CarbonLib: not available 389 * Non-Carbon CFM: not available 390 } 391 var kLSQuarantineOriginURLKey: CFStringRef; external name '_kLSQuarantineOriginURLKey'; (* attribute const *) 392 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *) 393 { 394 * kLSQuarantineDataURLKey 395 * 396 * Availability: 397 * Mac OS X: in version 10.5 and later in CoreServices.framework 398 * CarbonLib: not available 399 * Non-Carbon CFM: not available 400 } 401 var kLSQuarantineDataURLKey: CFStringRef; external name '_kLSQuarantineDataURLKey'; (* attribute const *) 402 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *) 403 404 {$endc} {TARGET_OS_MAC} 405 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE} 406 407 end. 408 {$endc} {not MACOSALLINCLUDE} 409