2018-11-03 17:12:20 +01:00
|
|
|
#ifndef LINKCREATOR_H
|
|
|
|
#define LINKCREATOR_H
|
|
|
|
#include "config.h"
|
|
|
|
#include "varreplacer.h"
|
|
|
|
class UrlProvider
|
|
|
|
{
|
|
|
|
private:
|
2019-09-29 17:12:36 +02:00
|
|
|
const ConfigUrls *config;
|
2018-11-03 17:12:20 +01:00
|
|
|
|
|
|
|
std::string replaceOnlyPage(std::string templatepart, std::string page);
|
|
|
|
|
|
|
|
public:
|
2019-09-29 17:12:36 +02:00
|
|
|
UrlProvider(const ConfigUrls &config)
|
2018-11-03 17:12:20 +01:00
|
|
|
{
|
|
|
|
this->config = &config;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string index();
|
|
|
|
|
|
|
|
std::string recent();
|
|
|
|
|
|
|
|
std::string recentSorted(unsigned int limit, unsigned int offset, unsigned int sort);
|
|
|
|
|
|
|
|
std::string allPages();
|
2022-04-03 11:13:01 +02:00
|
|
|
std::string allPages(std::string rendertype);
|
|
|
|
|
2018-11-03 17:12:20 +01:00
|
|
|
std::string allCats();
|
|
|
|
|
|
|
|
std::string page(std::string pagename);
|
|
|
|
|
2022-03-29 22:37:20 +02:00
|
|
|
std::string pageByTitle(std::string title);
|
|
|
|
|
2018-11-03 17:12:20 +01:00
|
|
|
std::string linksHere(std::string pagename);
|
|
|
|
|
|
|
|
std::string pageHistory(std::string pagename);
|
|
|
|
|
|
|
|
std::string pageHistorySort(std::string pagename, unsigned int limit, unsigned int offset, unsigned int sort);
|
|
|
|
|
|
|
|
std::string pageRevision(std::string pagename, unsigned int revision);
|
|
|
|
|
|
|
|
std::string editPage(std::string pagename);
|
|
|
|
|
|
|
|
std::string pageSettings(std::string pagename);
|
|
|
|
|
|
|
|
std::string pageDelete(std::string pagename);
|
|
|
|
|
2021-03-26 22:45:09 +01:00
|
|
|
std::string userSettings();
|
2018-11-03 17:12:20 +01:00
|
|
|
|
|
|
|
std::string refreshSession();
|
|
|
|
|
|
|
|
std::string category(std::string catname);
|
2022-04-03 11:13:01 +02:00
|
|
|
std::string category(std::string catname, std::string rendertype);
|
|
|
|
|
2018-11-03 17:12:20 +01:00
|
|
|
std::string login(std::string page);
|
2022-03-27 19:51:53 +02:00
|
|
|
|
|
|
|
std::string rootUrl();
|
|
|
|
|
|
|
|
std::string atomFeed(std::string filter);
|
|
|
|
|
|
|
|
std::string combine(std::initializer_list<std::string> urls);
|
2018-11-03 17:12:20 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LINKCREATOR_H
|