From 42eddac0e9f0216175fef223fd9b1023ed502a6e Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Tue, 12 Apr 2011 10:54:29 +0000 Subject: some quite significant changes to only receive/update recently-active torrents, if enabled. also use a hash table and tree row references for lookup. hopefully performance will be much better for people with large number of torrents. --- src/trg-client.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/trg-client.h') diff --git a/src/trg-client.h b/src/trg-client.h index 51d851d..480d828 100644 --- a/src/trg-client.h +++ b/src/trg-client.h @@ -20,6 +20,13 @@ #ifndef TRG_CLIENT_H_ #define TRG_CLIENT_H_ +#define TRANSMISSION_MIN_SUPPORTED 2.0 + +#define TORRENT_GET_MODE_FIRST 0 +#define TORRENT_GET_MODE_ACTIVE 1 +#define TORRENT_GET_MODE_INTERACTION 2 +#define TORRENT_GET_MODE_UPDATE 3 + #define TRG_GCONF_SCHEMA_ERROR -1 #define TRG_NO_HOSTNAME_SET -2 @@ -30,6 +37,7 @@ typedef struct { char *session_id; + gboolean activeOnlyUpdate; gint failCount; gint interval; gint64 updateSerial; @@ -40,7 +48,7 @@ typedef struct { char *username; char *password; char *proxy; - JsonArray *torrents; + GHashTable *torrentTable; GConfClient *gconf; GMutex *updateMutex; } trg_client; -- cgit v1.2.3