grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026a ó z]…"ã@sÔdZddlmZdZdZddlmZddlmZm Z m Z m Z m Z m Z mZmZmZmZmZmZddlmZddlmZdd lmZer�dd lmZGd d „d eƒZGd d„deƒZGdd„deƒZGdd„deƒZdS)z9Implementation for dbus.Bus. Not to be imported directly.é)Ú generators)ÚBusÚ SystemBusÚ SessionBusÚ StarterBusZreStructuredText)Ú DBusException) ÚBUS_DAEMON_IFACEÚBUS_DAEMON_NAMEÚBUS_DAEMON_PATHÚ BUS_SESSIONÚ BUS_STARTERÚ BUS_SYSTEMÚ DBUS_START_REPLY_ALREADY_RUNNINGÚDBUS_START_REPLY_SUCCESSÚvalidate_bus_nameÚvalidate_interface_nameÚvalidate_member_nameÚvalidate_object_path)Ú BusConnection)Ú SignalMessage)Úis_py2)Ú UTF8StringcsŽeZdZdZiZejddfdd„Z‡fdd„Zdd „Z e e ddd ƒZ dd d „Z e e ƒZ dd d„Ze eƒZddd„Ze eƒZdd„ZeZ‡ZS)ra A connection to one of three possible standard buses, the SESSION, SYSTEM, or STARTER bus. This class manages shared connections to those buses. If you're trying to subclass `Bus`, you may be better off subclassing `BusConnection`, which doesn't have all this magic. FNcCsv|s||jvr|j|S|tkr&t}n(|tkr4t}n|tkrBt}n td|ƒ‚tj |||d�}||_ |sr||j|<|S)aËConstructor, returning an existing instance where appropriate. The returned instance is actually always an instance of `SessionBus`, `SystemBus` or `StarterBus`. :Parameters: `bus_type` : cls.TYPE_SESSION, cls.TYPE_SYSTEM or cls.TYPE_STARTER Connect to the appropriate bus `private` : bool If true, never return an existing shared instance, but instead return a private connection. :Deprecated: since 0.82.3. Use dbus.bus.BusConnection for private connections. `mainloop` : dbus.mainloop.NativeMainLoop The main loop to use. The default is to use the default main loop if one has been set up, or raise an exception if none has been. :Changed: in dbus-python 0.80: converted from a wrapper around a Connection to a Connection subclass. zinvalid bus_type %s)Úmainloop) Ú_shared_instancesr rr rr rÚ ValueErrorrÚ__new__Ú _bus_type)ÚclsZbus_typeÚprivaterÚsubclassZbus©r ú0/usr/lib64/python3.9/site-packages/dbus/_dbus.pyr<s   z Bus.__new__cs4|j}|jj |¡|ur"|jj|=tt|ƒ ¡dS)N)rÚ __class__rÚgetÚsuperrÚclose)ÚselfÚt©r"r r!r%os z Bus.closecCs|S)zªReturn self, for backwards compatibility with earlier dbus-python versions where Bus was not a subclass of Connection. :Deprecated: since 0.80.0 r )r&r r r!Úget_connectionuszBus.get_connectionz¹self._connection == self, for backwards compatibility with earlier dbus-python versions where Bus was not a subclass of Connection.cCs t|d�S)z³Static method that returns a connection to the session bus. :Parameters: `private` : bool If true, do not return a shared connection. ©r)rr*r r r!Ú get_session�szBus.get_sessioncCs t|d�S)z²Static method that returns a connection to the system bus. :Parameters: `private` : bool If true, do not return a shared connection. r*)rr*r r r!Ú get_systemŒszBus.get_systemcCs t|d�S)z³Static method that returns a connection to the starter bus. :Parameters: `private` : bool If true, do not return a shared connection. r*)rr*r r r!Ú get_starter˜szBus.get_startercCsP|jtkrd}n$|jtkr d}n|jtkr0d}nd}d|jj|jj|t|ƒfS)NZsessionÚsystemZstarterzunknown bus typez<%s.%s (%s) at %#x>)rr r r r"Ú __module__Ú__name__Úid)r&Únamer r r!Ú__repr__£s   þz Bus.__repr__)F)F)F)r0r/Ú __qualname__Ú__doc__rrÚ TYPE_SESSIONrr%r)ÚpropertyZ _connectionr+Ú staticmethodr,r-r3Ú__str__Ú __classcell__r r r(r!r1s$ÿ 3 ÿ    rc@seZdZdZddd„ZdS)rzThe system-wide message bus.FNcCstj|tj||d�S)aÆReturn a connection to the system bus. :Parameters: `private` : bool If true, never return an existing shared instance, but instead return a private connection. `mainloop` : dbus.mainloop.NativeMainLoop The main loop to use. The default is to use the default main loop if one has been set up, or raise an exception if none has been. )rr)rrZ TYPE_SYSTEM©rrrr r r!r·s ÿzSystemBus.__new__)FN©r0r/r4r5rr r r r!rµsrc@seZdZdZddd„ZdS)rz(The session (current login) message bus.FNcCstj|tj||d�S)aÇReturn a connection to the session bus. :Parameters: `private` : bool If true, never return an existing shared instance, but instead return a private connection. `mainloop` : dbus.mainloop.NativeMainLoop The main loop to use. The default is to use the default main loop if one has been set up, or raise an exception if none has been. ©rr)rrr6r;r r r!rÈs ÿzSessionBus.__new__)FNr<r r r r!rÆsrc@seZdZdZddd„ZdS)rzjThe bus that activated this process (only valid if this process was launched by DBus activation). FNcCstj|tj||d�S)aÛReturn a connection to the bus that activated this process. :Parameters: `private` : bool If true, never return an existing shared instance, but instead return a private connection. `mainloop` : dbus.mainloop.NativeMainLoop The main loop to use. The default is to use the default main loop if one has been set up, or raise an exception if none has been. r=)rrZ TYPE_STARTERr;r r r!rÛs ÿzStarterBus.__new__)FNr<r r r r!r×srN)r5Z __future__rÚ__all__Z __docformat__Zdbus.exceptionsrZ_dbus_bindingsrr r r r r rrrrrrZdbus.busrZ dbus.lowlevelrZ dbus._compatrrrrrrr r r r!Ús  8