Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

buffer.h

00001 /*****************************************************************************
00002  * buffer.h: MMS access plug-in
00003  *****************************************************************************
00004  * Copyright (C) 2001, 2002 the VideoLAN team
00005  * $Id: buffer.h 11664 2005-07-09 06:17:09Z courmisch $
00006  *
00007  * Authors: Laurent Aimar <[email protected]>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00022  *****************************************************************************/
00023 
00024 typedef struct
00025 {
00026     uint8_t *p_data;    // pointer on data
00027     int     i_data;     // number of bytes set in p_data
00028 
00029     // private
00030     int    i_size;     // size of p_data memory allocated
00031 } var_buffer_t;
00032 
00033 
00034 /*****************************************************************************
00035  * Macro/Function to create/manipulate buffer 
00036  *****************************************************************************/
00037 int  var_buffer_initwrite( var_buffer_t *p_buf, int i_default_size );
00038 int  var_buffer_reinitwrite( var_buffer_t *p_buf, int i_default_size );
00039 void var_buffer_add8 ( var_buffer_t *p_buf, uint8_t  i_byte );
00040 void var_buffer_add16( var_buffer_t *p_buf, uint16_t i_word );
00041 void var_buffer_add32( var_buffer_t *p_buf, uint32_t i_word );
00042 void var_buffer_add64( var_buffer_t *p_buf, uint64_t i_word );
00043 void var_buffer_addmemory( var_buffer_t *p_buf, void *p_mem, int i_mem );
00044 void var_buffer_addUTF16( var_buffer_t *p_buf, char *p_str );
00045 void var_buffer_free( var_buffer_t *p_buf );
00046 
00047 
00048 void      var_buffer_initread( var_buffer_t *p_buf, void *p_data, int i_data );
00049 uint8_t   var_buffer_get8 ( var_buffer_t *p_buf );
00050 uint16_t  var_buffer_get16( var_buffer_t *p_buf );
00051 uint32_t  var_buffer_get32( var_buffer_t *p_buf );
00052 uint64_t  var_buffer_get64( var_buffer_t *p_buf );
00053 int       var_buffer_getmemory ( var_buffer_t *p_buf, void *p_mem, int64_t i_mem );
00054 int       var_buffer_readempty( var_buffer_t *p_buf );
00055 void      var_buffer_getguid( var_buffer_t *p_buf, guid_t *p_guid );
00056 

Generated on Tue Dec 20 10:14:26 2005 for vlc-0.8.4a by  doxygen 1.4.2