00001 /*************************************************************************** 00002 $RCSfile$ 00003 ------------------- 00004 cvs : $Id: crypttoken.h 1113 2007-01-10 09:14:16Z martin $ 00005 begin : Wed Mar 16 2005 00006 copyright : (C) 2005 by Martin Preuss 00007 email : martin@libchipcard.de 00008 00009 *************************************************************************** 00010 * Please see toplevel file COPYING for license details * 00011 ***************************************************************************/ 00012 00013 00014 #ifndef GWEN_IOLAYER_BUFFERED_H 00015 #define GWEN_IOLAYER_BUFFERED_H 00016 00017 #include <gwenhywfar/iolayer.h> 00018 #include <gwenhywfar/buffer.h> 00019 00020 #ifdef __cplusplus 00021 extern "C" { 00022 #endif 00023 00024 00037 00038 00043 #define GWEN_IO_LAYER_BUFFERED_TYPE "buffered" 00044 00057 #define GWEN_IO_LAYER_BUFFERED_FLAGS_DOSMODE 0x00000001 00058 00071 #define GWEN_IO_REQUEST_BUFFERED_FLAGS_RAW 0x00000001 00072 00078 #define GWEN_IO_REQUEST_BUFFERED_FLAGS_PEEK 0x00000002 00079 00080 #define GWEN_IO_REQUEST_BUFFERED_FLAGS_UNTILEMPTYLINE 0x00000004 00081 00092 GWENHYWFAR_API GWEN_IO_LAYER *GWEN_Io_LayerBuffered_new(GWEN_IO_LAYER *baseLayer); 00101 GWENHYWFAR_API uint32_t GWEN_Io_LayerBuffered_GetReadLineCount(const GWEN_IO_LAYER *io); 00102 GWENHYWFAR_API uint32_t GWEN_Io_LayerBuffered_GetReadLinePos(const GWEN_IO_LAYER *io); 00103 GWENHYWFAR_API void GWEN_Io_LayerBuffered_ResetLinePosAndCounter(GWEN_IO_LAYER *io); 00104 00113 00119 GWENHYWFAR_API int GWEN_Io_LayerBuffered_ReadLineToBuffer(GWEN_IO_LAYER *io, GWEN_BUFFER *fbuf, 00120 uint32_t guiid, int msecs); 00121 00126 GWENHYWFAR_API int GWEN_Io_LayerBuffered_WriteLine(GWEN_IO_LAYER *io, 00127 const char *buffer, int len, 00128 int flush, uint32_t guiid, int msecs); 00129 00130 00136 00137 #ifdef __cplusplus 00138 } 00139 #endif 00140 00141 #endif 00142 00143 00144 00145