Older/WebApplication/WebApplication.h
luocai a9640bbda5
All checks were successful
Deploy Docker Images / Build dockerfile and Server deploy (push) Successful in 17s
Deploy / Build (push) Successful in 3m11s
remove blog example source.
2024-11-11 19:21:48 +08:00

41 lines
851 B
C++

#ifndef __WEBAPPLICATION_H__
#define __WEBAPPLICATION_H__
#include <memory>
#include "Singleton.h"
namespace Wt {
class WServer;
namespace Dbo {
class SqlConnectionPool;
}
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();
private:
std::unique_ptr<Wt::WServer> m_server;
std::unique_ptr<Wt::Dbo::SqlConnectionPool> m_blogSqlConnectionPool;
std::unique_ptr<Wt::Auth::AuthService> m_authService;
std::unique_ptr<Wt::Auth::PasswordService> m_passwordService;
};
#endif // __WEBAPPLICATION_H__