warsvrprotocolftplite.h

来自「ftpserver very good sample」· C头文件 代码 · 共 168 行

H
168
字号
/** */#ifndef WAR_SVR_PROTOCOL_FTP_LITE_H#define WAR_SVR_PROTOCOL_FTP_LITE_H/* SYSTEM INCLUDES */#ifndef WAR_INCLUDED_TCHAR_H#   define WAR_INCLUDED_TCHAR_H#   include <tchar.h>#endif/* PROJECT INCLUDES */#ifndef WAR_SVR_PROTOCOL_FTP_H#   include "WarSvrProtocolFtp.h"#endif#ifndef WAR_SVR_DEFINITION_FTP_H#   include "WarSvrDefinitionFtp.h"#endif#ifndef WAR_WIN32_REGISTRY_H#   include "WarWin32Registry.h"#endif/* LOCAL INCLUDES */#ifndef WAR_FTPD_LITE_H#   include "WarftpdLite.h"#endif/* FORWARD REFERENCES */#ifdef __cplusplusextern "C" {#endif/****************** BEGIN OLD STYLE C spesific ********//****************** END OLD STYLE C spesific **********/#ifdef __cplusplus }#endif/****************** BEGIN C++ spesific ****************/#ifdef __cplusplusclass WarSvrProtocolFtpLite : public WarSvrProtocolFtp{public:    // LIFECYCLE        /**    * Default constructor.    */    WarSvrProtocolFtpLite(        war_socket_io_ptr_t& companionPtr,        WarSvrDefinition& svrDefinion);        // OPERATIONS                           // ACCESS    // INQUIRY    protected:private:};class WarSvrDefinitionFtpLite : public WarSvrDefinitionFtp{public:    WarSvrDefinitionFtpLite()        throw(WarException)    {}    war_registrypath_t mRegistryPath;protected:     virtual WarSvrProtocol *GetNewSvr(         war_socket_io_ptr_t& companionPtr)        throw(WarException)     {         return new WarSvrProtocolFtpLite(             companionPtr, *this);     }};typedef WarPtrWrapper<WarSvrDefinitionFtpLite> war_svr_definition_ftp_lite_ptr_t;class MacroProgramnameLite : public WarTextMacro{public:    MacroProgramnameLite()        : WarTextMacro("programname", "Name of the FTP daemon software")    {}    std::string Expand(war_ccstr_t argument = NULL) throw(WarException)    {        return PROGRAM;    }};class MacroProgramversionLite : public WarTextMacro{public:    MacroProgramversionLite()        : WarTextMacro("programversion", "")    {}    std::string Expand(war_ccstr_t argument = NULL) throw(WarException)    {        return VERSION;    }};class MacroPrgcopyrightLite : public WarTextMacro{public:    MacroPrgcopyrightLite()        : WarTextMacro("prgcopyright", "Copyright notification of the FTP daemon software")    {}    std::string Expand(war_ccstr_t argument = NULL) throw(WarException)    {        WarCollector<char> msg;        msg << COPYRIGHT << "\n"            << WAR_FTPD_DISCLAIMER            << war_endl;        return msg.GetValue();    }};class MacroBuilddateLite : public WarTextMacro{public:    MacroBuilddateLite()        : WarTextMacro("builddate", "Build date")    {}    std::string Expand(war_ccstr_t argument = NULL) throw(WarException)    {        WarCollector<char> msg;        msg << __DATE__;        return msg.GetValue();    }};/* INLINE METHODS *//* EXTERNAL REFERENCES */#endif /* __cplusplus *//****************** END C++ spesific ******************/#endif  /* WAR_SVR_PROTOCOL_FTP_LITE_H_ */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?