From 3a693ef526575633cc350a69aa1a5d1f08e64c46 Mon Sep 17 00:00:00 2001 From: Øyvind Harboe Date: Tue, 28 Sep 2010 15:37:56 +0200 Subject: fileio: refactor struct fileio to be an opaque structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Øyvind Harboe --- src/helper/fileio.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/helper/fileio.h') diff --git a/src/helper/fileio.h b/src/helper/fileio.h index 597bafc0..40c4ef0e 100644 --- a/src/helper/fileio.h +++ b/src/helper/fileio.h @@ -46,12 +46,10 @@ enum fileio_access FILEIO_APPENDREAD, /* open for writing, position at end, allow reading */ }; -struct fileio { - const char *url; - ssize_t size; - enum fileio_type type; - enum fileio_access access; - FILE *file; +struct fileio +{ + /* The structure is opaque */ + struct fileio_internal *fp; }; int fileio_open(struct fileio *fileio, @@ -68,6 +66,7 @@ int fileio_write(struct fileio *fileio, int fileio_read_u32(struct fileio *fileio, uint32_t *data); int fileio_write_u32(struct fileio *fileio, uint32_t data); +int fileio_size(struct fileio *fileio); #define ERROR_FILEIO_LOCATION_UNKNOWN (-1200) #define ERROR_FILEIO_NOT_FOUND (-1201) -- cgit v1.2.3