summaryrefslogtreecommitdiff
path: root/src/trg-client.h
diff options
context:
space:
mode:
authorGravatar Alan F <ajf@eth0.org.uk>2014-02-09 11:49:18 +0000
committerGravatar Alan F <ajf@eth0.org.uk>2014-02-09 11:49:18 +0000
commit9c83dab456ebeeb2bebd9ceae7e0cc53133b1cd5 (patch)
tree5fa92fb41b8d534f0e52068f667cb86640ce3f5b /src/trg-client.h
parent37d2c80cfa0bdd8e4af4e2a246c5395bb6681074 (diff)
refactor the TrgClient, so the thread pool and CURL clients are available for making general HTTP GET, so don't send our username, password, and session.
Diffstat (limited to 'src/trg-client.h')
-rw-r--r--src/trg-client.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/trg-client.h b/src/trg-client.h
index a0bee33..21833fc 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;
@@ -123,6 +128,8 @@ trg_response *dispatch(TrgClient * client, JsonNode * req);
trg_response *dispatch_str(TrgClient * client, gchar * 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);