Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / camel / camel-stream-vfs.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-stream-vfs.h :stream based on unix filesystem */
3
4 /*
5  * Author:
6  *  Srinivasa Ragavan <sragavan@novell.com>
7  *
8  * Copyright 2006 Novell, Inc. (www.novell.com)
9  *
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.
13  *
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.
18  *
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
22  * USA
23  */
24
25
26 #ifndef CAMEL_STREAM_VFS_H
27 #define CAMEL_STREAM_VFS_H 1
28
29 /* for open flags */
30 #include <sys/types.h>
31 #include <sys/stat.h>
32 #include <fcntl.h>
33 #include <libgnomevfs/gnome-vfs.h>
34
35 #include <camel/camel-seekable-stream.h>
36
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))
41
42 G_BEGIN_DECLS
43
44 typedef struct _CamelStreamVFS CamelStreamVFS;
45
46 struct _CamelStreamVFS {
47         CamelSeekableStream parent_object;
48
49         GnomeVFSHandle *handle;
50 };
51
52 typedef struct {
53         CamelSeekableStreamClass parent_class;
54
55 } CamelStreamVFSClass;
56
57 /* Standard Camel function */
58 CamelType camel_stream_vfs_get_type (void);
59
60 /* public methods */
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);
63
64 G_END_DECLS
65
66 #endif /* CAMEL_STREAM_VFS_H */