diff --git a/wrappers/csharp/genwrapper.py b/wrappers/csharp/genwrapper.py index de474eea9..83fd39ed4 100644 --- a/wrappers/csharp/genwrapper.py +++ b/wrappers/csharp/genwrapper.py @@ -491,13 +491,7 @@ if __name__ == '__main__': parser = AbsApi.CParser(project) parser.functionBl = \ ['linphone_vcard_get_belcard',\ - 'linphone_core_get_current_vtable',\ - 'linphone_call_set_native_video_window_id',\ - 'linphone_call_get_native_video_window_id',\ - 'linphone_core_get_native_preview_window_id',\ - 'linphone_core_set_native_preview_window_id',\ - 'linphone_core_set_native_video_window_id',\ - 'linphone_core_get_native_video_window_id'] + 'linphone_core_get_current_vtable'] parser.classBl += 'LinphoneCoreVTable' parser.methodBl.remove('getCurrentCallbacks') parser.parse_all() diff --git a/wrappers/csharp/wrapper_impl.mustache b/wrappers/csharp/wrapper_impl.mustache index 8837b4475..91da3f494 100644 --- a/wrappers/csharp/wrapper_impl.mustache +++ b/wrappers/csharp/wrapper_impl.mustache @@ -183,7 +183,11 @@ namespace Linphone obj.nativePtr = ptr; obj.handle = GCHandle.Alloc(obj, GCHandleType.WeakTrackResurrection); objPtr = GCHandle.ToIntPtr(obj.handle); +#if WINDOWS_UWP belle_sip_object_data_set(ptr, "cs_obj", objPtr, IntPtr.Zero); +#else + belle_sip_object_data_set(ptr, "cs_obj", objPtr, null); +#endif return obj; } @@ -377,13 +381,9 @@ namespace Linphone } {{/isLinphoneFactory}} {{#isLinphoneCall}} - [DllImport(LinphoneWrapper.LIB_NAME)] - static extern IntPtr linphone_call_get_native_video_window_id(IntPtr thiz); - [DllImport(LinphoneWrapper.LIB_NAME)] - static extern void linphone_call_set_native_video_window_id(IntPtr thiz, IntPtr id); /// Get the native window handle of the video window, casted as an unsigned long. - public string NativeVideoWindowId + public string NativeVideoWindowIdString { get { @@ -396,13 +396,9 @@ namespace Linphone } {{/isLinphoneCall}} {{#isLinphoneCore}} - [DllImport(LinphoneWrapper.LIB_NAME)] - static extern IntPtr linphone_core_get_native_video_window_id(IntPtr thiz); - [DllImport(LinphoneWrapper.LIB_NAME)] - static extern void linphone_core_set_native_video_window_id(IntPtr thiz, IntPtr id); /// Get the native window handle of the video window. - public string NativeVideoWindowId + public string NativeVideoWindowIdString { get { @@ -414,13 +410,8 @@ namespace Linphone } } - [DllImport(LinphoneWrapper.LIB_NAME)] - static extern IntPtr linphone_core_get_native_preview_window_id(IntPtr thiz); - [DllImport(LinphoneWrapper.LIB_NAME)] - static extern void linphone_core_set_native_preview_window_id(IntPtr thiz, IntPtr id); - /// Get the native window handle of the video preview window. - public string NativePreviewWindowId + public string NativePreviewWindowIdString { get {