root/http/article_entry.hh

Revision 99057e4d73dbb905f06f5ccc4ea49708b8aaa0a8, 1.8 KB (checked in by Antti-Juhani Kaijanaho <antti-juhani@…>, 20 months ago)

Rework entity handling

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 © 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_ARTICLE_ENTRY_HH
21#define GUARD_HTTP_ARTICLE_ENTRY_HH
22
23#include "feed_resource.hh"
24
25#include "../db/threaded.hh"
26
27namespace http
28{
29        class article_entry : public feed_resource::entry {
30                db::thread_node::const_ptr tn;
31                db::user::const_ptr u;
32        public:
33                typedef boost::shared_ptr<article_entry> ptr;
34                typedef boost::shared_ptr<const article_entry> const_ptr;
35
36                article_entry(db::thread_node::const_ptr tn,
37                              db::user::const_ptr u)
38                        : tn(tn), u(u) {}
39
40                tlate::value::const_ptr get_metadata() const;
41                std::string get_id_uri() const;
42                std::string get_title() const;
43                std::string get_author() const;
44                boost::shared_ptr<const msg::entity> get_content() const;
45                std::string get_link() const;
46                boost::posix_time::ptime get_date() const;
47                boost::posix_time::ptime get_updated() const;
48        };
49}
50
51#endif /* GUARD_HTTP_ARTICLE_ENTRY_HH */
Note: See TracBrowser for help on using the browser.