diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-05-18 15:41:40 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-05-18 15:41:40 +0900 |
| commit | a4b29ac2f7edfc77911cc92e08e345c1235cf6b9 (patch) | |
| tree | e999ff32f663bea28c00e7125084b69712f40136 /src/includes | |
| parent | c688f51f2e8c436fec55fc1f06e2bbb52b6592f4 (diff) | |
Add getGlobalStat API
Diffstat (limited to 'src/includes')
| -rw-r--r-- | src/includes/aria2/aria2.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/includes/aria2/aria2.h b/src/includes/aria2/aria2.h index fe4fb1b4..9aa76735 100644 --- a/src/includes/aria2/aria2.h +++ b/src/includes/aria2/aria2.h @@ -486,6 +486,42 @@ KeyVals getGlobalOptions(Session* session); int changeGlobalOption(Session* session, const KeyVals& options); /** + * @struct + * + * Global statistics of current aria2 session. + */ +struct GlobalStat { + /** + * Overall download speed (byte/sec). + */ + int downloadSpeed; + /** + * Overall upload speed(byte/sec). + */ + int uploadSpeed; + /** + * The number of active downloads. + */ + int numActive; + /** + * The number of waiting downloads. + */ + int numWaiting; + /** + * The number of stopped downloads. + */ + int numStopped; +}; + +/** + * @function + * + * Returns global statistics such as overall download and upload + * speed. + */ +GlobalStat getGlobalStat(Session* session); + +/** * @enum * * Constants how to re-position a download. |
