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

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