Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 iRÛVŠã@s:dZdZddlZddlZddlZddlZddlmZddlZdd l m Z m Z m Z m Z mZmZmZdd lmZmZdd lmZmZmZdd lmZmZmZdd lmZddlmZej dƒZ!Gdd„de"ƒZ#Gdd„de"ƒZ$dd„Z%dd„Z&dd„Z'Gdd„de(ƒZ)e)de"fiƒZ*e"ƒZ+Gdd„de*ƒZ,Gdd„de,ƒZ-dS)ÚBusNameÚObjectÚFallbackObjectÚmethodÚsignalZrestructuredtextéN)ÚSequence)ÚINTROSPECTABLE_IFACEÚ ObjectPathÚ SessionBusÚ SignatureÚStructÚvalidate_bus_nameÚvalidate_object_path)rr)Ú DBusExceptionÚNameExistsExceptionÚUnknownMethodException)Ú ErrorMessageÚMethodReturnMessageÚMethodCallMessage)Ú LOCAL_PATH)Úis_py2z dbus.servicec@s(eZdZdZdd„Zdd„Zer$eZdS)Ú_VariantSignaturez±A fake method signature which, when iterated, yields an endless stream of 'v' characters representing variants (handy with zip()). It has no string representation. cCs|S)z Return self.©)Úselfrrú/usr/lib64/python3.6/service.pyÚ__iter__8sz_VariantSignature.__iter__cCsdS)zReturn 'v' whenever called.Úvr)rrrrÚ__next__<sz_VariantSignature.__next__N)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrÚnextrrrrr2s rc@sFeZdZdZddd„Zdd„Zdd „Zd d „Zd d „Zdd„Z e Z dS)ra^A base class for exporting your own Named Services across the Bus. When instantiated, objects of this class attempt to claim the given well-known name on the given bus for the current process. The name is released when the BusName object becomes unreferenced. If a well-known name is requested multiple times, multiple references to the same BusName object will be returned. Caveats ------- - Assumes that named services are only ever requested using this class - if you request names from the bus directly, confusion may occur. - Does not handle queueing. NFc Csêt|ddd�|dkr4ddl}|jdtdd�tƒ}||jkrH|j|S|rRtjpTd|r^tjp`dB|rltj pndB}|j ||ƒ}|tj krŠn<|tj kr–n0|tj krªt|ƒ‚n|tjkr¶ntd ||fƒ‚tj|ƒ} || _|| _| |j|<| S) aSConstructor, which may either return an existing cached object or a new object. :Parameters: `name` : str The well-known name to be advertised `bus` : dbus.Bus A Bus on which this service will be advertised. Omitting this parameter or setting it to None has been deprecated since version 0.82.1. For backwards compatibility, if this is done, the global shared connection to the session bus will be used. `allow_replacement` : bool If True, other processes trying to claim the same well-known name will take precedence over this one. `replace_existing` : bool If True, this process can take over the well-known name from other processes already holding it. `do_not_queue` : bool If True, this service will not be placed in the queue of services waiting for the requested name if another service already holds it. TF)Zallow_well_knownZ allow_uniqueNrzKOmitting the "bus" parameter to dbus.service.BusName.__init__ is deprecatedé)Ú stacklevelz3requesting bus name %s returned unexpected value %s)r ÚwarningsÚwarnÚDeprecationWarningr Z _bus_namesÚ_dbus_bindingsZNAME_FLAG_ALLOW_REPLACEMENTZNAME_FLAG_REPLACE_EXISTINGZNAME_FLAG_DO_NOT_QUEUEZ request_nameZ REQUEST_NAME_REPLY_PRIMARY_OWNERZREQUEST_NAME_REPLY_IN_QUEUEZREQUEST_NAME_REPLY_EXISTSrZ REQUEST_NAME_REPLY_ALREADY_OWNERÚ RuntimeErrorÚobjectÚ__new__Ú_busÚ_name) ÚclsÚnameZbusZallow_replacementZreplace_existingZ do_not_queuer%Z name_flagsÚretvalÚbus_namerrrr+Ts2           zBusName.__new__cOsdS)Nr)rÚargsÚkeywordsrrrÚ__init__£szBusName.__init__cCs|jj|jƒdS)N)r,Z release_namer-)rrrrÚ__del__¨szBusName.__del__cCs|jS)zGet the Bus this Service is on)r,)rrrrÚget_bus¬szBusName.get_buscCs|jS)zGet the name of this service)r-)rrrrÚget_name°szBusName.get_namecCsd|j|jt|ƒfS)Nz&)r-r,Úid)rrrrÚ__repr__´szBusName.__repr__)NFFF) rrr r!r+r4r5r6r7r9Ú__str__rrrrrDs OcCs^d}d}d}|rÎxº|jjD]®}| rz||jkrzd|j|jkrvd|j|jkrv|j|j|krz|}|j|}d}Pqzn|}|r||jkrd|j|jkrd|j|jkr|j|j|kr|j|}d}PqWnTxR|jjD]F}| rð||jkrð|}|rØ||jkrØd|j|jkrØ|j|}d}PqØW|�r6|j||fS|�rNtd||fƒ‚n td|ƒ‚dS)zÙWalks the Python MRO of the given class to find the method to invoke. Returns two methods, the one to call, and the one it inherits from which defines its D-Bus interface name, signature, and attributes. NFÚ_dbus_is_methodÚ_dbus_interfaceTz(%s is not a valid method of interface %sz%s is not a valid method)Ú __class__Ú__mro__Ú__dict__r<r)rÚ method_nameZdbus_interfaceÚ parent_methodZcandidate_classZ successfulr.rrrÚ_method_lookup¹sF   rBc Gs¾t|ƒ}y|j|d|iŽWn’tk r®}zvtjƒ|dkrˆy|j|ƒd}Wn6tk r†}ztjd||j|ƒ‚WYdd}~XnXtjd|||j|ƒ‚WYdd}~XnX|j |ƒdS)NÚ signaturez (guessed)z2Unable to guess signature for arguments %r: %s: %sz8Unable to append %r to message with signature %s: %s: %s) rÚappendÚ ExceptionÚloggingZ basicConfigZguess_signatureÚ_loggerÚerrorr=Ú send_message)Ú connectionÚmessager@rCr0ÚreplyÚerrrÚ_method_reply_returnûs  rNc Cs¼t|ddƒ}|dk rn0t|ddƒdkr4d|jj}nd|j|jjf}tjƒ\}}}t|tƒrp|j rp|j ƒ}n2||krŽdj t j |||ƒƒ}ndj t j |j|ƒƒ}t|||ƒ}|j|ƒdS)NZ_dbus_error_namerÚÚ__main__zorg.freedesktop.DBus.Python.%sz!org.freedesktop.DBus.Python.%s.%s)rOrP)Úgetattrr=rrÚsysÚexc_infoÚ isinstancerZinclude_tracebackZget_dbus_messageÚjoinÚ tracebackÚformat_exceptionÚformat_exception_onlyrrI) rJrKÚ exceptionr/ZetZevZetbÚcontentsrLrrrÚ_method_reply_errors    r[cs,eZdZ‡fdd„Zdd„Zdd„Z‡ZS)Ú InterfaceTypec sÐt|diƒ}||_i}||jd|<xX|D]P}|jd|j}t|ddƒr.x.||jƒD]\}} |j|iƒ} | j| ƒq\Wq.Wx4|jƒD](} t| ddƒrŒ|j| jiƒ} | | | j<qŒWt t |ƒj |||ƒdS)NÚ_dbus_class_tableÚ.Fr<) rQr]rrÚitemsÚ setdefaultÚupdateÚvaluesr<Úsuperr\r4) r.r/ÚbasesZdctZ class_tableZinterface_tableÚbZ base_nameZ interfaceZ method_tableZour_method_tableÚfunc)r=rrr4,s     zInterfaceType.__init__cCsˆ|j}|jrtt|jƒƒ}ntƒ}|jr4t|jƒ}ng}d|j}xt||ƒD]}|d|7}qNWx|D]}|d|7}qhW|d7}|S)Nz z2 z( z )Ú _dbus_argsZ_dbus_in_signatureÚtupler rÚ_dbus_out_signaturerÚzip)r.rfr2Zin_sigZout_sigÚreflection_dataÚpairÚtyperrrÚ_reflect_on_methodFs   z InterfaceType._reflect_on_methodcCsX|j}|jrtt|jƒƒ}ntƒ}d|j}xt||ƒD]}|d|}q8W|d}|S)Nz z" z )rgZ_dbus_signaturerhr rrrj)r.rfr2ZsigrkrlrrrÚ_reflect_on_signalcs z InterfaceType._reflect_on_signal)rrr r4rnroÚ __classcell__rr)r=rr\+s r\Ú Interfacec@sŽeZdZdZdZdZddd„Zedd„ƒZedd „ƒZ ed d „ƒZ d d „Z ddd„Z dd„Z dd„Zeeddddd�dd„ƒZdd„ZeZdS)raÏA base class for exporting your own Objects across the Bus. Just inherit from Object and mark exported methods with the @\ `dbus.service.method` or @\ `dbus.service.signal` decorator. Example:: class Example(dbus.service.object): def __init__(self, object_path): dbus.service.Object.__init__(self, dbus.SessionBus(), path) self._last_input = None @dbus.service.method(interface='com.example.Sample', in_signature='v', out_signature='s') def StringifyVariant(self, var): self.LastInputChanged(var) # emits the signal return str(var) @dbus.service.signal(interface='com.example.Sample', signature='v') def LastInputChanged(self, var): # run just before the signal is actually emitted # just put "pass" if nothing should happen self._last_input = var @dbus.service.method(interface='com.example.Sample', in_signature='', out_signature='v') def GetLastInput(self): return self._last_input FNcCs |dk rt|ƒt|tƒr(|}|jƒ}n|dkr@|dk r@|jƒ}d|_d|_g|_tjƒ|_ d|_ ||_ |dkr€|dk r€t dƒ‚|dk rœ|dk rœ|j ||ƒdS)aConstructor. Either conn or bus_name is required; object_path is also required. :Parameters: `conn` : dbus.connection.Connection or None The connection on which to export this object. If None, use the Bus associated with the given ``bus_name``. If there is no ``bus_name`` either, the object is not initially available on any Connection. For backwards compatibility, if an instance of dbus.service.BusName is passed as the first parameter, this is equivalent to passing its associated Bus as ``conn``, and passing the BusName itself as ``bus_name``. `object_path` : str or None A D-Bus object path at which to make this Object available immediately. If this is not None, a `conn` or `bus_name` must also be provided. `bus_name` : dbus.service.BusName or None Represents a well-known name claimed by this process. A reference to the BusName object will be held by this Object, preventing the name from being released during this Object's lifetime (unless it's released manually). NFz|dk r†g}xN|jD]6}|dksb|d|krJ|dksv|d|krJ|j|ƒqJWn |j}g|_|s¨td|||fƒ‚xf|D]^}y|dj|dƒWntk rÜYnX|jr®y|jj|ƒWq®t k �r Yq®Xq®WWd|jj ƒXdS)aMake this object inaccessible via the given D-Bus connection and object path. If no connection or path is specified, the object ceases to be accessible via any connection or path. :Parameters: `connection` : dbus.connection.Connection or None Only remove the object from this Connection. If None, remove from all Connections on which it's exported. `path` : dbus.ObjectPath or other str, or None Only remove the object from this object path. If None, remove from all object paths. :Raises LookupError: if the object was not exported on the requested connection or path, or (if both are None) was not exported at all. :Since: 0.81.1 Nz%r is not exportedréz1%r is not exported at a location matching (%r,%r)) rvr‚rrrsÚ LookupErrorrtrDZ_unregister_object_pathÚremover�r‡)rrJrˆZdroppedÚlocationrrrÚremove_from_connectionPs4    zObject.remove_from_connectioncCstjd||ƒdS)Nz5Unregistering exported object %r from some path on %r)rGÚinfo)rrJrrrr†�szObject._unregister_cbcs¦tˆtƒsdS�y`ˆjƒ‰ˆjƒ}t|ˆ|ƒ\}}ˆjf|jŽ}i}|jdk rZt|jƒ‰nd‰|j r–|j \}} ‡‡‡‡fdd„||<‡‡fdd„|| <|j rªˆj ƒ||j <|j r¾ˆj ƒ||j <|j�r^ˆj ƒ} | } xx|jD]n} | dˆkrÚ| | dk�rþd} P| ddk�rqÚ| j| ddƒrÚ| t| dƒd…} t| ƒt| ƒkrÚ| } qÚWt| ƒ} | ||j<|j�rtˆjƒ||j<|j�r†ˆ||j<|j�r˜ˆ||j<||f|ž|Ž}|j �r´dSˆdk �r(tˆƒ}t|ƒdk�rò|dk�räf}n tdˆƒ‚n4t|ƒdk�r|f}nt|tƒ�rntdˆˆfƒ‚n2|dk�r8f}n"t|tƒ�rTt|tƒ �rTn|f}tˆˆˆˆf|žŽWn0tk �r }ztˆˆ|ƒWYdd}~XnXdS) Ncstˆˆˆˆf|žŽS)N)rN)r0)rJrKr@rCrrÚœsz$Object._message_cb..cs tˆˆ|ƒS)N)r[)rY)rJrKrrr��srr‰ú/z8%s has an empty output signature but did not return NonezK%s has multiple output values in signature %s but did not return a sequence)rTrZ get_memberZ get_interfacerBZ get_args_listZ_dbus_get_args_optionsrir Z_dbus_async_callbacksZ_dbus_sender_keywordZ get_senderZ_dbus_path_keywordÚget_pathZ_dbus_rel_path_keywordrtÚ startswithÚlenr Z_dbus_destination_keywordZget_destinationZ_dbus_message_keywordZ_dbus_connection_keywordrhrxrr rNrEr[)rrJrKZinterface_nameZcandidate_methodrAr2r3Zreturn_callbackZerror_callbackrˆZrel_pathZexpÚsuffixr0Zsignature_tuplerYr)rJrKr@rCrr…†s„               zObject._message_cbrOÚsr{rJ)Z in_signatureZ out_signatureZ path_keywordZconnection_keywordcCsÎtj}|d|7}|j|jjd|jj}xt|jƒD]h\}}|d|7}xJ|jƒD]>}t|ddƒrv||jj |ƒ7}qTt|ddƒrT||jj |ƒ7}qTW|d7}q6Wx|j |ƒD]}|d|7}q®W|d 7}|S) ziReturn a string of XML encoding this object's supported interfaces, methods and signals. z r^z r;FZ_dbus_is_signalz z z ) r(Z)DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODEr]r=rrr_rbrQrnroZlist_exported_child_objects)rr{rJrkZ interfacesr/ZfuncsrfrrrÚ Introspectôs     zObject.IntrospectcCs>d}|jtk r"|jdk r"d|j}d|jj|jj|t|ƒfS)NrOz at %sz<%s.%s%s at %#x>)rrr|r=rrr8)rÚwhererrrr9s   zObject.__repr__)NNN)NN)rrr r!r„rƒr4Úpropertyr~rJr€ryr�r†r…rrr–r9r:rrrrrs =   ; 1ncs&eZdZdZdZd‡fdd„ Z‡ZS)rzaAn object that implements an entire subtree of the object-path tree. :Since: 0.82.0 TNcsPtt|ƒjƒd|_|dkr.|dk rLtdƒ‚n|dkr@tdƒ‚n |j||ƒdS)aHConstructor. Note that the superclass' ``bus_name`` __init__ argument is not supported here. :Parameters: `conn` : dbus.connection.Connection or None The connection on which to export this object. If this is not None, an `object_path` must also be provided. If None, the object is not initially available on any Connection. `object_path` : str or None A D-Bus object path at which to make this Object available immediately. If this is not None, a `conn` must also be provided. This object will implements all object-paths in the subtree starting at this object-path, except where a more specific object has been added. TNz)If object_path is given, conn is requiredz)If conn is given, object_path is required)rcrr4rwrxry)rrzr{)r=rrr4#s  zFallbackObject.__init__)NN)rrr r!r„r4rprr)r=rrs)rrrrr).Ú__all__Z __docformat__rRrFrurVÚ collectionsrr(Zdbusrr r r r r rZdbus.decoratorsrrZdbus.exceptionsrrrZ dbus.lowlevelrrrZ dbus.proxiesrZ dbus._compatrZ getLoggerrGr*rrrBrNr[rmr\rqr|rrrrrrÚs6 $   uBM