1 /*************************************************************************** 2 begin : Tue Apr 27 2010 3 copyright : (C) 2010 by Martin Preuss 4 email : martin@libchipcard.de 5 6 *************************************************************************** 7 * * 8 * This library is free software; you can redistribute it and/or * 9 * modify it under the terms of the GNU Lesser General Public * 10 * License as published by the Free Software Foundation; either * 11 * version 2.1 of the License, or (at your option) any later version. * 12 * * 13 * This library is distributed in the hope that it will be useful, * 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 16 * Lesser General Public License for more details. * 17 * * 18 * You should have received a copy of the GNU Lesser General Public * 19 * License along with this library; if not, write to the Free Software * 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * 21 * MA 02111-1307 USA * 22 * * 23 ***************************************************************************/ 24 25 26 #ifndef GWENHYWFAR_SYNCIO_FILE_P_H 27 #define GWENHYWFAR_SYNCIO_FILE_P_H 28 29 #include "syncio_file_l.h" 30 31 32 33 typedef struct GWEN_SYNCIO_FILE GWEN_SYNCIO_FILE; 34 struct GWEN_SYNCIO_FILE { 35 char *path; 36 GWEN_SYNCIO_FILE_CREATIONMODE creationMode; 37 int fd; 38 }; 39 40 41 static void GWENHYWFAR_CB GWEN_SyncIo_File_FreeData(void *bp, void *p); 42 43 44 static GWEN_SYNCIO *GWEN_SyncIo_File_fromStdHandle(int fd, const char *hname); 45 46 47 static int GWENHYWFAR_CB GWEN_SyncIo_File_Connect(GWEN_SYNCIO *sio); 48 static int GWENHYWFAR_CB GWEN_SyncIo_File_Disconnect(GWEN_SYNCIO *sio); 49 50 51 static int GWENHYWFAR_CB GWEN_SyncIo_File_Read(GWEN_SYNCIO *sio, 52 uint8_t *buffer, 53 uint32_t size); 54 55 56 57 static int GWENHYWFAR_CB GWEN_SyncIo_File_Write(GWEN_SYNCIO *sio, 58 const uint8_t *buffer, 59 uint32_t size); 60 61 62 63 #endif 64 65 66