summaryrefslogtreecommitdiff
path: root/libsoup/soup-io-stream.h
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2012-04-20 11:29:14 -0400
committerDan Winship <danw@gnome.org>2012-04-28 13:14:15 -0400
commitbac8c22fd28479a3be149c0d742b8c7417381091 (patch)
tree64a8b40cdfb659b1339f0209ef0b1e19e861142d /libsoup/soup-io-stream.h
parentb5fd0fd154f6e91265e2525bb48c1fff1c59e139 (diff)
downloadlibsoup-bac8c22fd28479a3be149c0d742b8c7417381091.tar.gz
Move SoupSocket stuff out of soup-message-io.c
Add a new SoupIOStream, which wraps the SoupFilterInputStream and GOutputStream that SoupSocket exposes. Pass that to soup-message-io rather than the SoupSocket, and update various other things for this.
Diffstat (limited to 'libsoup/soup-io-stream.h')
-rw-r--r--libsoup/soup-io-stream.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/libsoup/soup-io-stream.h b/libsoup/soup-io-stream.h
new file mode 100644
index 00000000..92c24c3b
--- /dev/null
+++ b/libsoup/soup-io-stream.h
@@ -0,0 +1,40 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright 2012 Red Hat, Inc.
+ */
+
+#ifndef __SOUP_IO_STREAM_H__
+#define __SOUP_IO_STREAM_H__ 1
+
+#include <libsoup/soup-types.h>
+
+G_BEGIN_DECLS
+
+#define SOUP_TYPE_IO_STREAM (soup_io_stream_get_type ())
+#define SOUP_IO_STREAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_IO_STREAM, SoupIOStream))
+#define SOUP_IO_STREAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_IO_STREAM, SoupIOStreamClass))
+#define SOUP_IS_IO_STREAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_IO_STREAM))
+#define SOUP_IS_IO_STREAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_IO_STREAM))
+#define SOUP_IO_STREAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_IO_STREAM, SoupIOStreamClass))
+
+typedef struct _SoupIOStreamPrivate SoupIOStreamPrivate;
+
+typedef struct {
+ GIOStream parent;
+
+ SoupIOStreamPrivate *priv;
+} SoupIOStream;
+
+typedef struct {
+ GIOStreamClass parent_class;
+
+} SoupIOStreamClass;
+
+GType soup_io_stream_get_type (void);
+
+GIOStream *soup_io_stream_new (GIOStream *base_iostream,
+ gboolean close_on_dispose);
+
+G_END_DECLS
+
+#endif /* __SOUP_IO_STREAM_H__ */