-
Notifications
You must be signed in to change notification settings - Fork 6
/
post.hpp
59 lines (47 loc) · 1.19 KB
/
post.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
Copyright © 2015 Felipe Tavares <[email protected]>
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See the LICENSE file for more details.
*/
#ifndef BAKE_POST_H
#define BAKE_POST_H
#include <string>
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif // ifdef HAVE_SYS_TIME_H
#include "bakefile.hpp"
using namespace std;
namespace bake {
class Post {
time_t edit_time;
bool use_hashed_ids;
bool multiple_files;
public:
string title;
string content;
string time;
string id;
string link;
string author;
Post(time_t,
string,
string,
string,
string,
bool,
Configuration&);
private:
void set_time(time_t &, string);
void set_title(string&);
void set_link(string, string);
void set_id(string&);
string get_file(string);
public:
/* For facebook descriptions, ignore tags and lines starting with '|' */
static string simplify(string);
/* Html-Escape */
static string escape(string);
};
}
#endif /* BAKE_POST_H */