00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | __ __ ____ _____ ____ | 00004 | \ \ / /_ _/ ___|_ _|___ \ | 00005 | \ V / _` \___ \ | | __) | | 00006 | | | (_| |___) || | / __/ | 00007 | |_|\__,_|____/ |_| |_____| | 00008 | | 00009 | core system | 00010 | (C) SuSE GmbH | 00011 \----------------------------------------------------------------------/ 00012 00013 File: Y2CCPlugin.h 00014 00015 Author: Arvin Schnell <arvin@suse.de> 00016 Maintainer: Arvin Schnell <arvin@suse.de> 00017 00018 /-*/ 00019 // -*- c++ -*- 00020 00021 #ifndef Y2CCPlugin_h 00022 #define Y2CCPlugin_h 00023 00024 #include <regex.h> 00025 00026 #include "Y2ComponentCreator.h" 00027 00028 00029 class Y2CCPlugin : public Y2ComponentCreator 00030 { 00034 bool creates_servers; 00035 00036 /* 00037 * all this mutable and const is needed since create is const. 00038 * and all this is needed since you have to recompile a regex 00039 * when you call setlocale. 00040 */ 00041 00045 mutable regex_t rxs1, rxr1, rxr2, rxr3; 00046 00047 mutable int my_nl_msg_cat_cntr; 00048 void make_rxs () const; 00049 void free_rxs () const; 00050 00051 public: 00057 Y2CCPlugin (bool server); 00058 00062 bool isServerCreator () const; 00063 00068 Y2Component* createInLevel (const char* name, int level, int current_level) const; 00069 00073 Y2Component* provideNamespace(const char* name_space); 00074 00075 }; 00076 00077 00078 #endif // Y2CCPlugin_h