X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2Fgdcmopenjpeg%2Flibopenjpeg%2Fcio.h;h=0f4048b74c090bbced8ab819237d1157dbd38356;hb=6278320cc85da00d2d56ffbf07806e84966892c3;hp=8bf1deeec8c054ee910bb5784e4abed78b033d8f;hpb=7452f3039ff4dd2574fcbf3343b530a2f20f9623;p=gdcm.git diff --git a/src/gdcmopenjpeg/libopenjpeg/cio.h b/src/gdcmopenjpeg/libopenjpeg/cio.h index 8bf1deee..0f4048b7 100644 --- a/src/gdcmopenjpeg/libopenjpeg/cio.h +++ b/src/gdcmopenjpeg/libopenjpeg/cio.h @@ -1,5 +1,9 @@ /* - * Copyright (c) 2001-2002, David Janssens + * Copyright (c) 2001-2003, David Janssens + * Copyright (c) 2002-2003, Yannick Verschueren + * Copyright (c) 2003-2005, Francois Devaux and Antonin Descampe + * Copyright (c) 2005, Hervé Drolon, FreeImage Team + * Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,82 +30,56 @@ #ifndef __CIO_H #define __CIO_H +/** +@file cio.h +@brief Implementation of a byte input-output process (CIO) -/* - * Number of bytes written. - * - * returns number of bytes written - */ -int cio_numbytes(); - -/* - * Get position in byte stream. - * - * return position in bytes - */ -int cio_tell(); - -/* - * Set position in byte stream. - * - * pos : position, in number of bytes, from the beginning of the stream - */ -void cio_seek(int pos); +The functions in CIO.C have for goal to realize a byte input / output process. +*/ -/* - * Number of bytes left before the end of the stream. - * - * Returns the number of bytes before the end of the stream - */ -int cio_numbytesleft(); +/** @defgroup CIO CIO - byte input-output stream */ +/*@{*/ -/* - * Get pointer to the current position in the stream. - * - * return : pointer to the position - */ -unsigned char *cio_getbp(); +/** @name Exported functions (see also openjpeg.h) */ +/*@{*/ +/* ----------------------------------------------------------------------- */ +/** +Number of bytes left before the end of the stream +@param cio CIO handle +@return Returns the number of bytes before the end of the stream +*/ +int cio_numbytesleft(opj_cio_t *cio); +/** +Get pointer to the current position in the stream +@param cio CIO handle +@return Returns a pointer to the current position +*/ +unsigned char *cio_getbp(opj_cio_t *cio); +/** +Write some bytes +@param cio CIO handle +@param v Value to write +@param n Number of bytes to write +@return Returns the number of bytes written or 0 if an error occured +*/ +unsigned int cio_write(opj_cio_t *cio, unsigned int v, int n); +/** +Read some bytes +@param cio CIO handle +@param n Number of bytes to read +@return Returns the value of the n bytes read +*/ +unsigned int cio_read(opj_cio_t *cio, int n); +/** +Skip some bytes +@param cio CIO handle +@param n Number of bytes to skip +*/ +void cio_skip(opj_cio_t *cio, int n); +/* ----------------------------------------------------------------------- */ +/*@}*/ -/* - * Initialize byte IO - * - * bp : destination/source stream - * len : length of the stream - */ -void cio_init(unsigned char *bp, int len); +/*@}*/ -/* - * Write some bytes. - * - * v : value to write - * n : number of bytes to write - */ -void cio_write(unsigned int v, int n); - -/* - * Read some bytes. - * - * n : number of bytes to read - * - * return : value of the n bytes read - */ -unsigned int cio_read(int n); - -/* - * Skip some bytes. - * - * n : number of bytes to skip - */ -void cio_skip(int n); - -/* - * Read n bytes, copy to buffer - */ -void cio_read_to_buf(unsigned char* src_buf, int n);/* Glenn Pearson adds */ - -/* - * Write n bytes, copy from buffer - */ -void cio_write_from_buf(unsigned char* dest_buf, int n);/* Glenn Pearson adds */ +#endif /* __CIO_H */ -#endif