diff options
| author | Dan Winship <danw@src.gnome.org> | 2003-08-26 20:09:59 +0000 |
|---|---|---|
| committer | Dan Winship <danw@src.gnome.org> | 2003-08-26 20:09:59 +0000 |
| commit | 30cda756af1efcac7bfcf89ae02e7e43c018e63d (patch) | |
| tree | 6396cac095715659dd0b8a4131917a3ccff97862 /libsoup/soup-connection.h | |
| parent | 9c1ef03ebbe9f0d12e84034bb0986ef7fccd312e (diff) | |
| download | libsoup-30cda756af1efcac7bfcf89ae02e7e43c018e63d.tar.gz | |
Higher-than-soup-message-io-level functions to do client-side IO. (Code
* libsoup/soup-message-client-io.c (soup_message_write_request,
soup_message_read_response): Higher-than-soup-message-io-level
functions to do client-side IO. (Code that used to be in
soup-queue.c)
(get_request_header_cb): Fix a bug in the generation of the Host:
header; need to include the port number if it's not the default.
* libsoup/soup-message-io.c (soup_message_write,
soup_message_write_simple): Take separate user_datas for the get_*
callbacks and the done callbacks.
* libsoup/soup-queue.c: Update to use soup_message_write_request
and soup_message_read_response.
* libsoup/soup-connection.c (soup_connection_new): Change the
prototype to take a SoupUri and a callback.
* libsoup/soup-context.c (try_create_connection,
soup_context_connect_cb): Update for soup_connection_new change.
* libsoup/soup-server.c (read_done_cb, issue_bad_request): Update
for soup_message_write changes
* libsoup/soup-uri.c (soup_uri_uses_default_port): new utility
function
Diffstat (limited to 'libsoup/soup-connection.h')
| -rw-r--r-- | libsoup/soup-connection.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libsoup/soup-connection.h b/libsoup/soup-connection.h index 343f0905..723450fd 100644 --- a/libsoup/soup-connection.h +++ b/libsoup/soup-connection.h @@ -10,6 +10,7 @@ #include <glib-object.h> #include <libsoup/soup-socket.h> +#include <libsoup/soup-uri.h> #define SOUP_TYPE_CONNECTION (soup_connection_get_type ()) #define SOUP_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_CONNECTION, SoupConnection)) @@ -30,19 +31,29 @@ typedef struct { GObjectClass parent_class; /* signals */ + void (*connect_result) (SoupConnection *, SoupKnownErrorCode); void (*disconnected) (SoupConnection *); } SoupConnectionClass; GType soup_connection_get_type (void); -SoupConnection *soup_connection_new (SoupSocket *sock); +typedef void (*SoupConnectionCallback) (SoupConnection *sock, + SoupKnownErrorCode status, + gpointer data); + +SoupConnection *soup_connection_new (const SoupUri *uri, + SoupConnectionCallback, + gpointer data); + +gboolean soup_connection_is_proxy (SoupConnection *conn); + void soup_connection_disconnect (SoupConnection *conn); gboolean soup_connection_is_connected (SoupConnection *conn); SoupSocket *soup_connection_get_socket (SoupConnection *conn); -void soup_connection_set_in_use (SoupConnection *conn, +void soup_connection_set_in_use (SoupConnection *conn, gboolean in_use); gboolean soup_connection_is_in_use (SoupConnection *conn); time_t soup_connection_last_used (SoupConnection *conn); @@ -50,4 +61,4 @@ time_t soup_connection_last_used (SoupConnection *conn); gboolean soup_connection_is_new (SoupConnection *conn); void soup_connection_mark_old (SoupConnection *conn); -#endif /*SOUP_CONNECTION_H*/ +#endif /* SOUP_CONNECTION_H */ |
