34#include <jsonrpccpp/client/connectors/httpclient.h>
35#include "globaloptions.h"
38#include "downloadoptions.h"
41#include "globaloptions.h"
42#include "aria2cppexception.h"
61 Aria2CPP(
const char* host,
const char* port, std::string secret =
"");
86 void update(stringList keys = stringList());
131 std::string
addTorrent(
const std::string torrentFile,
133 stringList URIs = stringList{},
148 std::string
addTorrent(
const std::string torrentFile,
149 stringList URIs = stringList{},
160 stringList
addMetalink(
const std::string metalinkFile,
int position = 0);
184 bool pause(
const std::string
gid)
const;
193 bool resume(
const std::string
gid)
const;
253 int changePosition(
const std::string
gid,
const int count, std::string how)
const;
261 bool remove(
const std::string
gid)
const;
280 std::string
name(
const size_t pos)
const;
287 std::string
gid(
const size_t pos)
const;
296 bool hasGid(
const std::string
gid)
const;
331 bool setGlobalOption(
const std::string option,
const std::string value);
359 std::vector<URI>
getUris(std::string
gid)
const;
374 std::vector<Download>
getDownloads(stringList keys = stringList());
390 stringList keys = stringList(),
391 bool getPeers =
true,
392 bool getServers =
true);
409 stringList keys = stringList(),
410 bool getPeers =
true,
411 bool getServers =
true);
425 Json::Value
tellStatus(std::string
gid, stringList values = stringList());
469 std::unique_ptr<HttpClient> m_httpclient;
470 std::shared_ptr<StubClient> m_client;
471 std::shared_ptr<Options> m_options;
472 std::vector<Download> m_downloads;
473 std::string m_secret =
"token:";
Definition: aria2cpp.h:46
Json::Value tellStatus(std::string gid, stringList values=stringList())
Definition: aria2cpp.cpp:452
Options getGlobalOption() const
Definition: aria2cpp.cpp:411
std::string addTorrent(const std::string torrentFile, DownloadOptions &options, stringList URIs=stringList{}, int position=0)
Definition: aria2cpp.cpp:122
Version getVersion() const
Definition: aria2cpp.cpp:490
bool purgeDownloadResult() const
Definition: aria2cpp.cpp:379
std::string name(const size_t pos) const
Definition: aria2cpp.cpp:352
bool remove(const std::string gid) const
Definition: aria2cpp.cpp:321
void update(stringList keys=stringList())
Definition: aria2cpp.cpp:81
int changePosition(const std::string gid, const int count, std::string how) const
Definition: aria2cpp.cpp:279
Json::Value getWaitingDownloads(stringList keys=stringList()) const
Definition: aria2cpp.cpp:201
std::vector< URI > getUris(std::string gid) const
Definition: aria2cpp.cpp:519
bool saveSession() const
Definition: aria2cpp.cpp:574
bool removeDownloadResult(const std::string gid) const
Definition: aria2cpp.cpp:393
bool resume(const std::string gid) const
Definition: aria2cpp.cpp:264
std::shared_ptr< Options > getOptions() const
Definition: aria2cpp.cpp:59
std::string getSessionID()
Definition: aria2cpp.cpp:507
void addJsonValueToDownloads(Json::Value downloads, bool getPeers=true, bool getServers=true)
Definition: aria2cpp.cpp:65
bool hasGid(const std::string gid) const
Definition: aria2cpp.cpp:368
stringList listMethods()
Definition: aria2cpp.cpp:436
Aria2CPP(const char *host, const char *port, std::string secret="")
Definition: aria2cpp.cpp:28
bool pauseAll() const
Definition: aria2cpp.cpp:291
Json::Value getActiveDownloads(stringList keys=stringList()) const
Definition: aria2cpp.cpp:234
GlobalStat getGlobalStat() const
Definition: aria2cpp.cpp:471
stringList addMetalink(const std::string metalinkFile, int position=0)
Definition: aria2cpp.cpp:186
bool resumeAll() const
Definition: aria2cpp.cpp:305
bool setGlobalOption(const std::string option, const std::string value)
Definition: aria2cpp.cpp:423
std::string addDownload(const std::string URI, int position=0)
Definition: aria2cpp.cpp:91
bool shutdown() const
Definition: aria2cpp.cpp:545
std::vector< Download > getDownloads(stringList keys=stringList())
Definition: aria2cpp.cpp:589
std::string gid(const size_t pos) const
Definition: aria2cpp.cpp:360
bool forceShutdown() const
Definition: aria2cpp.cpp:560
Json::Value getWaitingStopped(stringList keys=stringList()) const
Definition: aria2cpp.cpp:218
bool forceRemove(const std::string gid) const
Definition: aria2cpp.cpp:336
Download getDownload(const std::string gid, stringList keys=stringList(), bool getPeers=true, bool getServers=true)
Definition: aria2cpp.cpp:595
bool pause(const std::string gid) const
Definition: aria2cpp.cpp:249
Definition: downloadoptions.h:235
Definition: download.h:39
Definition: globaloptions.h:114
Definition: ariadefs.h:40
Definition: ariadefs.h:71
Definition: ariadefs.h:58