In native, StateChangedCallback parameters are arranged like this. : error, state, userData
However, in csharp api, parameters are arranged like this. : userData, state, error
So, it can't get error because parameter location is different. So i will modify it.
Change-Id: I8ad5cd8da846f5ae7cf47a9049744b2387c8e4e1
Signed-off-by: Hyunsoo <hance.park@samsung.com>
internal static partial class ScreenMirroring
{
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- internal delegate void StateChangedCallback(IntPtr userData,
- ScreenMirroringState state, ScreenMirroringErrorCode error);
+ internal delegate void StateChangedCallback(ScreenMirroringErrorCode error,
+ ScreenMirroringState state, IntPtr userData);
[DllImport(Libraries.ScreenMirroring, EntryPoint = "scmirroring_sink_create")]
internal static extern ScreenMirroringErrorCode Create(out IntPtr handle);
/// </summary>
/// <feature>http://tizen.org/feature/network.wifi.direct.display</feature>
/// <exception cref="NotSupportedException">The feature is not supported.</exception>
+
public ScreenMirroring()
{
if (IsSupported() == false)
private void RegisterStateChangedEvent()
{
- _stateChangedCallback = (_, state, error) =>
+ _stateChangedCallback = (error, state, _) =>
{
var prevState = _state.Value;