objc2_file_provider/generated/NSFileProviderItem.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-uniform-type-identifiers")]
8use objc2_uniform_type_identifiers::*;
9
10use crate::*;
11
12/// [Apple's documentation](https://developer.apple.com/documentation/fileprovider/nsfileprovideritemidentifier?language=objc)
13// NS_TYPED_EXTENSIBLE_ENUM
14pub type NSFileProviderItemIdentifier = NSString;
15
16extern "C" {
17 /// The root of the hierarchical enumeration, i.e the container enumerated when the
18 /// user starts browsing your file provider.
19 ///
20 /// See also [Apple's documentation](https://developer.apple.com/documentation/fileprovider/nsfileproviderrootcontaineritemidentifier?language=objc)
21 pub static NSFileProviderRootContainerItemIdentifier: &'static NSFileProviderItemIdentifier;
22}
23
24extern "C" {
25 /// The item identifier of the working set, a synthetic container used by the
26 /// extension to communicate changes to the system even when the parent directories
27 /// of these items aren't actively being enumerated. Items in this set should have
28 /// their parentItemIdentifier set to the identifier of their parent directory.
29 ///
30 /// The working set is the set of files and directories that should be made
31 /// available to the system regardless of the local browsing history. Files listed
32 /// in the working set are indexed in the local Spotlight index and appear in
33 /// offline search results. They contribute to the Recents view of the Files app,
34 /// sorted by lastUsedDate, and it is therefore important to provide a consistent
35 /// experience across devices by including in the working set all the documents
36 /// recently used, trashed, favorited, shared or tagged.
37 ///
38 /// The Spotlight index and the Recents view will show outdated information unless
39 /// the file provider extension keeps the working set up to date with local and
40 /// remote changes. When an item in the working set is remotely modified, the
41 /// extension calls -signalEnumeratorForContainerItemIdentifier: on the identifier
42 /// of the working set; the system will then enumerate changes and update its caches.
43 ///
44 /// Starting in iOS 12 and macOS 10.15, the system maintains a cache on the local
45 /// file system of files and directories previously enumerated. The working set
46 /// is the container used to update that set of files. The extension may know
47 /// whether an item is in that set by checking whether its parentItemIdentifier
48 /// is listed in the materialized containers, see the documentation on
49 /// -materializedItemsDidChangeWithCompletionHandler:.
50 ///
51 /// See also [Apple's documentation](https://developer.apple.com/documentation/fileprovider/nsfileproviderworkingsetcontaineritemidentifier?language=objc)
52 pub static NSFileProviderWorkingSetContainerItemIdentifier:
53 &'static NSFileProviderItemIdentifier;
54}
55
56extern "C" {
57 /// The container containing all the trashed items.
58 ///
59 /// When an item is trashed, its `parentItemIdentifier` becomes `NSFileProviderTrashContainerItemIdentifier`.
60 ///
61 /// Extension should be able to return all trashed items by supporting the creation of a NSFileProviderEnumerator
62 /// for the trashed items.
63 ///
64 /// See also [Apple's documentation](https://developer.apple.com/documentation/fileprovider/nsfileprovidertrashcontaineritemidentifier?language=objc)
65 pub static NSFileProviderTrashContainerItemIdentifier: &'static NSFileProviderItemIdentifier;
66}
67
68extern_class!(
69 /// [Apple's documentation](https://developer.apple.com/documentation/fileprovider/nsfileprovideritemversion?language=objc)
70 #[unsafe(super(NSObject))]
71 #[derive(Debug, PartialEq, Eq, Hash)]
72 pub struct NSFileProviderItemVersion;
73);
74
75extern_conformance!(
76 unsafe impl NSObjectProtocol for NSFileProviderItemVersion {}
77);
78
79impl NSFileProviderItemVersion {
80 extern_methods!(
81 /// Version component exposed by the system to denote a state that predates a version returned by the provider.
82 ///
83 /// In case an item was created by calling `createItemBasedOnTemplate` and the item returned by the provider in
84 /// the completion handler of that call didn't match the item template passed by the system, the system will try
85 /// to apply the changes asked by the provider to the disk. However, the system may detect conflicts when applying
86 /// those content back to the disk, which will cause the system to send the new disk version to the extension,
87 /// by calling `modifyItem` or `deleteItemWithIdentifier` with a `baseVersion` that represents the item as passed in
88 /// the template of the `createItemBasedOnTemplate` call.
89 ///
90 /// This constant is used by the system to represent that specific version that was communicated by the system to
91 /// the extension but does not have a corresponding version assigned by the extension.
92 #[unsafe(method(beforeFirstSyncComponent))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn beforeFirstSyncComponent() -> Retained<NSData>;
95
96 /// Items versions have two distinct components, one for the file contents and one
97 /// for metadata.
98 ///
99 /// Components are limited to 128 bytes in size.
100 #[unsafe(method(initWithContentVersion:metadataVersion:))]
101 #[unsafe(method_family = init)]
102 pub unsafe fn initWithContentVersion_metadataVersion(
103 this: Allocated<Self>,
104 content_version: &NSData,
105 metadata_version: &NSData,
106 ) -> Retained<Self>;
107
108 /// Version data for the content of the file.
109 ///
110 /// This property is used by the system for two purposes: if the contentVersion changes,
111 /// - the system assumes that the contents have changed and will trigger a redownload if
112 /// necessary. The exception to this is the case where the extension accepts a content
113 /// sent by the system when replying to a createItemBasedOnTemplate or modifyItem call
114 /// with shouldFetchContent set to NO.
115 /// - the thumbnail cache is invalidated
116 ///
117 /// Note that the resource fork of the file is considered content, so this version
118 /// data should change when either the data fork or the resource fork changes.
119 #[unsafe(method(contentVersion))]
120 #[unsafe(method_family = none)]
121 pub unsafe fn contentVersion(&self) -> Retained<NSData>;
122
123 /// Version data for the metadata of the item, i.e everything but the data fork and
124 /// the resource fork.
125 ///
126 /// The system will store this version, but otherwise ignore it:
127 /// - metadata changes on an item will be applied even if the metadataVersion remains unchanged
128 /// - if the metadata version changes without any corresponding observable changes in the metadata returned
129 /// to the system, the system will simply store the updated metadata version (to return it as the base version
130 /// of a possible future change request).
131 #[unsafe(method(metadataVersion))]
132 #[unsafe(method_family = none)]
133 pub unsafe fn metadataVersion(&self) -> Retained<NSData>;
134 );
135}
136
137/// Methods declared on superclass `NSObject`.
138impl NSFileProviderItemVersion {
139 extern_methods!(
140 #[unsafe(method(init))]
141 #[unsafe(method_family = init)]
142 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
143
144 #[unsafe(method(new))]
145 #[unsafe(method_family = new)]
146 pub unsafe fn new() -> Retained<Self>;
147 );
148}
149
150extern "C" {
151 /// A special value for favorite ranks, to use when no rank was set when the item
152 /// was favorited.
153 ///
154 /// See also [Apple's documentation](https://developer.apple.com/documentation/fileprovider/nsfileproviderfavoriterankunranked?language=objc)
155 pub static NSFileProviderFavoriteRankUnranked: c_ulonglong;
156}
157
158/// [Apple's documentation](https://developer.apple.com/documentation/fileprovider/nsfileprovideritemcapabilities?language=objc)
159// NS_OPTIONS
160#[repr(transparent)]
161#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
162pub struct NSFileProviderItemCapabilities(pub NSUInteger);
163bitflags::bitflags! {
164 impl NSFileProviderItemCapabilities: NSUInteger {
165/// Indicates that the file can be opened for reading. If set on a folder
166/// this is equivalent to
167/// `.allowsContentEnumerating.`
168 #[doc(alias = "NSFileProviderItemCapabilitiesAllowsReading")]
169 const AllowsReading = 1<<0;
170/// Indicates that the file can be opened for writing. If set on a folder,
171/// this is equivalent to
172/// `.allowsAddingSubItems.`
173 #[doc(alias = "NSFileProviderItemCapabilitiesAllowsWriting")]
174 const AllowsWriting = 1<<1;
175/// Indicates that the item can be moved to another folder
176 #[doc(alias = "NSFileProviderItemCapabilitiesAllowsReparenting")]
177 const AllowsReparenting = 1<<2;
178/// Indicates that the item can be renamed
179 #[doc(alias = "NSFileProviderItemCapabilitiesAllowsRenaming")]
180 const AllowsRenaming = 1<<3;
181/// Indicates that the item can be moved to the trash
182 #[doc(alias = "NSFileProviderItemCapabilitiesAllowsTrashing")]
183 const AllowsTrashing = 1<<4;
184/// Indicates that the item can be deleted
185 #[doc(alias = "NSFileProviderItemCapabilitiesAllowsDeleting")]
186 const AllowsDeleting = 1<<5;
187/// Indicates that the item can be evicted.
188///
189/// If this capability is set on an item, the item will become evictable when the item is fully uploaded
190/// (-[NSFileProviderItem isUploaded] not implemented or set to YES), is not actively used and contains no
191/// local changes. The eviction can happen either because the user selected the "Remove Download" option
192/// in Finder, because the provider decided to evict the item using `-[NSFileProviderManager evictItemWithIdentifier:completionHandler:]`,
193/// or because the system ran into a low-disk space scenario.
194///
195/// If this capability is not present, the item will never be evicted.
196/// If the provider wishes to only suppress the user's ability to evict the item in the UI (but retain the ability
197/// of the OS or the provider's program to evict items), the provider can set the following key to false in
198/// their Info.plist, in the NSExtension section: NSExtensionFileProviderAllowsUserControlledEviction
199 #[doc(alias = "NSFileProviderItemCapabilitiesAllowsEvicting")]
200#[deprecated = "use NSFileProviderContentPolicy instead"]
201 const AllowsEvicting = 1<<6;
202/// Indicates that the item can be excluded from sync.
203///
204/// The user can choose to exclude the item in the UI (Finder), in which case the system will stop
205/// monitoring changes for the item and its children and will remove the item from the provider.
206///
207/// This capability can be used to allow an item to be excluded from sync.
208 #[doc(alias = "NSFileProviderItemCapabilitiesAllowsExcludingFromSync")]
209 const AllowsExcludingFromSync = 1<<7;
210/// Indicates that items can be imported to the folder. If set on a file,
211/// this is equivalent to
212/// `.allowsWriting.`
213 #[doc(alias = "NSFileProviderItemCapabilitiesAllowsAddingSubItems")]
214 const AllowsAddingSubItems = NSFileProviderItemCapabilities::AllowsWriting.0;
215/// Indicates that the folder can be enumerated. If set on a file, this is
216/// equivalent to
217/// `.allowsReading.`
218 #[doc(alias = "NSFileProviderItemCapabilitiesAllowsContentEnumerating")]
219 const AllowsContentEnumerating = NSFileProviderItemCapabilities::AllowsReading.0;
220/// Indicates that the folder can be enumerated. If set on a file, this is
221/// equivalent to
222/// `.allowsReading.`
223 #[doc(alias = "NSFileProviderItemCapabilitiesAllowsAll")]
224#[deprecated = "This capability is no longer supported, and does not contain all capabilities. Please migrate to directly specifying each of the individual capabilities that should be allowed for the item."]
225 const AllowsAll = NSFileProviderItemCapabilities::AllowsReading.0|NSFileProviderItemCapabilities::AllowsWriting.0|NSFileProviderItemCapabilities::AllowsReparenting.0|NSFileProviderItemCapabilities::AllowsRenaming.0|NSFileProviderItemCapabilities::AllowsTrashing.0|NSFileProviderItemCapabilities::AllowsDeleting.0;
226 }
227}
228
229unsafe impl Encode for NSFileProviderItemCapabilities {
230 const ENCODING: Encoding = NSUInteger::ENCODING;
231}
232
233unsafe impl RefEncode for NSFileProviderItemCapabilities {
234 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
235}
236
237/// NSFileProviderItemContents corresponds to the item's contents.
238///
239/// Each subsequent field corresponds to a property on NSFileProviderItem that can
240/// change.
241///
242/// See also [Apple's documentation](https://developer.apple.com/documentation/fileprovider/nsfileprovideritemfields?language=objc)
243// NS_OPTIONS
244#[repr(transparent)]
245#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
246pub struct NSFileProviderItemFields(pub NSUInteger);
247bitflags::bitflags! {
248 impl NSFileProviderItemFields: NSUInteger {
249 #[doc(alias = "NSFileProviderItemContents")]
250 const Contents = 1<<0;
251 #[doc(alias = "NSFileProviderItemFilename")]
252 const Filename = 1<<1;
253 #[doc(alias = "NSFileProviderItemParentItemIdentifier")]
254 const ParentItemIdentifier = 1<<2;
255 #[doc(alias = "NSFileProviderItemLastUsedDate")]
256 const LastUsedDate = 1<<3;
257 #[doc(alias = "NSFileProviderItemTagData")]
258 const TagData = 1<<4;
259 #[doc(alias = "NSFileProviderItemFavoriteRank")]
260 const FavoriteRank = 1<<5;
261 #[doc(alias = "NSFileProviderItemCreationDate")]
262 const CreationDate = 1<<6;
263 #[doc(alias = "NSFileProviderItemContentModificationDate")]
264 const ContentModificationDate = 1<<7;
265 #[doc(alias = "NSFileProviderItemFileSystemFlags")]
266 const FileSystemFlags = 1<<8;
267 #[doc(alias = "NSFileProviderItemExtendedAttributes")]
268 const ExtendedAttributes = 1<<9;
269 #[doc(alias = "NSFileProviderItemTypeAndCreator")]
270 const TypeAndCreator = 1<<10;
271 }
272}
273
274unsafe impl Encode for NSFileProviderItemFields {
275 const ENCODING: Encoding = NSUInteger::ENCODING;
276}
277
278unsafe impl RefEncode for NSFileProviderItemFields {
279 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
280}
281
282/// [Apple's documentation](https://developer.apple.com/documentation/fileprovider/nsfileproviderfilesystemflags?language=objc)
283// NS_OPTIONS
284#[repr(transparent)]
285#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
286pub struct NSFileProviderFileSystemFlags(pub NSUInteger);
287bitflags::bitflags! {
288 impl NSFileProviderFileSystemFlags: NSUInteger {
289/// Item has the POSIX user-executable (u+x) permission.
290 #[doc(alias = "NSFileProviderFileSystemUserExecutable")]
291 const UserExecutable = 1<<0;
292/// Item has the POSIX user-readable (u+r) permission.
293 #[doc(alias = "NSFileProviderFileSystemUserReadable")]
294 const UserReadable = 1<<1;
295/// Item has the POSIX user-writable (u+w) permission.
296 #[doc(alias = "NSFileProviderFileSystemUserWritable")]
297 const UserWritable = 1<<2;
298/// Item should not be presented in the file viewers.
299///
300/// This includes both the UF_HIDDEN BSD flag and the Invisible bit from the
301/// FinderInfo. When syncing down, the system only sets the UF_HIDDEN
302/// flag.
303 #[doc(alias = "NSFileProviderFileSystemHidden")]
304 const Hidden = 1<<3;
305/// The extension of the item should not be presented in the file viewers.
306 #[doc(alias = "NSFileProviderFileSystemPathExtensionHidden")]
307 const PathExtensionHidden = 1<<4;
308 }
309}
310
311unsafe impl Encode for NSFileProviderFileSystemFlags {
312 const ENCODING: Encoding = NSUInteger::ENCODING;
313}
314
315unsafe impl RefEncode for NSFileProviderFileSystemFlags {
316 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
317}
318
319/// [Apple's documentation](https://developer.apple.com/documentation/fileprovider/nsfileprovidertypeandcreator?language=objc)
320#[repr(C)]
321#[derive(Clone, Copy, Debug, PartialEq)]
322pub struct NSFileProviderTypeAndCreator {
323 /// The first word of the FinderInfo structure. It matches the file type code
324 pub r#type: OSType,
325 /// The second word of the FinderInfo structure. It matches the creator code
326 pub creator: OSType,
327}
328
329unsafe impl Encode for NSFileProviderTypeAndCreator {
330 const ENCODING: Encoding = Encoding::Struct(
331 "NSFileProviderTypeAndCreator",
332 &[<OSType>::ENCODING, <OSType>::ENCODING],
333 );
334}
335
336unsafe impl RefEncode for NSFileProviderTypeAndCreator {
337 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
338}
339
340/// [Apple's documentation](https://developer.apple.com/documentation/fileprovider/nsfileprovidercontentpolicy?language=objc)
341// NS_ENUM
342#[repr(transparent)]
343#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
344pub struct NSFileProviderContentPolicy(pub NSInteger);
345impl NSFileProviderContentPolicy {
346 /// Inherit the content policy of the parent folder.
347 ///
348 /// This is the default policy on every item other than the root.
349 #[doc(alias = "NSFileProviderContentPolicyInherited")]
350 pub const Inherited: Self = Self(0);
351 /// Download this item lazily (i.e when it is read) if it is dataless.
352 /// Download remote content updates eagerly if this file is not dataless.
353 /// Allow eviction on low disk pressure and other triggers.
354 ///
355 /// This is the default policy on the root on macOS.
356 #[doc(alias = "NSFileProviderContentPolicyDownloadLazily")]
357 pub const DownloadLazily: Self = Self(1);
358 /// Download this item lazily (i.e when it is read.)
359 /// Evict the file upon remote content update.
360 /// Also allow eviction on low disk pressure and other triggers.
361 ///
362 /// This is the default policy on the root on iOS.
363 #[doc(alias = "NSFileProviderContentPolicyDownloadLazilyAndEvictOnRemoteUpdate")]
364 pub const DownloadLazilyAndEvictOnRemoteUpdate: Self = Self(2);
365 /// Download this item eagerly (i.e before it is read.)
366 /// Keep downloading remote updates eagerly.
367 /// Prevent eviction on low disk pressure and other triggers.
368 ///
369 /// When an item with the inherited policy is moved into a folder with
370 /// this policy, the system will automatically schedule a download.
371 #[doc(alias = "NSFileProviderContentPolicyDownloadEagerlyAndKeepDownloaded")]
372 pub const DownloadEagerlyAndKeepDownloaded: Self = Self(3);
373}
374
375unsafe impl Encode for NSFileProviderContentPolicy {
376 const ENCODING: Encoding = NSInteger::ENCODING;
377}
378
379unsafe impl RefEncode for NSFileProviderContentPolicy {
380 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
381}
382
383extern_protocol!(
384 /// [Apple's documentation](https://developer.apple.com/documentation/fileprovider/nsfileprovideritemprotocol?language=objc)
385 #[doc(alias = "NSFileProviderItem")]
386 #[name = "NSFileProviderItem"]
387 pub unsafe trait NSFileProviderItemProtocol: NSObjectProtocol {
388 /// The identifier of the item.
389 ///
390 /// The itemIdentifier should not contain sensitive information, as it may be recorded in system logs and
391 /// diagnostic files.
392 #[unsafe(method(itemIdentifier))]
393 #[unsafe(method_family = none)]
394 unsafe fn itemIdentifier(&self) -> Retained<NSFileProviderItemIdentifier>;
395
396 /// The parent identifier specifies the parent of the item in the hierarchy.
397 ///
398 /// Set to NSFileProviderRootContainerItemIdentifier for an item at the root of the
399 /// user's storage. Set to the itemIdentifier of the item's parent otherwise.
400 ///
401 /// When enumerating the root container or a generic container, the
402 /// parentItemIdentifier of the enumerated items is expected to match the
403 /// enumerated item's identifier. When enumerating the working set, the
404 /// parentItemIdentifier is expected to match the actual parent of the item in the
405 /// hierarchy (ie. it is not NSFileProviderWorkingSetContainerItemIdentifier).
406 ///
407 /// The parents of trashed items and of the root item are ignored.
408 #[unsafe(method(parentItemIdentifier))]
409 #[unsafe(method_family = none)]
410 unsafe fn parentItemIdentifier(&self) -> Retained<NSFileProviderItemIdentifier>;
411
412 /// The file or directory name, complete with its file extension.
413 ///
414 /// The filename property must not be an empty string, including when the item identifier is
415 /// NSFileProviderRootContainerItemIdentifier. The filename for NSFileProviderRootContainerItemIdentifier
416 /// may be displayed in the user interface. Therefore it should be a user-friendly string.
417 #[unsafe(method(filename))]
418 #[unsafe(method_family = none)]
419 unsafe fn filename(&self) -> Retained<NSString>;
420
421 #[cfg(feature = "objc2-uniform-type-identifiers")]
422 /// ContentType (UTType) for the item.
423 ///
424 /// On macOS, items must implement contentType.
425 ///
426 /// On iOS, items must implement either contentType or typeIdentifier. Note
427 /// that contentType is not available on iOS 13 and earlier, so typeIdentifier
428 /// is required in order to target iOS 13 and earlier.
429 ///
430 /// When using NSFileProviderReplicatedExtension, providers must be prepared
431 /// to handle the following contentType in the appropriate manner
432 /// when they are passed in itemTemplates contentType to createItem/modifyItem calls:
433 /// UTType.symbolicLink
434 /// UTType.folder
435 /// UTType.package
436 /// UTType.aliasFile
437 ///
438 /// Changing the contentType for a given item that would result in a transition to/from a folder
439 /// or to/from a symlink is not supported.
440 #[optional]
441 #[unsafe(method(contentType))]
442 #[unsafe(method_family = none)]
443 unsafe fn contentType(&self) -> Retained<UTType>;
444
445 /// Uniform type identifier (UTI) for the item.
446 ///
447 /// This property is deprecated in favor of the "contentType" property.
448 ///
449 /// On macOS, typeIdentifier is not available. Items must implement contentType
450 /// on macOS.
451 ///
452 /// On iOS, items must implement either contentType or typeIdentifier. Note
453 /// that contentType is not available on iOS 13 and earlier, so typeIdentifier
454 /// is required in order to target iOS 13 and earlier.
455 #[deprecated]
456 #[optional]
457 #[unsafe(method(typeIdentifier))]
458 #[unsafe(method_family = none)]
459 unsafe fn typeIdentifier(&self) -> Retained<NSString>;
460
461 /// File type and creator code for the item.
462 ///
463 /// This property contains two variables, one for the file type code and one for the creator code.
464 /// Both will be synchronized at the same time, so you have to define both when changing one.
465 ///
466 /// On change on this structure, the NSFileProviderItemTypeAndCreator field will be set in the
467 /// NSFileProviderItemFields argument to createItem/modifyItem.
468 ///
469 /// These will be written down in the FinderInfo structure if relevant.
470 #[optional]
471 #[unsafe(method(typeAndCreator))]
472 #[unsafe(method_family = none)]
473 unsafe fn typeAndCreator(&self) -> NSFileProviderTypeAndCreator;
474
475 /// The capabilities of the item. This controls the list of actions that the UI
476 /// will allow for the item.
477 ///
478 /// Capabilities on an item only apply to the item itself. They are not inherited by the children of directories.
479 #[optional]
480 #[unsafe(method(capabilities))]
481 #[unsafe(method_family = none)]
482 unsafe fn capabilities(&self) -> NSFileProviderItemCapabilities;
483
484 /// File System level flags.
485 ///
486 /// This includes POSIX permissions and presentation options for the item.
487 ///
488 /// Prior to macOS 11.3, fileSystemFlags are not honored for directories.
489 #[optional]
490 #[unsafe(method(fileSystemFlags))]
491 #[unsafe(method_family = none)]
492 unsafe fn fileSystemFlags(&self) -> NSFileProviderFileSystemFlags;
493
494 #[optional]
495 #[unsafe(method(documentSize))]
496 #[unsafe(method_family = none)]
497 unsafe fn documentSize(&self) -> Option<Retained<NSNumber>>;
498
499 #[optional]
500 #[unsafe(method(childItemCount))]
501 #[unsafe(method_family = none)]
502 unsafe fn childItemCount(&self) -> Option<Retained<NSNumber>>;
503
504 #[optional]
505 #[unsafe(method(creationDate))]
506 #[unsafe(method_family = none)]
507 unsafe fn creationDate(&self) -> Option<Retained<NSDate>>;
508
509 #[optional]
510 #[unsafe(method(contentModificationDate))]
511 #[unsafe(method_family = none)]
512 unsafe fn contentModificationDate(&self) -> Option<Retained<NSDate>>;
513
514 /// Syncable extended attributes on the file.
515 ///
516 /// The system decides which extended attributes should be synced from the device,
517 /// based on a set of rules largely inferred from the name of the extended
518 /// attribute. Extended attributes named with xattr_name_with_flags(XATTR_FLAG_SYNCABLE)
519 /// will be listed in this dictionary; some extended attributes introduced before
520 /// this API are also whitelisted for sync. The provider can declare of list of
521 /// attributes it wants to sync even if the system heuristic won't consider those
522 /// as syncable. For this, it can add a list of xattr names in the Info.plist of the
523 /// extension under the key NSExtensionFileProviderAdditionalSyncableExtendedAttributes.
524 ///
525 /// Syncable xattrs are capped in size to about 32KiB total for a given item.
526 /// When the set of extended attributes on a file is larger than that, the system
527 /// demotes some of the extended attributes to non-syncable.
528 ///
529 /// The system decides which non-syncable extended attributes should be preserved
530 /// locally when the item is updated remotely, based on a set of rules again largely
531 /// inferred from the name of the extended attribute. Extended attributes named
532 /// with xattr_name_with_flags(XATTR_FLAG_CONTENT_DEPENDENT) will be preserved only
533 /// if itemVersion.contentVersion was not modified by the remote update.
534 ///
535 /// Some NSFileProviderItem properties (lastUsedDate, tagData...) happen to be
536 /// stored on disk in extended attributes that won't be listed in this dictionary
537 /// because that would be redundant. The 32 bits of Finder info in the extended
538 /// attribute named XATTR_FINDERINFO_NAME ("com.apple.FinderInfo") is not listed
539 /// here for the same reason: the syncable Finder info bits are deserialized to
540 /// other properties of NSFileProviderItem.
541 ///
542 /// The system will set extended attributes on dataless files, and will preserve
543 /// them when a file is rendered dataless. I.e extended attributes are considered
544 /// metadata, not content. The resource fork however is considered content and
545 /// will not be included in this dictionary. Local changes to the resource fork
546 /// will be communicated under NSFileProviderItemContents. Remote changes to
547 /// the resource fork should bump itemVersion.contentVersion.
548 #[optional]
549 #[unsafe(method(extendedAttributes))]
550 #[unsafe(method_family = none)]
551 unsafe fn extendedAttributes(&self) -> Retained<NSDictionary<NSString, NSData>>;
552
553 /// The date this item was last used. This is neither the modification date nor
554 /// the last access date exposed in traditional file system APIs, and indicates a
555 /// very clear user intent to use the document. For example, this is set when the
556 /// document is open full screen on a device.
557 ///
558 /// This is the system's cue that the document is recent and should appear in the
559 /// recent list of the UIDocumentBrowserViewController.
560 ///
561 /// This property must not be shared between users, even if the item is.
562 #[optional]
563 #[unsafe(method(lastUsedDate))]
564 #[unsafe(method_family = none)]
565 unsafe fn lastUsedDate(&self) -> Option<Retained<NSDate>>;
566
567 /// An abstract data blob representing the tags associated with the item. The same
568 /// tags that are available via -[NSURL getResourceValue:forKey:error:] with key
569 /// NSURLTagNamesKey on macOS, except that this data blob may transport more
570 /// information than just the tag names.
571 ///
572 /// This property must not be shared between users, even if the item is.
573 ///
574 /// Starting in macOS 12 and iOS 15, the system suppports the value of the
575 /// `com.apple.metadata:_kMDItemUserTags` xattr as a valid `tagData` blob input.
576 #[optional]
577 #[unsafe(method(tagData))]
578 #[unsafe(method_family = none)]
579 unsafe fn tagData(&self) -> Option<Retained<NSData>>;
580
581 /// The presence of a favorite rank indicates that a directory is a favorite.
582 /// Favorite ranks are 64-bit unsigned integers. The initial value for the first
583 /// item is the time since the unix epoch in milliseconds, but subsequent items are
584 /// simply placed relative to that. Favorite ranks are modified when the user
585 /// reorders favorites.
586 ///
587 /// When favoriting folders on other platforms, set the rank to the time since the
588 /// unix epoch in milliseconds. Special value
589 /// @
590 /// (NSFileProviderFavoriteRankUnranked)
591 /// may be used if no rank is available: the system will then figure out the best
592 /// rank and set it. Please persist and sync the new value.
593 ///
594 /// This property must not be shared between users, even if the item is.
595 #[optional]
596 #[unsafe(method(favoriteRank))]
597 #[unsafe(method_family = none)]
598 unsafe fn favoriteRank(&self) -> Option<Retained<NSNumber>>;
599
600 /// Set on a directory or a document if it should appear in the trash.
601 ///
602 /// This flag should only be set on the top-level item: trashing a directory sets
603 /// this flag on the directory itself, but not on its children.
604 ///
605 /// Trashed items should remain in the working set; however, children of trashed
606 /// directories should be removed from the working set.
607 #[optional]
608 #[unsafe(method(isTrashed))]
609 #[unsafe(method_family = none)]
610 unsafe fn isTrashed(&self) -> bool;
611
612 /// Uploaded and uploading are used to inform the cloud badge which will be shown on the item.
613 ///
614 /// When using NSFileProviderReplicatedExtension, uploaded is used to inform whether the item may be
615 /// evicted from the local disk. If you choose to finish uploading items after calling the completion handler
616 /// of creteItem/modifyItem, you must set the uploaded flag to false, in order for the item to be excluded from
617 /// eviction.
618 #[optional]
619 #[unsafe(method(isUploaded))]
620 #[unsafe(method_family = none)]
621 unsafe fn isUploaded(&self) -> bool;
622
623 #[optional]
624 #[unsafe(method(isUploading))]
625 #[unsafe(method_family = none)]
626 unsafe fn isUploading(&self) -> bool;
627
628 /// An error that occurred while uploading to your remote server.
629 ///
630 ///
631 /// Note: Typical uploading errors include:
632 /// - NSFileProviderErrorInsufficientQuota
633 /// - NSFileProviderErrorServerUnreachable
634 ///
635 ///
636 /// See also: NSFileProviderErrorInsufficientQuota
637 ///
638 /// See also: NSFileProviderErrorServerUnreachable
639 #[optional]
640 #[unsafe(method(uploadingError))]
641 #[unsafe(method_family = none)]
642 unsafe fn uploadingError(&self) -> Option<Retained<NSError>>;
643
644 /// When using NSFileProviderExtension, downloaded and downloading are used to inform the cloud badge
645 /// which will be shown on the item.
646 ///
647 /// When using NSFileProviderReplicatedExtension, downloaded and downloading are ignored, as they can be
648 /// inferred from the result of calls to fetchContentsForItemWithIdentifier.
649 #[optional]
650 #[unsafe(method(isDownloaded))]
651 #[unsafe(method_family = none)]
652 unsafe fn isDownloaded(&self) -> bool;
653
654 #[optional]
655 #[unsafe(method(isDownloading))]
656 #[unsafe(method_family = none)]
657 unsafe fn isDownloading(&self) -> bool;
658
659 /// An error that occurred while downloading from your remote server.
660 #[optional]
661 #[unsafe(method(downloadingError))]
662 #[unsafe(method_family = none)]
663 unsafe fn downloadingError(&self) -> Option<Retained<NSError>>;
664
665 #[optional]
666 #[unsafe(method(isMostRecentVersionDownloaded))]
667 #[unsafe(method_family = none)]
668 unsafe fn isMostRecentVersionDownloaded(&self) -> bool;
669
670 #[optional]
671 #[unsafe(method(isShared))]
672 #[unsafe(method_family = none)]
673 unsafe fn isShared(&self) -> bool;
674
675 #[optional]
676 #[unsafe(method(isSharedByCurrentUser))]
677 #[unsafe(method_family = none)]
678 unsafe fn isSharedByCurrentUser(&self) -> bool;
679
680 /// ownerNameComponents should be nil when sharedByCurrentUser is equal to YES or
681 /// when the item is not shared.
682 #[optional]
683 #[unsafe(method(ownerNameComponents))]
684 #[unsafe(method_family = none)]
685 unsafe fn ownerNameComponents(&self) -> Option<Retained<NSPersonNameComponents>>;
686
687 #[optional]
688 #[unsafe(method(mostRecentEditorNameComponents))]
689 #[unsafe(method_family = none)]
690 unsafe fn mostRecentEditorNameComponents(&self)
691 -> Option<Retained<NSPersonNameComponents>>;
692
693 /// The versionIdentifier is used to invalidate the thumbnail in the thumbnail cache.
694 /// A content hash would be a reasonable choice.
695 ///
696 /// Version identifiers are limited to 1000 bytes.
697 ///
698 /// This property is deprecated in favor of the "itemVersion" property.
699 #[optional]
700 #[unsafe(method(versionIdentifier))]
701 #[unsafe(method_family = none)]
702 unsafe fn versionIdentifier(&self) -> Option<Retained<NSData>>;
703
704 /// The version is used to track which version of an item has been modified when informing a provider about changes. It is also used to invalidate the thumbnail cache.
705 #[optional]
706 #[unsafe(method(itemVersion))]
707 #[unsafe(method_family = none)]
708 unsafe fn itemVersion(&self) -> Retained<NSFileProviderItemVersion>;
709
710 /// The target of a symlink.
711 ///
712 /// If a replicated extension expose an item with the contentType public.symlink (UTTypeSymbolicLink),
713 /// this field should contain the target of the symlink.
714 #[optional]
715 #[unsafe(method(symlinkTargetPath))]
716 #[unsafe(method_family = none)]
717 unsafe fn symlinkTargetPath(&self) -> Option<Retained<NSString>>;
718
719 /// Use this dictionary to add state information to the item. Entries are accessible to
720 /// FileProviderUI and non-UI action predicates and user interaction predicates [1] via the
721 /// `userInfo` context key.
722 ///
723 /// Additionally, any entry of this dictionary with a key ending in `.inherited`
724 /// will be accessible to predicates for descendants of this item via the context key `inheritedUserInfo`.
725 ///
726 /// Items can redefine inherited values for their descendants by specifying the same key used in an ancestor's `userInfo`.
727 /// Thus, `inheritedUserInfo` for a given item is a dictionary of `*.inherited` keys from all if its ancestors, with each value
728 /// taken from the nearest ancestor that has the entry defined.
729 ///
730 /// In this example directory structure:
731 /// root
732 /// |_ parent
733 /// |_ child
734 /// |_ grandchild
735 ///
736 /// with the following userInfo values set:
737 /// parent.userInfo = { "a.inherited": YES, "b.inherited": YES }
738 /// child.userInfo = { "a.inherited": NO, "c.inherited": NO }
739 /// grandchild.userInfo = { }
740 ///
741 /// the following inheritedUserInfo values will be provided:
742 /// parent.inheritedUserInfo = { }
743 /// child.inheritedUserInfo = { "a.inherited": YES, "b.inherited": YES }
744 /// grandchild.inheritedUserInfo = { "a.inherited": NO, "b.inherited": YES, "c.inherited": NO }
745 ///
746 /// The context key `resolvedUserInfo` is also available. For each item, the resolvedUserInfo is it's
747 /// inheritedUserInfo, combined with the keys suffixed with .inherited from it's userInfo.
748 /// Continuing the previous example:
749 /// parent.resolvedUserInfo = { "a.inherited": YES, "b.inherited": YES }
750 /// child.resolvedUserInfo = { "a.inherited": NO, "b.inherited": YES, "c.inherited": NO }
751 /// grandchild.resolvedUserInfo = { "a.inherited": NO, "b.inherited": YES, "c.inherited": NO }
752 ///
753 /// All values for this dictionary must be of type String, Number, Bool or Date.
754 ///
755 /// [1] UserInteraction can be defined when a user level action occurs with a file.
756 ///
757 /// - `NSFileProviderUserInteractions` *array*
758 /// - `ActivationRule ` *string*, the predicate.
759 /// Parameters predicates
760 /// - `destinationItem`: the destination item for an action. Present for Move/MoveIn/Copy/CopyIn/Create
761 /// - `action` : the action that is being performed
762 /// 'Move' : moving item(s) within the same provider
763 /// 'MoveOut' : moving item(s) out of the provider
764 /// 'MoveIn' : importing item(s) into a folder/root of the provider
765 /// 'Copy' : copying item(s) within the same provider
766 /// 'CopyOut' : copying item(s) out of the provider
767 /// 'CopyIn' : copying item(s) into a folder/root of the provider
768 /// 'Trash' : trashing item(s)
769 /// 'Create' : creating an item (available in macOS 12.0 and later)
770 /// The Create action will be evaluated when the user creates a new file
771 /// or folder in a system Open/Save panel.
772 /// The sourceItem is the file/folder being created. The only field that is
773 /// populated for this item is the filename. The type of file/folder, size, etc,
774 /// are unknown at Create evaluation time.
775 /// The destinationItem is the directory which the file/folder is being created
776 /// within.
777 /// 'Delete' : deleting item(s)
778 /// If the provider wishes to take full responsibility for showing warnings on Delete,
779 /// the provider can set NSExtensionFileProviderAllowsSystemDeleteAlerts=0 in the provider's Info.plist.
780 /// This will ensure that the system does not display it's warnings when the user is deleting a file.
781 /// 'ExcludeFromSync' : deleting items(s) because the user chose to exclude those from sync (available in macOS 12.0 and later)
782 /// 'Rename' : renaming item(s) (available in macOS 11.3 and later)
783 /// The destinationItem has only the `filename` field populated (available in macOS 12.0.1 and later).
784 /// - `sourceItem` : current item that the predicate is evaluating. Present for Move/MoveOut/Copy/CopyOut/Create/Trash/Delete/ExcludeFromSync/Rename
785 /// - `sourceItemsCount` :
786 /// - In userInteraction, represents the count of sourceItems of an action operation
787 /// - In subUserInteraction: represents the count of items that matched the previous predicate
788 /// - `domainUserInfo`: The latest dictionary returned from -[NSFileProviderDomainState userInfo]
789 /// - `Alert` *dictionary*
790 /// - `LocalizedTitle` *string*, title of the alert
791 /// - `LocalizedSubTitle` *string*, sub title of the alert
792 /// -
793 /// Parameters (maximum 10) for LocalizedTitle/LocalizedSubTitle
794 /// - `matchingItemsCount`: count of source items that matched the predicate (only present if matchingItemsCount > 0)
795 /// - `matchingItemsCountMinusOne`: matchingItemsCount minus one (only present if matchingItemsCount > 1)
796 /// - `matchingItemsCountMinusTwo`: matchingItemsCount minus two (only present if matchingItemsCount > 2)
797 /// - `firstMatchingItem`: first sourceItem that matched the predicate (only present if matchingItemsCount > 1)
798 /// - `secondMatchingItem`: second sourceItem that matched the predicate (only present if matchingItemsCount > 2)
799 /// - `LocalizedRecoveryOptions`
800 /// - `Continue` *string*, the string for the continue button - default value if not specified
801 /// - `Cancel` *string*, the string for the cancel button - default value if not specified
802 /// - `RecoveryOptions` (optional)
803 /// - `Continue` *bool*, the boolean for whether to have a continue button - default value is YES if not specified
804 /// - `Destructive` *bool*, the boolean for whether continuing is a destructive action - default value is NO if not specified
805 /// - `HelpURL` *string*: If present, a help button will be displayed on the Alert that is shown. If the user
806 /// clicks the help button, this help URL will be opened. This URL is not restricted to Web URLs. For instance, the extension could configure
807 /// the HelpURL to launch it's application with a custom URL scheme. (available in macOS 12.0 and later)
808 /// - `SubInteractions `: *dictionary* (same as `NSFileProviderUserInteractions`)
809 /// - `SupressionIdentifier` *string*: If present, when this predicate matches, the alert will display an option to
810 /// suppress future alerts from UserInteractions with the same
811 /// SuppressionIdentifier (including the current UserInteraction). This also
812 /// requires implementing the `NSFileProviderUserInteractionSuppressing`
813 /// protocol on the principal class of the FileProvider extension (available in
814 /// macOS 12.0 and later).
815 ///
816 /// For each interaction, either Alert or SubInteractions must be specified. SubInteractions will be evaluated if the main ActivationRule evaluates to
817 /// YES for at least once. This allows you to match a general pattern via the top-level activation rule and then select a specialized error message from a list
818 /// of subpatterns.
819 ///
820 /// At most one UserInteraction alert will be shown for each FileProvider domain involved in the user's Action. For
821 /// instance, if provider A defines a UserInteraction for MoveOut actions, and provider B defines a UserInteraction
822 /// for MoveIn operations. When the user moves a file from A to B, and the predicate for both UserInteraction
823 /// matches, then both of the UserInteraction alerts will be shown to the user. However, as soon as the user
824 /// denies any of the alerts, the remainder will not be shown, and the action will be denied.
825 ///
826 /// If the provider wishes to take full responsibility for showing a custom contextual menu item for Download,
827 /// the provider can set NSExtensionFileProviderAllowsContextualMenuDownloadEntry=0 in the provider's Info.plist.
828 /// This will ensure that the system does not display the "Download Now" button in the contextual menu.
829 ///
830 /// When `sourceItem` or `destinationItem` are present in a UserInteraction, a subset of the fields present on the item will be available for use.
831 /// The subset includes:
832 /// - `userInfo`
833 /// - `itemIdentifier`
834 /// - `parentItemIdentifier`
835 /// - `contentType`
836 /// - `typeIdentifier`
837 /// - `isTrashed`
838 /// - `filename`
839 /// - `capabilities`
840 /// - `documentSize`
841 /// - `childItemCount`
842 /// - `creationDate`
843 /// - `contentModificationDate`
844 /// - `lastUsedDate`
845 /// - `tagData`
846 /// - `favoriteRank`
847 /// - `isUploaded`
848 /// - `isUploading`
849 /// - `uploadingError`
850 /// - `isDownloaded`
851 /// - `isDownloading`
852 /// - `downloadingError`
853 /// - `isMostRecentVersionDownloaded`
854 /// - `isShared`
855 /// - `isSharedByCurrentUser`
856 /// - `ownerNameComponents`
857 /// - `mostRecentEditorNameComponents`
858 /// - `versionIdentifier`
859 /// - `inheritedUserInfo`
860 /// - `resolvedUserInfo`
861 /// - `isRecursivelyDownloaded`
862 ///
863 /// Here is a sample extension Info.plist:
864 ///
865 /// ```text
866 /// <key
867 /// >NSExtension
868 /// </key
869 /// >
870 /// <key
871 /// >NSExtensionFileProviderAllowsContextualMenuDownloadEntry
872 /// </key
873 /// >
874 /// <false
875 /// />
876 /// <key
877 /// >NSFileProviderUserInteractions
878 /// </key
879 /// >
880 /// <array
881 /// >
882 /// <key
883 /// >ActivationRule
884 /// </key
885 /// >
886 /// <string
887 /// >action == "Move"
888 /// </string
889 /// >
890 /// <key
891 /// >SubInteractions
892 /// </key
893 /// >
894 /// <array
895 /// >
896 /// <dict
897 /// >
898 /// <key
899 /// >ActivationRule
900 /// </key
901 /// >
902 /// <string
903 /// >sourceItem.isShared == NO AND
904 /// destinationItem.isShared == YES AND
905 /// destinationItem.isSharedByCurrentUser == YES
906 /// </string
907 /// >
908 /// <key
909 /// >SubInteractions
910 /// </key
911 /// >
912 /// <array
913 /// >
914 /// <dict
915 /// >
916 /// <key
917 /// >ActivationRule
918 /// </key
919 /// >
920 /// <string
921 /// >sourceItemsCount == 1
922 /// </string
923 /// >
924 /// <key
925 /// >Alert
926 /// </key
927 /// >
928 /// <dict
929 /// >
930 /// <key
931 /// >LocalizedTitle
932 /// </key
933 /// >
934 /// <dict
935 /// >
936 /// <key
937 /// >NSStringFormat
938 /// </key
939 /// >
940 /// <string
941 /// >Are you sure you want to move %
942 /// @
943 /// into %
944 /// @
945 /// ?
946 /// </string
947 /// >
948 /// <key
949 /// >NSStringFormatValues
950 /// </key
951 /// >
952 /// <array
953 /// >
954 /// <string
955 /// >firstMatchingItem.filename
956 /// </string
957 /// >
958 /// <string
959 /// >destinationItem.filename
960 /// </string
961 /// >
962 /// </array
963 /// >
964 /// </dict
965 /// >
966 /// <key
967 /// >LocalizedSubTitle
968 /// </key
969 /// >
970 /// <dict
971 /// >
972 /// <key
973 /// >NSStringFormat
974 /// </key
975 /// >
976 /// <string
977 /// >If you move it, people added to the shared folder “%
978 /// @
979 /// ” will be able to access it
980 /// </string
981 /// >
982 /// <key
983 /// >NSStringFormatValues
984 /// </key
985 /// >
986 /// <array
987 /// >
988 /// <string
989 /// >destinationItem.filename
990 /// </string
991 /// >
992 /// </array
993 /// >
994 /// </dict
995 /// >
996 /// <key
997 /// >LocalizedRecoveryOptions
998 /// </key
999 /// >
1000 /// <array
1001 /// >
1002 /// <key
1003 /// >Continue
1004 /// </key
1005 /// >
1006 /// <string
1007 /// >Save to shared folder
1008 /// </string
1009 /// >
1010 /// </array
1011 /// >
1012 /// </dict
1013 /// >
1014 /// </dict
1015 /// >
1016 /// </array
1017 /// >
1018 /// </dict
1019 /// >
1020 /// <dict
1021 /// >
1022 /// <key
1023 /// >ActivationRule
1024 /// </key
1025 /// >
1026 /// <string
1027 /// >sourceItem.isShared == YES AND
1028 /// sourceItem.isSharedByCurrentUser == NO AND
1029 /// destinationItem.isSharedByCurrentUser == YES
1030 /// </string
1031 /// >
1032 /// <key
1033 /// >SubInteractions
1034 /// </key
1035 /// >
1036 /// <array
1037 /// >
1038 /// <dict
1039 /// >
1040 /// <key
1041 /// >ActivationRule
1042 /// </key
1043 /// >
1044 /// <string
1045 /// >sourceItemsCount == 1
1046 /// </string
1047 /// >
1048 /// <key
1049 /// >Alert
1050 /// </key
1051 /// >
1052 /// <dict
1053 /// >
1054 /// <key
1055 /// >LocalizedTitle
1056 /// </key
1057 /// >
1058 /// <dict
1059 /// >
1060 /// <key
1061 /// >NSStringFormat
1062 /// </key
1063 /// >
1064 /// <string
1065 /// >This shared item can't be moved.
1066 /// </string
1067 /// >
1068 /// </dict
1069 /// >
1070 /// <key
1071 /// >LocalizedSubTitle
1072 /// </key
1073 /// >
1074 /// <dict
1075 /// >
1076 /// <key
1077 /// >NSStringFormat
1078 /// </key
1079 /// >
1080 /// <string
1081 /// >Items shared with you can’t be moved to shared folders
1082 /// </string
1083 /// >
1084 /// </dict
1085 /// >
1086 /// </dict
1087 /// >
1088 /// <key
1089 /// >RecoveryOptions
1090 /// </key
1091 /// >
1092 /// <dict
1093 /// >
1094 /// <key
1095 /// >Continue
1096 /// </key
1097 /// >
1098 /// <false
1099 /// />
1100 /// </dict
1101 /// >
1102 /// </dict
1103 /// >
1104 /// </array
1105 /// >
1106 /// </dict
1107 /// >
1108 /// </array
1109 /// >
1110 /// </array
1111 /// >
1112 /// ```
1113 #[optional]
1114 #[unsafe(method(userInfo))]
1115 #[unsafe(method_family = none)]
1116 unsafe fn userInfo(&self) -> Option<Retained<NSDictionary>>;
1117
1118 /// Declarative API to define the item content policy according to the available NSFileProviderContentPolicy
1119 #[optional]
1120 #[unsafe(method(contentPolicy))]
1121 #[unsafe(method_family = none)]
1122 unsafe fn contentPolicy(&self) -> NSFileProviderContentPolicy;
1123 }
1124);
1125
1126/// [Apple's documentation](https://developer.apple.com/documentation/fileprovider/nsfileprovideritem?language=objc)
1127pub type NSFileProviderItem = ProtocolObject<dyn NSFileProviderItemProtocol>;