root/http/compose.hh

Revision 1a970cd0640f976f152341597a5249ec22acbba7, 2.5 KB (checked in by Antti-Juhani Kaijanaho <antti-juhani@…>, 21 months ago)

[msg::msg] Separate out db::msg and let msg::entity handle the rest

Signed-off-by: Antti-Juhani Kaijanaho <antti-juhani@…>

  • Property mode set to 100644
Line 
1/*  This file is part of Alue, the multiprotocol Internet discussion daemon
2
3    Copyright © 2009, 2010 Antti-Juhani Kaijanaho
4
5    Alue is free software: you can redistribute it and/or modify it
6    under the terms of the GNU General Public License as published by
7    the Free Software Foundation, either version 3 of the License, or
8    (at your option) any later version.
9
10    Alue is distributed in the hope that it will be useful, but
11    WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    General Public License for more details.
14
15    You should have received a copy of the GNU General Public License
16    along with Alue.  If not, see <http://www.gnu.org/licenses/>.
17
18 */
19
20#ifndef GUARD_HTTP_COMPOSE_HH
21#define GUARD_HTTP_COMPOSE_HH
22
23#include "templated_resource.hh"
24
25#include "../server.hh"
26#include "../tlate/tlate.hh"
27
28namespace db { class msg; class group; }
29
30namespace http
31{
32        class compose : public templated_resource
33        {
34                void reload_action(boost::shared_ptr<request> req,
35                                   tlate::data_model::ptr,
36                                   std::string error_message = "");
37
38                void post_action(boost::shared_ptr<request> req,
39                                 tlate::data_model::ptr);
40
41                void respond_compose(boost::shared_ptr<request>,
42                                     tlate::data_model::ptr,
43                                     std::list<std::string>&,
44                                     std::list<std::string>&);
45
46                void new_thread(boost::shared_ptr<request>,
47                                tlate::data_model::ptr,
48                                boost::shared_ptr<db::group>);
49
50                void followup(boost::shared_ptr<request>,
51                              tlate::data_model::ptr,
52                              boost::shared_ptr<db::msg>);       
53        public:
54                compose(server::conn_cb cb)
55                        : templated_resource(cb, "compose.html")
56                        {}
57
58                static std::string get_posting_uri
59                (boost::shared_ptr<const db::group>);
60                static std::string get_followup_uri
61                (boost::shared_ptr<const db::msg>);
62        protected:
63                void set_attributes(boost::shared_ptr<request>,
64                                    tlate::data_model::ptr);
65        };
66}
67
68#endif /* GUARD_HTTP_COMPOSE_HH */
Note: See TracBrowser for help on using the browser.