Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia / Interop / Interop.Volume.cs
1 using System;
2 using System.Runtime.InteropServices;
3
4 namespace Tizen.Multimedia
5 {
6     internal static partial class Interop
7     {
8         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
9         internal delegate void SoundManagerVolumeChangedCallback(AudioVolumeType type, uint volume, IntPtr userData);
10
11         internal static partial class AudioVolume
12         {
13             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_get_max_volume")]
14             internal static extern int GetMaxVolume(AudioVolumeType type, out int max);
15
16             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_set_volume")]
17             internal static extern int SetVolume(AudioVolumeType type, int volume);
18
19             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_get_volume")]
20             internal static extern int GetVolume(AudioVolumeType type, out int volume);
21
22             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_get_current_sound_type")]
23             internal static extern int GetCurrentSoundType(out AudioVolumeType type);
24
25             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_add_volume_changed_cb")]
26             internal static extern int AddVolumeChangedCallback(SoundManagerVolumeChangedCallback callback, IntPtr userData, out int id);
27
28             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_remove_volume_changed_cb")]
29             internal static extern int RemoveVolumeChangedCallback(int id);
30         }
31     }
32 }