objc2_game_kit/generated/
GKPublicProtocols.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_protocol!(
11 #[deprecated]
15 pub unsafe trait GKSessionDelegate: NSObjectProtocol {
16 #[cfg(all(feature = "GKPublicConstants", feature = "GKSession"))]
17 #[deprecated]
18 #[optional]
19 #[unsafe(method(session:peer:didChangeState:))]
20 #[unsafe(method_family = none)]
21 unsafe fn session_peer_didChangeState(
22 &self,
23 session: &GKSession,
24 peer_id: &NSString,
25 state: GKPeerConnectionState,
26 );
27
28 #[cfg(feature = "GKSession")]
29 #[deprecated]
34 #[optional]
35 #[unsafe(method(session:didReceiveConnectionRequestFromPeer:))]
36 #[unsafe(method_family = none)]
37 unsafe fn session_didReceiveConnectionRequestFromPeer(
38 &self,
39 session: &GKSession,
40 peer_id: &NSString,
41 );
42
43 #[cfg(feature = "GKSession")]
44 #[deprecated]
46 #[optional]
47 #[unsafe(method(session:connectionWithPeerFailed:withError:))]
48 #[unsafe(method_family = none)]
49 unsafe fn session_connectionWithPeerFailed_withError(
50 &self,
51 session: &GKSession,
52 peer_id: &NSString,
53 error: &NSError,
54 );
55
56 #[cfg(feature = "GKSession")]
57 #[deprecated]
59 #[optional]
60 #[unsafe(method(session:didFailWithError:))]
61 #[unsafe(method_family = none)]
62 unsafe fn session_didFailWithError(&self, session: &GKSession, error: &NSError);
63 }
64);
65
66extern_protocol!(
67 #[deprecated]
69 pub unsafe trait GKVoiceChatClient: NSObjectProtocol {
70 #[cfg(feature = "GKVoiceChatService")]
71 #[deprecated]
73 #[unsafe(method(voiceChatService:sendData:toParticipantID:))]
74 #[unsafe(method_family = none)]
75 unsafe fn voiceChatService_sendData_toParticipantID(
76 &self,
77 voice_chat_service: &GKVoiceChatService,
78 data: &NSData,
79 participant_id: &NSString,
80 );
81
82 #[deprecated]
84 #[unsafe(method(participantID))]
85 #[unsafe(method_family = none)]
86 unsafe fn participantID(&self) -> Retained<NSString>;
87
88 #[cfg(feature = "GKVoiceChatService")]
89 #[deprecated]
92 #[optional]
93 #[unsafe(method(voiceChatService:sendRealTimeData:toParticipantID:))]
94 #[unsafe(method_family = none)]
95 unsafe fn voiceChatService_sendRealTimeData_toParticipantID(
96 &self,
97 voice_chat_service: &GKVoiceChatService,
98 data: &NSData,
99 participant_id: &NSString,
100 );
101
102 #[cfg(feature = "GKVoiceChatService")]
103 #[deprecated]
104 #[optional]
105 #[unsafe(method(voiceChatService:didStartWithParticipantID:))]
106 #[unsafe(method_family = none)]
107 unsafe fn voiceChatService_didStartWithParticipantID(
108 &self,
109 voice_chat_service: &GKVoiceChatService,
110 participant_id: &NSString,
111 );
112
113 #[cfg(feature = "GKVoiceChatService")]
114 #[deprecated]
115 #[optional]
116 #[unsafe(method(voiceChatService:didNotStartWithParticipantID:error:))]
117 #[unsafe(method_family = none)]
118 unsafe fn voiceChatService_didNotStartWithParticipantID_error(
119 &self,
120 voice_chat_service: &GKVoiceChatService,
121 participant_id: &NSString,
122 error: Option<&NSError>,
123 );
124
125 #[cfg(feature = "GKVoiceChatService")]
126 #[deprecated]
127 #[optional]
128 #[unsafe(method(voiceChatService:didStopWithParticipantID:error:))]
129 #[unsafe(method_family = none)]
130 unsafe fn voiceChatService_didStopWithParticipantID_error(
131 &self,
132 voice_chat_service: &GKVoiceChatService,
133 participant_id: &NSString,
134 error: Option<&NSError>,
135 );
136
137 #[cfg(feature = "GKVoiceChatService")]
138 #[deprecated]
139 #[optional]
140 #[unsafe(method(voiceChatService:didReceiveInvitationFromParticipantID:callID:))]
141 #[unsafe(method_family = none)]
142 unsafe fn voiceChatService_didReceiveInvitationFromParticipantID_callID(
143 &self,
144 voice_chat_service: &GKVoiceChatService,
145 participant_id: &NSString,
146 call_id: NSInteger,
147 );
148 }
149);