ok
Direktori : /lib/python2.7/site-packages/tuned/exports/ |
Current File : //lib/python2.7/site-packages/tuned/exports/dbus_exporter.pyc |
� ��\c @ s� d d l m Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l j Z d d l m Z d d l m Z e j j � Z d e j f d � � YZ d S( i ( t interfacesi����N( t polkit( t GLibt DBusExporterc B s� e Z d Z d � Z e d � � Z e d � � Z e d � � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( s+ Export method calls through DBus Interface. We take a method to be exported and create a simple wrapper function to call it. This is required as we need the original function to be bound to the original object instance. While the wrapper will be bound to an object we dynamically construct. c C s� t j j j d t � d | _ d | _ i | _ t � | _ | | _ | | _ | | _ d | _ d | _ t � | _ t j t j � } t j � | _ t j t j | � d S( Nt set_as_default( t dbust mainloopt glibt DBusGMainLoopt Truet Nonet _dbus_object_clst _dbus_objectt _dbus_methodst sett _signalst _bus_namet _interface_namet _object_namet _threadt _bus_objectR t _polkitt signalt getsignalt SIGINTR t MainLoopt _main_loop( t selft bus_namet interface_namet object_namet signal_handler( ( s? /usr/lib/python2.7/site-packages/tuned/exports/dbus_exporter.pyt __init__ s c C s | j S( N( R ( R ( ( s? /usr/lib/python2.7/site-packages/tuned/exports/dbus_exporter.pyR / s c C s | j S( N( R ( R ( ( s? /usr/lib/python2.7/site-packages/tuned/exports/dbus_exporter.pyR 3 s c C s | j S( N( R ( R ( ( s? /usr/lib/python2.7/site-packages/tuned/exports/dbus_exporter.pyR 7 s c C s | j d k S( N( R R ( R ( ( s? /usr/lib/python2.7/site-packages/tuned/exports/dbus_exporter.pyt running; s c s� t j � � s t d � � n � j } | � j k rE t d � � n � � f d � } t j | � j � } t j j � j | | d d �| � } | � j | <d S( Ns# Only bound methods can be exported.s* Method with this name is already exported.c s$ t j d � j } | d } t j d | | f � � j j | | � } | d k rp t j d | | f � n� | d k r� t j d | | f � n� | d k r� t j d | | f � d | d <nQ | d k r� t j d | | f � d | d <n! t j d | | f � d | d <� | | � S( Nt .i����sC checking authorization for for action '%s' requested by caller '%s'i sJ action '%s' requested by caller '%s' was successfully authorized by polkiti se polkit error, but action '%s' requested by caller '%s' was successfully authorized by fallback methodi sL action '%s' requested by caller '%s' wasn't authorized, ignoring the requestt sp polkit error and action '%s' requested by caller '%s' wasn't authorized by fallback method, ignoring the requestsv polkit error and unable to use fallback method to authorize action '%s' requested by caller '%s', ignoring the request( t constst NAMESPACEt __name__t logt debugR t check_authorizationt warnt infot error( t wrappedt ownert argst kwargst action_idt callert ret( t methodR ( s? /usr/lib/python2.7/site-packages/tuned/exports/dbus_exporter.pyt wrapperF s"