Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia / Interop / Interop.Device.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 SoundDeviceConnectionChangedCallback(IntPtr device, bool isConnected, IntPtr userData);
10
11         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
12         internal delegate void SoundDeviceStateChangedCallback(IntPtr device, AudioDeviceState changedState, IntPtr userData);
13
14         internal static partial class AudioDevice
15         {
16             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_get_device_list")]
17             internal static extern int GetCurrentDeviceList(AudioDeviceOptions deviceMask, out IntPtr deviceList);
18
19             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_free_device_list")]
20             internal static extern int FreeDeviceList(IntPtr deviceList);
21
22             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_get_next_device")]
23             internal static extern int GetNextDevice(IntPtr deviceList, out IntPtr device);
24
25             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_get_device_type")]
26             internal static extern int GetDeviceType(IntPtr device, out AudioDeviceType type);
27
28             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_get_device_io_direction")]
29             internal static extern int GetDeviceIoDirection(IntPtr device, out AudioDeviceIoDirection ioDirection);
30
31             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_get_device_id")]
32             internal static extern int GetDeviceId(IntPtr device, out int id);
33
34             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_get_device_name")]
35             internal static extern int GetDeviceName(IntPtr device, out IntPtr name);
36
37             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_get_device_state")]
38             internal static extern int GetDeviceState(IntPtr device, out AudioDeviceState state);
39
40             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_add_device_connection_changed_cb")]
41             internal static extern int AddDeviceConnectionChangedCallback(AudioDeviceOptions deviceMask, SoundDeviceConnectionChangedCallback callback, IntPtr userData, out int id);
42
43             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_remove_device_connection_changed_cb")]
44             internal static extern int RemoveDeviceConnectionChangedCallback(int id);
45
46             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_add_device_state_changed_cb")]
47             internal static extern int AddDeviceStateChangedCallback(AudioDeviceOptions deviceMask, SoundDeviceStateChangedCallback callback, IntPtr userData, out int id);
48
49             [DllImportAttribute(Libraries.SoundManager, EntryPoint = "sound_manager_remove_device_state_changed_cb")]
50             internal static extern int RemoveDeviceStateChangedCallback(int id);
51         }
52     }
53 }