📄 warifsite.h
字号:
/** */#ifndef WAR_IF_SITE_H#define WAR_IF_SITE_H/* SYSTEM INCLUDES *//* PROJECT INCLUDES */#ifndef WAR_PTR_WRAPPER_H# include "WarPtrWrapper.h"#endif#ifndef WAR_SMART_POINTER_H# include "WarSmartPointer.h"#endif#ifndef WAR_USER_AUTH_H# include "WarUserAuth.h"#endif#ifndef WAR_SVR_DEFINITION_H# include "WarSvrDefinition.h"#endif/* LOCAL INCLUDES *//* FORWARD REFERENCES */class WarIfServer;class WarIfAuthModule;class WarIfUser;class WarIfOptions;class WarIfMimeTypes;typedef WarPtrWrapper<WarIfServer> war_if_server_ptr_t;typedef WarPtrWrapper<WarIfAuthModule> war_if_aut_module_ptr_t;typedef std::list<war_if_aut_module_ptr_t> war_if_aut_module_list_t;typedef WarPtrWrapper<WarIfUser> war_if_user_ptr_t;typedef std::set<war_if_user_ptr_t> war_if_user_set_t;typedef WarPtrWrapper<WarIfOptions> war_if_options_ptr_t;typedef WarPtrWrapper<WarIfMimeTypes> war_if_mime_types_ptr_t;#ifdef __cplusplusextern "C" {#endif/****************** BEGIN OLD STYLE C spesific ********//****************** END OLD STYLE C spesific **********/#ifdef __cplusplus }#endif/****************** BEGIN C++ spesific ****************/#ifdef __cplusplusclass WarIfSite : public WarSmartPointer{public: enum ProtocolE { PROT_FTP, PROT_HTTP, PROT_INVALID }; typedef std::basic_string<war_sysch_t> namestr_t; // LIFECYCLE // OPERATORS // OPERATIONS void SetEnable(const bool doEnable = true) throw(WarException); void SetEnableProtocol(const ProtocolE type, const bool doEnable = true) throw(WarException); void SetName(war_ccsysstr_t newName) throw(WarException); void SetSiteName(war_ccsysstr_t newName) throw(WarException); void SetAdress(const ProtocolE type, war_ccsysstr_t newAddress) throw(WarException); void SetVirtualHostName(const ProtocolE type, war_ccsysstr_t newName) throw(WarException); void SetDefaultPage(const ProtocolE type, war_ccsysstr_t newPage) throw(WarException); void SetIpAccessList(const WarIpAccessList& returnList); // Initialize a virtual server object void InitializeRealSite(war_svrdef_ptr_t& sitePtr, const ProtocolE siteProtocol) throw(WarException); war_if_options_ptr_t GetOptions(); // CALLBACK // ACCESS // INQUIRY bool IsEnabled() const throw(WarException); bool IsProtocolEnabled(const ProtocolE type) const throw(WarException); const namestr_t& GetName() const throw(WarException); const namestr_t GetSiteName() const throw(WarException); const namestr_t GetAddress(const ProtocolE type) const throw(WarException); const namestr_t GetVirtualHostName(const ProtocolE type) const throw(WarException); const namestr_t GetDefaultPage(const ProtocolE type) const throw(WarException); const war_ccstr_t GetProtocolName(const ProtocolE type) const throw (WarException); void Validate(const ProtocolE type) const throw (WarException); std::string Explain() const; war_if_mime_types_ptr_t GetMime() throw (WarException); /** Enumerate the exiting auth modules for a site */ void EnumAuthModules(war_if_aut_module_list_t& authList, bool hideDisabled = false) throw (WarException); /** Enumerate all the users assigned to this site */ void EnumAllUsers(war_if_user_set_t& user_set, bool doIgnoreDisabledUsers = false) throw(WarException); /** Get IP Access list */ void GetIpAccessList(WarIpAccessList& returnList); const WarWin32Registry& GetRegKey() const { return mRegKey; } WarIfServer& GetServer() throw(WarException) { return (*mServerPtr); } protected: friend class WarIfServer; WarIfSite(war_if_server_ptr_t& serverPtr, const WarWin32Registry& regKey); ~WarIfSite();private: WarWin32Registry mRegKey; WarWin32Registry mRegSite[PROT_INVALID]; war_if_server_ptr_t mServerPtr; namestr_t mName;};/* INLINE METHODS *//* EXTERNAL REFERENCES */typedef WarPtrWrapper<WarIfSite> war_if_site_ptr_t;typedef std::list<war_if_site_ptr_t> war_if_site_list_t;#endif /* __cplusplus *//****************** END C++ spesific ******************/#endif /* WAR_IF_SITE_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -