1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-seekable-substream.h : stream */
7 * Bertrand Guiheneuf <bertrand@helixcode.com>
9 * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
28 #ifndef CAMEL_SEEKABLE_SUBSTREAM_H
29 #define CAMEL_SEEKABLE_SUBSTREAM_H 1
35 #endif /* __cplusplus }*/
38 #include "camel-types.h"
39 #include "camel-seekable-stream.h"
42 #define CAMEL_SEEKABLE_SUBSTREAM_TYPE (camel_seekable_substream_get_type ())
43 #define CAMEL_SEEKABLE_SUBSTREAM(obj) (GTK_CHECK_CAST((obj), CAMEL_SEEKABLE_SUBSTREAM_TYPE, CamelSeekableSubstream))
44 #define CAMEL_SEEKABLE_SUBSTREAM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_SEEKABLE_SUBSTREAM_TYPE, CamelSeekableSubstreamClass))
45 #define CAMEL_IS_SEEKABLE_SUBSTREAM(o) (GTK_CHECK_TYPE((o), CAMEL_SEEKABLE_SUBSTREAM_TYPE))
50 struct _CamelSeekableSubstream
52 CamelSeekableStream parent_object;
54 /* --**-- Private fields --**-- */
55 CamelSeekableStream *parent_stream; /* the stream this substream uses */
56 guint32 cur_pos; /* current postion in the stream */
57 guint32 inf_bound; /* first valid position */
58 gint64 sup_bound; /* first invalid position */
67 CamelSeekableStreamClass parent_class;
70 void (*init_with_seekable_stream_and_bounds) (CamelSeekableSubstream *seekable_substream,
71 CamelSeekableStream *parent_stream,
75 } CamelSeekableSubstreamClass;
79 /* Standard Gtk function */
80 GtkType camel_seekable_substream_get_type (void);
85 /* obtain a new seekable substream */
86 CamelSeekableSubstream *
87 camel_seekable_substream_new_with_seekable_stream_and_bounds (CamelSeekableStream *parent_stream,
93 #endif /* __cplusplus */
95 #endif /* CAMEL_SEEKABLE_SUBSTREAM_H */