diff options
author | John (J5) Palmieri <johnp@redhat.com> | 2006-07-14 16:20:12 +0000 |
---|---|---|
committer | John (J5) Palmieri <johnp@redhat.com> | 2006-07-14 16:20:12 +0000 |
commit | a929c9a3b465db8b7e17b9b39936c612c2621a7c (patch) | |
tree | d1764257d1bd56f8e6a044516ccfc9bc44f7f9f5 /python/introspect_parser.py | |
parent | 5efe8e7f1d97931710558495a951e0b35afbfb72 (diff) |
* Remove all bindings
Diffstat (limited to 'python/introspect_parser.py')
-rw-r--r-- | python/introspect_parser.py | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/python/introspect_parser.py b/python/introspect_parser.py deleted file mode 100644 index 47c9806e..00000000 --- a/python/introspect_parser.py +++ /dev/null @@ -1,51 +0,0 @@ -import libxml2 -import cStringIO -import exceptions - -def process_introspection_data(data): - method_map = {} - - XMLREADER_START_ELEMENT_NODE_TYPE = 1 - XMLREADER_END_ELEMENT_NODE_TYPE = 15 - - stream = cStringIO.StringIO(data.encode('utf-8')) - input_source = libxml2.inputBuffer(stream) - reader = input_source.newTextReader("urn:introspect") - - ret = reader.Read() - current_iface = None - current_method = None - current_sigstr = '' - - while ret == 1: - name = reader.LocalName() - if reader.NodeType() == XMLREADER_START_ELEMENT_NODE_TYPE: - if (not current_iface and not current_method and name == 'interface'): - current_iface = reader.GetAttribute('name') - elif (current_iface and not current_method and name == 'method'): - current_method = reader.GetAttribute('name') - if reader.IsEmptyElement(): - method_map[current_iface + '.' + current_method] = '' - current_method = None - current_sigstr = '' - - elif (current_iface and current_method and name == 'arg'): - direction = reader.GetAttribute('direction') - - if not direction or direction == 'in': - current_sigstr = current_sigstr + reader.GetAttribute('type') - - elif reader.NodeType() == XMLREADER_END_ELEMENT_NODE_TYPE: - if (current_iface and not current_method and name == 'interface'): - current_iface = None - if (current_iface and current_method and name == 'method'): - method_map[current_iface + '.' + current_method] = current_sigstr - current_method = None - current_sigstr = '' - - ret = reader.Read() - - if ret != 0: - raise exceptions.IntrospectionParserException(data) - - return method_map |