diff --git a/tools/python/apixml2python.py b/tools/python/apixml2python.py index 7242ff43d..56aeb275a 100755 --- a/tools/python/apixml2python.py +++ b/tools/python/apixml2python.py @@ -26,6 +26,10 @@ sys.path.append(os.path.realpath(__file__)) from apixml2python.linphone import LinphoneModule +blacklisted_classes = [ + 'LinphoneTunnel', + 'LinphoneTunnelConfig' +] blacklisted_functions = [ 'linphone_call_get_user_pointer', 'linphone_call_set_user_pointer', @@ -107,7 +111,7 @@ blacklisted_functions = [ def generate(apixmlfile): tree = ET.parse(apixmlfile) renderer = pystache.Renderer() - m = LinphoneModule(tree, blacklisted_functions) + m = LinphoneModule(tree, blacklisted_classes, blacklisted_functions) f = open("linphone.c", "w") f.write(renderer.render(m)) diff --git a/tools/python/apixml2python/linphone.py b/tools/python/apixml2python/linphone.py index bfc0a27bc..bdffdba13 100644 --- a/tools/python/apixml2python/linphone.py +++ b/tools/python/apixml2python/linphone.py @@ -537,7 +537,7 @@ class SetterMethodDefinition(MethodDefinition): class LinphoneModule(object): - def __init__(self, tree, blacklisted_functions): + def __init__(self, tree, blacklisted_classes, blacklisted_functions): self.internal_instance_method_names = ['destroy', 'ref', 'unref'] self.internal_property_names = ['user_data'] self.enums = [] @@ -565,6 +565,8 @@ class LinphoneModule(object): for xml_class in xml_classes: if xml_class.get('deprecated') == 'true': continue + if xml_class.get('name') in blacklisted_classes: + continue c = {} c['class_xml_node'] = xml_class c['class_cname'] = xml_class.get('name')