summaryrefslogtreecommitdiff
path: root/src/protocol-constants.h
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-04 22:24:11 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-04 22:24:11 +0000
commite941b2e01998f86cd60fac3c83091d473b4bfecd (patch)
tree0f833a787611ebbef73aaf2df201cb86bfb49ad6 /src/protocol-constants.h
parentdca8f6d8b87d6f92ff21344ec80b64c7a3b7de7f (diff)
issue 70 - new statuses in RPC version >= 14. still need to add stateselector entries for queued items.
Diffstat (limited to 'src/protocol-constants.h')
-rw-r--r--src/protocol-constants.h29
1 files changed, 22 insertions, 7 deletions
diff --git a/src/protocol-constants.h b/src/protocol-constants.h
index d0d8f49..e28cf05 100644
--- a/src/protocol-constants.h
+++ b/src/protocol-constants.h
@@ -118,13 +118,28 @@
#define PARAM_PAUSED "paused"
#define PARAM_TAG "tag"
-enum {
- STATUS_WAITING_TO_CHECK = 1,
- STATUS_CHECKING = 2,
- STATUS_DOWNLOADING = 4,
- STATUS_SEEDING = 8,
- STATUS_PAUSED = 16
-};
+/* The rpc-version >= that the status field of torrent-get changed */
+#define NEW_STATUS_RPC_VERSION 14
+
+typedef enum {
+ OLD_STATUS_WAITING_TO_CHECK = 1,
+ OLD_STATUS_CHECKING = 2,
+ OLD_STATUS_DOWNLOADING = 4,
+ OLD_STATUS_SEEDING = 8,
+ OLD_STATUS_PAUSED = 16
+} trg_old_status;
+
+typedef enum
+{
+ TR_STATUS_STOPPED = 0, /* Torrent is stopped */
+ TR_STATUS_CHECK_WAIT = 1, /* Queued to check files */
+ TR_STATUS_CHECK = 2, /* Checking files */
+ TR_STATUS_DOWNLOAD_WAIT = 3, /* Queued to download */
+ TR_STATUS_DOWNLOAD = 4, /* Downloading */
+ TR_STATUS_SEED_WAIT = 5, /* Queued to seed */
+ TR_STATUS_SEED = 6 /* Seeding */
+}
+tr_torrent_activity;
enum {
TR_PRI_LOW = -1,