Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Examples

YUIComponent.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:         YUIComponent.h
00014 
00015   Author:       Stefan Hundhammer <sh@suse.de>
00016   Maintainer:   Stefan Hundhammer <sh@suse.de>
00017 
00018 /-*/
00019 
00020 #ifndef YUIComponent_h
00021 #define YUIComponent_h
00022 
00023 
00024 #include <Y2.h>
00025 #include <ycp/YCPValue.h>
00026 
00027 
00028 class YUI;
00029 
00034 class YUIComponent : public Y2Component
00035 {
00036 protected:
00040     YUIComponent();
00041 
00045     virtual ~YUIComponent();
00046 
00054     virtual YUI * createUI( int argc, char **argv, bool with_threads, const char * macro_file ) = 0;
00055 
00056 public:
00057 
00061     static YUIComponent * uiComponent();
00062 
00069     static YUI * ui() { return _ui; }
00070 
00076     void createUI();
00077 
00083     YCPValue callBuiltin( void * function, int fn_argc, YCPValue fn_argv[] );
00084     
00089     void result( const YCPValue & result );
00090 
00095     void setServerOptions( int argc, char ** argv );
00096 
00101     virtual string name() const { return string( "UI" ); }
00102     
00106     void setCallback( Y2Component * callback );
00107     
00112     Y2Component * getCallback() const;
00113     
00114     
00115 private:
00116 
00117     static YUI *                _ui;
00118     static YUIComponent *       _uiComponent;
00119 
00120     int                 _argc;
00121     char **             _argv;
00122     const char *        _macro_file;
00123     bool                _with_threads;
00124     bool                _have_server_options;
00125 };
00126 
00127 #endif // YUI_h

Generated on Fri Nov 9 18:15:23 2007 for yast2-core by doxygen 1.3.6