[libsoup: 1/5] Add soup-socket-private.h



commit 24378ecafe7e62b1f45ebe38ae3aed73f1ac480e
Author: Dan Winship <danw gnome org>
Date:   Wed Mar 12 14:45:15 2014 -0400

    Add soup-socket-private.h
    
    SoupSocket-related stuff made up more than half of
    soup-misc-private.h. Split it out into its own header.

 libsoup/Makefile.am              |    1 +
 libsoup/soup-connection.c        |    2 +-
 libsoup/soup-message-client-io.c |    2 +-
 libsoup/soup-message-server-io.c |    1 +
 libsoup/soup-misc-private.h      |   33 ----------------------------
 libsoup/soup-socket-private.h    |   44 ++++++++++++++++++++++++++++++++++++++
 libsoup/soup-socket.c            |    2 +-
 7 files changed, 49 insertions(+), 36 deletions(-)
---
diff --git a/libsoup/Makefile.am b/libsoup/Makefile.am
index 60920bd..aa5e6eb 100644
--- a/libsoup/Makefile.am
+++ b/libsoup/Makefile.am
@@ -176,6 +176,7 @@ libsoup_2_4_la_SOURCES =            \
        soup-session-private.h          \
        soup-session-sync.c             \
        soup-socket.c                   \
+       soup-socket-private.h           \
        soup-status.c                   \
        soup-tld.c                      \
        soup-tld-private.h              \
diff --git a/libsoup/soup-connection.c b/libsoup/soup-connection.c
index e0dbd59..62ba2f5 100644
--- a/libsoup/soup-connection.c
+++ b/libsoup/soup-connection.c
@@ -12,7 +12,7 @@
 #include "soup-connection.h"
 #include "soup.h"
 #include "soup-message-queue.h"
-#include "soup-misc-private.h"
+#include "soup-socket-private.h"
 
 typedef struct {
        SoupSocket  *socket;
diff --git a/libsoup/soup-message-client-io.c b/libsoup/soup-message-client-io.c
index b145bba..f571ef7 100644
--- a/libsoup/soup-message-client-io.c
+++ b/libsoup/soup-message-client-io.c
@@ -17,7 +17,7 @@
 #include "soup-connection.h"
 #include "soup-message-private.h"
 #include "soup-message-queue.h"
-#include "soup-misc-private.h"
+#include "soup-socket-private.h"
 
 static guint
 parse_response_headers (SoupMessage *msg,
diff --git a/libsoup/soup-message-server-io.c b/libsoup/soup-message-server-io.c
index 2647b81..f70e9a9 100644
--- a/libsoup/soup-message-server-io.c
+++ b/libsoup/soup-message-server-io.c
@@ -16,6 +16,7 @@
 #include "soup.h"
 #include "soup-message-private.h"
 #include "soup-misc-private.h"
+#include "soup-socket-private.h"
 
 static guint
 parse_request_headers (SoupMessage *msg, char *headers, guint headers_len,
diff --git a/libsoup/soup-misc-private.h b/libsoup/soup-misc-private.h
index 50a3b98..94aa71d 100644
--- a/libsoup/soup-misc-private.h
+++ b/libsoup/soup-misc-private.h
@@ -7,7 +7,6 @@
 #ifndef SOUP_MISC_PRIVATE_H
 #define SOUP_MISC_PRIVATE_H 1
 
-#include "soup-socket.h"
 #include "soup-message-headers.h"
 
 char *soup_uri_decoded_copy (const char *str, int length, int *decoded_length);
@@ -16,38 +15,6 @@ char *soup_uri_to_string_internal (SoupURI *uri, gboolean just_path_and_query,
 gboolean soup_uri_is_http (SoupURI *uri, char **aliases);
 gboolean soup_uri_is_https (SoupURI *uri, char **aliases);
 
-gboolean soup_socket_connect_sync_internal   (SoupSocket          *sock,
-                                             GCancellable        *cancellable,
-                                             GError             **error);
-void     soup_socket_connect_async_internal  (SoupSocket          *sock,
-                                             GCancellable        *cancellable,
-                                             GAsyncReadyCallback  callback,
-                                             gpointer             user_data);
-gboolean soup_socket_connect_finish_internal (SoupSocket          *sock,
-                                             GAsyncResult        *result,
-                                             GError             **error);
-
-gboolean soup_socket_handshake_sync   (SoupSocket           *sock,
-                                      const char           *host,
-                                      GCancellable         *cancellable,
-                                      GError              **error);
-void     soup_socket_handshake_async  (SoupSocket           *sock,
-                                      const char           *host,
-                                      GCancellable         *cancellable,
-                                      GAsyncReadyCallback   callback,
-                                      gpointer              user_data);
-gboolean soup_socket_handshake_finish (SoupSocket           *sock,
-                                      GAsyncResult         *result,
-                                      GError              **error);
-
-GSocket   *soup_socket_get_gsocket    (SoupSocket *sock);
-GIOStream *soup_socket_get_connection (SoupSocket *sock);
-GIOStream *soup_socket_get_iostream   (SoupSocket *sock);
-
-#define SOUP_SOCKET_CLEAN_DISPOSE "clean-dispose"
-#define SOUP_SOCKET_PROXY_RESOLVER "proxy-resolver"
-SoupURI *soup_socket_get_http_proxy_uri (SoupSocket *sock);
-
 /* At some point it might be possible to mark additional methods
  * safe or idempotent...
  */
diff --git a/libsoup/soup-socket-private.h b/libsoup/soup-socket-private.h
new file mode 100644
index 0000000..2f3fbdc
--- /dev/null
+++ b/libsoup/soup-socket-private.h
@@ -0,0 +1,44 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright 2011-2014 Red Hat, Inc.
+ */
+
+#ifndef SOUP_SOCKET_PRIVATE_H
+#define SOUP_SOCKET_PRIVATE_H 1
+
+#include "soup-socket.h"
+
+#define SOUP_SOCKET_CLEAN_DISPOSE    "clean-dispose"
+#define SOUP_SOCKET_PROXY_RESOLVER   "proxy-resolver"
+
+gboolean   soup_socket_connect_sync_internal   (SoupSocket           *sock,
+                                               GCancellable         *cancellable,
+                                               GError              **error);
+void       soup_socket_connect_async_internal  (SoupSocket           *sock,
+                                               GCancellable         *cancellable,
+                                               GAsyncReadyCallback   callback,
+                                               gpointer              user_data);
+gboolean   soup_socket_connect_finish_internal (SoupSocket           *sock,
+                                               GAsyncResult         *result,
+                                               GError              **error);
+
+gboolean   soup_socket_handshake_sync          (SoupSocket           *sock,
+                                               const char           *host,
+                                               GCancellable         *cancellable,
+                                               GError              **error);
+void       soup_socket_handshake_async         (SoupSocket           *sock,
+                                               const char           *host,
+                                               GCancellable         *cancellable,
+                                               GAsyncReadyCallback   callback,
+                                               gpointer              user_data);
+gboolean   soup_socket_handshake_finish        (SoupSocket           *sock,
+                                               GAsyncResult         *result,
+                                               GError              **error);
+
+GSocket   *soup_socket_get_gsocket             (SoupSocket           *sock);
+GIOStream *soup_socket_get_connection          (SoupSocket           *sock);
+GIOStream *soup_socket_get_iostream            (SoupSocket           *sock);
+
+SoupURI   *soup_socket_get_http_proxy_uri      (SoupSocket           *sock);
+
+#endif /* SOUP_SOCKET_PRIVATE_H */
diff --git a/libsoup/soup-socket.c b/libsoup/soup-socket.c
index b9f1dfc..9b9b540 100644
--- a/libsoup/soup-socket.c
+++ b/libsoup/soup-socket.c
@@ -14,10 +14,10 @@
 #include <gio/gnetworking.h>
 
 #include "soup-socket.h"
+#include "soup-socket-private.h"
 #include "soup.h"
 #include "soup-filter-input-stream.h"
 #include "soup-io-stream.h"
-#include "soup-misc-private.h"
 
 /**
  * SECTION:soup-socket


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