syncio_memory.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  begin       : Tue Apr 27 2010
00003  copyright   : (C) 2010 by Martin Preuss
00004  email       : martin@libchipcard.de
00005 
00006  ***************************************************************************
00007  *                                                                         *
00008  *   This library is free software; you can redistribute it and/or         *
00009  *   modify it under the terms of the GNU Lesser General Public            *
00010  *   License as published by the Free Software Foundation; either          *
00011  *   version 2.1 of the License, or (at your option) any later version.    *
00012  *                                                                         *
00013  *   This library is distributed in the hope that it will be useful,       *
00014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00016  *   Lesser General Public License for more details.                       *
00017  *                                                                         *
00018  *   You should have received a copy of the GNU Lesser General Public      *
00019  *   License along with this library; if not, write to the Free Software   *
00020  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00021  *   MA  02111-1307  USA                                                   *
00022  *                                                                         *
00023  ***************************************************************************/
00024 
00025 
00026 #ifndef GWENHYWFAR_SYNCIO_MEMORY_H
00027 #define GWENHYWFAR_SYNCIO_MEMORY_H
00028 
00029 #include <gwenhywfar/syncio.h>
00030 #include <gwenhywfar/buffer.h>
00031 
00032 
00033 #define GWEN_SYNCIO_MEMORY_TYPE "memory"
00034 
00035 
00036 
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif
00040 
00041 
00042 
00043 GWENHYWFAR_API
00044 GWEN_SYNCIO *GWEN_SyncIo_Memory_new(GWEN_BUFFER *buffer, int take);
00045 
00046 GWENHYWFAR_API
00047 GWEN_SYNCIO *GWEN_SyncIo_Memory_fromBuffer(const uint8_t *buffer, int size);
00048 
00049 
00050 GWENHYWFAR_API
00051 GWEN_BUFFER *GWEN_SyncIo_Memory_GetBuffer(const GWEN_SYNCIO *sio);
00052 
00053 GWENHYWFAR_API
00054 GWEN_BUFFER *GWEN_SyncIo_Memory_TakeBuffer(const GWEN_SYNCIO *sio);
00055 
00056 
00057 #ifdef __cplusplus
00058 }
00059 #endif
00060 
00061 
00062 #endif
00063 
00064