00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | __ __ ____ _____ ____ | 00004 | \ \ / /_ _/ ___|_ _|___ \ | 00005 | \ V / _` \___ \ | | __) | | 00006 | | | (_| |___) || | / __/ | 00007 | |_|\__,_|____/ |_| |_____| | 00008 | | 00009 | core system | 00010 | (C) SuSE GmbH | 00011 \----------------------------------------------------------------------/ 00012 00013 File: Y2Component.h 00014 00015 Author: Mathias Kettner <kettner@suse.de> 00016 Thomas Roelz <tom@suse.de> 00017 Stanislav Visnovsky <visnov@suse.cz> 00018 Maintainer: Stanislav Visnovsky <visnov@suse.cz> 00019 00020 /-*/ 00021 // -*- c++ -*- 00022 00023 #ifndef Y2Component_h 00024 #define Y2Component_h 00025 00026 #include <string> 00027 00028 using std::string; 00029 00030 class SCRAgent; 00031 class Y2Namespace; 00032 class YCPValue; 00033 class YCPList; 00034 00262 class Y2Component 00263 { 00264 public: 00265 00266 /* ================ common ================ */ 00267 00268 Y2Component(); 00269 00273 virtual ~Y2Component(); 00274 00278 virtual string name() const = 0; 00279 00280 /* ================ server ================ */ 00281 00292 virtual YCPValue evaluate(const YCPValue& command); 00293 00300 virtual void result(const YCPValue& result); 00301 00313 virtual void setServerOptions(int argc, char **argv); 00314 00332 virtual Y2Namespace* import(const char* name_space); 00333 00334 /* ================ client ================ */ 00335 00353 virtual YCPValue doActualWork(const YCPList& arglist, Y2Component *user_interface); 00354 00355 /* ================ misc ================ */ 00356 00363 virtual SCRAgent * getSCRAgent (); 00364 00365 virtual bool remote () const; 00366 }; 00367 00368 #endif // Y2Component_h