GKMatchmakerViewControllerDelegate

Trait GKMatchmakerViewControllerDelegate 

Source
pub unsafe trait GKMatchmakerViewControllerDelegate: NSObjectProtocol {
    // Provided methods
    unsafe fn matchmakerViewControllerWasCancelled(
        &self,
        view_controller: &GKMatchmakerViewController,
    )
       where Self: Sized + Message { ... }
    unsafe fn matchmakerViewController_didFailWithError(
        &self,
        view_controller: &GKMatchmakerViewController,
        error: &NSError,
    )
       where Self: Sized + Message { ... }
    unsafe fn matchmakerViewController_didFindMatch(
        &self,
        view_controller: &GKMatchmakerViewController,
        match: &GKMatch,
    )
       where Self: Sized + Message { ... }
    unsafe fn matchmakerViewController_didFindHostedPlayers(
        &self,
        view_controller: &GKMatchmakerViewController,
        players: &NSArray<GKPlayer>,
    )
       where Self: Sized + Message { ... }
    unsafe fn matchmakerViewController_hostedPlayerDidAccept(
        &self,
        view_controller: &GKMatchmakerViewController,
        player: &GKPlayer,
    )
       where Self: Sized + Message { ... }
    unsafe fn matchmakerViewController_getMatchPropertiesForRecipient_withCompletionHandler(
        &self,
        view_controller: &GKMatchmakerViewController,
        recipient: &GKPlayer,
        completion_handler: &DynBlock<dyn Fn(NonNull<GKMatchProperties>)>,
    )
       where Self: Sized + Message { ... }
    unsafe fn matchmakerViewController_didFindPlayers(
        &self,
        view_controller: &GKMatchmakerViewController,
        player_i_ds: &NSArray<NSString>,
    )
       where Self: Sized + Message { ... }
    unsafe fn matchmakerViewController_didReceiveAcceptFromHostedPlayer(
        &self,
        view_controller: &GKMatchmakerViewController,
        player_id: &NSString,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature GKMatchmakerViewController only.
Expand description

Provided Methods§

Source

unsafe fn matchmakerViewControllerWasCancelled( &self, view_controller: &GKMatchmakerViewController, )
where Self: Sized + Message,

Available on crate feature objc2-app-kit and macOS only.

The user has cancelled matchmaking

Source

unsafe fn matchmakerViewController_didFailWithError( &self, view_controller: &GKMatchmakerViewController, error: &NSError, )
where Self: Sized + Message,

Available on crate feature objc2-app-kit and macOS only.

Matchmaking has failed with an error

Source

unsafe fn matchmakerViewController_didFindMatch( &self, view_controller: &GKMatchmakerViewController, match: &GKMatch, )
where Self: Sized + Message,

Available on crate feature GKMatch and crate feature objc2-app-kit and macOS only.

A peer-to-peer match has been found, the game should start

Source

unsafe fn matchmakerViewController_didFindHostedPlayers( &self, view_controller: &GKMatchmakerViewController, players: &NSArray<GKPlayer>, )
where Self: Sized + Message,

Available on crate feature GKBasePlayer and crate feature GKPlayer and crate feature objc2-app-kit and macOS only.

Players have been found for a server-hosted game, the game should start

Source

unsafe fn matchmakerViewController_hostedPlayerDidAccept( &self, view_controller: &GKMatchmakerViewController, player: &GKPlayer, )
where Self: Sized + Message,

Available on crate feature GKBasePlayer and crate feature GKPlayer and crate feature objc2-app-kit and macOS only.

An invited player has accepted a hosted invite. Apps should connect through the hosting server and then update the player’s connected state (using setConnected:forHostedPlayer:)

Source

unsafe fn matchmakerViewController_getMatchPropertiesForRecipient_withCompletionHandler( &self, view_controller: &GKMatchmakerViewController, recipient: &GKPlayer, completion_handler: &DynBlock<dyn Fn(NonNull<GKMatchProperties>)>, )
where Self: Sized + Message,

Available on crate feature GKBasePlayer and crate feature GKDefines and crate feature GKPlayer and crate feature block2 and crate feature objc2-app-kit and macOS only.

The game should provide GKMatchProperties for the GKPlayer that has been invited. If implemented, this function must call completionHandler: failing to do so will hang matchmaking.

Source

unsafe fn matchmakerViewController_didFindPlayers( &self, view_controller: &GKMatchmakerViewController, player_i_ds: &NSArray<NSString>, )
where Self: Sized + Message,

👎Deprecated
Available on crate feature objc2-app-kit and macOS only.
  • These protocol methods are obsoleted. They will never be invoked and their implementation does nothing**
Source

unsafe fn matchmakerViewController_didReceiveAcceptFromHostedPlayer( &self, view_controller: &GKMatchmakerViewController, player_id: &NSString, )
where Self: Sized + Message,

👎Deprecated
Available on crate feature objc2-app-kit and macOS only.

Trait Implementations§

Source§

impl ProtocolType for dyn GKMatchmakerViewControllerDelegate

Source§

const NAME: &'static str = "GKMatchmakerViewControllerDelegate"

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 GKMatchmakerViewControllerDelegate

Implementations on Foreign Types§

Source§

impl<T> GKMatchmakerViewControllerDelegate for ProtocolObject<T>

Implementors§