#include <Y2WFMComponent.h>

typedef vector<WFMSubAgent*> Y2WFMComponent::WFMSubAgents [private] |
typedef vector<Y2SystemNamespace*> Y2WFMComponent::SystemNamespaces [private] |
| Y2WFMComponent::Y2WFMComponent | ( | ) |
Creates a new WFM component
| Y2WFMComponent::~Y2WFMComponent | ( | ) |
Cleans up
| string Y2WFMComponent::name | ( | ) | const [virtual] |
Returns "wfm";
Implements Y2Component.
| YCPValue Y2WFMComponent::doActualWork | ( | const YCPList & | arglist, | |
| Y2Component * | displayserver | |||
| ) | [virtual] |
Executes the YCP script.
Reimplemented from Y2Component.
| Y2WFMComponent * Y2WFMComponent::instance | ( | ) | [static] |
| YCPInteger Y2WFMComponent::SCROpen | ( | const YCPString & | name, | |
| const YCPBoolean & | check_version | |||
| ) |
SCROpen Create a new scr instance.
Creates a new scr instance. The name must be a valid y2component name (e.g. "scr", "chroot=/mnt:scr"). The component is created immediately. The parameter check_version determines whether the SuSE Version should be checked. On error a negative value is returned.
| string | name a valid y2component name | |
| boolean | check_version determines whether the SuSE Version should be checked |
| void Y2WFMComponent::SCRClose | ( | const YCPInteger & | handle | ) |
| YCPString Y2WFMComponent::SCRGetName | ( | const YCPInteger & | handle | ) |
SCRGetName Get the name of a scr instance.
| integer | handle SCR handle |
| void Y2WFMComponent::SCRSetDefault | ( | const YCPInteger & | handle | ) |
| YCPInteger Y2WFMComponent::SCRGetDefault | ( | ) | const |
| YCPValue Y2WFMComponent::Args | ( | const YCPInteger & | index = YCPNull () |
) | const |
Args Returns the arguments with which the module was called. The result is a list whose arguments are the module's arguments. If the module was called with CallFunction("my_mod", [17,true]), Args() will return [ 17, true ].
| YCPString Y2WFMComponent::GetLanguage | ( | ) | const |
GetLanguage Returns the current language code (without modifiers !)
| YCPString Y2WFMComponent::GetEncoding | ( | ) | const |
GetEncoding Returns the current encoding code
| YCPString Y2WFMComponent::SetLanguage | ( | const YCPString & | language, | |
| const YCPString & | encoding = YCPNull () | |||
| ) |
SetLanguage Selects the language for translate()
| string | language string encoding SetLanguage("de_DE", "UTF-8") -> "" SetLanguage("de_DE@euro") -> "ISO-8859-15" |
Read Special interface to the system agent. Not for general use.
| path | path Path any options |
| YCPValue Y2WFMComponent::Write | ( | const YCPPath & | path, | |
| const YCPValue & | arg1, | |||
| const YCPValue & | arg2 = YCPNull () | |||
| ) |
Write Special interface to the system agent. Not for general use.
| path | path Path any options |
Execute Special interface to the system agent. Not for general use.
| path | path Path any options |
| YCPValue Y2WFMComponent::CallFunction | ( | const YCPString & | client, | |
| const YCPList & | args = YCPList () | |||
| ) |
call Executes a YCP client or a Y2 client component.
| string | name client name | |
| list | arguments list of arguments |
The modulename is temporarily changed to the name of the called script or a component.
In the example, WFM looks for the file YAST2HOME/clients/inst_mouse.ycp and executes it. If the client is not found, a Y2 client component is tried to be created.
call ("inst_mouse", [true, false]) -> ....
| YCPString Y2WFMComponent::GetEnvironmentEncoding | ( | ) |
GetEnvironmentEncoding Returns the encoding code of the environment where YaST is started
| Y2Namespace * Y2WFMComponent::import | ( | const char * | name_space | ) | [virtual] |
Try to import a given namespace. This method is used for transparent handling of namespaces (YCP modules) through whole YaST. NOTICE: there is no reverse operation to import. Semantics of YCP modules is there is a single instance and it is available from the first import until the end of YaST run.
| name_space | the name of the required namespace |
Reimplemented from Y2Component.
| void Y2WFMComponent::setupComponent | ( | string | client_name, | |
| string | fullname, | |||
| const YCPValue & | script | |||
| ) |
Setups this script component.
| the | name of the component that is realized be the script. | |
| script | the script. This component clones it, so you can destroy the script after the constructor call. |
| bool Y2WFMComponent::createDefaultSCR | ( | ) | [private] |
| Y2WFMComponent::WFMSubAgents::iterator Y2WFMComponent::find_handle | ( | int | handle | ) | [private] |
Finds a SCR instance to a given handle.
| const char * Y2WFMComponent::get_env_lang | ( | ) | const [private] |
Get the language from the environment.
WFMSubAgents Y2WFMComponent::scrs [private] |
int Y2WFMComponent::handle_cnt [private] |
Handle count.
int Y2WFMComponent::default_handle [private] |
Handle of default SCR instance.
WFMSubAgent Y2WFMComponent::local [private] |
The local system agent.
string Y2WFMComponent::modulename [private] |
The name of the module that is realized by this wfm.
YCPList Y2WFMComponent::argumentlist [private] |
Arguments of the module that is realized through the wfm. The script has access to it via the builtin args(). The symbol of the term itself is the module name.
string Y2WFMComponent::currentLanguage [private] |
string Y2WFMComponent::currentEncoding [private] |
string Y2WFMComponent::systemEncoding [private] |
system encoding
string Y2WFMComponent::environmentEncoding [private] |
environment encoding
Y2WFMComponent * Y2WFMComponent::current_wfm = 0 [static, private] |
YCPValue Y2WFMComponent::script [private] |
The script that implements the component.
string Y2WFMComponent::client_name [private] |
The name of the client that is implemented by the script.
string Y2WFMComponent::fullname [private] |
The fullname of the script file.
1.5.3