Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/proxy.pyc


Tc@sXdZddlZddlmZmZmZddlmZdefdYZ	dS(s
This module contains a class, L{ConfigurationProxy} which pretends to be a
L{landscape.configuration.LandscapeSetupConfiguration} but actually directs
its calls via DBus to the L{ConfigurationMechanism}.
iN(tSERVICE_NAMEtINTERFACE_NAMEtOBJECT_PATH(tLandscapeSetupConfigurationtConfigurationProxycBs7eZdZddgdZdZejje_dZejje_dZejje_dZ	ej	je	_e
dZdZe
edZe
ed	Ze
ed
Ze
edZe
edZe
ed
Ze
edZe
edZe
edZRS(s
    L{ConfigurationProxy} attempts to be a drop-in replacement for
    L{LandscapeSetupConfiguration} allowing applications run by user accounts
    with the correct rights (as defined by a PolicyKit policy file) to interact
    with the landscape client configuration via a DBus service.  This is the
    RightThing(TM) for PolicyKit and therefore for GNOME/Unity.

    The canonical case for this is L{landscape-client-settings-ui}.
    cCsv||_|dkr'tj|_n	||_|dkri|jjtt}tj|t	|_
n	||_
dS(N(t	_loadargstNonetdbust	SystemBust_bust
get_objectRRt	InterfaceRt
_interface(tselftbust	interfacetloadargst
remote_object((sJ/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/proxy.pyt__init__s		cCs|dkr|j}nt|dkr3d}ntdj|}y|jj|Wn5tjk
r}|j	}|dkrnt
SXtS(Nitis>com.canonical.LandscapeClientSettings.PermissionDeniedByPolicys"org.freedesktop.DBus.Error.NoReply(s>com.canonical.LandscapeClientSettings.PermissionDeniedByPolicys"org.freedesktop.DBus.Error.NoReply(RRtlentchrtjoinRtloadRt
DBusExceptiont
get_dbus_nametFalsetTrue(R
targlisttaltet
error_name((sJ/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/proxy.pyR%s		cCs|jjdS(N(Rtreload(R
((sJ/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/proxy.pyR 8scCs|jjdS(N(Rtwrite(R
((sJ/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/proxy.pyR!<scCs
|jjS(N(Rtget_config_filename(R
((sJ/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/proxy.pyR"@scCsEd}d}|r4|jjd|d|n
|jjdS(s.
        Cause the mechanism to exit.
        cSsdS(sr
            This will never get called because we call L{sys.exit} inside the
            mechanism.
            N((((sJ/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/proxy.pyton_replyIscSsdS(s
            This will always be called, this allows us to supress the
            L{NoReply} error from DBus when we terminate the mechanism.
            N((((sJ/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/proxy.pyton_errorOst
reply_handlert
error_handlerN(Rtexit(R
tasynchronousR#R$((sJ/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/proxy.pyR'Es		
cs(fd}fd}||fS(Ncs|jjS(N(Rtget(R
(tfield(sJ/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/proxy.pyR)]scs|jj|dS(N(Rtset(R
tvalue(R*(sJ/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/proxy.pyR+`s((R*R)R+((R*sJ/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/proxy.pyt_delegate_to_interface[staccount_nametcomputer_titlet	data_patht
http_proxythttps_proxytping_urltregistration_keyttagsturlN(t__name__t
__module__t__doc__RRRRR R!R"RR'R-tpropertyR.R/R0R1R2R3R4R5R6(((sJ/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/proxy.pyRs,						
(
R9Rt*landscape.ui.model.configuration.mechanismRRRtlandscape.configurationRtobjectR(((sJ/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/proxy.pyt<module>s