%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/3/root/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/
Upload File :
Create Path :
Current File : //proc/3/root/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyc

�
�SK\c@s�ddlZddlmZddlZddlmZmZmZmZddl	m
Z
mZmZm
Z
mZmZmZmZmZddlZejddkr�eZnddd	d
dgZdd
ddddgZddgZddgZeeZeeeZeeeZdZd�ZiZ iZ!iZ"da#d�Z$d�Z%ddl&m'Z'm(Z(m)Z)m*Z*m+Z+e)e*Be+BZ,d�Z-dd%d��YZ.de.fd��YZ/d e.fd!��YZ0d"�Z1d#d&d$��YZ2dS('i����N(t
MethodType(txpttCOMExceptiontnsErrortlogger(	tIID_nsISupportstIID_nsIClassInfotIID_nsISupportsCStringtIID_nsISupportsStringtIID_nsISupportsWeakReferencetIID_nsIWeakReferencetXPTI_GetInterfaceInfoManagertGetComponentManagertXPTC_InvokeByIndexiit__del__t__len__t__nonzero__t__eq__t__neq__tnsISupportsPRInt32tnsISupportsPRInt16tnsISupportsPRUint32tnsISupportsPRUint16tnsISupportsPRUint8tnsISupportsPRBooltnsISupportsPRInt64tnsISupportsPRUint64tnsISupportsDoubletnsISupportsFloatsP
def %s(self, %s):
    return XPTC_InvokeByIndex(self._comobj_, %d, (%s, (%s)))
cCsDd}g}g}g}d}x�|jD]�}|d}d|f}d}|jr�|j�r�|j�r�|j�s�|r�d}d}n|j||�|j|�ntj|�}	|j|jf|	�q(Wd}
|
j	|�}t
|�dkr|dd}n|
j	|�}t|j||j
t|�|fS(NiisParam%dts = Nones, t,(tparamsthidden_indicatortIsIntIsDippertIsOuttappendRtMakeReprForInvoketparam_flagstjointlentmethod_templatetnametmethod_indexttuple(tmethodtparam_notparam_declsR&tparam_namestused_defaulttparamt
param_namet
param_defaultt	type_reprtsep((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt_MakeMethodCodeFs.

#	cCs(tj�tj�tj�dadS(Ni(tinterface_cachetcleartinterface_method_cachetcontractid_info_cachet
have_shutdown(((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt	_shutdownls


cBs�|j}ye||SWnek
r,nX|j�pB|j�sRtd��e|�}e|d|fd�}i}|e�|fdU||}|ekr�ie|<n|e||<|S(Ns6getters and setters should have been weeded out by nows<XPCOMObject method '%s'>texec(	R*R:tKeyErrortIsSettertIsGettertAssertionErrorR7tcompiletglobals(tmethod_infotiidR*tmethod_codet
codeObjectt
tempNameSpacetret((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pytBuildMethodts	
%

(t
XPT_MD_GETTERt
XPT_MD_SETTERtXPT_MD_NOTXPCOMtXPT_MD_CTORt
XPT_MD_HIDDENc
Cs�tstd��tj|d�}|dkr�g}i}i}i}tj|�}x�|jD]�}|j}|t	@dkrb|t
@r�tg|jD]}	|	j
ftj|	�^q��}
|j|
f||j<qA|t@r1tg|jD]}	|	j
ftj|	�^q��}
|j|
f||j<qA|||j<qbqbWi}x!|jD]}|j||j<qUW||||f}|t|<n|S(Ns+Can't build interface info after a shutdowni(R<RBR8tgettNoneRt	InterfacetmethodstflagstFLAGS_TO_IGNORERMtlistRR&R%R+R*RLt	constantstvalue(
RFRJtmethod_code_blockstgetterstsetterstmethod_infost	interfacetmRUtxR&RXtc((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pytBuildInterfaceInfo�s0	
5
5
t
_XPCOMBasecBsbeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZRS(
cCs1y
|j}Wntk
r nXt|j|�S(N(t_comobj_tAttributeErrortcmp(tselftother((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt__cmp__�s


cCs
t|j�S(N(thashRd(Rg((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt__hash__�scCs.y
|j}Wntk
r nX|j|kS(N(RdRe(RgRh((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyR�s


cCs.y
|j}Wntk
r nX|j|kS(N(RdRe(RgRh((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyR�s


cCsCy$|jjtd�t|j�SWntk
r>|j�SXdS(Ni(RdtQueryInterfaceRtstrRt__repr__(Rg((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt__str__�s

cCs>y|jjt�}Wntk
r6tt|��SX|jS(N(RdRlRRtunicodeRmtdata(Rgtprin((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt__unicode__�s

cCsvt�}xZ|D]R}|j|�j�}y#|jj|�}||j�SWqtk
raqXqWtd��dS(NsFThis object does not support automatic numeric conversion to this type(RtGetInfoForNametGetIIDRdRlRqRt
ValueError(Rgtinterface_namestcvttiimtinterface_nameRFtprim((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt_do_conversion�s	

cCs7tjddkr'|jttt�S|jtt�S(Nii(tsystversion_infoR|t_int_interfacest_long_interfacestint(Rg((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt__int__�scCs|jtt�S(N(R|R�tlong(Rg((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt__long__�scCs|jtt�S(N(R|t_float_interfacestfloat(Rg((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt	__float__�s(t__name__t
__module__RiRkRRRoRsR|R�R�R�(((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyRc�s									t	ComponentcBsYeZed�Zd�Zd�Zd�ZeZd�Zd�Z	d�Z
d�ZRS(cCs�t|d�std��d}t|d�sn|}t�}|j|�}t|d�sntd��n||jd<i|jd<i|jd<i|jd<i|jd<d	|jd
<|dkr�d}n||jd<|j|�dS(
NRds.Should be a raw nsIWhatever, not a wrapped onetIIDsAThe created object should be a raw nsIWhatever, not a wrapped onet_interfaces_t_interface_names_t_interface_infos_t_name_to_interface_iid_it_tried_classinfo_s	<unknown>t
_object_name_(thasattrRBRRRtcreateInstanceByContractIDt__dict__Rl(RgtobRFtob_nametcm((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt__init__�s"	





	
cCs�|jstd��d|jd<y|jjtd�}Wntk
rUd}nX|dk	r�y
|j}Wntk
r�d}nX|r�||jd<t	j
|�}nd}|dkrby|j�}Wntk
r�g}nXx1|D])}||jdkr�|j|�q�q�W|dk	r�i}|jd|d<|jd|d<|t	|<q�q�x7t
|j��D] \}}|j|j|�quWn||jd<dS(	Ns$already tried to get the class info.iR�iR�R�R�t_com_classinfo_(R�RBR�RdRlRRRRt
contractIDR;RQt
getInterfacestqueryInterfaceRWtitemstupdate(Rgt	classinfotreal_cidtcontractid_infotinterface_infost
nominated_iidtkeytval((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt _build_all_supported_interfaces_s>









c
Cs8|jd}||ks%td��yt|�\}}}}Wn1tk
rt}tjd||�d||<dSX||||f||<|jd}x$t|j��D]}	|||	<q�Wx$t|j��D]}	|||	<q�Wx$t|j��D]}	|||	<q�Wx$t|j��D]}	|||	<q WdS(NR�s"Already remembered this interface!s)Failed to build interface info for %s: %sR�(	R�RBRbRRtinfoRRRWtkeys(
RgRFtiisR]R[R\RXtwhytnamesR*((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt_remember_interface_info0s$


c	Cs�||jkr1|j|jks-td��|S||jkrP|j|�n|j|}|dkr||jj|d�S|jj|d�}|\}}}}t	||||||�}||j|<||j|j<|S(Ns9_interfaces_ has the key, but _interface_names_ does not!i(
R�R*R�RBR�R�RRRdRlt
_Interface(	RgRFt
iface_infot	raw_ifaceR]R[R\RXt
new_interface((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyRlHs

cCs�|tkrt|��n|jdj|d�}|dk	rD|S|jdj|d�}|dkr�|jr�|j�|jdj|d�}|jdj|d�}|dk	r�|Sn|dk	r!|jdj|d�}|dkr|j|�|jd|}nt||�Sx`t	|jdj
��D]E}y+t||�}|j|jd|<|SWq;tk
rq;Xq;Wtd|j|f��dS(NR�R�R�s*XPCOM component '%s' has no attribute '%s'(
t_special_getattr_namesReR�RQRRR�R�RltgetattrRWtvaluest_iid_R�(RgtattrR^RFRJ((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt__getattr__es4


 
cCs�|jj|d�}|dkrQ|jrQ|j�|jdj|d�}n|dk	r�|jj|d�}|dkr�|j|�|jd|}nt|||�dSt	d|j
|f��dS(NR�R�s*XPCOM component '%s' has no attribute '%s'(R�RQRRR�R�R�R�RltsetattrReR�(RgR�R�RFR^((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt__setattr__�s

cCs�y/|js|j�n|js.td��Wntk
rOd|jd<nXt|jdj��}y|jd�Wntk
r�nX|j	�ddj
|�f}|S(Ns(Should have tried the class info by now!iR�R�tnsISupportssimplementing %sR(R�R�RBRR�RWR�tremoveRvtsortR'(Rgtiface_namest
iface_desc((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt_get_classinfo_repr_�s	



cCs|j�}d|j|fS(Ns<XPCOM component '%s' (%s)>(R�R�(RgR�((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyRn�s(R�R�RR�R�R�RlR�R�R�R�Rn(((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyR��s	)			$		R�cBs,eZd�Zd�Zd�Zd�ZRS(cCs�||jd<||jd<||jd<||jd<||jd<i|jd<|j|jd<|jj|�t|j��|jd<dS(	NRdR�t_property_getters_t_property_setters_t_method_infos_t	_methods_R�t_constant_names_(R�R*R�RWR�(RgtcomobjRFR]R[R\RX((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyR��s





c
Cs\|tkrt|��nt|jd|d�}|dk	rD|S|jdj|d�}|dk	rvt||�S|jd}|j|�}|dk	r�|\}}t|�dkr�td��n|df}t	|j
||�S|jdj|d�}	|	dk	r?t|	|j�}||jd|<t||�Std|j
|f��dS(	NRdR�R�is)Can't get properties with this many args!R�s*XPCOM component '%s' has no attribute '%s'((R�ReR�R�RRRQRR(tRuntimeErrorR
RdRKR�R�(
RgR�RJtunbound_methodR[R�R+tparam_infostargsRE((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyR��s,


cCs�||jkr3||jdkr3||j|<dS|jd}|j|�}|dkrwtd|j|f��n|\}}t|�dkr�td��n||ff}t|j||�S(NR�R�s/XPCOM component '%s' can not set attribute '%s'is)Can't set properties with this many args!(	R�RQRRReR�R(R�R
Rd(RgR�R�R\R�R+R�treal_param_infos((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyR��s"

cCsd|jfS(Ns<XPCOM interface '%s'>(R�(Rg((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyRn�s(R�R�R�R�R�Rn(((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyR��s		!	cCs
t||�S(N(R�(R�RF((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pytMakeInterfaceResult�st
WeakReferencecBs&eZdZdd�Zdd�ZRS(s�A weak-reference object.  You construct a weak reference by passing
    any COM object you like.  If the object does not support weak
    refs, you will get a standard NS_NOINTERFACE exception.

    Once you have a weak-reference, you can "call" the object to get
    back a strong reference.  Eg:

    >>> some_ob = components.classes['...']
    >>> weak_ref = WeakReference(some_ob)
    >>> new_ob = weak_ref() # new_ob is effectively "some_ob" at this point
    >>> # EXCEPT: new_ob may be None if some_ob has already died - a
    >>> # weak reference does not keep the object alive (that is the point)

    You should never hold onto this resulting strong object for a long time,
    or else you defeat the purpose of the weak-reference.
    cCspt|jt�}t|j�jt�|_|dkrcy
|j}Wqctk
r_t}qcXn||_	dS(N(
R�RdR	tGetWeakReferenceR
RRR�ReRR�(RgR�RFtswr((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyR�s


cCsk|dkr|j}ny t|jj|�j|�SWn,tk
rf}|jtjkrb�ndSXdS(N(	RRR�R�Rdt
QueryReferentRterrnoRtNS_ERROR_NULL_POINTER(RgRFtdetails((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt__call__s N(R�R�t__doc__RRR�R�(((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyR��s	(((3tosttypesRtloggingtxpcomRRRRtxpcom._xpcomRRRRR	R
RRR
R}R~R�R�R�t_just_int_interfacest_just_long_interfacest_just_float_interfacesRR�R�R)R7R8R:R;R<R=RKtxpcom.xpcom_constsRLRMRNRORPRVRbRcR�R�R�R�(((sF/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/client/__init__.pyt<module>&s<"@	
			(	@�E	

Zerion Mini Shell 1.0