[librest] Move RestProxyCallPrivate to rest-proxy-call.c



commit 73984ab8bad002080885df1a12efd97b35ba7810
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Tue Sep 2 16:27:50 2014 +0200

    Move RestProxyCallPrivate to rest-proxy-call.c
    
    It was in a separate rest-proxy-call.h header which allowed derived
    classes to access RestProxyCall private data without any control.
    Better to go through explicit methods to do that.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=735919

 rest/oauth2-proxy-call.c       |    1 -
 rest/rest-proxy-call-private.h |   26 --------------------------
 rest/rest-proxy-call.c         |   37 ++++++++++++++++++++++++++++++++-----
 3 files changed, 32 insertions(+), 32 deletions(-)
---
diff --git a/rest/oauth2-proxy-call.c b/rest/oauth2-proxy-call.c
index f0d441c..2d71b45 100644
--- a/rest/oauth2-proxy-call.c
+++ b/rest/oauth2-proxy-call.c
@@ -26,7 +26,6 @@
 #include <rest/rest-proxy-call.h>
 #include "oauth2-proxy-call.h"
 #include "oauth2-proxy-private.h"
-#include "rest-proxy-call-private.h"
 #include "sha1.h"
 
 G_DEFINE_TYPE (OAuth2ProxyCall, oauth2_proxy_call, REST_TYPE_PROXY_CALL)
diff --git a/rest/rest-proxy-call-private.h b/rest/rest-proxy-call-private.h
index 573794e..f2d102b 100644
--- a/rest/rest-proxy-call-private.h
+++ b/rest/rest-proxy-call-private.h
@@ -29,32 +29,6 @@
 
 G_BEGIN_DECLS
 
-typedef struct _RestProxyCallAsyncClosure RestProxyCallAsyncClosure;
-typedef struct _RestProxyCallContinuousClosure RestProxyCallContinuousClosure;
-typedef struct _RestProxyCallUploadClosure RestProxyCallUploadClosure;
-
-struct _RestProxyCallPrivate {
-  gchar *method;
-  gchar *function;
-  GHashTable *headers;
-  RestParams *params;
-  /* The real URL we're about to invoke */
-  gchar *url;
-
-  GHashTable *response_headers;
-  goffset length;
-  gchar *payload;
-  guint status_code;
-  gchar *status_message;
-
-  GCancellable *cancellable;
-  gulong cancel_sig;
-
-  RestProxy *proxy;
-
-  RestProxyCallAsyncClosure *cur_call_closure;
-};
-
 const char *rest_proxy_call_get_url (RestProxyCall *call);
 
 G_END_DECLS
diff --git a/rest/rest-proxy-call.c b/rest/rest-proxy-call.c
index 3339d47..f5dc6bc 100644
--- a/rest/rest-proxy-call.c
+++ b/rest/rest-proxy-call.c
@@ -28,10 +28,6 @@
 #include "rest-private.h"
 #include "rest-proxy-call-private.h"
 
-G_DEFINE_TYPE (RestProxyCall, rest_proxy_call, G_TYPE_OBJECT)
-
-#define GET_PRIVATE(o) \
-  (G_TYPE_INSTANCE_GET_PRIVATE ((o), REST_TYPE_PROXY_CALL, RestProxyCallPrivate))
 
 struct _RestProxyCallAsyncClosure {
   RestProxyCall *call;
@@ -40,7 +36,7 @@ struct _RestProxyCallAsyncClosure {
   gpointer userdata;
   SoupMessage *message;
 };
-
+typedef struct _RestProxyCallAsyncClosure RestProxyCallAsyncClosure;
 
 struct _RestProxyCallContinuousClosure {
   RestProxyCall *call;
@@ -49,6 +45,7 @@ struct _RestProxyCallContinuousClosure {
   gpointer userdata;
   SoupMessage *message;
 };
+typedef struct _RestProxyCallContinuousClosure RestProxyCallContinuousClosure;
 
 struct _RestProxyCallUploadClosure {
   RestProxyCall *call;
@@ -58,6 +55,36 @@ struct _RestProxyCallUploadClosure {
   SoupMessage *message;
   gsize uploaded;
 };
+typedef struct _RestProxyCallUploadClosure RestProxyCallUploadClosure;
+
+
+G_DEFINE_TYPE (RestProxyCall, rest_proxy_call, G_TYPE_OBJECT)
+
+#define GET_PRIVATE(o) \
+  (G_TYPE_INSTANCE_GET_PRIVATE ((o), REST_TYPE_PROXY_CALL, RestProxyCallPrivate))
+
+struct _RestProxyCallPrivate {
+  gchar *method;
+  gchar *function;
+  GHashTable *headers;
+  RestParams *params;
+  /* The real URL we're about to invoke */
+  gchar *url;
+
+  GHashTable *response_headers;
+  goffset length;
+  gchar *payload;
+  guint status_code;
+  gchar *status_message;
+
+  GCancellable *cancellable;
+  gulong cancel_sig;
+
+  RestProxy *proxy;
+
+  RestProxyCallAsyncClosure *cur_call_closure;
+};
+
 
 enum
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]