summaryrefslogtreecommitdiff
path: root/src/trg-client.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/trg-client.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/trg-client.h')
-rw-r--r--src/trg-client.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/trg-client.h b/src/trg-client.h
index a0bee33..ce98a4e 100644
--- a/src/trg-client.h
+++ b/src/trg-client.h
@@ -57,6 +57,9 @@
#define FAIL_RESPONSE_UNSUCCESSFUL -3
#define DISPATCH_POOL_SIZE 3
+#define HTTP_CLASS_TRANSMISSION 0
+#define HTTP_CLASS_PUBLIC 1
+
typedef struct {
int status;
int size;
@@ -69,6 +72,7 @@ typedef struct {
gint connid;
JsonNode *node;
gchar *str;
+ gchar *url;
GSourceFunc callback;
gpointer cb_data;
} trg_request;
@@ -109,6 +113,7 @@ typedef struct {
* We lock updating (and checking for updates) with priv->configMutex
*/
int serial;
+ guint client_class;
CURL *curl;
} trg_tls;
@@ -121,8 +126,11 @@ int trg_http_perform(TrgClient * client, gchar * reqstr,
/* stuff that used to be in dispatch.c */
trg_response *dispatch(TrgClient * client, JsonNode * req);
trg_response *dispatch_str(TrgClient * client, gchar * req);
+trg_response *dispatch_public_http(TrgClient *tc, trg_request *req);
gboolean dispatch_async(TrgClient * client, JsonNode * req,
GSourceFunc callback, gpointer data);
+gboolean async_http_request(TrgClient *tc, gchar *url, GSourceFunc callback, gpointer data);
+
/* end dispatch.c*/
GType trg_client_get_type(void);