MCSessionDelegate

Trait MCSessionDelegate 

Source
pub unsafe trait MCSessionDelegate: NSObjectProtocol {
    // Provided methods
    unsafe fn session_peer_didChangeState(
        &self,
        session: &MCSession,
        peer_id: &MCPeerID,
        state: MCSessionState,
    )
       where Self: Sized + Message { ... }
    unsafe fn session_didReceiveData_fromPeer(
        &self,
        session: &MCSession,
        data: &NSData,
        peer_id: &MCPeerID,
    )
       where Self: Sized + Message { ... }
    unsafe fn session_didReceiveStream_withName_fromPeer(
        &self,
        session: &MCSession,
        stream: &NSInputStream,
        stream_name: &NSString,
        peer_id: &MCPeerID,
    )
       where Self: Sized + Message { ... }
    unsafe fn session_didStartReceivingResourceWithName_fromPeer_withProgress(
        &self,
        session: &MCSession,
        resource_name: &NSString,
        peer_id: &MCPeerID,
        progress: &NSProgress,
    )
       where Self: Sized + Message { ... }
    unsafe fn session_didFinishReceivingResourceWithName_fromPeer_atURL_withError(
        &self,
        session: &MCSession,
        resource_name: &NSString,
        peer_id: &MCPeerID,
        local_url: Option<&NSURL>,
        error: Option<&NSError>,
    )
       where Self: Sized + Message { ... }
    unsafe fn session_didReceiveCertificate_fromPeer_certificateHandler(
        &self,
        session: &MCSession,
        certificate: Option<&NSArray>,
        peer_id: &MCPeerID,
        certificate_handler: &DynBlock<dyn Fn(Bool)>,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature MCSession only.
Expand description

Provided Methods§

Source

unsafe fn session_peer_didChangeState( &self, session: &MCSession, peer_id: &MCPeerID, state: MCSessionState, )
where Self: Sized + Message,

Available on crate feature MCPeerID only.
Source

unsafe fn session_didReceiveData_fromPeer( &self, session: &MCSession, data: &NSData, peer_id: &MCPeerID, )
where Self: Sized + Message,

Available on crate feature MCPeerID only.
Source

unsafe fn session_didReceiveStream_withName_fromPeer( &self, session: &MCSession, stream: &NSInputStream, stream_name: &NSString, peer_id: &MCPeerID, )
where Self: Sized + Message,

Available on crate feature MCPeerID only.
Source

unsafe fn session_didStartReceivingResourceWithName_fromPeer_withProgress( &self, session: &MCSession, resource_name: &NSString, peer_id: &MCPeerID, progress: &NSProgress, )
where Self: Sized + Message,

Available on crate feature MCPeerID only.
Source

unsafe fn session_didFinishReceivingResourceWithName_fromPeer_atURL_withError( &self, session: &MCSession, resource_name: &NSString, peer_id: &MCPeerID, local_url: Option<&NSURL>, error: Option<&NSError>, )
where Self: Sized + Message,

Available on crate feature MCPeerID only.
Source

unsafe fn session_didReceiveCertificate_fromPeer_certificateHandler( &self, session: &MCSession, certificate: Option<&NSArray>, peer_id: &MCPeerID, certificate_handler: &DynBlock<dyn Fn(Bool)>, )
where Self: Sized + Message,

Available on crate features MCPeerID and block2 only.
§Safety

certificate generic should be of the correct type.

Trait Implementations§

Source§

impl ProtocolType for dyn MCSessionDelegate

Source§

const NAME: &'static str = "MCSessionDelegate"

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 MCSessionDelegate

Implementations on Foreign Types§

Source§

impl<T> MCSessionDelegate for ProtocolObject<T>

Implementors§