summaryrefslogtreecommitdiff
path: root/src/upload.h
diff options
context:
space:
mode:
authorGravatar Alan F <ajf@eth0.org.uk>2014-03-10 09:10:24 +0000
committerGravatar Alan F <ajf@eth0.org.uk>2014-03-10 09:10:24 +0000
commit1a5447c0138fd25e3f6d78f78593f5b70be5614a (patch)
tree9468304a4688a63788363bcf2457b1767aa513a9 /src/upload.h
parentdd0c7d8317dd199b6dd9d612ebb863c4da6cf242 (diff)
parent118b702bec50d9872699357a379413f69e9b176e (diff)
Merge branch 'rss-viewer'. This is the biggest feature I've attempted to add for quite a long time. Quite a lot of refactoring of the HTTP client and threadpool has been done (to make it not send session tokens etc), uploads (was too much code duplication), and the add dialog was done to implement this. Don't expect this to be some fully automatable RSS client, use something like flexget for that, this is just a simple view on RSS feeds. It uses the rss-glib library, which you will probably need to install yourself to optionally use this feature. There are probably bugs still, so report them.
Diffstat (limited to 'src/upload.h')
-rw-r--r--src/upload.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/upload.h b/src/upload.h
new file mode 100644
index 0000000..5dc17e2
--- /dev/null
+++ b/src/upload.h
@@ -0,0 +1,30 @@
+#ifndef UPLOAD_H_
+#define UPLOAD_H_
+
+#include <glib.h>
+
+#include "trg-client.h"
+#include "trg-main-window.h"
+
+typedef struct {
+ GSList *list; // list of filenames
+ trg_response *upload_response; // OR: a HTTP response containing a torrent
+ TrgClient *client;
+ gpointer cb_data;
+ TrgMainWindow *main_window; // a parent window to attach any error dialogs to
+ guint flags;
+ gchar *dir;
+ gint priority;
+ gint* file_priorities;
+ gint* file_wanted;
+ guint n_files;
+ gboolean extra_args;
+ guint progress_index;
+ GSourceFunc callback;
+ gchar *uid;
+} trg_upload;
+
+void trg_upload_free(trg_upload *upload);
+void trg_do_upload(trg_upload *upload);
+
+#endif