GKSessionDelegate

Trait GKSessionDelegate 

Source
pub unsafe trait GKSessionDelegate: NSObjectProtocol {
    // Provided methods
    unsafe fn session_peer_didChangeState(
        &self,
        session: &GKSession,
        peer_id: &NSString,
        state: GKPeerConnectionState,
    )
       where Self: Sized + Message { ... }
    unsafe fn session_didReceiveConnectionRequestFromPeer(
        &self,
        session: &GKSession,
        peer_id: &NSString,
    )
       where Self: Sized + Message { ... }
    unsafe fn session_connectionWithPeerFailed_withError(
        &self,
        session: &GKSession,
        peer_id: &NSString,
        error: &NSError,
    )
       where Self: Sized + Message { ... }
    unsafe fn session_didFailWithError(
        &self,
        session: &GKSession,
        error: &NSError,
    )
       where Self: Sized + Message { ... }
}
👎Deprecated
Available on crate feature GKPublicProtocols only.
Expand description

Callbacks to the GKSession delegate.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn session_peer_didChangeState( &self, session: &GKSession, peer_id: &NSString, state: GKPeerConnectionState, )
where Self: Sized + Message,

👎Deprecated
Available on crate features GKPublicConstants and GKSession only.
Source

unsafe fn session_didReceiveConnectionRequestFromPeer( &self, session: &GKSession, peer_id: &NSString, )
where Self: Sized + Message,

👎Deprecated
Available on crate feature GKSession only.

Indicates a connection request was received from another peer.

Accept by calling -acceptConnectionFromPeer: Deny by calling -denyConnectionFromPeer:

Source

unsafe fn session_connectionWithPeerFailed_withError( &self, session: &GKSession, peer_id: &NSString, error: &NSError, )
where Self: Sized + Message,

👎Deprecated
Available on crate feature GKSession only.

Indicates a connection error occurred with a peer, which includes connection request failures, or disconnects due to timeouts.

Source

unsafe fn session_didFailWithError(&self, session: &GKSession, error: &NSError)
where Self: Sized + Message,

👎Deprecated
Available on crate feature GKSession only.

Indicates an error occurred with the session such as failing to make available.

Trait Implementations§

Source§

impl ProtocolType for dyn GKSessionDelegate

Source§

const NAME: &'static str = "GKSessionDelegate"

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 GKSessionDelegate

Implementations on Foreign Types§

Source§

impl<T> GKSessionDelegate for ProtocolObject<T>

Implementors§