Git init
[profile/ivi/libsoup2.4.git] / libsoup / soup-directory-input-stream.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2010 Red Hat, Inc.
4  * Copyright (C) 2010 Igalia, S.L.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public License
17  * along with this library; see the file COPYING.LIB.  If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21
22 #ifndef SOUP_DIRECTORY_INPUT_STREAM_H
23 #define SOUP_DIRECTORY_INPUT_STREAM_H 1
24
25 #include <gio/gio.h>
26 #include <libsoup/soup-types.h>
27 #include <libsoup/soup-message-body.h>
28
29 G_BEGIN_DECLS
30
31 #define SOUP_TYPE_DIRECTORY_INPUT_STREAM            (soup_directory_input_stream_get_type ())
32 #define SOUP_DIRECTORY_INPUT_STREAM(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_DIRECTORY_INPUT_STREAM, SoupDirectoryInputStream))
33 #define SOUP_DIRECTORY_INPUT_STREAM_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_DIRECTORY_INPUT_STREAM, SoupDirectoryInputStreamClass))
34 #define SOUP_IS_DIRECTORY_INPUT_STREAM(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_DIRECTORY_INPUT_STREAM))
35 #define SOUP_IS_DIRECTORY_INPUT_STREAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_DIRECTORY_INPUT_STREAM))
36 #define SOUP_DIRECTORY_INPUT_STREAM_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_DIRECTORY_INPUT_STREAM, SoupDirectoryInputStreamClass))
37
38 typedef struct _SoupDirectoryInputStream SoupDirectoryInputStream;
39 typedef struct _SoupDirectoryInputStreamClass SoupDirectoryInputStreamClass;
40
41 struct _SoupDirectoryInputStream {
42         GInputStream parent;
43
44         GFileEnumerator *enumerator;
45         char *uri;
46         SoupBuffer *buffer;
47         gboolean done;
48 };
49
50 struct _SoupDirectoryInputStreamClass {
51         GInputStreamClass parent_class;
52 };
53
54 GType         soup_directory_input_stream_get_type (void);
55
56 GInputStream *soup_directory_input_stream_new      (GFileEnumerator *enumerator,
57                                                     SoupURI         *uri);
58
59
60 G_END_DECLS
61
62 #endif /* SOUP_DIRECTORY_INPUT_STREAM_H */