diff options
author | Dan Winship <danw@gnome.org> | 2013-12-09 12:16:05 +0100 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-12-08 10:28:42 +0100 |
commit | e18257576ee5d2dbb74d85e06e9252bff5ac5f9b (patch) | |
tree | 807e8854c236be38a790f1c9050af8633b09f8e7 /libsoup/soup-session-host.h | |
parent | eaa46acc264de3a63b2d529b56aeffc5fac042cb (diff) | |
download | libsoup-wip/http2-a.tar.gz |
SoupSessionHost: split from SoupSessionwip/http2-a
HTTP/2.0 will need to do connection management differently than
HTTP/1.1, so let's split SoupSessionHost out of soup-session.c in
preparation for making it more complicated.
Diffstat (limited to 'libsoup/soup-session-host.h')
-rw-r--r-- | libsoup/soup-session-host.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/libsoup/soup-session-host.h b/libsoup/soup-session-host.h new file mode 100644 index 00000000..72f0339a --- /dev/null +++ b/libsoup/soup-session-host.h @@ -0,0 +1,59 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Copyright 2013 Red Hat, Inc. + */ + +#ifndef SOUP_SESSION_HOST_H +#define SOUP_SESSION_HOST_H 1 + +#include "soup-types.h" + +G_BEGIN_DECLS + +#define SOUP_TYPE_SESSION_HOST (soup_session_host_get_type ()) +#define SOUP_SESSION_HOST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_SESSION_HOST, SoupSessionHost)) +#define SOUP_SESSION_HOST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_SESSION_HOST, SoupSessionHostClass)) +#define SOUP_IS_SESSION_HOST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_SESSION_HOST)) +#define SOUP_IS_SESSION_HOST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_SESSION_HOST)) +#define SOUP_SESSION_HOST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_SESSION_HOST, SoupSessionHostClass)) + +typedef struct { + GObject parent; + +} SoupSessionHost; + +typedef struct { + GObjectClass parent_class; + +} SoupSessionHostClass; + +GType soup_session_host_get_type (void); + +SoupSessionHost *soup_session_host_new (SoupSession *session, + SoupURI *uri); + +SoupURI *soup_session_host_get_uri (SoupSessionHost *host); +SoupAddress *soup_session_host_get_address (SoupSessionHost *host); + +void soup_session_host_add_message (SoupSessionHost *host, + SoupMessage *msg); +void soup_session_host_remove_message (SoupSessionHost *host, + SoupMessage *msg); + +SoupConnection *soup_session_host_get_connection (SoupSessionHost *host, + gboolean need_new_connection, + gboolean at_max_conns, + gboolean *try_cleanup); +int soup_session_host_get_num_connections (SoupSessionHost *host); +GSList *soup_session_host_get_connections (SoupSessionHost *host); + +gboolean soup_session_host_cleanup_connections (SoupSessionHost *host, + gboolean cleanup_idle); + +gboolean soup_session_host_get_ssl_fallback (SoupSessionHost *host); +void soup_session_host_set_ssl_fallback (SoupSessionHost *host, + gboolean ssl_fallback); + +G_END_DECLS + +#endif /* SOUP_SESSION_HOST_H */ |