2018-03-29 14:15:52 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "dokuwiki.h"
|
|
|
|
|
|
|
|
#include <xmlrpc-c/client.hpp>
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <list>
|
|
|
|
|
|
|
|
class DokuWiki::impl
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
std::string m_url;
|
|
|
|
xmlrpc_c::clientXmlTransport_curl m_clientTransport;
|
|
|
|
|
|
|
|
public:
|
|
|
|
impl(const std::string &url, const std::string &username, const std::string &password);
|
|
|
|
|
|
|
|
void login(const std::string &username, const std::string &password);
|
|
|
|
std::string getVersion();
|
|
|
|
std::string getTime();
|
|
|
|
std::string getPage(const std::string &pageName);
|
|
|
|
std::string getWikiTitle();
|
|
|
|
|
|
|
|
DokuWiki::PageInfo getPageInfo(const std::string &pageName);
|
2018-03-29 18:30:30 +00:00
|
|
|
|
|
|
|
bool pageExists(const std::string &pageName);
|
|
|
|
void putPage(const std::string &pageName, const std::string &content);
|
|
|
|
void addPage(const std::string &pageName, const std::string &content);
|
|
|
|
|
2018-03-29 14:15:52 +00:00
|
|
|
template <typename ReturnType>
|
|
|
|
ReturnType executeCommand(const std::string &command,
|
2018-03-29 18:30:30 +00:00
|
|
|
const std::list<std::string> ¶ms = {},
|
|
|
|
const std::map<std::string, xmlrpc_c::value> &attributes = {});
|
2018-03-29 14:15:52 +00:00
|
|
|
};
|
|
|
|
|