NSFileProviderDomainState

Trait NSFileProviderDomainState 

Source
pub unsafe trait NSFileProviderDomainState: NSObjectProtocol {
    // Provided methods
    unsafe fn domainVersion(&self) -> Retained<NSFileProviderDomainVersion>
       where Self: Sized + Message { ... }
    unsafe fn userInfo(&self) -> Retained<NSDictionary>
       where Self: Sized + Message { ... }
}
Available on crate feature NSFileProviderReplicatedExtension only.
Expand description

Provided Methods§

Source

unsafe fn domainVersion(&self) -> Retained<NSFileProviderDomainVersion>
where Self: Sized + Message,

Available on crate feature NSFileProviderDomain only.

Version of the domain.

The domain version is an opaque value assigned by the provider. It is read by the system in the completion handler for createItemBasedOnTemplate, modifyItem, deleteItem and itemForIdentifier, as well as in the finish calls when enumerating the working set. The read is guaranteed to happen on the same dispatch queue the completion handler was called on.

When the system discovers a change on disk, it associates that change to the currently known domain version. When that change get communicated to the extension, that version is included in the NSFileProviderRequest object passed by the system to the extension. As a consequence, the provider can use the domain version to identify the state of the system when a change was made on disk.

The provider is responsible for defining when the domain version changes. When that value is updated, the provider must notify the system by signaling the working set.

The system ignore any domain version that is smaller than the previously known version.

Source

unsafe fn userInfo(&self) -> Retained<NSDictionary>
where Self: Sized + Message,

Global state of the domain.

Use this dictionary to add state information to the domain. It is accessible to predicates for User Interactions, FileProvider Actions, and FileProviderUI Actions, via the top-level domainUserInfo context key.

This dictionary must only contain key and value classes in the following list: NSString, NSNumber, NSDate, and NSPersonNameComponents.

The system expects the domainVersion to be updated when the value of the userInfo property changes.

Trait Implementations§

Source§

impl ProtocolType for dyn NSFileProviderDomainState

Source§

const NAME: &'static str = "NSFileProviderDomainState"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn NSFileProviderDomainState

Implementations on Foreign Types§

Source§

impl<T> NSFileProviderDomainState for ProtocolObject<T>

Implementors§