3 iR�V0 �@s4ddlmZddlmZGdd�de�Zdd�ZdS)�)� ParserCreate)�IntrospectionParserExceptionc@s0eZdZdZdd�Zdd�Zd d �Zd d �Zd S)�_Parser�map�in_iface� in_method�sigcCsi|_d|_d|_d|_dS)N�)rrrr)�self�r �0/usr/lib64/python3.6/_expat_introspect_parser.py�__init__sz_Parser.__init__cCs0tdd�}d|_|j|_|j|_|j|�|jS)NzUTF-8� T)rZ buffer_text�StartElementHandler�EndElementHandlerZParser)r �data�parserr r r �parse%s   z _Parser.parsecCsr|js"|j rn|dkrn|d|_nL|j r>|dkr>|d|_n0|jrn|dkrn|jdd�dkrn|j|d7_dS)N� interface�name�method�arg� direction�in�type)rr�getr)r rZ attributesr r r r-s  z_Parser.StartElementHandlercCsT|jrP|j r|dkrd|_n2|jrP|dkrP|j|j|jd|j<d|_d|_dS)Nrr r�.)rrrr)r rr r r r8sz_Parser.EndElementHandlerN)rrrr)�__name__� __module__� __qualname__� __slots__r rrrr r r r rs  rcCsFy t�j|�Stk r@}ztd|j|f��WYdd}~XnXdS)a�Return a dict mapping ``interface.method`` strings to the concatenation of all their 'in' parameters, and mapping ``interface.signal`` strings to the concatenation of all their parameters. Example output:: { 'com.example.SignalEmitter.OneString': 's', 'com.example.MethodImplementor.OneInt32Argument': 'i', } :Parameters: `data` : str The introspection XML. Must be an 8-bit string of UTF-8. z%s: %sN)rr� Exceptionr� __class__)r�er r r �process_introspection_dataAs r$N)Zxml.parsers.expatrZdbus.exceptionsr�objectrr$r r r r �s  $