TheChess
|
00001 /* 00002 * thechess, chess game web application written in C++ and based on Wt 00003 * Copyright (C) 2010 Boris Nagaev 00004 * 00005 * thechess is licensed under the GNU GPL Version 2. 00006 * Other versions of the GPL do not apply. 00007 * See the LICENSE file for terms of use. 00008 */ 00009 00010 #ifndef THECHESS_SERVER_HPP_ 00011 #define THECHESS_SERVER_HPP_ 00012 00013 #include <Wt/WServer> 00014 #include <Wt/Dbo/FixedSqlConnectionPool> 00015 00016 #include "ThechessOptions.hpp" 00017 #include "ThechessSession.hpp" 00018 #include "ThechessNotifier.hpp" 00019 #include "TaskTracker.hpp" 00020 #include "widgets/PgnResource.hpp" 00021 00022 namespace dbo = Wt::Dbo; 00023 00024 namespace thechess { 00025 00026 class ThechessServer : public Wt::WServer { 00027 public: 00028 ThechessServer(int argc, char **argv); 00029 const ThechessOptions& options() const; 00030 dbo::FixedSqlConnectionPool& pool(); 00031 ThechessNotifier& notifier(); 00032 TaskTracker& tracker(); 00033 00034 private: 00035 ThechessOptions options_; 00036 dbo::FixedSqlConnectionPool pool_; 00037 ThechessNotifier notifier_; 00038 TaskTracker tracker_; 00039 widgets::PgnResource pgn_; 00040 }; 00041 00042 } 00043 00044 #endif 00045