libdacav 0.9.0
/home/dacav/Projects/libdacav/libdacav/dacav/dacavcircbuf.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2009 2010 Giovanni Simoni
00003  *
00004  * This file is part of LibDacav.
00005  *
00006  * LibDacav is free software: you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation, either version 3 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * LibDacav is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with LibDacav.  If not, see <http://www.gnu.org/licenses/>.
00018  *
00019  */
00020 
00026 #ifndef __defined_dacav_dacavcircbuf_h
00027 #define __defined_dacav_dacavcircbuf_h
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00033 #include <dacav/dacav.h>
00034 #include <stdlib.h>
00035 
00038 
00040 typedef struct dcirc dcirc_t;
00041 
00047 typedef enum {
00048     DCIRC_SUCCESS = 0,  
00049     DCIRC_EMPTY = 1     
00050 } dcirc_result_t;
00051 
00063 dcirc_t *dcirc_new (size_t size, const dcprm_t * cprm);
00064 
00080 dcirc_result_t dcirc_get (dcirc_t * cb, void **item);
00081 
00091 void dcirc_put (dcirc_t *cb, const void * item);
00092 
00101 void dcirc_flush (dcirc_t *cb);
00102 
00109 void dcirc_free (dcirc_t *cb);
00110 
00113 #ifdef __cplusplus
00114 }
00115 #endif
00116 #endif // __defined_dacav_dacavcircbuf_h
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator