1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2/*
3 * Copyright (C) 2012 Collabora Ltd.
4 */
5
6#ifndef __SOUP_MULTIPART_INPUT_STREAM_H__
7#define __SOUP_MULTIPART_INPUT_STREAM_H__ 1
8
9#include <libsoup/soup-types.h>
10#include <libsoup/soup-message-headers.h>
11
12G_BEGIN_DECLS
13
14#define SOUP_TYPE_MULTIPART_INPUT_STREAM (soup_multipart_input_stream_get_type ())
15#define SOUP_MULTIPART_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SOUP_TYPE_MULTIPART_INPUT_STREAM, SoupMultipartInputStream))
16#define SOUP_MULTIPART_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SOUP_TYPE_MULTIPART_INPUT_STREAM, SoupMultipartInputStreamClass))
17#define SOUP_IS_MULTIPART_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SOUP_TYPE_MULTIPART_INPUT_STREAM))
18#define SOUP_IS_MULTIPART_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SOUP_TYPE_MULTIPART_INPUT_STREAM))
19#define SOUP_MULTIPART_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), SOUP_TYPE_MULTIPART_INPUT_STREAM, SoupMultipartInputStreamClass))
20
21typedef struct _SoupMultipartInputStream SoupMultipartInputStream;
22typedef struct _SoupMultipartInputStreamPrivate SoupMultipartInputStreamPrivate;
23typedef struct _SoupMultipartInputStreamClass SoupMultipartInputStreamClass;
24
25struct _SoupMultipartInputStream {
26 GFilterInputStream parent_instance;
27
28 /*< private >*/
29 SoupMultipartInputStreamPrivate *priv;
30};
31
32struct _SoupMultipartInputStreamClass {
33 GFilterInputStreamClass parent_class;
34};
35
36SOUP_AVAILABLE_IN_2_40
37GType soup_multipart_input_stream_get_type (void) G_GNUC_CONST;
38
39SOUP_AVAILABLE_IN_2_40
40SoupMultipartInputStream *soup_multipart_input_stream_new (SoupMessage *msg,
41 GInputStream *base_stream);
42
43SOUP_AVAILABLE_IN_2_40
44GInputStream *soup_multipart_input_stream_next_part (SoupMultipartInputStream *multipart,
45 GCancellable *cancellable,
46 GError **error);
47
48SOUP_AVAILABLE_IN_2_40
49void soup_multipart_input_stream_next_part_async (SoupMultipartInputStream *multipart,
50 int io_priority,
51 GCancellable *cancellable,
52 GAsyncReadyCallback callback,
53 gpointer data);
54
55SOUP_AVAILABLE_IN_2_40
56GInputStream *soup_multipart_input_stream_next_part_finish (SoupMultipartInputStream *multipart,
57 GAsyncResult *result,
58 GError **error);
59
60SOUP_AVAILABLE_IN_2_40
61SoupMessageHeaders *soup_multipart_input_stream_get_headers (SoupMultipartInputStream *multipart);
62
63
64G_END_DECLS
65
66#endif /* __SOUP_MULTIPART_INPUT_STREAM_H__ */
67