Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/dbus/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/dbus/bus.pyc


-"Oc@sPdZdZddlZddlZddlmZmZmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZddlmZddlmZddl m!Z!ddl"m#Z#d	eeefZ$d
Z%ej&dZ'de(fd
YZ)defdYZ*dS(t
BusConnectiontreStructuredTextiN(tBUS_DAEMON_IFACEtBUS_DAEMON_NAMEtBUS_DAEMON_PATHtBUS_SESSIONtBUS_STARTERt
BUS_SYSTEMt DBUS_START_REPLY_ALREADY_RUNNINGtDBUS_START_REPLY_SUCCESStNAME_FLAG_ALLOW_REPLACEMENTtNAME_FLAG_DO_NOT_QUEUEtNAME_FLAG_REPLACE_EXISTINGtRELEASE_NAME_REPLY_NON_EXISTENTtRELEASE_NAME_REPLY_NOT_OWNERtRELEASE_NAME_REPLY_RELEASEDt REQUEST_NAME_REPLY_ALREADY_OWNERtREQUEST_NAME_REPLY_EXISTStREQUEST_NAME_REPLY_IN_QUEUEt REQUEST_NAME_REPLY_PRIMARY_OWNERtvalidate_bus_nametvalidate_error_nametvalidate_interface_nametvalidate_member_nametvalidate_object_path(t
Connection(t
DBusException(tHANDLER_RESULT_NOT_YET_HANDLED(tis_py2sWtype='signal',sender='%s',interface='%s',member='NameOwnerChanged',path='%s',arg0='%%s's)org.freedesktop.DBus.Error.NameHasNoOwnersdbus.bustNameOwnerWatchcBs eZdZdZdZRS(t_matcht
_pending_callc
stfd}fd}|j|dtttd|_i}trht|d<n|jtttddf|||_	dS(Ncs|dS(N((townedt	old_ownert	new_owner(tcallback(s,/usr/lib/python2.7/dist-packages/dbus/bus.pyt	signal_cb@scsO|jtkrdn,tjtjdd|j|dfdS(NtsGetNameOwner(%s) failed:texc_info(t
get_dbus_namet_NAME_HAS_NO_OWNERtloggingtbasicConfigt_loggertdebugt	__class__tNone(te(tbus_nameR#(s,/usr/lib/python2.7/dist-packages/dbus/bus.pyterror_cbCs


tNameOwnerChangedtarg0tutf8_stringstGetNameOwnerts(
Rtadd_signal_receiverRRRRRtTruet
call_asyncR(tselftbus_connR0R#R$R1tkeywords((R0R#s,/usr/lib/python2.7/dist-packages/dbus/bus.pyt__init__=s&
	
		cCsT|jdk	r|jjn|jdk	r>|jjnd|_d|_dS(N(RR.tremoveRtcancel(R:((s,/usr/lib/python2.7/dist-packages/dbus/bus.pyR?\s	(s_matchs
_pending_call(t__name__t
__module__t	__slots__R=R?(((s,/usr/lib/python2.7/dist-packages/dbus/bus.pyR:s	cBseZdZeZeZeZe	Z
eZeddZdddddZdZdZeedZdZddZdd	Zd
ZdZdZd
ZdZdZdZdZdZ dZ!RS(sxA connection to a D-Bus daemon that implements the
    ``org.freedesktop.DBus`` pseudo-service.

    :Since: 0.81.0
    cCs1|j|d|}tj|_i|_|S(Ntmainloop(t_new_for_bustweakreftWeakValueDictionaryt
_bus_namest_signal_sender_matches(tclstaddress_or_typeRCtbus((s,/usr/lib/python2.7/dist-packages/dbus/bus.pyt__new__ys	cs|jdd}|dk	re|dk	r9tdn|}ddlm}|dtddntt|j|||||||dk	r|t	kr|d d	krfd
}	n	j
}	|j||	}
|
|j<n|j
tS(Nt
named_services3bus_name and named_service cannot both be specifiedi(twarnsrPassing the named_service parameter to add_signal_receiver by name is deprecated: please use positional parameterst
stackleveliit:cs|dkrjndS(NR%(R>(R"(tmatch(s,/usr/lib/python2.7/dist-packages/dbus/bus.pyR#s(tpopR.t	TypeErrortwarningsRNtDeprecationWarningtsuperRR7Rtset_sender_name_ownertwatch_name_ownerRHtadd_match_stringtstr(R:thandler_functiontsignal_nametdbus_interfaceR0tpathR<RMRNR#twatch((RQs,/usr/lib/python2.7/dist-packages/dbus/bus.pyR7s&	cCsE|jt||jj|d}|dk	rA|jndS(N(t remove_match_string_non_blockingRZRHRRR.R?(R:RQR_((s,/usr/lib/python2.7/dist-packages/dbus/bus.pyt_clean_up_signal_matchscCs|dk	r|d dkr|tkry|j|SWqtk
r}}|jtkrcn|j||j|SXn|SdS(NiRP(R.Rtget_name_ownerRR'R(tstart_service_by_name(R:R0R/((s,/usr/lib/python2.7/dist-packages/dbus/bus.pytactivate_name_owners
cKs|r|jn|jdd}|dk	rx|dk	rLtdnddlm}|dtdd|}n|rtdd	j|jn|j	|||d
|d|S(
sJReturn a local proxy for the given remote object.

        Method calls on the proxy are translated into method calls on the
        remote object.

        :Parameters:
            `bus_name` : str
                A bus name (either the unique name or a well-known name)
                of the application owning the object. The keyword argument
                named_service is a deprecated alias for this.
            `object_path` : str
                The object path of the desired object
            `introspect` : bool
                If true (default), attempt to introspect the remote
                object to find out supported methods and their signatures
            `follow_name_owner_changes` : bool
                If the object path is a well-known name and this parameter
                is false (default), resolve the well-known name to the unique
                name of its current owner and bind to that instead; if the
                ownership of the well-known name changes in future,
                keep communicating with the original owner.
                This is necessary if the D-Bus API used is stateful.

                If the object path is a well-known name and this parameter
                is true, whenever the well-known name changes ownership in
                future, bind to the new owner, if any.

                If the given object path is a unique name, this parameter
                has no effect.

        :Returns: a `dbus.proxies.ProxyObject`
        :Raises `DBusException`: if resolving the well-known name to a
            unique name fails
        RMs3bus_name and named_service cannot both be specifiedi(RNsiPassing the named_service parameter to get_object by name is deprecated: please use positional parametersROis4get_object does not take these keyword arguments: %ss, t
introspecttfollow_name_owner_changesN(
t_require_main_loopRRR.RSRTRNRUtjointkeystProxyObjectClass(R:R0tobject_pathReRftkwargsRMRN((s,/usr/lib/python2.7/dist-packages/dbus/bus.pyt
get_objects $

	cCs)t||jtttdd|fS(sGet the numeric uid of the process owning the given bus name.

        :Parameters:
            `bus_name` : str
                A bus name, either unique or well-known
        :Returns: a `dbus.UInt32`
        :Since: 0.80.0
        tGetConnectionUnixUserR6(Rt
call_blockingRRR(R:R0((s,/usr/lib/python2.7/dist-packages/dbus/bus.pyt
get_unix_users	
ic	Cs2t|t|jtttdd||ffS(s?Start a service which will implement the given bus name on this Bus.

        :Parameters:
            `bus_name` : str
                The well-known bus name to be activated.
            `flags` : dbus.UInt32
                Flags to pass to StartServiceByName (currently none are
                defined)

        :Returns: A tuple of 2 elements. The first is always True, the
            second is either START_REPLY_SUCCESS or
            START_REPLY_ALREADY_RUNNING.

        :Raises `DBusException`: if the service could not be started.
        :Since: 0.80.0
        tStartServiceByNametsu(RR8RoRRR(R:R0tflags((s,/usr/lib/python2.7/dist-packages/dbus/bus.pyRcs

cCs2t|dt|jtttdd||fS(sRequest a bus name.

        :Parameters:
            `name` : str
                The well-known name to be requested
            `flags` : dbus.UInt32
                A bitwise-OR of 0 or more of the flags
                `NAME_FLAG_ALLOW_REPLACEMENT`,
                `NAME_FLAG_REPLACE_EXISTING`
                and `NAME_FLAG_DO_NOT_QUEUE`
        :Returns: `REQUEST_NAME_REPLY_PRIMARY_OWNER`,
            `REQUEST_NAME_REPLY_IN_QUEUE`,
            `REQUEST_NAME_REPLY_EXISTS` or
            `REQUEST_NAME_REPLY_ALREADY_OWNER`
        :Raises `DBusException`: if the bus daemon cannot be contacted or
            returns an error.
        tallow_uniquetRequestNameRr(RtFalseRoRRR(R:tnameRs((s,/usr/lib/python2.7/dist-packages/dbus/bus.pytrequest_namescCs/t|dt|jtttdd|fS(ssRelease a bus name.

        :Parameters:
            `name` : str
                The well-known name to be released
        :Returns: `RELEASE_NAME_REPLY_RELEASED`,
            `RELEASE_NAME_REPLY_NON_EXISTENT`
            or `RELEASE_NAME_REPLY_NOT_OWNER`
        :Raises `DBusException`: if the bus daemon cannot be contacted or
            returns an error.
        RttReleaseNameR6(RRvRoRRR(R:Rw((s,/usr/lib/python2.7/dist-packages/dbus/bus.pytrelease_name1scCs8i}trt|d<n|jtttddd|S(sReturn a list of all currently-owned names on the bus.

        :Returns: a dbus.Array of dbus.UTF8String
        :Since: 0.81.0
        R4t	ListNamesR%((RR8RoRRR(R:R<((s,/usr/lib/python2.7/dist-packages/dbus/bus.pyt
list_namesBs
cCs8i}trt|d<n|jtttddd|S(sReturn a list of all names that can be activated on the bus.

        :Returns: a dbus.Array of dbus.UTF8String
        :Since: 0.81.0
        R4tListActivatableNamesR%((RR8RoRRR(R:R<((s,/usr/lib/python2.7/dist-packages/dbus/bus.pytlist_activatable_namesOs
cCsKi}trt|d<nt|dt|jtttdd|f|S(sReturn the unique connection name of the primary owner of the
        given name.

        :Raises `DBusException`: if the `bus_name` has no owner
        :Since: 0.81.0
        R4RtR5R6(RR8RRvRoRRR(R:R0R<((s,/usr/lib/python2.7/dist-packages/dbus/bus.pyRb\s
cCst|||S(sWatch the unique connection name of the primary owner of the
        given name.

        `callback` will be called with one argument, which is either the
        unique connection name, or the empty string (meaning the name is
        not owned).

        :Since: 0.81.0
        (R(R:R0R#((s,/usr/lib/python2.7/dist-packages/dbus/bus.pyRXks
cCs%t|jtttdd|fS(sReturn True iff the given bus name has an owner on this bus.

        :Parameters:
            `bus_name` : str
                The bus name to look up
        :Returns: a `bool`
        tNameHasOwnerR6(tboolRoRRR(R:R0((s,/usr/lib/python2.7/dist-packages/dbus/bus.pytname_has_ownerwscCs#|jtttdd|fdS(sArrange for this application to receive messages on the bus that
        match the given rule. This version will block.

        :Parameters:
            `rule` : str
                The match rule
        :Raises `DBusException`: on error.
        :Since: 0.80.0
        tAddMatchR6N(RoRRR(R:trule((s,/usr/lib/python2.7/dist-packages/dbus/bus.pyRYs
c	Cs)|jtttdd|fdddS(s=Arrange for this application to receive messages on the bus that
        match the given rule. This version will not block, but any errors
        will be ignored.


        :Parameters:
            `rule` : str
                The match rule
        :Raises `DBusException`: on error.
        :Since: 0.80.0
        RR6N(R9RRRR.(R:R((s,/usr/lib/python2.7/dist-packages/dbus/bus.pytadd_match_string_non_blockingscCs#|jtttdd|fdS(sArrange for this application to receive messages on the bus that
        match the given rule. This version will block.

        :Parameters:
            `rule` : str
                The match rule
        :Raises `DBusException`: on error.
        :Since: 0.80.0
        tRemoveMatchR6N(RoRRR(R:R((s,/usr/lib/python2.7/dist-packages/dbus/bus.pytremove_match_strings
c	Cs)|jtttdd|fdddS(s=Arrange for this application to receive messages on the bus that
        match the given rule. This version will not block, but any errors
        will be ignored.


        :Parameters:
            `rule` : str
                The match rule
        :Raises `DBusException`: on error.
        :Since: 0.80.0
        RR6N(R9RRRR.(R:R((s,/usr/lib/python2.7/dist-packages/dbus/bus.pyR`sN("R@RAt__doc__RtTYPE_SESSIONRtTYPE_SYSTEMRtTYPE_STARTERR	tSTART_REPLY_SUCCESSRtSTART_REPLY_ALREADY_RUNNINGR.RLR7RaRdR8RvRmRpRcRxRzR|R~RbRXRRYRRR`(((s,/usr/lib/python2.7/dist-packages/dbus/bus.pyRes6		8			
	
						
(s
BusConnection(+t__all__t
__docformat__R)REt_dbus_bindingsRRRRRRRR	R
RRR
RRRRRRRRRRRtdbus.connectionRtdbus.exceptionsRt
dbus.lowlevelRtdbus._compatRt_NAME_OWNER_CHANGE_MATCHR(t	getLoggerR+tobjectRR(((s,/usr/lib/python2.7/dist-packages/dbus/bus.pyt<module>s

+