NSCloudSharingServiceDelegate

Trait NSCloudSharingServiceDelegate 

Source
pub unsafe trait NSCloudSharingServiceDelegate: NSSharingServiceDelegate {
    // Provided methods
    unsafe fn sharingService_didCompleteForItems_error(
        &self,
        sharing_service: &NSSharingService,
        items: &NSArray,
        error: Option<&NSError>,
    )
       where Self: Sized + Message { ... }
    fn optionsForSharingService_shareProvider(
        &self,
        cloud_kit_sharing_service: &NSSharingService,
        provider: &NSItemProvider,
    ) -> NSCloudKitSharingServiceOptions
       where Self: Sized + Message { ... }
    fn sharingService_didSaveShare(
        &self,
        sharing_service: &NSSharingService,
        share: &CKShare,
    )
       where Self: Sized + Message { ... }
    fn sharingService_didStopSharing(
        &self,
        sharing_service: &NSSharingService,
        share: &CKShare,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature NSSharingService only.
Expand description

Provided Methods§

Source

unsafe fn sharingService_didCompleteForItems_error( &self, sharing_service: &NSSharingService, items: &NSArray, error: Option<&NSError>, )
where Self: Sized + Message,

When an NSSharingServiceNameCloudSharing sharing service is dismissed it will invoke this method on the delegate, with an error if there was any. If the delegate implements this method, NSSharingServiceNameCloudSharing will not send -sharingService:didFailToShareItems:error: or -sharingService:didShareItems:.

§Safety

items generic should be of the correct type.

Source

fn optionsForSharingService_shareProvider( &self, cloud_kit_sharing_service: &NSSharingService, provider: &NSItemProvider, ) -> NSCloudKitSharingServiceOptions
where Self: Sized + Message,

The options returned by this method describe how the user is allowed to configure the share: whether the share is public or private, and whether participants have read-only or read/write permissions. If this method is not implemented, NSCloudKitSharingServiceStandard is assumed.

Source

fn sharingService_didSaveShare( &self, sharing_service: &NSSharingService, share: &CKShare, )
where Self: Sized + Message,

Available on crate feature objc2-cloud-kit and Apple only.

When an NSSharingServiceNameCloudSharing sharing service successfully saves modifications to the CKShare, it will invoke this method on the delegate with the last-known state of the CKShare on the server.

Source

fn sharingService_didStopSharing( &self, sharing_service: &NSSharingService, share: &CKShare, )
where Self: Sized + Message,

Available on crate feature objc2-cloud-kit and Apple only.

When an NSSharingServiceNameCloudSharing sharing service stops sharing it will delete the CKShare from the server, then invoke this method on the delegate with the last-known state of the CKShare.

Trait Implementations§

Source§

impl ProtocolType for dyn NSCloudSharingServiceDelegate

Source§

const NAME: &'static str = "NSCloudSharingServiceDelegate"

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 NSCloudSharingServiceDelegate

Implementations on Foreign Types§

Source§

impl<T> NSCloudSharingServiceDelegate for ProtocolObject<T>

Implementors§