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 | |
12 | G_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 | |
21 | typedef struct _SoupMultipartInputStream SoupMultipartInputStream; |
22 | typedef struct _SoupMultipartInputStreamPrivate SoupMultipartInputStreamPrivate; |
23 | typedef struct _SoupMultipartInputStreamClass SoupMultipartInputStreamClass; |
24 | |
25 | struct _SoupMultipartInputStream { |
26 | GFilterInputStream parent_instance; |
27 | |
28 | /*< private >*/ |
29 | SoupMultipartInputStreamPrivate *priv; |
30 | }; |
31 | |
32 | struct _SoupMultipartInputStreamClass { |
33 | GFilterInputStreamClass parent_class; |
34 | }; |
35 | |
36 | SOUP_AVAILABLE_IN_2_40 |
37 | GType soup_multipart_input_stream_get_type (void) G_GNUC_CONST; |
38 | |
39 | SOUP_AVAILABLE_IN_2_40 |
40 | SoupMultipartInputStream *soup_multipart_input_stream_new (SoupMessage *msg, |
41 | GInputStream *base_stream); |
42 | |
43 | SOUP_AVAILABLE_IN_2_40 |
44 | GInputStream *soup_multipart_input_stream_next_part (SoupMultipartInputStream *multipart, |
45 | GCancellable *cancellable, |
46 | GError **error); |
47 | |
48 | SOUP_AVAILABLE_IN_2_40 |
49 | void soup_multipart_input_stream_next_part_async (SoupMultipartInputStream *multipart, |
50 | int io_priority, |
51 | GCancellable *cancellable, |
52 | GAsyncReadyCallback callback, |
53 | gpointer data); |
54 | |
55 | SOUP_AVAILABLE_IN_2_40 |
56 | GInputStream *soup_multipart_input_stream_next_part_finish (SoupMultipartInputStream *multipart, |
57 | GAsyncResult *result, |
58 | GError **error); |
59 | |
60 | SOUP_AVAILABLE_IN_2_40 |
61 | SoupMessageHeaders * (SoupMultipartInputStream *multipart); |
62 | |
63 | |
64 | G_END_DECLS |
65 | |
66 | #endif /* __SOUP_MULTIPART_INPUT_STREAM_H__ */ |
67 | |