TheChess

widgets/PgnResource.hpp

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_WIDGETS_PGN_RESOURCE_HPP_
00011 #define THECHESS_WIDGETS_PGN_RESOURCE_HPP_
00012 
00013 #include <Wt/WResource>
00014 
00015 #include "model/Game.hpp"
00016 #include "ThechessSession.hpp"
00017 
00018 namespace thechess {
00019 class ThechessServer;
00020 namespace widgets {
00021 
00022 class PgnResource : public Wt::WResource {
00023 public:
00024     PgnResource(model::GamePtr game, ThechessServer& server, Wt::WObject* p=0);
00025     PgnResource(ThechessServer& server, Wt::WObject* p=0);
00026     ~PgnResource();
00027 
00028     virtual void handleRequest(const Wt::Http::Request& request,
00029                                Wt::Http::Response& response);
00030 
00031 private:
00032     model::GamePtr game_;
00033     ThechessSession session_;
00034 };
00035 
00036 }
00037 }
00038 
00039 #endif
00040 
 All Classes Functions Enumerations Enumerator