yast2-core
Y2PluginComponent.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: Y2PluginComponent.h
14 
15  Author: Arvin Schnell <arvin@suse.de>
16  Maintainer: Arvin Schnell <arvin@suse.de>
17 
18 /-*/
19 // -*- c++ -*-
20 
21 /*
22  * Component that starts a plugin
23  */
24 
25 #ifndef Y2PluginComponent_h
26 #define Y2PluginComponent_h
27 
28 #include "Y2.h"
29 
31 {
35  const bool is_server;
36 
40  string filename;
41 
45  string creator_name;
46 
51 
55  int argc;
56 
60  char** argv;
61 
65  int level;
66 
70  void* handle;
71 
76 
77 public:
78 
79  Y2PluginComponent (bool is_server, string filename, const char* creator_name,
80  const char* component_name, int level);
81 
82  Y2PluginComponent (string filename, const char* creator_name,
83  const char* component_name, const char* name_space);
88 
92  string name () const;
93 
99  YCPValue evaluate (const YCPValue& command);
100 
104  SCRAgent* getSCRAgent ();
105 
106  Y2Namespace* import (const char* name_space);
107 
114  void result (const YCPValue& result);
115 
121  void setServerOptions (int argc, char** argv);
122 
126  YCPValue doActualWork (const YCPList& arglist, Y2Component* user_interface);
127 
132  Y2Component* component () { return comp; }
133 
134 private:
138  bool loadPlugin (const char* name_space = NULL);
139 
143  Y2ComponentCreator* locateSym (int num);
144 
145 };
146 
147 
148 #endif // Y2PluginComponent_h
void * handle
Definition: Y2PluginComponent.h:70
string creator_name
Definition: Y2PluginComponent.h:45
SCRAgent * getSCRAgent()
Definition: Y2PluginComponent.cc:115
Y2Component * comp
Definition: Y2PluginComponent.h:75
Y2Component * component()
Definition: Y2PluginComponent.h:132
string component_name
Definition: Y2PluginComponent.h:50
~Y2PluginComponent()
Definition: Y2PluginComponent.cc:68
string filename
Definition: Y2PluginComponent.h:40
bool loadPlugin(const char *name_space=NULL)
Definition: Y2PluginComponent.cc:202
YCPValue doActualWork(const YCPList &arglist, Y2Component *user_interface)
Definition: Y2PluginComponent.cc:173
Communication handle to a YaST2 component.
Definition: Y2Component.h:262
Y2PluginComponent(bool is_server, string filename, const char *creator_name, const char *component_name, int level)
Definition: Y2PluginComponent.cc:33
SuSE Configuration Repository Agent.
Definition: SCRAgent.h:37
YCPValue evaluate(const YCPValue &command)
Definition: Y2PluginComponent.cc:97
Wrapper for YCPListRep This class realizes an automatic memory management via YCPElement. Access the functionality of YCPListRep with the arrow operator. See YCPListRep.
Definition: YCPList.h:236
const bool is_server
Definition: Y2PluginComponent.h:35
Definition: Y2PluginComponent.h:30
Wrapper for YCPValueRep This class realizes an automatic memory management via YCPElement. Access the functionality of YCPValueRep with the arrow operator. See YCPValueRep.
Definition: YCPValue.h:275
void setServerOptions(int argc, char **argv)
Definition: Y2PluginComponent.cc:84
Definition: Y2Namespace.h:43
string name() const
Definition: Y2PluginComponent.cc:164
char ** argv
Definition: Y2PluginComponent.h:60
int level
Definition: Y2PluginComponent.h:65
Can create certain YaST2 components As documented in Y2Component, there are many ways how to realize ...
Definition: Y2ComponentCreator.h:43
int argc
Definition: Y2PluginComponent.h:55
Y2ComponentCreator * locateSym(int num)
Definition: Y2PluginComponent.cc:293
void result(const YCPValue &result)
Definition: Y2PluginComponent.cc:149

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