mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-14 04:57:21 +01:00
42 lines
775 B
C++
42 lines
775 B
C++
#ifndef PAGED_ARTICLE_H
|
|
#define PAGED_ARTICLE_H
|
|
|
|
#include <map>
|
|
#include "core/containers/vector.h"
|
|
#include "core/string.h"
|
|
|
|
#include "web/file_cache.h"
|
|
#include "web/http/web_node.h"
|
|
|
|
#include "web/http/request.h"
|
|
|
|
class PagedArticle : public WebNode {
|
|
RCPP_OBJECT(PagedArticle, WebNode);
|
|
|
|
public:
|
|
void handle_request_main(Request *request);
|
|
|
|
void load();
|
|
void load_folder(const String &folder, const String &path);
|
|
String get_index_page();
|
|
String get_summary();
|
|
|
|
virtual void generate_summary();
|
|
|
|
void _notification(const int what);
|
|
|
|
PagedArticle();
|
|
~PagedArticle();
|
|
|
|
String articles_folder;
|
|
bool serve_folder_relative;
|
|
String serve_folder;
|
|
|
|
protected:
|
|
String index_page;
|
|
String summary;
|
|
std::map<String, String *> pages;
|
|
FileCache *file_cache;
|
|
};
|
|
|
|
#endif |