summaryrefslogtreecommitdiff
path: root/src/includes
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-05-18 15:41:40 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-05-18 15:41:40 +0900
commita4b29ac2f7edfc77911cc92e08e345c1235cf6b9 (patch)
treee999ff32f663bea28c00e7125084b69712f40136 /src/includes
parentc688f51f2e8c436fec55fc1f06e2bbb52b6592f4 (diff)
Add getGlobalStat API
Diffstat (limited to 'src/includes')
-rw-r--r--src/includes/aria2/aria2.h36
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.