⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 warlogeventdata.h

📁 ftpserver very good sample
💻 H
字号:
/** @name A one line description of the class. * * #include "WarLogEventData.h" <BR> * -llib  * * @doc A longer description. *   * @see something */#ifndef WAR_LOG_EVENTDATA_H#define WAR_LOG_EVENTDATA_H/* SYSTEM INCLUDES *//* PROJECT INCLUDES */#ifndef WAR_LOG_IDENTIFIER_H#	include "WarLogIdentifier.h"#endif/* LOCAL INCLUDES *//* FORWARD REFERENCES */#ifdef __cplusplusextern "C" {#endif/****************** BEGIN OLD STYLE C spesific ********//** Log event types */enum WarLogEventTypeE{    /** Debug events */    WARLOG_DEBUG,    /** Serious and fatal errors */    WARLOG_ERROR,    /** A file has been accessed */    WARLOG_FILEACC,    /** Login or logout */    WARLOG_INOUT,    /** A security event */    WARLOG_SECURITY,    // A non-fatal error, suspicious internal state or unexpected return-value */    WARLOG_WARNINGS,    /** System information, typically startup or shutdown messages */    WARLOG_SYSTEM,    /** Debug-messages at the socket level. Can be very verbose! */    WARLOG_SOCKET,    /** A file was sent */    WARLOG_SNDFILE,    /** A file was received */    WARLOG_RCVFILE,    /** A directoiry was created */    WARLOG_CREDIR,    /** A directory was deleted */    WARLOG_DELDIR,    /** A file was deleted */    WARLOG_DELFILE,    /** User login */    WARLOG_LOGIN,    /** User logout */    WARLOG_LOGOUT,    /** An account was created */    WARLOG_CREACC,    /** An account was deleted */    WARLOG_DELACC,    /** An account was changed */    WARLOG_CHGACC,    /** CPS (Character Pr Second) statistics entry */    WARLOG_CPS,    /** Non-classified information */    WARLOG_INFO,    /** Debug info for thread modules */    WARLOG_THREADS,     /** Debug info for file modules */    WARLOG_FILES,    /** Network events, non-debug */    WARLOG_NETWORK,    /** Debug FTP protocol events */    WARLOG_DEBUG_FTP,    /** Debug HTTP protocol events */    WARLOG_DEBUG_HTTP,    /* */    WARLOG_INVALID,    /** meta-definition for all events*/    WARLOG_ALL = -1};/** Macro to determine if an evebt is to be logged     @param Mask Mask to use    @param Flag Log flag */#define WARLOG_ISSET(mask, flag) ((mask >> flag) & 1)/** Macro to set or remove an event to the event-mask.     @param Mask    @param Flag    @param Value */#define WARLOG_SET(mask, flag, value)\{\    mask &= ~(1 << flag);\    mask |= ((value & 1) << flag);\}/****************** END OLD STYLE C spesific **********/#ifdef __cplusplus }#endif/****************** BEGIN C++ spesific ****************/#ifdef __cplusplusclass WarLogEventData {public:    // LIFECYCLE        /**    * Default constructor.    */    WarLogEventData(void)        : mType(WARLOG_DEBUG)    {}    /**    * constructor.    */    WarLogEventData(const WarLogEventTypeE logType,         war_ccstr_t logFunction,		WarLogIdentifier& logIdentifier		)        : mType(logType),        mCallingFunc(logFunction),		mIdentifier(logIdentifier)    {    }        /**    * Copy constructor.    *    * @param from The value to copy to this object.    */    WarLogEventData(const WarLogEventData& from)        : mType(from.mType),        mTime(from.mTime),        mMessage(from.mMessage),        mError(from.mError),        mCallingFunc(from.mCallingFunc),        mInterfaceName(from.mInterfaceName),        mUser(from.mUser),		mIdentifier(from.mIdentifier)    {}        // OPERATORS        /**    * Assignment operator.    *    * @param from THe value to assign to this object.    *    * @return A reference to this object.    */    WarLogEventData& operator=(WarLogEventData& from)    {        mType = from.mType;        mTime = from.mTime;        mMessage = from.mMessage;        mError = from.mError;        mCallingFunc = from.mCallingFunc;        mInterfaceName = from.mInterfaceName;        mUser = from.mUser;		mIdentifier = from.mIdentifier;		return *this;    }        // OPERATIONS                           // ACCESS    // INQUIRY    ///    WarLogEventTypeE mType;    ///    WarTime mTime;    ///    std::string mMessage;    ///    WarError mError;    ///    std::string mCallingFunc;    ///    std::string mInterfaceName;    ///    std::string mUser;	///	WarLogIdentifier mIdentifier;    protected:private:};/* INLINE METHODS *//* EXTERNAL REFERENCES */#endif /* __cplusplus *//****************** END C++ spesific ******************/#endif  /* WAR_LOG_EVENTDATA_H */

⌨️ 快捷键说明

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