Spade
Mini Shell
| Directory:~$ /lib/python2.7/site-packages/slip/dbus/ |
| [Home] [System Details] [Kill Me] |
�
��9Qc@s�dZddlmZddlmZdefd��YZdefd��YZdefd ��YZd
efd��YZ dee fd
��YZ
defd��YZdefd��YZdefd��YZ
dee fd��YZd�ZdS(s?Classes
and functions to easily access DBus introspection
data.i����(tElementTree(tStringIOt IElemMetacBs,eZdZiZed��Zd�ZRS(s�Metaclass
for introspection elements.
Sets elemname class member automatically from class name if not set
explicitly. Registers classes for their element
names.cCsYd}xL|D]D}|j�}||krGt|�rG|d7}qGn||7}q
W|S(Ntt_(tlowertlen(tclstclsnametelemnametctc_lower((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pytclsname_to_elemnames
cCs�|dkr"tj||||�Sd|krj|jd�sPtd|��ntj|d�|d<n|d}|tjkr�td||f��ntj||||�}|tj|<|S(NtIElemR s;Class
'%s' needs to set elemname (or be called
'IElem...'))is4Class '%s' tries to register duplicate
elemname '%s'(ttypet__new__t
startswitht TypeErrorRRtelemnames_to_classes(RtnametbasestdctR tkls((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyRs
(t__name__t
__module__t__doc__RtclassmethodRR(((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyR sR
cBsDeZdZeZdd�Zdd�Zd�Ze d��Z
RS(s&Base class for introspection
elements.cCs;tjj|jtjd�}tt|�j|||�S(N(RRtgetttagtNonetsuperR
R(RtelemtparentR((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyR8scCs>||_||_g|D]}t|d|�^q|_dS(NR
(RR R
tchild_elements(tselfRR R
((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyt__init__=s cCsud|jr|jn
d|jj|jf}x?|jD]4}x+t|�jd�D]}|d|7}qUWq9W|S(Ns%s
%rs
unknown:%ss
s
%s(R RRtattribR!tstrtsplit(R"tsR
tcc((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyt__str__BscCs
|jjS(N(RR$(R"((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyR$JsN(RRRRt
__metaclass__RRR#R)tpropertyR$(((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyR
3s tIElemUnknowncBseZdZdZRS(s-Catch-all
for unknown introspection
elements.N(RRRRR (((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyR,OstIElemNameMixincBseZdZed��ZRS(s,Mixin
for introspection elements with
names.cCs|jdS(NR(R$(R"((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyRXs(RRRR+R(((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyR-Ust IElemNodecBseZdZdd�ZRS(sIntrospection
node.cCsKtt|�j||�g|jD]}t|t�r#|^q#|_dS(N(RR.R#R!t
isinstancetchild_nodes(R"RR R
((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyR#`sN(RRRRR#(((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyR.]stIElemInterfacecBseZdZRS(sIntrospection
interface.(RRR(((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyR1fstIElemMethodcBseZdZRS(sIntrospection
interface
method.(RRR(((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyR2jstIElemArgcBseZdZRS(sIntrospection
method
argument.(RRR(((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyR3nstIElemSignalcBseZdZRS(sIntrospection
interface
signal.(RRR(((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyR4rscCsFt�}t|d�s't|�}n|j|�}t|�}|S(Ntread(RthasattrRtparseR
(tstring_or_filettreetxml_roott elem_root((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyt
introspectvs N(Rtxml.etree.ElementTreeRRRRtobjectR
R,R-R.R1R2R3R4R<(((s;/usr/lib/python2.7/site-packages/slip/dbus/introspection.pyt<module>s*