YaST2 Developers Documentation: Configuration of power-management

Configuration of power-management

modules/PowerManagement.ycp
PowerManagement settings, input and output functions

This module has an unstable interface.

Representation of the configuration of power-management. Input and output routines.

Imports

  • Mode
  • PackageSystem
  • Progress
  • Report
  • Service
  • String

Global Variables

Global Functions

Local Variables

local scheme_options_mapping -> map<string,string>

Mapping of cheme option identifiers in the internal structure and in the created file Key is internal structure, value is scheme file

local global_options_mapping -> map<string,list<string> >

Mapping of global option identifiers in the internal structure and in the created file Key is internal structure, value is scheme file (2-member list, first file identifier, second variable name)

global Modified () -> boolean

Was the settings modified?

Return value:
true if modified
global modified -> boolean

Data was modified?

global proposal_valid -> boolean

global write_only -> boolean

Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.

Info:

Abort function return boolean return true if abort

global Abort () -> boolean

Abort function

Return value:
blah blah lahjk
global Modified () -> boolean

Data was modified?

Return value:
true if modified
global Read () -> boolean

Read all power-management settings

Return value:
true on success
global Write () -> boolean

Write all power-management settings

Return value:
true on success
global Import (map settings) -> boolean

Get all power-management settings from the first parameter (For use by autoinstallation.)

Parameters:
settings The YCP structure to be imported.
Return value:
True on success
global Export () -> map

Dump the power-management settings to a single map (For use by autoinstallation.)

Return value:
Dumped settings (later acceptable by Import ())
global Summary () -> list<string>

Create a textual summary and a list of unconfigured cards

Return value:
summary of the current configuration
global AutoPackages () -> map

Return packages needed to be installed and removed during Autoinstallation to insure module has all needed software installed.

Return value:
with 2 lists.
global ACPIModes () -> list<string>

List all supported ACPI modes

Return value:
a list containing all supported ACPI modes
global ACPI () -> boolean

Check if ACPI is being used

Return value:
true if ACPI is being used
global APM () -> boolean

Check if APM is being used

Return value:
true if APM is being used
global TranslatePowersaveText (string text) -> string

Translate a text using powersave mo-file

Parameters:
text string to translate
Return value:
translated text
global TranslateSchemeName (string name) -> string

Get localized scheme name

Parameters:
name string original scheme name
Return value:
localized scheme name
global TranslateSchemeDescription (string descr) -> string

Get localized scheme description

Parameters:
descr string original scheme desceriptino
Return value:
localized scheme decription
global FindScheme (string name) -> integer

Find index of a scheme

Parameters:
name string scheme name
Return value:
scheme index (-1 if not found)
global FetchSchemes () -> void

Fetch all schemes

global StoreSchemes () -> void

Store all schemes

global FetchScheme (integer index, integer clone) -> void

fetch a scheme

Parameters:
index integer index of the scheme (-1 is new scheme)
clone integer index of scheme to clone if not exists
global StoreScheme () -> void

Store the current scheme