yast2-core
Y2WFMComponent.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | |
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
8 | |
9 | core system |
10 | (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12 
13  File: Y2WFMComponent.h
14 
15  Author: Stanislav Visnovsky <visnov@suse.cz>
16  Maintainer: Stanislav Visnovsky <visnov@suse.cz>
17 
18 /-*/
19 
20 #ifndef Y2WFMComponent_h
21 #define Y2WFMComponent_h
22 
23 #include <y2/Y2Component.h>
24 
25 #include <ycp/YCPInteger.h>
26 #include <ycp/YCPList.h>
27 #include <ycp/YCPString.h>
28 
29 #include "WFMSubAgent.h"
30 
31 #define MAX_CLIENT_NAME_LEN 160
32 
33 class Y2SystemNamespace;
34 
36 {
37 
38 public:
43 
48 
52  virtual string name() const;
53 
57  virtual YCPValue doActualWork(const YCPList& arglist, Y2Component *displayserver);
58 
59  static Y2WFMComponent* instance();
60 
61  YCPInteger SCROpen (const YCPString& name, const YCPBoolean &check_version);
62  void SCRClose (const YCPInteger& handle);
63  YCPString SCRGetName (const YCPInteger &handle);
64  void SCRSetDefault (const YCPInteger &handle);
65  YCPInteger SCRGetDefault () const;
66  YCPValue Args (const YCPInteger& index = YCPNull ()) const;
67  YCPString GetLanguage () const;
68  YCPString GetEncoding () const;
69  YCPString SetLanguage (const YCPString& language, const YCPString& encoding = YCPNull ());
70  YCPValue Read (const YCPPath &path, const YCPValue& arg);
71  YCPValue Write (const YCPPath &path, const YCPValue& arg1, const YCPValue& arg2 = YCPNull ());
72  YCPValue Execute (const YCPPath &path, const YCPValue& arg1);
73  YCPValue CallFunction (const YCPString& client, const YCPList& args = YCPList ());
75  YCPBoolean ClientExists (const YCPString& client);
76 
77  virtual Y2Namespace* import (const char* name_space);
78 
85  void setupComponent (string client_name, string fullname,
86  const YCPValue& script);
87 
88 private:
89 
90  bool createDefaultSCR ();
91 
95  typedef vector <WFMSubAgent*> WFMSubAgents;
96  typedef vector <Y2SystemNamespace*> SystemNamespaces;
97 
100 
104  WFMSubAgents::iterator find_handle (int);
105 
110 
115 
120 
124  const char* get_env_lang () const;
125 
129  string modulename;
130 
137 
140 
145 
150 
151 
153 
158 
162  string client_name;
163 
167  string fullname;
168 };
169 
170 
171 #endif // Y2WFMComponent_h

Generated on a sunny day for yast2-core by doxygen 1.8.2