From 15bb26cac82a27aeca37c377679c2821d9ff8a8f Mon Sep 17 00:00:00 2001
From: Tatsuhiro Tsujikawa
Date: Sun, 11 Apr 2010 14:46:07 +0000
Subject: [PATCH] 2010-04-11 Tatsuhiro Tsujikawa
Added aria2.pauseAll, aria2.forcePauseAll and aria2.unpauseAll
XML-RPC method.
* doc/aria2c.1.txt
* src/XmlRpcMethodFactory.cc
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
* test/XmlRpcMethodTest.cc
---
ChangeLog | 10 +++++
doc/aria2c.1 | 28 ++++++++++---
doc/aria2c.1.html | 30 ++++++++++----
doc/aria2c.1.txt | 30 ++++++++++++--
src/XmlRpcMethodFactory.cc | 6 +++
src/XmlRpcMethodImpl.cc | 85 ++++++++++++++++++++++++++++++++------
src/XmlRpcMethodImpl.h | 33 +++++++++++++++
test/XmlRpcMethodTest.cc | 61 +++++++++++++++++++++++++++
8 files changed, 252 insertions(+), 31 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c0242e6a..65f705e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-04-11 Tatsuhiro Tsujikawa
+
+ Added aria2.pauseAll, aria2.forcePauseAll and aria2.unpauseAll
+ XML-RPC method.
+ * doc/aria2c.1.txt
+ * src/XmlRpcMethodFactory.cc
+ * src/XmlRpcMethodImpl.cc
+ * src/XmlRpcMethodImpl.h
+ * test/XmlRpcMethodTest.cc
+
2010-04-11 Tatsuhiro Tsujikawa
Added aria2.forcePause XML-RPC command.
diff --git a/doc/aria2c.1 b/doc/aria2c.1
index f7f5dbaf..f91fd6b5 100644
--- a/doc/aria2c.1
+++ b/doc/aria2c.1
@@ -2,12 +2,12 @@
.\" Title: aria2c
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2
-.\" Date: 04/09/2010
+.\" Date: 04/11/2010
.\" Manual: Aria2 Manual
.\" Source: Aria2 1.9.1a
.\" Language: English
.\"
-.TH "ARIA2C" "1" "04/09/2010" "Aria2 1\&.9\&.1a" "Aria2 Manual"
+.TH "ARIA2C" "1" "04/11/2010" "Aria2 1\&.9\&.1a" "Aria2 Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -2631,12 +2631,28 @@ This method removes the download denoted by \fIgid\fR\&. This method behaves jus
.sp
\fBaria2\&.pause\fR \fIgid\fR
.sp
-This method pauses the download denoted by \fIgid\fR\&. \fIgid\fR is of type string\&. The status of paused download becomes "paused" and the download is placed on the first position of waiting queue\&. As long as the status is "paused", the download is not started\&. To change status to "waiting", use \fBaria2\&.unpause\fR method\&. This method returns GID of paused download\&.
+This method pauses the download denoted by \fIgid\fR\&. \fIgid\fR is of type string\&. The status of paused download becomes "paused"\&. If the download is active, the download is placed on the first position of waiting queue\&. As long as the status is "paused", the download is not started\&. To change status to "waiting", use \fBaria2\&.unpause\fR method\&. This method returns GID of paused download\&.
+.sp
+\fBaria2\&.pauseAll\fR
+.sp
+This method is equal to calling \fBaria2\&.pause\fR for every active/waiting download\&. This methods returns "OK" for success\&.
+.sp
+\fBaria2\&.forcePause\fR \fIpid\fR
+.sp
+This method pauses the download denoted by \fIgid\fR\&. This method behaves just like \fBaria2\&.pause\fR except that this method pauses download without any action which takes time such as contacting BitTorrent tracker\&.
+.sp
+\fBaria2\&.forcePauseAll\fR
+.sp
+This method is equal to calling \fBaria2\&.forcePause\fR for every active/waiting download\&. This methods returns "OK" for success\&.
.sp
\fBaria2\&.unpause\fR \fIgid\fR
.sp
This method changes the status of the download denoted by \fIgid\fR from "paused" to "waiting"\&. This makes the download eligible to restart\&. \fIgid\fR is of type string\&. This method returns GID of unpaused download\&.
.sp
+\fBaria2\&.unpauseAll\fR
+.sp
+This method is equal to calling \fBaria2\&.unpause\fR for every active/waiting download\&. This methods returns "OK" for success\&.
+.sp
\fBaria2\&.tellStatus\fR \fIgid\fR
.sp
This method returns download progress of the download denoted by \fIgid\fR\&. \fIgid\fR is of type string\&. The response is of type struct and it contains following keys\&. The value type is string\&.
@@ -3167,7 +3183,7 @@ aria2 uses 5 connections to download 1 file by default\&. \-s1 limits the number
.ps -1
.br
.sp
-To pause a download, press Ctrl\-C\&. You can resume the transfer by running aria2c with the same argument in the same directory\&. You can change URIs as long as they are pointing to the same file\&.
+To stop a download, press Ctrl\-C\&. You can resume the transfer by running aria2c with the same argument in the same directory\&. You can change URIs as long as they are pointing to the same file\&.
.sp .5v
.RE
.RE
@@ -3383,7 +3399,7 @@ aria2c \-p \-\-lowest\-speed\-limit=4000 file\&.metalink
.ps -1
.br
.sp
-To pause a download, press Ctrl\-C\&. You can resume the transfer by running aria2c with the same argument in the same directory\&.
+To stop a download, press Ctrl\-C\&. You can resume the transfer by running aria2c with the same argument in the same directory\&.
.sp .5v
.RE
.RE
@@ -3527,7 +3543,7 @@ aria2c \-\-max\-upload\-limit=40K file\&.torrent
.ps -1
.br
.sp
-To pause a download, press Ctrl\-C\&. You can resume the transfer by running aria2c with the same argument in the same directory\&.
+To stop a download, press Ctrl\-C\&. You can resume the transfer by running aria2c with the same argument in the same directory\&.
.sp .5v
.RE
.RE
diff --git a/doc/aria2c.1.html b/doc/aria2c.1.html
index 7e297cd8..793002b2 100644
--- a/doc/aria2c.1.html
+++ b/doc/aria2c.1.html
@@ -3102,16 +3102,30 @@ download without any action which takes time such as contacting
BitTorrent tracker.
This method pauses the download denoted by gid. gid is of type
-string. The status of paused download becomes "paused" and the
-download is placed on the first position of waiting queue. As long as
-the status is "paused", the download is not started. To change status
-to "waiting", use aria2.unpause method.
+string. The status of paused download becomes "paused". If the
+download is active, the download is placed on the first position of
+waiting queue. As long as the status is "paused", the download is not
+started. To change status to "waiting", use aria2.unpause method.
This method returns GID of paused download.
+
+This method is equal to calling aria2.pause for every active/waiting
+download. This methods returns "OK" for success.
+
+This method pauses the download denoted by gid. This method
+behaves just like aria2.pause except that this method pauses
+download without any action which takes time such as contacting
+BitTorrent tracker.
+
+This method is equal to calling aria2.forcePause for every
+active/waiting download. This methods returns "OK" for success.
This method changes the status of the download denoted by gid from
"paused" to "waiting". This makes the download eligible to restart.
gid is of type string. This method returns GID of unpaused
download.
+
+This method is equal to calling aria2.unpause for every active/waiting
+download. This methods returns "OK" for success.
This method returns download progress of the download denoted by
gid. gid is of type string. The response is of type struct and it
@@ -3794,7 +3808,7 @@ pprint(r)
Note
|
-
To pause a download, press Ctrl-C. You can resume the transfer by running aria2c with the same argument in the same directory. You can change URIs as long as they are pointing to the same file. |
+
To stop a download, press Ctrl-C. You can resume the transfer by running aria2c with the same argument in the same directory. You can change URIs as long as they are pointing to the same file. |
Download a file from 2 different HTTP servers
@@ -3870,7 +3884,7 @@ variables. See ENVIRONMENT section.
Note
|
-To pause a download, press Ctrl-C.
+ | To stop a download, press Ctrl-C.
You can resume the transfer by running aria2c with the same argument in the same
directory. |
@@ -3922,7 +3936,7 @@ directory.
Note
|
-To pause a download, press Ctrl-C. You can resume the transfer by running aria2c with the same argument in the same directory. |
+To stop a download, press Ctrl-C. You can resume the transfer by running aria2c with the same argument in the same directory. |
Download using BitTorrent Magnet URI
@@ -4174,7 +4188,7 @@ files in the program, then also delete it here.