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

📄 waruserauthdata.h

📁 ftpserver very good sample
💻 H
字号:
/**   Container for implementation dependent login/session  data. Typically used to store uid/gid or SID's.  */#ifndef WAR_USER_AUTH_DATA_H#define WAR_USER_AUTH_DATA_H/* SYSTEM INCLUDES *//* PROJECT INCLUDES */#ifndef WAR_SMART_POINTER_H#   include "WarSmartPointer.h"#endif#ifndef WAR_PTR_WRAPPER_H#   include "WarPtrWrapper.h"#endif#ifndef WAR_OPTION_LIST_H#   include "WarOptionList.h"#endif/* LOCAL INCLUDES *//* FORWARD REFERENCES */class WarSvrProperties;#ifdef __cplusplusextern "C" {#endif/****************** BEGIN OLD STYLE C spesific ********//****************** END OLD STYLE C spesific **********/#ifdef __cplusplus }#endif/****************** BEGIN C++ spesific ****************/#ifdef __cplusplusclass WarUserAuthData : public WarSmartPointer{public:    // LIFECYCLE        /**    * Default constructor.    */    WarUserAuthData(void)    {}     /**    * Destructor.    */    ~WarUserAuthData(void)    {}        // OPERATORS     bool operator == (const WarUserAuthData& from) const    {        return mUserName == from.mUserName;    }    bool operator < (const WarUserAuthData& from) const     {        return mUserName < from.mUserName;    }    virtual void BeginImpersonate()         throw(WarException) = 0;    virtual void EndImpersonate()         throw(WarException) = 0;    // OPERATIONS          void SetUserName(war_ccstr_t userName)    {        mUserName = userName ? userName : "";    }        /* Merge the current effective properties, so that the     * properties specified for the user takes precidence.     */    virtual void     MergeProperties(WarSvrProperties& effectiveProperties)        throw(WarException)    {        WarThrow(WarError(WAR_ERR_NOT_IMPLEMENTED), NULL);    }    // ACCESS    // INQUIRY    virtual bool IsAnonymous() const    {        return false;    }    virtual bool IsPwdEmail() const    {        return false;    }    virtual const std::string& GetUserName() const    {        return mUserName;    }    virtual bool IsEnabled() const    {        return true;    }    virtual int GetIntOption(war_ccstr_t name) const         throw(WarException)    {        return mOptions.GetIntOption(name);    }    virtual std::string GetOption(war_ccstr_t name) const        throw(WarException)    {        return mOptions.GetOption(name);    }    protected:    std::string mUserName;    WarOptionList mOptions;#ifdef WIN32    friend class WarUserAuthWin32Nt;    friend class WarIfUser;    WarWin32Registry mRegRoot; // Users root-key in the registry#endifprivate:};/* INLINE METHODS *//* EXTERNAL REFERENCES */typedef WarPtrWrapper<WarUserAuthData> war_authdata_ptr_t;#endif /* __cplusplus *//****************** END C++ spesific ******************/#endif  /* WAR_USER_AUTH_DATA_H_ */

⌨️ 快捷键说明

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