icrate/generated/GameKit/
GKVoiceChatService.rs1use crate::common::*;
4use crate::AppKit::*;
5use crate::Foundation::*;
6use crate::GameKit::*;
7
8extern_class!(
9 #[derive(Debug, PartialEq, Eq, Hash)]
10 #[cfg(feature = "GameKit_GKVoiceChatService")]
11 pub struct GKVoiceChatService;
12
13 #[cfg(feature = "GameKit_GKVoiceChatService")]
14 unsafe impl ClassType for GKVoiceChatService {
15 type Super = NSObject;
16 type Mutability = InteriorMutable;
17 }
18);
19
20#[cfg(feature = "GameKit_GKVoiceChatService")]
21unsafe impl NSObjectProtocol for GKVoiceChatService {}
22
23extern_methods!(
24 #[cfg(feature = "GameKit_GKVoiceChatService")]
25 unsafe impl GKVoiceChatService {
26 #[method_id(@__retain_semantics Other defaultVoiceChatService)]
27 pub unsafe fn defaultVoiceChatService() -> Option<Id<GKVoiceChatService>>;
28
29 #[method(isVoIPAllowed)]
30 pub unsafe fn isVoIPAllowed() -> bool;
31
32 #[method_id(@__retain_semantics Other client)]
33 pub unsafe fn client(&self) -> Option<Id<ProtocolObject<dyn GKVoiceChatClient>>>;
34
35 #[method(setClient:)]
36 pub unsafe fn setClient(&self, client: Option<&ProtocolObject<dyn GKVoiceChatClient>>);
37
38 #[cfg(feature = "Foundation_NSString")]
39 #[method(stopVoiceChatWithParticipantID:)]
40 pub unsafe fn stopVoiceChatWithParticipantID(&self, participant_id: Option<&NSString>);
41
42 #[method(denyCallID:)]
43 pub unsafe fn denyCallID(&self, call_id: NSInteger);
44
45 #[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSString"))]
46 #[method(receivedRealTimeData:fromParticipantID:)]
47 pub unsafe fn receivedRealTimeData_fromParticipantID(
48 &self,
49 audio: Option<&NSData>,
50 participant_id: Option<&NSString>,
51 );
52
53 #[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSString"))]
54 #[method(receivedData:fromParticipantID:)]
55 pub unsafe fn receivedData_fromParticipantID(
56 &self,
57 arbitrary_data: Option<&NSData>,
58 participant_id: Option<&NSString>,
59 );
60
61 #[method(isMicrophoneMuted)]
62 pub unsafe fn isMicrophoneMuted(&self) -> bool;
63
64 #[method(setMicrophoneMuted:)]
65 pub unsafe fn setMicrophoneMuted(&self, microphone_muted: bool);
66
67 #[method(remoteParticipantVolume)]
68 pub unsafe fn remoteParticipantVolume(&self) -> c_float;
69
70 #[method(setRemoteParticipantVolume:)]
71 pub unsafe fn setRemoteParticipantVolume(&self, remote_participant_volume: c_float);
72
73 #[method(isOutputMeteringEnabled)]
74 pub unsafe fn isOutputMeteringEnabled(&self) -> bool;
75
76 #[method(setOutputMeteringEnabled:)]
77 pub unsafe fn setOutputMeteringEnabled(&self, output_metering_enabled: bool);
78
79 #[method(isInputMeteringEnabled)]
80 pub unsafe fn isInputMeteringEnabled(&self) -> bool;
81
82 #[method(setInputMeteringEnabled:)]
83 pub unsafe fn setInputMeteringEnabled(&self, input_metering_enabled: bool);
84
85 #[method(outputMeterLevel)]
86 pub unsafe fn outputMeterLevel(&self) -> c_float;
87
88 #[method(inputMeterLevel)]
89 pub unsafe fn inputMeterLevel(&self) -> c_float;
90 }
91);
92
93extern_methods!(
94 #[cfg(feature = "GameKit_GKVoiceChatService")]
96 unsafe impl GKVoiceChatService {
97 #[method_id(@__retain_semantics Init init)]
98 pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
99
100 #[method_id(@__retain_semantics New new)]
101 pub unsafe fn new() -> Id<Self>;
102 }
103);