Older/WebApplication/WebApplication.h
amass 059d6d3879
Some checks failed
Deploy / Build (push) Failing after 3m33s
use wt dbo.
2024-11-26 22:58:54 +08:00

40 lines
920 B
C++

#ifndef __WEBAPPLICATION_H__
#define __WEBAPPLICATION_H__
#include "Singleton.h"
#include <memory>
namespace Wt {
class WServer;
class WApplication;
class WEnvironment;
namespace Auth {
class AuthService;
class PasswordService;
} // namespace Auth
}; // namespace Wt
class WebApplication {
friend class Amass::Singleton<WebApplication>;
public:
~WebApplication();
void initializeAuthenticationService();
const Wt::Auth::AuthService &authService();
const Wt::Auth::PasswordService &passwordService();
protected:
WebApplication(uint16_t port, const std::string &documentRoot);
std::unique_ptr<Wt::WApplication> createApplication(const Wt::WEnvironment &env, bool embedded);
private:
std::unique_ptr<Wt::WServer> m_server;
std::unique_ptr<Wt::Auth::AuthService> m_authService;
std::unique_ptr<Wt::Auth::PasswordService> m_passwordService;
};
#endif // __WEBAPPLICATION_H__