1 /*************************************************************************** 2 begin : Sun Jun 13 2004 3 copyright : (C) 2004-2010 by Martin Preuss 4 email : martin@libchipcard.de 5 6 *************************************************************************** 7 * Please see toplevel file COPYING for license details * 8 ***************************************************************************/ 9 10 /** @file examplecard_p.h 11 * @short Private header file only to be used by examplecard.c 12 * 13 * This file is not to be included by any other file except the corresponding 14 * source file (in this case examplecard.c). It only contains definitions 15 * private to this type. This allows to follow the object oriented programming 16 * paradigm used by Libchipcard2. 17 */ 18 19 #ifndef CHIPCARD_CARD_EXAMPLECARD_P_H 20 #define CHIPCARD_CARD_EXAMPLECARD_P_H 21 22 23 #include "examplecard.h" 24 #include <chipcard/card_imp.h> 25 26 27 /** 28 * This type definition MUST NEVER be used outside this file and the 29 * corresponding source file (examplecard.c) ! 30 * This makes this type invisible to the outside, which is very much intended. 31 * This way a class may be changed later without corrupting the API. 32 */ 33 typedef struct EXAMPLE_CARD EXAMPLE_CARD; 34 35 struct EXAMPLE_CARD { 36 LC_CARD_OPEN_FN openFn; 37 LC_CARD_CLOSE_FN closeFn; 38 int exampleData; 39 }; 40 41 42 void GWENHYWFAR_CB ExampleCard_freeData(void *bp, void *p); 43 44 45 LC_CLIENT_RESULT CHIPCARD_CB ExampleCard_Open(LC_CARD *card); 46 LC_CLIENT_RESULT CHIPCARD_CB ExampleCard_Close(LC_CARD *card); 47 48 49 50 #endif /* CHIPCARD_CARD_EXAMPLECARD_P_H */ 51 52 53 54 55