Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
5a2f2273
Commit
5a2f2273
authored
Jun 27, 2017
by
Sylvain Berfini
🐮
Browse files
Changes in C# wrapper for Windows UWP
parent
ca3eadc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
9 deletions
+24
-9
wrappers/csharp/wrapper_impl.mustache
wrappers/csharp/wrapper_impl.mustache
+24
-9
No files found.
wrappers/csharp/wrapper_impl.mustache
View file @
5a2f2273
...
...
@@ -38,6 +38,12 @@ namespace Linphone
public const string LIB_NAME = "linphone"; // With this, it automatically finds liblinphone.so
#endif
#if WINDOWS_UWP
public const string BELLE_SIP_LIB_NAME = "bellesip";
#else
public const string BELLE_SIP_LIB_NAME = "linphone";
#endif
#if ANDROID
[DllImport(LinphoneWrapper.LIB_NAME)]
static extern void setAndroidLogHandler();
...
...
@@ -63,7 +69,15 @@ namespace Linphone
///
<summary>
/// All methods that returns a LinphoneStatus with a value != 0 as an error code in C are translated in C# by throwing a LinphoneException
///
</summary>
[Serializable()]
#if WINDOWS_UWP
public class LinphoneException : System.Exception
{
public LinphoneException() : base() { }
public LinphoneException(string message) : base(message) { }
public LinphoneException(string message, System.Exception inner) : base(message, inner) { }
}
#else
[Serializable()]
public class LinphoneException : System.Exception
{
public LinphoneException() : base() { }
...
...
@@ -71,6 +85,7 @@ namespace Linphone
public LinphoneException(string message, System.Exception inner) : base(message, inner) { }
protected LinphoneException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
}
#endif
[StructLayout(LayoutKind.Sequential)]
///
<summary>
...
...
@@ -83,28 +98,28 @@ namespace Linphone
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate void OnLinphoneObjectDataDestroyed(IntPtr data);
[DllImport(LinphoneWrapper.LIB_NAME)]
[DllImport(LinphoneWrapper.
BELLE_SIP_
LIB_NAME)]
static extern int belle_sip_object_data_set(IntPtr ptr, string name, IntPtr data, OnLinphoneObjectDataDestroyed cb);
[DllImport(LinphoneWrapper.LIB_NAME)]
[DllImport(LinphoneWrapper.
BELLE_SIP_
LIB_NAME)]
static extern IntPtr belle_sip_object_data_get(IntPtr ptr, string name);
[DllImport(LinphoneWrapper.LIB_NAME)]
[DllImport(LinphoneWrapper.
BELLE_SIP_
LIB_NAME)]
static extern IntPtr belle_sip_object_ref(IntPtr ptr);
[DllImport(LinphoneWrapper.LIB_NAME)]
[DllImport(LinphoneWrapper.
BELLE_SIP_
LIB_NAME)]
static extern void belle_sip_object_unref(IntPtr ptr);
[DllImport(LinphoneWrapper.LIB_NAME)]
[DllImport(LinphoneWrapper.
BELLE_SIP_
LIB_NAME)]
static extern IntPtr bctbx_list_next(IntPtr ptr);
[DllImport(LinphoneWrapper.LIB_NAME)]
[DllImport(LinphoneWrapper.
BELLE_SIP_
LIB_NAME)]
static extern IntPtr bctbx_list_get_data(IntPtr ptr);
[DllImport(LinphoneWrapper.LIB_NAME)]
[DllImport(LinphoneWrapper.
BELLE_SIP_
LIB_NAME)]
static extern IntPtr bctbx_list_append(IntPtr elem, string data);
[DllImport(LinphoneWrapper.LIB_NAME)]
[DllImport(LinphoneWrapper.
BELLE_SIP_
LIB_NAME)]
static extern IntPtr bctbx_list_append(IntPtr elem, IntPtr data);
#if __IOS__
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment