b500944298a1627eaa9e5ead51de7839d2481481
[platform/upstream/evolution-data-server.git] / camel / camel-seekable-substream.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-seekable-substream.h: stream that piggybacks on another stream */
3
4 /*
5  * Author:
6  *  Bertrand Guiheneuf <bertrand@helixcode.com>
7  *
8  * Copyright 1999, 2000 Ximian, Inc. (www.ximian.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 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 General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22  * USA
23  */
24
25
26 #ifndef CAMEL_SEEKABLE_SUBSTREAM_H
27 #define CAMEL_SEEKABLE_SUBSTREAM_H 1
28
29
30 #ifdef __cplusplus
31 extern "C" {
32 #pragma }
33 #endif /* __cplusplus }*/
34
35 #include <camel/camel-seekable-stream.h>
36
37 #define CAMEL_SEEKABLE_SUBSTREAM_TYPE       (camel_seekable_substream_get_type ())
38 #define CAMEL_SEEKABLE_SUBSTREAM(obj)       (CAMEL_CHECK_CAST((obj), CAMEL_SEEKABLE_SUBSTREAM_TYPE, CamelSeekableSubstream))
39 #define CAMEL_SEEKABLE_SUBSTREAM_CLASS(k)   (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SEEKABLE_SUBSTREAM_TYPE, CamelSeekableSubstreamClass))
40 #define CAMEL_IS_SEEKABLE_SUBSTREAM(o)      (CAMEL_CHECK_TYPE((o), CAMEL_SEEKABLE_SUBSTREAM_TYPE))
41
42 struct _CamelSeekableSubstream
43 {
44         CamelSeekableStream parent_object;
45
46         /*  --**-- Private fields --**--  */
47         CamelSeekableStream *parent_stream;
48 };
49
50 typedef struct {
51         CamelSeekableStreamClass parent_class;
52
53 } CamelSeekableSubstreamClass;
54
55 /* Standard Camel function */
56 CamelType camel_seekable_substream_get_type (void);
57
58 /* public methods */
59
60 /* obtain a new seekable substream */
61 CamelStream *
62 camel_seekable_substream_new(CamelSeekableStream *parent_stream, off_t start, off_t end);
63
64 #ifdef __cplusplus
65 }
66 #endif /* __cplusplus */
67
68 #endif /* CAMEL_SEEKABLE_SUBSTREAM_H */