eaiovnaovbqoebvqoeavibavo 3 Ö¸VXÍ ã@slddlmZddlmZddlZGdd„dedƒƒZGdd „d ed ƒƒZGd d „d eƒZGd d„deƒZ dS)é)ÚGioé)ÚExitableWithAliasesNc@seZdZejZfZdd„ZdS)Ú NameOwnercs(tj|||||ƒ‰|j‡fdd„ƒdS)Ncs tjˆƒS)N)rZbus_unown_name©)Úidrú/usr/lib/python3.6/bus_names.pyÚ sz$NameOwner.__init__..)rZbus_own_name_on_connectionÚ_at_exit)ÚselfÚconÚnameÚflagsÚname_aquired_handlerÚname_lost_handlerr)rrÚ__init__ szNameOwner.__init__N)Ú__name__Ú __module__Ú __qualname__rZBusNameOwnerFlagsÚFlagsÚ __slots__rrrrrrsrZunownc@seZdZejZfZdd„ZdS)Ú NameWatchercs(tj|||||ƒ‰|j‡fdd„ƒdS)Ncs tjˆƒS)N)rZbus_unwatch_namer)rrrr sz&NameWatcher.__init__..)rZbus_watch_name_on_connectionr )r r r rÚname_appeared_handlerÚname_vanished_handlerr)rrrszNameWatcher.__init__N)rrrrZBusNameWatcherFlagsrrrrrrrr srZunwatchc@s eZdZfZejZddd„ZdS)ÚOwnMixinrNcsNtjdtƒˆdk r ‡fdd„nd}ˆdk r8‡fdd„nd}t|j||||ƒS)a7[DEPRECATED] Asynchronously aquires a bus name. Starts acquiring name on the bus specified by bus_type and calls name_acquired and name_lost when the name is acquired respectively lost. To receive name_aquired and name_lost callbacks, you need an event loop. https://github.com/LEW21/pydbus/blob/master/doc/tutorial.rst#setting-up-an-event-loop Parameters ---------- name : string Bus name to aquire flags : NameOwnerFlags, optional name_aquired : callable, optional Invoked when name is acquired name_lost : callable, optional Invoked when name is lost Returns ------- NameOwner An object you can use as a context manager to unown the name later. See Also -------- See https://developer.gnome.org/gio/2.44/gio-Owning-Bus-Names.html#g-bus-own-name for more information. z5own_name() is deprecated, use request_name() instead.NcsˆƒS)Nr)r r )Ú name_aquiredrrr 8sz#OwnMixin.own_name..csˆƒS)Nr)r r )Ú name_lostrrr 9s)ÚwarningsÚwarnÚDeprecationWarningrr )r r rrrrrr)rrrÚown_names zOwnMixin.own_name)rNN)rrrrrrZNameOwnerFlagsr rrrrrsrc@s eZdZfZejZddd„ZdS)Ú WatchMixinrNcsBˆdk r‡fdd„nd}ˆdk r,‡fdd„nd}t|j||||ƒS)ažAsynchronously watches a bus name. Starts watching name on the bus specified by bus_type and calls name_appeared and name_vanished when the name is known to have a owner respectively known to lose its owner. To receive name_appeared and name_vanished callbacks, you need an event loop. https://github.com/LEW21/pydbus/blob/master/doc/tutorial.rst#setting-up-an-event-loop Parameters ---------- name : string Bus name to watch flags : NameWatcherFlags, optional name_appeared : callable, optional Invoked when name is known to exist Called as name_appeared(name_owner). name_vanished : callable, optional Invoked when name is known to not exist Returns ------- NameWatcher An object you can use as a context manager to unwatch the name later. See Also -------- See https://developer.gnome.org/gio/2.44/gio-Watching-Bus-Names.html#g-bus-watch-name for more information. Ncsˆ|ƒS)Nr)r r Z name_owner)Ú name_appearedrrr _sz'WatchMixin.watch_name..csˆƒS)Nr)r r )Ú name_vanishedrrr `s)rr )r r rr"r#rrr)r"r#rÚ watch_name@szWatchMixin.watch_name)rNN)rrrrrrZNameWatcherFlagsr$rrrrr!<sr!) Z gi.repositoryrZexitablerrrrÚobjectrr!rrrrÚs  '