-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblog.h
More file actions
71 lines (55 loc) · 1.13 KB
/
blog.h
File metadata and controls
71 lines (55 loc) · 1.13 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
/*
blog entry class and helper code
*/
#ifndef BLOG_H
#define BLOG_H
#include "page.h"
#include <cstdio>
class blog_post_t{
private:
char title[64];
char author[64];
char summary[128];
int month, day, year;
char html[64];
char sb[64];
char *contents;
public:
blog_post_t();
~blog_post_t();
//deep copy constrcutor
blog_post_t(const blog_post_t &to_copy);
/* the setters */
void setTitle(const char *t);
void setAuthor(const char *a);
void setSummary(const char *s);
void setDate(int m, int d, int y);
void setHTML(const char *h);
void setSB(const char *s);
void addChar(char c, int i);
char *getTitle();
int getM();
int getD();
int getY();
char *getSummary();
char *getAuthor();
char *getSB();
char *getHTML();
char getChar(int i);
char *getContents();
};
struct blog_t{
page_t *web_pages;
blog_post_t *blogs;
int page_count;
int blog_count;
//todo change to size_t
char main_css[64]; //main css for all websites
char blog_footer[256];
char blog_title[128];
char blog_slogan[128];
char blog_domain[64];
FILE *manifest_file;
FILE *index_file, *blog_index_file;
};
#endif