#ifndef _YPROXY_NNTPCOMMANDS_HPP_ #define _YPROXY_NNTPCOMMANDS_HPP_ #ifndef _COMMON_WINDOWS_HPP_ #include #endif #ifndef _COMMON_STRING_HPP_ #include #endif #ifndef _COMMON_BLOCK_HPP_ #include #endif class NNTPCommands { public: typedef enum NNTPCommand{Article,Body,Group,Head,Help,IHave,Last,List,NewGroups,NewNews, Next,Post,Quit,Slave,Stat,ListGroup,AuthInfoUser,AuthInfoPass,AuthInfo,ModeReader,XOver,InvalidCommand}; static NNTPCommands &getInstance(void); NNTPCommand interpretCommand(const String &string); String toString(NNTPCommand command); private: NNTPCommands(); virtual ~NNTPCommands(); void buildCommands(void); Block mNNTPCmds; static NNTPCommands *smInstance; }; inline NNTPCommands::NNTPCommands() { buildCommands(); } inline NNTPCommands::~NNTPCommands() { } inline NNTPCommands &NNTPCommands::getInstance() { if(0==smInstance)smInstance=::new NNTPCommands(); return *smInstance; } #endif