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 class Y2Namespace;
00030 
00035 class YUIComponent : public Y2Component
00036 {
00037 public:
00041     YUIComponent();
00042 
00046     virtual ~YUIComponent();
00047 
00048 protected:
00056     virtual YUI * createUI( int argc, char **argv, bool with_threads, const char * macro_file );
00057 
00058 public:
00059 
00060     virtual Y2Namespace *import (const char* name);
00061 
00065     static YUIComponent * uiComponent();
00066 
00073     static YUI * ui() { return _ui; }
00074 
00080     void createUI();
00081 
00087     YCPValue callBuiltin( void * function, int fn_argc, YCPValue fn_argv[] );
00088     
00093     void result( const YCPValue & result );
00094 
00099     void setServerOptions( int argc, char ** argv );
00100 
00105     virtual string name() const { return string( "UI" ); }
00106     
00110     void setCallback( Y2Component * callback );
00111     
00116     Y2Component * getCallback() const;
00117     
00118     
00119 private:
00120 
00121     static YUI *                _ui;
00122     static YUIComponent *       _uiComponent;
00123     Y2Namespace *               _namespace;
00124 
00125     int                 _argc;
00126     char **             _argv;
00127     const char *        _macro_file;
00128     bool                _with_threads;
00129     bool                _have_server_options;
00130 };
00131 
00132 #endif // YUI_h

Generated on Tue Nov 6 01:27:46 2007 for yast2-core by  doxygen 1.5.3