From 9c83dab456ebeeb2bebd9ceae7e0cc53133b1cd5 Mon Sep 17 00:00:00 2001 From: Alan F Date: Sun, 9 Feb 2014 11:49:18 +0000 Subject: 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. --- src/trg-client.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/trg-client.h') 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); -- cgit v1.2.3