use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
pub type AVAudioSessionPort = NSString;
extern "C" {
pub static AVAudioSessionPortContinuityMicrophone: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortLineIn: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortBuiltInMic: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortHeadsetMic: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortLineOut: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortHeadphones: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortBluetoothA2DP: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortBuiltInReceiver: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortBuiltInSpeaker: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortHDMI: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortAirPlay: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortBluetoothLE: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortBluetoothHFP: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortUSBAudio: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortCarAudio: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortVirtual: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortPCI: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortFireWire: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortDisplayPort: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortAVB: Option<&'static AVAudioSessionPort>;
}
extern "C" {
pub static AVAudioSessionPortThunderbolt: Option<&'static AVAudioSessionPort>;
}
pub type AVAudioSessionCategory = NSString;
extern "C" {
pub static AVAudioSessionCategoryAmbient: Option<&'static AVAudioSessionCategory>;
}
extern "C" {
pub static AVAudioSessionCategorySoloAmbient: Option<&'static AVAudioSessionCategory>;
}
extern "C" {
pub static AVAudioSessionCategoryPlayback: Option<&'static AVAudioSessionCategory>;
}
extern "C" {
pub static AVAudioSessionCategoryRecord: Option<&'static AVAudioSessionCategory>;
}
extern "C" {
pub static AVAudioSessionCategoryPlayAndRecord: Option<&'static AVAudioSessionCategory>;
}
extern "C" {
#[deprecated = "No longer supported"]
pub static AVAudioSessionCategoryAudioProcessing: Option<&'static AVAudioSessionCategory>;
}
extern "C" {
pub static AVAudioSessionCategoryMultiRoute: Option<&'static AVAudioSessionCategory>;
}
pub type AVAudioSessionMode = NSString;
extern "C" {
pub static AVAudioSessionModeDefault: Option<&'static AVAudioSessionMode>;
}
extern "C" {
pub static AVAudioSessionModeVoiceChat: Option<&'static AVAudioSessionMode>;
}
extern "C" {
pub static AVAudioSessionModeGameChat: Option<&'static AVAudioSessionMode>;
}
extern "C" {
pub static AVAudioSessionModeVideoRecording: Option<&'static AVAudioSessionMode>;
}
extern "C" {
pub static AVAudioSessionModeMeasurement: Option<&'static AVAudioSessionMode>;
}
extern "C" {
pub static AVAudioSessionModeMoviePlayback: Option<&'static AVAudioSessionMode>;
}
extern "C" {
pub static AVAudioSessionModeVideoChat: Option<&'static AVAudioSessionMode>;
}
extern "C" {
pub static AVAudioSessionModeSpokenAudio: Option<&'static AVAudioSessionMode>;
}
extern "C" {
pub static AVAudioSessionModeVoicePrompt: Option<&'static AVAudioSessionMode>;
}
extern "C" {
pub static AVAudioSessionModeShortFormVideo: Option<&'static AVAudioSessionMode>;
}
extern "C" {
pub static AVAudioSessionInterruptionNotification: Option<&'static NSNotificationName>;
}
extern "C" {
pub static AVAudioSessionRouteChangeNotification: Option<&'static NSNotificationName>;
}
extern "C" {
pub static AVAudioSessionMediaServicesWereLostNotification: Option<&'static NSNotificationName>;
}
extern "C" {
pub static AVAudioSessionMediaServicesWereResetNotification:
Option<&'static NSNotificationName>;
}
extern "C" {
pub static AVAudioSessionSilenceSecondaryAudioHintNotification:
Option<&'static NSNotificationName>;
}
extern "C" {
pub static AVAudioSessionSpatialPlaybackCapabilitiesChangedNotification:
Option<&'static NSNotificationName>;
}
extern "C" {
pub static AVAudioSessionRenderingModeChangeNotification: Option<&'static NSNotificationName>;
}
extern "C" {
pub static AVAudioSessionRenderingCapabilitiesChangeNotification:
Option<&'static NSNotificationName>;
}
extern "C" {
pub static AVAudioSessionMicrophoneInjectionCapabilitiesChangeNotification:
Option<&'static NSNotificationName>;
}
extern "C" {
pub static AVAudioSessionOutputMuteStateChangeNotification: Option<&'static NSNotificationName>;
}
extern "C" {
pub static AVAudioSessionMuteStateKey: Option<&'static NSString>;
}
extern "C" {
pub static AVAudioSessionUserIntentToUnmuteOutputNotification:
Option<&'static NSNotificationName>;
}
extern "C" {
pub static AVAudioSessionSpatialAudioEnabledKey: Option<&'static NSString>;
}
extern "C" {
pub static AVAudioSessionInterruptionTypeKey: Option<&'static NSString>;
}
extern "C" {
pub static AVAudioSessionInterruptionOptionKey: Option<&'static NSString>;
}
extern "C" {
pub static AVAudioSessionInterruptionReasonKey: Option<&'static NSString>;
}
extern "C" {
#[deprecated = "No longer supported - see AVAudioSessionInterruptionReasonKey"]
pub static AVAudioSessionInterruptionWasSuspendedKey: Option<&'static NSString>;
}
extern "C" {
pub static AVAudioSessionRouteChangeReasonKey: Option<&'static NSString>;
}
extern "C" {
pub static AVAudioSessionRouteChangePreviousRouteKey: Option<&'static NSString>;
}
extern "C" {
pub static AVAudioSessionSilenceSecondaryAudioHintTypeKey: Option<&'static NSString>;
}
extern "C" {
pub static AVAudioSessionRenderingModeNewRenderingModeKey: Option<&'static NSString>;
}
extern "C" {
pub static AVAudioSessionMicrophoneInjectionIsAvailableKey: Option<&'static NSString>;
}
extern "C" {
pub static AVAudioSessionAvailableInputsChangeNotification: Option<&'static NSNotificationName>;
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVAudioSessionActivationOptions(pub NSUInteger);
bitflags::bitflags! {
impl AVAudioSessionActivationOptions: NSUInteger {
#[doc(alias = "AVAudioSessionActivationOptionNone")]
const None = 0;
}
}
unsafe impl Encode for AVAudioSessionActivationOptions {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioSessionActivationOptions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVAudioSessionPortOverride(pub NSUInteger);
impl AVAudioSessionPortOverride {
#[doc(alias = "AVAudioSessionPortOverrideNone")]
pub const None: Self = Self(0);
#[doc(alias = "AVAudioSessionPortOverrideSpeaker")]
pub const Speaker: Self = Self(0x73706b72);
}
unsafe impl Encode for AVAudioSessionPortOverride {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioSessionPortOverride {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVAudioSessionRouteChangeReason(pub NSUInteger);
impl AVAudioSessionRouteChangeReason {
#[doc(alias = "AVAudioSessionRouteChangeReasonUnknown")]
pub const Unknown: Self = Self(0);
#[doc(alias = "AVAudioSessionRouteChangeReasonNewDeviceAvailable")]
pub const NewDeviceAvailable: Self = Self(1);
#[doc(alias = "AVAudioSessionRouteChangeReasonOldDeviceUnavailable")]
pub const OldDeviceUnavailable: Self = Self(2);
#[doc(alias = "AVAudioSessionRouteChangeReasonCategoryChange")]
pub const CategoryChange: Self = Self(3);
#[doc(alias = "AVAudioSessionRouteChangeReasonOverride")]
pub const Override: Self = Self(4);
#[doc(alias = "AVAudioSessionRouteChangeReasonWakeFromSleep")]
pub const WakeFromSleep: Self = Self(6);
#[doc(alias = "AVAudioSessionRouteChangeReasonNoSuitableRouteForCategory")]
pub const NoSuitableRouteForCategory: Self = Self(7);
#[doc(alias = "AVAudioSessionRouteChangeReasonRouteConfigurationChange")]
pub const RouteConfigurationChange: Self = Self(8);
}
unsafe impl Encode for AVAudioSessionRouteChangeReason {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioSessionRouteChangeReason {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVAudioSessionCategoryOptions(pub NSUInteger);
bitflags::bitflags! {
impl AVAudioSessionCategoryOptions: NSUInteger {
#[doc(alias = "AVAudioSessionCategoryOptionMixWithOthers")]
const MixWithOthers = 0x1;
#[doc(alias = "AVAudioSessionCategoryOptionDuckOthers")]
const DuckOthers = 0x2;
#[doc(alias = "AVAudioSessionCategoryOptionAllowBluetooth")]
#[deprecated]
const AllowBluetooth = 0x4;
#[doc(alias = "AVAudioSessionCategoryOptionAllowBluetoothHFP")]
const AllowBluetoothHFP = 0x4;
#[doc(alias = "AVAudioSessionCategoryOptionDefaultToSpeaker")]
const DefaultToSpeaker = 0x8;
#[doc(alias = "AVAudioSessionCategoryOptionInterruptSpokenAudioAndMixWithOthers")]
const InterruptSpokenAudioAndMixWithOthers = 0x11;
#[doc(alias = "AVAudioSessionCategoryOptionAllowBluetoothA2DP")]
const AllowBluetoothA2DP = 0x20;
#[doc(alias = "AVAudioSessionCategoryOptionAllowAirPlay")]
const AllowAirPlay = 0x40;
#[doc(alias = "AVAudioSessionCategoryOptionOverrideMutedMicrophoneInterruption")]
const OverrideMutedMicrophoneInterruption = 0x80;
#[doc(alias = "AVAudioSessionCategoryOptionBluetoothHighQualityRecording")]
const BluetoothHighQualityRecording = 1<<19;
}
}
unsafe impl Encode for AVAudioSessionCategoryOptions {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioSessionCategoryOptions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVAudioSessionInterruptionType(pub NSUInteger);
impl AVAudioSessionInterruptionType {
#[doc(alias = "AVAudioSessionInterruptionTypeBegan")]
pub const Began: Self = Self(1);
#[doc(alias = "AVAudioSessionInterruptionTypeEnded")]
pub const Ended: Self = Self(0);
}
unsafe impl Encode for AVAudioSessionInterruptionType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioSessionInterruptionType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVAudioSessionInterruptionOptions(pub NSUInteger);
bitflags::bitflags! {
impl AVAudioSessionInterruptionOptions: NSUInteger {
#[doc(alias = "AVAudioSessionInterruptionOptionShouldResume")]
const ShouldResume = 1;
}
}
unsafe impl Encode for AVAudioSessionInterruptionOptions {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioSessionInterruptionOptions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVAudioSessionInterruptionReason(pub NSUInteger);
impl AVAudioSessionInterruptionReason {
#[doc(alias = "AVAudioSessionInterruptionReasonDefault")]
pub const Default: Self = Self(0);
#[doc(alias = "AVAudioSessionInterruptionReasonAppWasSuspended")]
#[deprecated = "wasSuspended reason no longer present"]
pub const AppWasSuspended: Self = Self(1);
#[doc(alias = "AVAudioSessionInterruptionReasonBuiltInMicMuted")]
pub const BuiltInMicMuted: Self = Self(2);
#[doc(alias = "AVAudioSessionInterruptionReasonRouteDisconnected")]
pub const RouteDisconnected: Self = Self(4);
}
unsafe impl Encode for AVAudioSessionInterruptionReason {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioSessionInterruptionReason {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVAudioSessionSetActiveOptions(pub NSUInteger);
bitflags::bitflags! {
impl AVAudioSessionSetActiveOptions: NSUInteger {
#[doc(alias = "AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation")]
const NotifyOthersOnDeactivation = 1;
}
}
unsafe impl Encode for AVAudioSessionSetActiveOptions {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioSessionSetActiveOptions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVAudioSessionSilenceSecondaryAudioHintType(pub NSUInteger);
impl AVAudioSessionSilenceSecondaryAudioHintType {
#[doc(alias = "AVAudioSessionSilenceSecondaryAudioHintTypeBegin")]
pub const Begin: Self = Self(1);
#[doc(alias = "AVAudioSessionSilenceSecondaryAudioHintTypeEnd")]
pub const End: Self = Self(0);
}
unsafe impl Encode for AVAudioSessionSilenceSecondaryAudioHintType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioSessionSilenceSecondaryAudioHintType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVAudioSessionIOType(pub NSUInteger);
impl AVAudioSessionIOType {
#[doc(alias = "AVAudioSessionIOTypeNotSpecified")]
pub const NotSpecified: Self = Self(0);
#[doc(alias = "AVAudioSessionIOTypeAggregated")]
pub const Aggregated: Self = Self(1);
}
unsafe impl Encode for AVAudioSessionIOType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioSessionIOType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVAudioSessionRouteSharingPolicy(pub NSUInteger);
impl AVAudioSessionRouteSharingPolicy {
#[doc(alias = "AVAudioSessionRouteSharingPolicyDefault")]
pub const Default: Self = Self(0);
#[doc(alias = "AVAudioSessionRouteSharingPolicyLongFormAudio")]
pub const LongFormAudio: Self = Self(1);
#[doc(alias = "AVAudioSessionRouteSharingPolicyLongForm")]
#[deprecated]
pub const LongForm: Self = Self(AVAudioSessionRouteSharingPolicy::LongFormAudio.0);
#[doc(alias = "AVAudioSessionRouteSharingPolicyIndependent")]
pub const Independent: Self = Self(2);
#[doc(alias = "AVAudioSessionRouteSharingPolicyLongFormVideo")]
pub const LongFormVideo: Self = Self(3);
}
unsafe impl Encode for AVAudioSessionRouteSharingPolicy {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioSessionRouteSharingPolicy {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVAudioSessionPromptStyle(pub NSUInteger);
impl AVAudioSessionPromptStyle {
#[doc(alias = "AVAudioSessionPromptStyleNone")]
pub const None: Self = Self(0x6e6f6e65);
#[doc(alias = "AVAudioSessionPromptStyleShort")]
pub const Short: Self = Self(0x73687274);
#[doc(alias = "AVAudioSessionPromptStyleNormal")]
pub const Normal: Self = Self(0x6e726d6c);
}
unsafe impl Encode for AVAudioSessionPromptStyle {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioSessionPromptStyle {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVAudioStereoOrientation(pub NSInteger);
impl AVAudioStereoOrientation {
#[doc(alias = "AVAudioStereoOrientationNone")]
pub const None: Self = Self(0);
#[doc(alias = "AVAudioStereoOrientationPortrait")]
pub const Portrait: Self = Self(1);
#[doc(alias = "AVAudioStereoOrientationPortraitUpsideDown")]
pub const PortraitUpsideDown: Self = Self(2);
#[doc(alias = "AVAudioStereoOrientationLandscapeRight")]
pub const LandscapeRight: Self = Self(3);
#[doc(alias = "AVAudioStereoOrientationLandscapeLeft")]
pub const LandscapeLeft: Self = Self(4);
}
unsafe impl Encode for AVAudioStereoOrientation {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioStereoOrientation {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVAudioSessionRecordPermission(pub NSUInteger);
impl AVAudioSessionRecordPermission {
#[doc(alias = "AVAudioSessionRecordPermissionUndetermined")]
#[deprecated]
pub const Undetermined: Self = Self(0x756e6474);
#[doc(alias = "AVAudioSessionRecordPermissionDenied")]
#[deprecated]
pub const Denied: Self = Self(0x64656e79);
#[doc(alias = "AVAudioSessionRecordPermissionGranted")]
#[deprecated]
pub const Granted: Self = Self(0x67726e74);
}
unsafe impl Encode for AVAudioSessionRecordPermission {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioSessionRecordPermission {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVAudioSessionRenderingMode(pub NSInteger);
impl AVAudioSessionRenderingMode {
#[doc(alias = "AVAudioSessionRenderingModeNotApplicable")]
pub const NotApplicable: Self = Self(0);
#[doc(alias = "AVAudioSessionRenderingModeMonoStereo")]
pub const MonoStereo: Self = Self(1);
#[doc(alias = "AVAudioSessionRenderingModeSurround")]
pub const Surround: Self = Self(2);
#[doc(alias = "AVAudioSessionRenderingModeSpatialAudio")]
pub const SpatialAudio: Self = Self(3);
#[doc(alias = "AVAudioSessionRenderingModeDolbyAudio")]
pub const DolbyAudio: Self = Self(4);
#[doc(alias = "AVAudioSessionRenderingModeDolbyAtmos")]
pub const DolbyAtmos: Self = Self(5);
}
unsafe impl Encode for AVAudioSessionRenderingMode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioSessionRenderingMode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVAudioSessionMicrophoneInjectionMode(pub NSInteger);
impl AVAudioSessionMicrophoneInjectionMode {
#[doc(alias = "AVAudioSessionMicrophoneInjectionModeNone")]
pub const None: Self = Self(0);
#[doc(alias = "AVAudioSessionMicrophoneInjectionModeSpokenAudio")]
pub const SpokenAudio: Self = Self(1);
}
unsafe impl Encode for AVAudioSessionMicrophoneInjectionMode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for AVAudioSessionMicrophoneInjectionMode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}