+
     Gi  c                   sv    ^ RI HtHt ^ RIHt ^ RItRtRtRtRt	Rt
R	tR
tRtRt ! R R4      t ! R R4      tR# )i    )ConfigParserError)TunedExceptionNzpower-saverZbalancedZperformanceZmainprofilesZbatteryZdefaultbattery_detectionsysfs_acpi_monitorc                   s6   a  ] tR t^t o RtR tR tR tRtV t	R# )
ProfileMapz:
Mapping of PPD profiles to TuneD profiles or vice versa.
c                s    Wn         W n        R # N_ac_map_dc_map)selfZac_mapZdc_map   &&&5/usr/lib/python3.14/site-packages/tuned/ppd/config.py__init__ZProfileMap.__init__   s        c                sR    V'       d   V P                   MV P                  pW1,          # )zi
Returns a TuneD profile corresponding to the given
PPD profile and power supply status (or vice versa).
)r
   r	   )r   Zprofile
on_batteryprofile_maps   &&& r   getZProfileMap.get   s    
 '1dlldll##r   c                sb    V'       d   V P                   MV P                  pVP                  4       # )z.
Returns the supported PPD or TuneD profiles.
)r
   r	   keys)r   r   r   s   && r   r   ZProfileMap.keys!   s$     '1dlldll!!r   r   N)
__name__
__module____qualname____firstlineno____doc__r   r   r   __static_attributes____classdictcell__Z__classdict__   @r   r   r      s     $" "r   r   c                   s   a  ] tR t^)t o RtR t]R 4       t]R 4       t]R 4       t	]R 4       t
]R 4       tR tR	tV tR
# )	PPDConfigz)
Configuration for the tuned-ppd daemon.
c                s4    W n         V P                  V4       R # r   )_tuned_interfaceload_from_file)r   config_fileZtuned_interfacer   r   r   ZPPDConfig.__init__-   s     /K(r   c                    V P                   # )z'
Whether battery detection is enabled.
)_battery_detectionr      &r   r   ZPPDConfig.battery_detection1   s    
 &&&r   c                r!   )z3
Default PPD profile to set during initialization.
)_default_profiler#   r$   r   default_profileZPPDConfig.default_profile8   s    
 $$$r   c                r!   )z,
Mapping of PPD profiles to TuneD profiles.
)_ppd_to_tunedr#   r$   r   ppd_to_tunedZPPDConfig.ppd_to_tuned?       
 !!!r   c                r!   )z,
Mapping of TuneD profiles to PPD profiles.
)_tuned_to_ppdr#   r$   r   tuned_to_ppdZPPDConfig.tuned_to_ppdF   r)   r   c                r!   )z
Whether to react to changes of ACPI platform profile
done via function keys (e.g., Fn-L) on newer Thinkpad
machines. Experimental feature.
)_sysfs_acpi_monitorr#   r$   r   r   ZPPDConfig.sysfs_acpi_monitorM   s     '''r   c           	     s   \        4       p\        P                  P                  V4      '       g   \	        RV,          4      h VP                  V4       \        T9  d   \	        RT,          4      h\        T\        ,          4      p\        T9  d   \	        RT,          4      h\        T9  d   \	        RT,          4      h\        T9  d   \	        RT,          4      h\        T9  g   \        T\        ,          9  d   \        T n        MT\        ,          \        ,          T n        T P                  T9  d   \	        RT P                  ,          4      hTP                  \        \         \"        T9   R7      T n        T P$                  '       d   \"        T9  d   \	        R	T,          4      hT P$                  '       d   T\        T\"        ,          4      ,          MTp\'        TP)                  4       4      \'        TP)                  4       4      ,          \'        T P*                  P-                  4       4      ,
          pT'       d"   \	        R
RP/                  T4      ,           4      h\'        TP1                  4       4      \'        TP1                  4       4      ,
          pT'       d"   \	        RRP/                  T4      ,           4      h\3        \'        TP)                  4       4      4      \3        T4      8w  g1   \3        \'        TP)                  4       4      4      \3        T4      8w  d   \	        RT,          4      h\5        Y44      T n        \5        TP9                  4        UUu/ uF  w  rxYbK	  	  uppTP9                  4        UUu/ uF  w  rxYbK	  	  upp4      T n        TP                  \        \<        RR7      T n        R#   \         d    \	        RT,          4      hi ; iu uppi u uppi )z1
Loads the configuration from the provided file.
z&Configuration file '%s' does not existz)Error parsing the configuration file '%s'z7Missing profiles section in the configuration file '%s'z:Missing power-saver profile in the configuration file '%s'z7Missing balanced profile in the configuration file '%s'z:Missing performance profile in the configuration file '%s'z3Default profile '%s' missing in the profile mapping)Zfallbackz6Missing battery section in the configuration file '%s'z2Unknown TuneD profiles in the configuration file: z, z-Unknown PPD profiles in the battery section: z8Duplicate profile mapping in the configuration file '%s'TN) r    osZpathZisfiler   Zreadr   PROFILES_SECTIONZdictPPD_POWER_SAVERPPD_BALANCEDPPD_PERFORMANCEMAIN_SECTIONDEFAULT_PROFILE_OPTIONr%   Z
getbooleanBATTERY_DETECTION_OPTIONBATTERY_SECTIONr"   ZsetZvaluesr   r   Zjoinr   Zlenr   r'   Zitemsr*   SYSFS_ACPI_MONITOR_OPTIONr,   )	r   r    ZcfgZprofile_dict_acZprofile_dict_dcZunknown_tuned_profilesZunknown_battery_profilesZkZvs	   &&       r   r   ZPPDConfig.load_from_fileV   s?    nww~~k** !IK!WXX	\HH[! 3& !Z]h!hiis#345/1 !]`k!kll. !Z]h!hii/1 !]`k!klls"&<CDU&U$0D!$'$56L$MD!  7 !VY]YnYn!noo"%..?Wbquxbx."y"""c'A !Y\g!ghhJNJaJaJa/D_1E,FFgv #&o&<&<&>"?#oF\F\F^B_"_cfgkg|g|  hF  hF  hH  dI  "I! !UX\XaXabxXy!yzz $'';';'=#>_EYEYE[A\#\ # !PSWS\S\]uSv!vww s?))+,-_1EESQ`QgQgQiMjIkor  tC  pD  JD ![^i!ijj'I'/:O:O:Q(R:Q$!:Q(Rfuf{f{f}T~f}^b^_UVUYf}T~#&>>,@Ydh>#i a  	\ !L{!Z[[	\\ )ST~s   N? O 
O&?O)r"   r%   r'   r,   r   r*   N)r   r   r   r   r   r   Zpropertyr   r&   r(   r+   r   r   r   r   r   r   r   r   r   )   s     ) ' ' % % " " " " ( (:j :jr   r   )Ztuned.utils.config_parserr    r   Ztuned.exceptionsr   r-   r/   r0   r1   r2   r.   r5   r3   r4   r6   r   r   ) r   r   <module>r7      sW    9 + 	 " . 0 " "0gj gjr   