#include <Y2WFMComponent.h>
Inheritance diagram for Y2WFMComponent:
Public Member Functions | |
Y2WFMComponent () | |
~Y2WFMComponent () | |
virtual string | name () const |
virtual YCPValue | doActualWork (const YCPList &arglist, Y2Component *displayserver) |
YCPInteger | SCROpen (const YCPString &name, const YCPBoolean &check_version) |
Create a new scr instance. | |
void | SCRClose (const YCPInteger &handle) |
Closes a scr instance. | |
YCPString | SCRGetName (const YCPInteger &handle) |
Get the name of a scr instance. | |
void | SCRSetDefault (const YCPInteger &handle) |
Sets the default scr instance. | |
YCPInteger | SCRGetDefault () const |
Gets the default scr instance. | |
YCPValue | Args (const YCPInteger &index=YCPNull()) const |
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 | GetLanguage () const |
Returns the current language code (without modifiers !). | |
YCPString | GetEncoding () const |
Returns the current encoding code. | |
YCPString | SetLanguage (const YCPString &language, const YCPString &encoding=YCPNull()) |
Selects the language for translate(). | |
YCPValue | Read (const YCPPath &path, const YCPValue &arg) |
Special interface to the system agent. Not for general use. | |
YCPValue | Write (const YCPPath &path, const YCPValue &arg1, const YCPValue &arg2=YCPNull()) |
Special interface to the system agent. Not for general use. | |
YCPValue | Execute (const YCPPath &path, const YCPValue &arg1) |
Special interface to the system agent. Not for general use. | |
YCPValue | CallFunction (const YCPString &client, const YCPList &args=YCPList()) |
Executes a YCP client or a Y2 client component. | |
YCPString | GetEnvironmentEncoding () |
Returns the encoding code of the environment where YaST is started. | |
virtual Y2Namespace * | import (const char *name_space) |
void | setupComponent (string client_name, string fullname, const YCPValue &script) |
Static Public Member Functions | |
static Y2WFMComponent * | instance () |
Private Types | |
typedef vector< WFMSubAgent * > | WFMSubAgents |
typedef vector< Y2SystemNamespace * > | SystemNamespaces |
Private Member Functions | |
bool | createDefaultSCR () |
WFMSubAgents::iterator | find_handle (int) |
const char * | get_env_lang () const |
Private Attributes | |
WFMSubAgents | scrs |
SystemNamespaces | system_namespaces |
int | handle_cnt |
int | default_handle |
WFMSubAgent | local |
string | modulename |
YCPList | argumentlist |
string | currentLanguage |
string | currentEncoding |
string | systemEncoding |
string | environmentEncoding |
YCPValue | script |
string | client_name |
string | fullname |
Static Private Attributes | |
static Y2WFMComponent * | current_wfm = 0 |
|
|
|
|
Creates a new WFM component |
|
Cleans up |
|
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 Args
|
|
Executes a YCP client or a Y2 client component. call
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]) -> ....
|
|
|
|
Executes the YCP script. Reimplemented from Y2Component. |
|
Special interface to the system agent. Not for general use. Execute
|
|
Finds a SCR instance to a given handle. |
|
Get the language from the environment. |
|
Returns the current encoding code. GetEncoding
|
|
Returns the encoding code of the environment where YaST is started. GetEnvironmentEncoding
|
|
Returns the current language code (without modifiers !). GetLanguage
|
|
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.
Reimplemented from Y2Component. |
|
|
|
Returns "wfm"; Implements Y2Component. |
|
Special interface to the system agent. Not for general use. Read
|
|
Closes a scr instance. SCRClose
|
|
Gets the default scr instance. SCRGetDefault
|
|
Get the name of a scr instance. SCRGetName
|
|
Create a new scr instance. SCROpen 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.
|
|
Sets the default scr instance. SCRSetDefault
|
|
Selects the language for translate(). SetLanguage
|
|
Setups this script component.
|
|
Special interface to the system agent. Not for general use. Write
|
|
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. |
|
The name of the client that is implemented by the script. |
|
|
|
|
|
|
|
Handle of default SCR instance. |
|
environment encoding |
|
The fullname of the script file. |
|
Handle count. |
|
The local system agent. |
|
The name of the module that is realized by this wfm. |
|
The script that implements the component. |
|
|
|
|
|
system encoding |