Y2PluginComponent.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013    File:       Y2PluginComponent.h
00014 
00015    Author:     Arvin Schnell <arvin@suse.de>
00016    Maintainer: Arvin Schnell <arvin@suse.de>
00017 
00018 /-*/
00019 // -*- c++ -*-
00020 
00021 /*
00022  * Component that starts a plugin
00023  */
00024 
00025 #ifndef Y2PluginComponent_h
00026 #define Y2PluginComponent_h
00027 
00028 #include "Y2.h"
00029 
00030 class Y2PluginComponent : public Y2Component
00031 {
00035     const bool is_server;
00036 
00040     string filename;
00041 
00045     string creator_name;
00046 
00050     string component_name;
00051 
00055     int argc;
00056 
00060     char** argv;
00061 
00065     int level;
00066 
00070     void* handle;
00071 
00075     Y2Component* comp;
00076 
00077 public:
00078 
00079     Y2PluginComponent (bool is_server, string filename, const char* creator_name,
00080                        const char* component_name, int level);
00081 
00082     Y2PluginComponent (string filename, const char* creator_name,
00083                        const char* component_name, const char* name_space);
00087     ~Y2PluginComponent ();
00088 
00092     string name () const;
00093 
00099     YCPValue evaluate (const YCPValue& command);
00100 
00104     SCRAgent* getSCRAgent ();
00105 
00112     void result (const YCPValue& result);
00113 
00119     void setServerOptions (int argc, char** argv);
00120 
00124     YCPValue doActualWork (const YCPList& arglist, Y2Component* user_interface);
00125 
00130     Y2Component* component () { return comp; }
00131 
00132 private:
00136     bool loadPlugin (const char* name_space = NULL);
00137 
00141     Y2ComponentCreator* locateSym (int num);
00142 
00143 };
00144 
00145 
00146 #endif // Y2PluginComponent_h

Generated on Fri Jun 16 18:07:45 2006 for yast2-core by  doxygen 1.4.6