%PDF-
%PDF-
Mini Shell
Mini Shell
�
�SK\c@s�ddlZddlmZmZddlmZddlZddlZddlmZdZ dZ
dZd�Zd �Z
d
�Zddd��YZd
�ZdS(i����N(t
componentstloggeri(tmodule(t ComponentiicCst||d�dk S(N(tgetattrtNone(tobjecttattr((sD/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/loader.pyt_has_good_attr2scCs�g}x�t|jj��D]�\}}ybt|�tksLt||�r�t|d�r�t|d�r�t|d�r�|j|�nWqtk
r�qXqW|S(Nt_com_interfaces_t_reg_clsid_t_reg_contractid_(tlistt__dict__titemsttypet
issubclassRtappendt TypeError(t py_moduletcompstnameR((sD/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/loader.pytFindCOMComponents6s"!
cCsWt}ddlm}|j�jdtjj�}|jd|j |j
dd�dS(Ni����(t_xpcoms@mozilla.org/categorymanager;1scomponent-loaderi(tPythonComponentLoadertxpcomRtGetServiceManagertgetServiceByContractIDRt
interfacestnsICategoryManagertaddCategoryEntryt_reg_component_type_R(tklasstcompMgrtlocationtregistryLocationt
componentTypetpclRtsvc((sD/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/loader.pyt
register_selfEsRcBs�eZejjZdZdZdZe dfZdZd�Z
d�Zd�Zd�Zd�Zd �Zd
�Zd�Zd�Zd
�ZRS(s&{63B68B1E-3E62-45f0-98E3-5E0B5797970C}smoz.pyloader.1sPython component loaders
script/pythoncCs"i|_tj|_d|_dS(Ni(tcom_modulesRtModulet
moduleFactorytnum_modules_this_register(tself((sD/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/loader.pyt__init__Vs cCs�|j}|jj|�}|dk r+|Sddl}ddl}tjjtjj|��d}|j �}d|f}|j
||jjg�} |j|| �}
t
|
�}|j|�}||j|<|S(Ni����iscomponent:%s(tpathR(tgetRtihookstsystostsplitexttbasenametModuleLoadertfind_moduletparenttload_moduleRR*(R,t
componentFiletfqntmodR0R1t base_nametloadertmodule_name_in_syststufftpy_modR((sD/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/loader.pyt_getCOMModuleForLocation[s "
cCsRtjjtjj�}|j|�}|j|�}|jtj|tjj�S(N( RtmanagertqueryInterfaceRtnsIComponentManagerObsoletetspecForRegistryLocationRAtgetClassObjectt
nsIFactory(R,tclsidR"Rtcmotfile_interfacetm((sD/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/loader.pyt
getFactorypscCs||_tjd�dS(Ns%Python component loader init() called(tcomp_mgrRtdebug(R,RMtregistry((sD/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/loader.pytinitzs cCstjd�dS(Ns-Python component loader - onRegister() called(RRN(R,RHRt classNametproIdR"treplacetpersist((sD/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/loader.pyt
onRegister�scCs8|j}d|_tjd|�|j}x|j�r3|jtjj �}t
jj|j�ddkr.y|j||�Wq0t
jk
r�}ddl
m}|j|jkr�tjd|j|j�q-tjd|j�q0tk
r}tjd|j|�q0tjd |j�q0Xq.q.WdS(
Nis.Auto-registering all Python components in '%s'is.pyi����(tnsErrorsRegistration of '%s' failed
%ssRegistration of '%s' failed!sRegistration of '%s' failed.(R.R+RRNtdirectoryEntriestHasMoreElementstGetNextRRtnsIFileR2R3tautoRegisterComponentRtCOMExceptionRVterrnotNS_ERROR_NO_INTERFACEterrortleafNametmessaget exceptiontSyntaxError(R,twhent directorytdirectory_pathtentriestentrytdetailsRV((sD/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/loader.pytautoRegisterComponents�s( c
Cs|j}tjjtjj�}|j|d|�s:dS|jdkr�yRddl m
}ddl}d}|j|�}|j
d�|j|j�Wq�tjd�q�Xn|jd7_|j|�} | jtj|d|j�tjjtjj�}|j|d|�dS(Niii����(Rt XCurProcDtpythonsMPyXPCOM loader failed to process site directory before component registration(tlastModifiedTimeRRBRCRtnsIComponentLoaderManagerthasFileChangedRR+RRtsitetGetSpecialDirectoryRt
addsitedirR.RRbRAtregisterSelfRtsaveFileInfo(
R,RdR9tmodtimet
loader_mgrRRptNS_XPCOM_CURRENT_PROCESS_DIRtdirnameRK((sD/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/loader.pyR[�s(
cCsV|j|�}tjjtjj�}z|jtj|�Wd|j|d�XdS(Ni( RARRBRCRRntunregisterSelftremoveFileInfoR(R,RdR9RKRv((sD/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/loader.pytautoUnregisterComponent�scCstjd�dS(Ns3Python component loader - registerDeferred() calledi(RRN(R,Rd((sD/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/loader.pytregisterDeferredComponents�s
cCs1ytjd�WnnXd|_i|_dS(Ns=Python component loader being asked to unload all components!(RRNRRMR((R,Rd((sD/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/loader.pyt unloadAll�s N(t__name__t
__module__RRtnsIComponentLoaderR R
Rt
_reg_desc_R'Rt_reg_registrar_RR-RARLRPRURjR[R{R|R}(((sD/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/loader.pyRKs
! cCs ddlm}|jtg�S(Ni(R(tRR)R(tserviceManagerRZR((sD/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/loader.pytMakePythonComponentLoaderModule�s((RRRR�RtglobR2txpcom.clientRtWhen_StartuptWhen_Componentt
When_TimerRRR'RR�(((sD/usr/lib/virtualbox/sdk/bindings/xpcom/python/xpcom/server/loader.pyt<module>&s �
Zerion Mini Shell 1.0