objc2_game_kit/generated/
GKGameSessionError.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern "C" {
10    /// [Apple's documentation](https://developer.apple.com/documentation/gamekit/gkgamesessionerrordomain?language=objc)
11    #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
12    pub static GKGameSessionErrorDomain: &'static NSString;
13}
14
15/// [Apple's documentation](https://developer.apple.com/documentation/gamekit/gkgamesessionerrorcode?language=objc)
16// NS_ENUM
17#[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
18#[repr(transparent)]
19#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
20pub struct GKGameSessionErrorCode(pub NSInteger);
21impl GKGameSessionErrorCode {
22    #[doc(alias = "GKGameSessionErrorUnknown")]
23    #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
24    pub const Unknown: Self = Self(1);
25    #[doc(alias = "GKGameSessionErrorNotAuthenticated")]
26    #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
27    pub const NotAuthenticated: Self = Self(2);
28    #[doc(alias = "GKGameSessionErrorSessionConflict")]
29    #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
30    pub const SessionConflict: Self = Self(3);
31    #[doc(alias = "GKGameSessionErrorSessionNotShared")]
32    #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
33    pub const SessionNotShared: Self = Self(4);
34    #[doc(alias = "GKGameSessionErrorConnectionCancelledByUser")]
35    #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
36    pub const ConnectionCancelledByUser: Self = Self(5);
37    #[doc(alias = "GKGameSessionErrorConnectionFailed")]
38    #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
39    pub const ConnectionFailed: Self = Self(6);
40    #[doc(alias = "GKGameSessionErrorSessionHasMaxConnectedPlayers")]
41    #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
42    pub const SessionHasMaxConnectedPlayers: Self = Self(7);
43    #[doc(alias = "GKGameSessionErrorSendDataNotConnected")]
44    #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
45    pub const SendDataNotConnected: Self = Self(8);
46    #[doc(alias = "GKGameSessionErrorSendDataNoRecipients")]
47    #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
48    pub const SendDataNoRecipients: Self = Self(9);
49    #[doc(alias = "GKGameSessionErrorSendDataNotReachable")]
50    #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
51    pub const SendDataNotReachable: Self = Self(10);
52    #[doc(alias = "GKGameSessionErrorSendRateLimitReached")]
53    #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
54    pub const SendRateLimitReached: Self = Self(11);
55    #[doc(alias = "GKGameSessionErrorBadContainer")]
56    #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
57    pub const BadContainer: Self = Self(12);
58    #[doc(alias = "GKGameSessionErrorCloudQuotaExceeded")]
59    #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
60    pub const CloudQuotaExceeded: Self = Self(13);
61    #[doc(alias = "GKGameSessionErrorNetworkFailure")]
62    #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
63    pub const NetworkFailure: Self = Self(14);
64    #[doc(alias = "GKGameSessionErrorCloudDriveDisabled")]
65    #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
66    pub const CloudDriveDisabled: Self = Self(15);
67    #[doc(alias = "GKGameSessionErrorInvalidSession")]
68    #[deprecated = "GKGameSession is deprecated, use real-time and turn-based matchmaking APIs instead."]
69    pub const InvalidSession: Self = Self(16);
70}
71
72unsafe impl Encode for GKGameSessionErrorCode {
73    const ENCODING: Encoding = NSInteger::ENCODING;
74}
75
76unsafe impl RefEncode for GKGameSessionErrorCode {
77    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
78}