From: coderhyme Date: Thu, 25 Jan 2018 05:18:17 +0000 (+0900) Subject: [Multimedia] Moved enums of AudioManager into separate files. (#73) X-Git-Tag: 5.0.0-preview1-00450~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d7b12945031febb53830192ec561cf5f2a4623e1;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [Multimedia] Moved enums of AudioManager into separate files. (#73) Signed-off-by: coderhyme --- diff --git a/src/Tizen.Multimedia/AudioManager/AudioDeviceIoDirection.cs b/src/Tizen.Multimedia/AudioManager/AudioDeviceIoDirection.cs new file mode 100644 index 000000000..26a2c89b4 --- /dev/null +++ b/src/Tizen.Multimedia/AudioManager/AudioDeviceIoDirection.cs @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace Tizen.Multimedia +{ + /// + /// Specifies the audio device directions. + /// + /// 3 + public enum AudioDeviceIoDirection + { + /// + /// Input device. + /// + Input, + + /// + /// Output device. + /// + Output, + + /// + /// Input/output device (both directions are available). + /// + InputAndOutput + } +} diff --git a/src/Tizen.Multimedia/AudioManager/AudioDeviceOptions.cs b/src/Tizen.Multimedia/AudioManager/AudioDeviceOptions.cs new file mode 100644 index 000000000..e822a19c0 --- /dev/null +++ b/src/Tizen.Multimedia/AudioManager/AudioDeviceOptions.cs @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; + +namespace Tizen.Multimedia +{ + /// + /// Specifies the flags for the audio device options. + /// + /// This enumeration has a attribute that allows a bitwise combination of its member values. + /// + /// + [Flags] + internal enum AudioDeviceOptions + { + /// + /// Input devices. + /// + Input = 0x0001, + + /// + /// Output devices. + /// + Output = 0x0002, + + /// + /// Input and output devices (both directions are available). + /// + InputAndOutput = 0x0004, + + /// + /// Built-in devices. + /// + Internal = 0x00010, + + /// + /// External devices. + /// + External = 0x0020, + + /// + /// Deactivated devices. + /// + Deactivated = 0x1000, + + /// + /// Activated devices. + /// + Activated = 0x2000, + + /// + /// All devices. + /// + All = 0xFFFF + } +} diff --git a/src/Tizen.Multimedia/AudioManager/AudioDeviceState.cs b/src/Tizen.Multimedia/AudioManager/AudioDeviceState.cs new file mode 100644 index 000000000..5c1c8c5ff --- /dev/null +++ b/src/Tizen.Multimedia/AudioManager/AudioDeviceState.cs @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace Tizen.Multimedia +{ + /// + /// Specifies the audio device states. + /// + /// 3 + public enum AudioDeviceState + { + /// + /// Deactivated state. + /// + Deactivated, + + /// + /// Activated state. + /// + Activated + } + +} diff --git a/src/Tizen.Multimedia/AudioManager/AudioDeviceType.cs b/src/Tizen.Multimedia/AudioManager/AudioDeviceType.cs new file mode 100644 index 000000000..b4fcda5a0 --- /dev/null +++ b/src/Tizen.Multimedia/AudioManager/AudioDeviceType.cs @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace Tizen.Multimedia +{ + /// + /// Specifies the audio device types. + /// + /// 3 + public enum AudioDeviceType + { + /// + /// Built-in speaker. + /// + BuiltinSpeaker, + + /// + /// Built-in receiver. + /// + BuiltinReceiver, + + /// + /// Built-in microphone. + /// + BuiltinMic, + + /// + /// Audio jack that can be connected to wired accessories such as headphones and headsets. + /// + AudioJack, + + /// + /// Bluetooth media (A2DP). + /// + BluetoothMedia, + + /// + /// HDMI. + /// + Hdmi, + + /// + /// Device for forwarding. + /// + Forwarding, + + /// + /// USB audio. + /// + UsbAudio, + + /// + /// Bluetooth voice (SCO). + /// + BluetoothVoice + } +} diff --git a/src/Tizen.Multimedia/AudioManager/AudioManagerEnumExtensions.cs b/src/Tizen.Multimedia/AudioManager/AudioManagerEnumExtensions.cs new file mode 100644 index 000000000..eaec6038a --- /dev/null +++ b/src/Tizen.Multimedia/AudioManager/AudioManagerEnumExtensions.cs @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace Tizen.Multimedia +{ + internal static class AudioManagerEnumExtensions + { + internal static bool IsValid(this AudioStreamFocusOptions value) + { + int mask = (int)(AudioStreamFocusOptions.Playback | AudioStreamFocusOptions.Recording); + + return (mask & (int)value) != 0; + } + + internal static bool IsValid(this AudioStreamBehaviors value) + { + int mask = (int)(AudioStreamBehaviors.NoResume | AudioStreamBehaviors.Fading); + + return ((~mask) & (int)value) == 0; + } + } + +} diff --git a/src/Tizen.Multimedia/AudioManager/AudioManagerEnums.cs b/src/Tizen.Multimedia/AudioManager/AudioManagerEnums.cs deleted file mode 100644 index 70d6183da..000000000 --- a/src/Tizen.Multimedia/AudioManager/AudioManagerEnums.cs +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using System; - -namespace Tizen.Multimedia -{ - /// - /// Specifies the flags for the audio device options. - /// - /// This enumeration has a attribute that allows a bitwise combination of its member values. - /// - /// - [Flags] - internal enum AudioDeviceOptions - { - /// - /// Input devices. - /// - Input = 0x0001, - /// - /// Output devices. - /// - Output = 0x0002, - /// - /// Input and output devices (both directions are available). - /// - InputAndOutput = 0x0004, - /// - /// Built-in devices. - /// - Internal = 0x00010, - /// - /// External devices. - /// - External = 0x0020, - /// - /// Deactivated devices. - /// - Deactivated = 0x1000, - /// - /// Activated devices. - /// - Activated = 0x2000, - - /// - /// All devices. - /// - All = 0xFFFF - } - - /// - /// Specifies the audio device types. - /// - /// 3 - public enum AudioDeviceType - { - /// - /// Built-in speaker. - /// - BuiltinSpeaker, - /// - /// Built-in receiver. - /// - BuiltinReceiver, - /// - /// Built-in microphone. - /// - BuiltinMic, - /// - /// Audio jack that can be connected to wired accessories such as headphones and headsets. - /// - AudioJack, - /// - /// Bluetooth media (A2DP). - /// - BluetoothMedia, - /// - /// HDMI. - /// - Hdmi, - /// - /// Device for forwarding. - /// - Forwarding, - /// - /// USB audio. - /// - UsbAudio, - /// - /// Bluetooth voice (SCO). - /// - BluetoothVoice - } - - /// - /// Specifies the audio device directions. - /// - /// 3 - public enum AudioDeviceIoDirection - { - /// - /// Input device. - /// - Input, - /// - /// Output device. - /// - Output, - /// - /// Input/output device (both directions are available). - /// - InputAndOutput - } - - /// - /// Specifies the audio device states. - /// - /// 3 - public enum AudioDeviceState - { - /// - /// Deactivated state. - /// - Deactivated, - /// - /// Activated state. - /// - Activated - } - - /// - /// Specifies the audio volume types. - /// - /// 3 - public enum AudioVolumeType - { - /// - /// System. - /// - System, - /// - /// Notification. - /// - Notification, - /// - /// Alarm. - /// - Alarm, - /// - /// Ringtone. - /// - Ringtone, - /// - /// Media. - /// - Media, - /// - /// Call. - /// - Call, - /// - /// VoIP. - /// - Voip, - /// - /// Voice. - /// - Voice, - /// - /// No volume exists. - /// - /// - None - } - - /// - /// Specifies the audio stream types. - /// - /// 3 - public enum AudioStreamType - { - /// - /// Media. - /// - Media, - /// - /// System. - /// - System, - /// - /// Alarm. - /// - Alarm, - /// - /// Notification. - /// - Notification, - /// - /// Emergency. - /// - Emergency, - /// - /// Voice information. - /// - VoiceInformation, - /// - /// Voice recognition. - /// - VoiceRecognition, - /// - /// Ringtone for VoIP. - /// - RingtoneVoip, - /// - /// VoIP. - /// - Voip, - /// - /// Media only for external devices. - /// - MediaExternalOnly - } - - /// - /// Specifies the change reasons of the audio stream focus state. - /// - /// 3 - public enum AudioStreamFocusChangedReason - { - /// - /// Media. - /// - Media, - /// - /// System. - /// - System, - /// - /// Alarm. - /// - Alarm, - /// - /// Notification. - /// - Notification, - /// - /// Emergency. - /// - Emergency, - /// - /// Voice information. - /// - VoiceInformation, - /// - /// Voice recognition. - /// - VoiceRecognition, - /// - /// Ringtone. - /// - RingtoneVoip, - /// - /// VoIP. - /// - Voip, - /// - /// Voice-call or video-call. - /// - Call, - /// - /// Media only for external devices. - /// - MediaExternalOnly - } - - /// - /// Specifies the flags for the audio stream focus options. - /// - /// This enumeration has a attribute that allows a bitwise combination of its member values. - /// - /// - /// 3 - [Flags] - public enum AudioStreamFocusOptions - { - /// - /// Playback focus. - /// - Playback = 0x0001, - /// - /// Recording focus. - /// - Recording = 0x0002 - } - - /// - /// Specifies the audio stream focus states. - /// - /// 3 - public enum AudioStreamFocusState - { - /// - /// Focus state for release. - /// - Released, - /// - /// Focus state for acquisition. - /// - Acquired - } - - /// - /// Specifies the flags for the audio stream behaviors. - /// - /// This enumeration has a attribute that allows a bitwise combination of its member values. - /// - /// - /// 4 - [Flags] - public enum AudioStreamBehaviors - { - /// - /// No Resume. - /// - NoResume = 0x0001, - /// - /// Fading. - /// - Fading = 0x0002 - } - - - internal static class AudioManagerEnumExtensions - { - internal static bool IsValid(this AudioStreamFocusOptions value) - { - int mask = (int)(AudioStreamFocusOptions.Playback | AudioStreamFocusOptions.Recording); - - return (mask & (int)value) != 0; - } - - internal static bool IsValid(this AudioStreamBehaviors value) - { - int mask = (int)(AudioStreamBehaviors.NoResume | AudioStreamBehaviors.Fading); - - return ((~mask) & (int)value) == 0; - } - } - -} diff --git a/src/Tizen.Multimedia/AudioManager/AudioStreamBehaviors.cs b/src/Tizen.Multimedia/AudioManager/AudioStreamBehaviors.cs new file mode 100644 index 000000000..d9c3621d1 --- /dev/null +++ b/src/Tizen.Multimedia/AudioManager/AudioStreamBehaviors.cs @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; + +namespace Tizen.Multimedia +{ + /// + /// Specifies the flags for the audio stream behaviors. + /// + /// This enumeration has a attribute that allows a bitwise combination of its member values. + /// + /// + /// 4 + [Flags] + public enum AudioStreamBehaviors + { + /// + /// No Resume. + /// + NoResume = 0x0001, + + /// + /// Fading. + /// + Fading = 0x0002 + } + +} diff --git a/src/Tizen.Multimedia/AudioManager/AudioStreamFocusChangedReason.cs b/src/Tizen.Multimedia/AudioManager/AudioStreamFocusChangedReason.cs new file mode 100644 index 000000000..2cc6a7cef --- /dev/null +++ b/src/Tizen.Multimedia/AudioManager/AudioStreamFocusChangedReason.cs @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace Tizen.Multimedia +{ + /// + /// Specifies the change reasons of the audio stream focus state. + /// + /// 3 + public enum AudioStreamFocusChangedReason + { + /// + /// Media. + /// + Media, + + /// + /// System. + /// + System, + + /// + /// Alarm. + /// + Alarm, + + /// + /// Notification. + /// + Notification, + + /// + /// Emergency. + /// + Emergency, + + /// + /// Voice information. + /// + VoiceInformation, + + /// + /// Voice recognition. + /// + VoiceRecognition, + + /// + /// Ringtone. + /// + RingtoneVoip, + + /// + /// VoIP. + /// + Voip, + + /// + /// Voice-call or video-call. + /// + Call, + + /// + /// Media only for external devices. + /// + MediaExternalOnly + } +} diff --git a/src/Tizen.Multimedia/AudioManager/AudioStreamFocusOptions.cs b/src/Tizen.Multimedia/AudioManager/AudioStreamFocusOptions.cs new file mode 100644 index 000000000..efd6680a6 --- /dev/null +++ b/src/Tizen.Multimedia/AudioManager/AudioStreamFocusOptions.cs @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; + +namespace Tizen.Multimedia +{ + /// + /// Specifies the flags for the audio stream focus options. + /// + /// This enumeration has a attribute that allows a bitwise combination of its member values. + /// + /// + /// 3 + [Flags] + public enum AudioStreamFocusOptions + { + /// + /// Playback focus. + /// + Playback = 0x0001, + + /// + /// Recording focus. + /// + Recording = 0x0002 + } + +} diff --git a/src/Tizen.Multimedia/AudioManager/AudioStreamFocusState.cs b/src/Tizen.Multimedia/AudioManager/AudioStreamFocusState.cs new file mode 100644 index 000000000..4872792eb --- /dev/null +++ b/src/Tizen.Multimedia/AudioManager/AudioStreamFocusState.cs @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace Tizen.Multimedia +{ + /// + /// Specifies the audio stream focus states. + /// + /// 3 + public enum AudioStreamFocusState + { + /// + /// Focus state for release. + /// + Released, + + /// + /// Focus state for acquisition. + /// + Acquired + } +} diff --git a/src/Tizen.Multimedia/AudioManager/AudioStreamType.cs b/src/Tizen.Multimedia/AudioManager/AudioStreamType.cs new file mode 100644 index 000000000..4f50d5ba6 --- /dev/null +++ b/src/Tizen.Multimedia/AudioManager/AudioStreamType.cs @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace Tizen.Multimedia +{ + /// + /// Specifies the audio stream types. + /// + /// 3 + public enum AudioStreamType + { + /// + /// Media. + /// + Media, + + /// + /// System. + /// + System, + + /// + /// Alarm. + /// + Alarm, + + /// + /// Notification. + /// + Notification, + + /// + /// Emergency. + /// + Emergency, + + /// + /// Voice information. + /// + VoiceInformation, + + /// + /// Voice recognition. + /// + VoiceRecognition, + + /// + /// Ringtone for VoIP. + /// + RingtoneVoip, + + /// + /// VoIP. + /// + Voip, + + /// + /// Media only for external devices. + /// + MediaExternalOnly + } +} diff --git a/src/Tizen.Multimedia/AudioManager/AudioVolumeType.cs b/src/Tizen.Multimedia/AudioManager/AudioVolumeType.cs new file mode 100644 index 000000000..db3b541ac --- /dev/null +++ b/src/Tizen.Multimedia/AudioManager/AudioVolumeType.cs @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace Tizen.Multimedia +{ + /// + /// Specifies the audio volume types. + /// + /// 3 + public enum AudioVolumeType + { + /// + /// System. + /// + System, + + /// + /// Notification. + /// + Notification, + + /// + /// Alarm. + /// + Alarm, + + /// + /// Ringtone. + /// + Ringtone, + + /// + /// Media. + /// + Media, + + /// + /// Call. + /// + Call, + + /// + /// VoIP. + /// + Voip, + + /// + /// Voice. + /// + Voice, + + /// + /// No volume exists. + /// + /// + None + } +}