Commit 0e58a367 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Improved a bit C# wrapper

parent 1f94814f
......@@ -363,20 +363,22 @@ class CsharpTranslator(object):
listenerDict['delegate']['params_public'] += ', '
listenerDict['delegate']['params_private'] += ', '
listenerDict['delegate']['params'] += ', '
else:
listenerDict['delegate']['first_param'] = argName
if normalType == dllImportType:
listenerDict['delegate']['params'] += argName
else:
if normalType == "bool":
listenerDict['delegate']['params'] += argName + " == 0"
elif self.is_linphone_type(arg.type, True, False) and type(arg.type) is AbsApi.ClassType:
listenerDict['delegate']['params'] += "fromNativePtr<" + normalType + ">(" + argName + ")"
elif self.is_linphone_type(arg.type, True, False) and type(arg.type) is AbsApi.EnumType:
listenerDict['delegate']['params'] += "(" + normalType + ")" + argName + ""
if normalType == dllImportType:
listenerDict['delegate']['params'] += argName
else:
raise("Error")
if normalType == "bool":
listenerDict['delegate']['params'] += argName + " == 0"
elif self.is_linphone_type(arg.type, True, False) and type(arg.type) is AbsApi.ClassType:
listenerDict['delegate']['params'] += "fromNativePtr<" + normalType + ">(" + argName + ")"
elif self.is_linphone_type(arg.type, True, False) and type(arg.type) is AbsApi.EnumType:
listenerDict['delegate']['params'] += "(" + normalType + ")" + argName + ""
else:
raise("Error")
else:
listenerDict['delegate']['first_param'] = argName
listenerDict['delegate']['params'] = 'thiz'
listenerDict['delegate']['params_public'] += normalType + " " + argName
listenerDict['delegate']['params_private'] += dllImportType + " " + argName
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment