|
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 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 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 | |
|---|
| 28 | namespace db { class msg; class group; } |
|---|
| 29 | |
|---|
| 30 | namespace 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 |
|---|