diff options
Diffstat (limited to 'camel/camel-stream-fs.h')
-rw-r--r-- | camel/camel-stream-fs.h | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/camel/camel-stream-fs.h b/camel/camel-stream-fs.h index 2e7dfd946f..79c7874c74 100644 --- a/camel/camel-stream-fs.h +++ b/camel/camel-stream-fs.h @@ -47,6 +47,7 @@ typedef enum { CAMEL_STREAM_FS_READ = 1, CAMEL_STREAM_FS_WRITE = 2 + } CamelStreamFsMode; @@ -55,8 +56,9 @@ typedef struct CamelSeekableStream parent_object; - gchar *name; /* name of the underlying file */ - gint fd; /* file descriptor on the underlying file */ + gchar *name; /* name of the underlying file */ + gboolean eof; /* are we at the end of the file ? */ + gint fd; /* file descriptor on the underlying file */ guint32 inf_bound; /* first valid position */ gint32 sup_bound; /* last valid position, -1 means, no sup bound */ @@ -68,11 +70,20 @@ typedef struct { CamelSeekableStreamClass parent_class; /* Virtual methods */ - void (*init_with_fd) (CamelStreamFs *stream_fs, int fd); - void (*init_with_fd_and_bounds) (CamelStreamFs *stream_fs, int fd, guint32 inf_bound, gint32 sup_bound); - void (*init_with_name) (CamelStreamFs *stream_fs, const gchar *name, CamelStreamFsMode mode); - void (*init_with_name_and_bounds) (CamelStreamFs *stream_fs, const gchar *name, - CamelStreamFsMode mode, guint32 inf_bound, gint32 sup_bound); + void (*init_with_fd) (CamelStreamFs *stream_fs, + int fd); + void (*init_with_fd_and_bounds) (CamelStreamFs *stream_fs, + int fd, guint32 inf_bound, + gint32 sup_bound); + + void (*init_with_name) (CamelStreamFs *stream_fs, + const gchar *name, + CamelStreamFsMode mode); + void (*init_with_name_and_bounds) (CamelStreamFs *stream_fs, + const gchar *name, + CamelStreamFsMode mode, + guint32 inf_bound, + gint32 sup_bound); } CamelStreamFsClass; @@ -83,12 +94,17 @@ GtkType camel_stream_fs_get_type (void); /* public methods */ -CamelStream *camel_stream_fs_new_with_name (const gchar *name, CamelStreamFsMode mode); -CamelStream *camel_stream_fs_new_with_name_and_bounds (const gchar *name, CamelStreamFsMode mode, - guint32 inf_bound, gint32 sup_bound); -CamelStream *camel_stream_fs_new_with_fd (int fd); -CamelStream *camel_stream_fs_new_with_fd_and_bounds (int fd, - guint32 inf_bound, gint32 sup_bound); +CamelStream * camel_stream_fs_new_with_name (const gchar *name, + CamelStreamFsMode mode); +CamelStream * camel_stream_fs_new_with_name_and_bounds (const gchar *name, + CamelStreamFsMode mode, + guint32 inf_bound, + gint32 sup_bound); + +CamelStream * camel_stream_fs_new_with_fd (int fd); +CamelStream * camel_stream_fs_new_with_fd_and_bounds (int fd, + guint32 inf_bound, + gint32 sup_bound); #ifdef __cplusplus } |