mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 00:29:21 +00:00
Blacklist some classes in the Python wrapper.
This commit is contained in:
parent
941d57811b
commit
a4c2f0ef36
2 changed files with 8 additions and 2 deletions
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue