Begin HandlerFeedGenerator: Generates Atom feeds for categories (or all pages)
This commit is contained in:
21
handlers/handlerfeedgenerator.h
Normal file
21
handlers/handlerfeedgenerator.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef HANDLERFEEDGENERATOR_H
|
||||
#define HANDLERFEEDGENERATOR_H
|
||||
#include "handler.h"
|
||||
#include "../page.h"
|
||||
#include "../revision.h"
|
||||
class HandlerFeedGenerator : public Handler
|
||||
{
|
||||
typedef std::pair<Page, Revision> EntryRevisionPair;
|
||||
|
||||
protected:
|
||||
std::vector<EntryRevisionPair> fetchEntries(std::vector<std::string> categories);
|
||||
Response generateAtom(const std::vector<EntryRevisionPair> &entries, std::string atomtitle);
|
||||
Response generateRss(const std::vector<EntryRevisionPair> &entries);
|
||||
|
||||
public:
|
||||
using Handler::Handler;
|
||||
Response handleRequest(const Request &r) override;
|
||||
bool canAccess(const Permissions &perms) override;
|
||||
};
|
||||
|
||||
#endif // HANDLERFEEDGENERATOR_H
|
Referens i nytt ärende
Block a user