#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
use crate::audio_common::OH_AudioCommon_Result;
use crate::audiostream_base::OH_AudioStream_EncodingType;
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl OH_AudioDevice_ChangeType {
pub const AUDIO_DEVICE_CHANGE_TYPE_CONNECT: OH_AudioDevice_ChangeType =
OH_AudioDevice_ChangeType(0);
pub const AUDIO_DEVICE_CHANGE_TYPE_DISCONNECT: OH_AudioDevice_ChangeType =
OH_AudioDevice_ChangeType(1);
}
#[repr(transparent)]
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_AudioDevice_ChangeType(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl OH_AudioDevice_Role {
pub const AUDIO_DEVICE_ROLE_INPUT: OH_AudioDevice_Role = OH_AudioDevice_Role(1);
pub const AUDIO_DEVICE_ROLE_OUTPUT: OH_AudioDevice_Role = OH_AudioDevice_Role(2);
}
#[repr(transparent)]
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_AudioDevice_Role(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl OH_AudioDevice_Type {
pub const AUDIO_DEVICE_TYPE_INVALID: OH_AudioDevice_Type = OH_AudioDevice_Type(0);
pub const AUDIO_DEVICE_TYPE_EARPIECE: OH_AudioDevice_Type = OH_AudioDevice_Type(1);
pub const AUDIO_DEVICE_TYPE_SPEAKER: OH_AudioDevice_Type = OH_AudioDevice_Type(2);
pub const AUDIO_DEVICE_TYPE_WIRED_HEADSET: OH_AudioDevice_Type = OH_AudioDevice_Type(3);
pub const AUDIO_DEVICE_TYPE_WIRED_HEADPHONES: OH_AudioDevice_Type = OH_AudioDevice_Type(4);
pub const AUDIO_DEVICE_TYPE_BLUETOOTH_SCO: OH_AudioDevice_Type = OH_AudioDevice_Type(7);
pub const AUDIO_DEVICE_TYPE_BLUETOOTH_A2DP: OH_AudioDevice_Type = OH_AudioDevice_Type(8);
pub const AUDIO_DEVICE_TYPE_MIC: OH_AudioDevice_Type = OH_AudioDevice_Type(15);
pub const AUDIO_DEVICE_TYPE_USB_HEADSET: OH_AudioDevice_Type = OH_AudioDevice_Type(22);
pub const AUDIO_DEVICE_TYPE_DISPLAY_PORT: OH_AudioDevice_Type = OH_AudioDevice_Type(23);
pub const AUDIO_DEVICE_TYPE_REMOTE_CAST: OH_AudioDevice_Type = OH_AudioDevice_Type(24);
#[cfg(feature = "api-18")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
pub const AUDIO_DEVICE_TYPE_USB_DEVICE: OH_AudioDevice_Type = OH_AudioDevice_Type(25);
#[cfg(feature = "api-19")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
pub const AUDIO_DEVICE_TYPE_ACCESSORY: OH_AudioDevice_Type = OH_AudioDevice_Type(26);
#[cfg(feature = "api-19")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
pub const AUDIO_DEVICE_TYPE_HDMI: OH_AudioDevice_Type = OH_AudioDevice_Type(27);
#[cfg(feature = "api-19")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-19")))]
pub const AUDIO_DEVICE_TYPE_LINE_DIGITAL: OH_AudioDevice_Type = OH_AudioDevice_Type(28);
#[cfg(feature = "api-20")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
pub const AUDIO_DEVICE_TYPE_HEARING_AID: OH_AudioDevice_Type = OH_AudioDevice_Type(30);
#[cfg(feature = "api-20")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
pub const AUDIO_DEVICE_TYPE_NEARLINK: OH_AudioDevice_Type = OH_AudioDevice_Type(31);
pub const AUDIO_DEVICE_TYPE_DEFAULT: OH_AudioDevice_Type = OH_AudioDevice_Type(1000);
}
#[repr(transparent)]
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_AudioDevice_Type(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl OH_AudioDevice_Flag {
pub const AUDIO_DEVICE_FLAG_NONE: OH_AudioDevice_Flag = OH_AudioDevice_Flag(0);
pub const AUDIO_DEVICE_FLAG_OUTPUT: OH_AudioDevice_Flag = OH_AudioDevice_Flag(1);
pub const AUDIO_DEVICE_FLAG_INPUT: OH_AudioDevice_Flag = OH_AudioDevice_Flag(2);
pub const AUDIO_DEVICE_FLAG_ALL: OH_AudioDevice_Flag = OH_AudioDevice_Flag(3);
}
#[repr(transparent)]
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_AudioDevice_Flag(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl OH_AudioDevice_Usage {
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const AUDIO_DEVICE_USAGE_MEDIA_OUTPUT: OH_AudioDevice_Usage = OH_AudioDevice_Usage(1);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const AUDIO_DEVICE_USAGE_MEDIA_INPUT: OH_AudioDevice_Usage = OH_AudioDevice_Usage(2);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const AUDIO_DEVICE_USAGE_MEDIA_ALL: OH_AudioDevice_Usage = OH_AudioDevice_Usage(3);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const AUDIO_DEVICE_USAGE_CALL_OUTPUT: OH_AudioDevice_Usage = OH_AudioDevice_Usage(4);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const AUDIO_DEVICE_USAGE_CALL_INPUT: OH_AudioDevice_Usage = OH_AudioDevice_Usage(8);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub const AUDIO_DEVICE_USAGE_CALL_ALL: OH_AudioDevice_Usage = OH_AudioDevice_Usage(12);
}
#[repr(transparent)]
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_AudioDevice_Usage(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
pub struct OH_AudioDeviceDescriptor {
_unused: [u8; 0],
}
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OH_AudioDeviceDescriptorArray {
pub size: u32,
pub descriptors: *mut *mut OH_AudioDeviceDescriptor,
}
#[cfg(feature = "api-13")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
impl OH_AudioDevice_BlockStatus {
#[cfg(feature = "api-13")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
pub const AUDIO_DEVICE_UNBLOCKED: OH_AudioDevice_BlockStatus = OH_AudioDevice_BlockStatus(0);
#[cfg(feature = "api-13")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
pub const AUDIO_DEVICE_BLOCKED: OH_AudioDevice_BlockStatus = OH_AudioDevice_BlockStatus(1);
}
#[repr(transparent)]
#[cfg(feature = "api-13")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct OH_AudioDevice_BlockStatus(pub ::core::ffi::c_uint);
extern "C" {
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_AudioDeviceDescriptor_GetDeviceRole(
audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
deviceRole: *mut OH_AudioDevice_Role,
) -> OH_AudioCommon_Result;
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_AudioDeviceDescriptor_GetDeviceType(
audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
deviceType: *mut OH_AudioDevice_Type,
) -> OH_AudioCommon_Result;
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_AudioDeviceDescriptor_GetDeviceId(
audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
id: *mut u32,
) -> OH_AudioCommon_Result;
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_AudioDeviceDescriptor_GetDeviceName(
audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
name: *mut *mut ::core::ffi::c_char,
) -> OH_AudioCommon_Result;
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_AudioDeviceDescriptor_GetDeviceAddress(
audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
address: *mut *mut ::core::ffi::c_char,
) -> OH_AudioCommon_Result;
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_AudioDeviceDescriptor_GetDeviceSampleRates(
audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
sampleRates: *mut *mut u32,
size: *mut u32,
) -> OH_AudioCommon_Result;
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_AudioDeviceDescriptor_GetDeviceChannelCounts(
audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
channelCounts: *mut *mut u32,
size: *mut u32,
) -> OH_AudioCommon_Result;
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_AudioDeviceDescriptor_GetDeviceDisplayName(
audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
displayName: *mut *mut ::core::ffi::c_char,
) -> OH_AudioCommon_Result;
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
pub fn OH_AudioDeviceDescriptor_GetDeviceEncodingTypes(
audioDeviceDescriptor: *mut OH_AudioDeviceDescriptor,
encodingTypes: *mut *mut OH_AudioStream_EncodingType,
size: *mut u32,
) -> OH_AudioCommon_Result;
}