1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-stream-vfs.h :stream based on unix filesystem */
6 * Srinivasa Ragavan <sragavan@novell.com>
8 * Copyright 2006 Novell, Inc. (www.novell.com)
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of version 2 of the GNU Lesser General Public
12 * License as published by the Free Software Foundation.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
26 #ifndef CAMEL_STREAM_VFS_H
27 #define CAMEL_STREAM_VFS_H 1
30 #include <sys/types.h>
33 #include <libgnomevfs/gnome-vfs.h>
35 #include <camel/camel-seekable-stream.h>
37 #define CAMEL_STREAM_VFS_TYPE (camel_stream_vfs_get_type ())
38 #define CAMEL_STREAM_VFS(obj) (CAMEL_CHECK_CAST((obj), CAMEL_STREAM_VFS_TYPE, CamelStreamVFS))
39 #define CAMEL_STREAM_VFS_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_STREAM_VFS_TYPE, CamelStreamVFSClass))
40 #define CAMEL_IS_STREAM_VFS(o) (CAMEL_CHECK_TYPE((o), CAMEL_STREAM_VFS_TYPE))
44 typedef struct _CamelStreamVFS CamelStreamVFS;
46 struct _CamelStreamVFS {
47 CamelSeekableStream parent_object;
49 GnomeVFSHandle *handle;
53 CamelSeekableStreamClass parent_class;
55 } CamelStreamVFSClass;
57 /* Standard Camel function */
58 CamelType camel_stream_vfs_get_type (void);
61 CamelStream * camel_stream_vfs_new_with_uri (const char *uri, int flags, mode_t mode);
62 CamelStream * camel_stream_vfs_new_with_handle (GnomeVFSHandle *handle);
66 #endif /* CAMEL_STREAM_VFS_H */