1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
/***************************************************************************
$RCSfile$
-------------------
cvs : $Id: tutorial1a.c 163 2006-02-15 19:31:45Z aquamaniac $
begin : Mon Mar 01 2004
copyright : (C) 2004 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* Please see toplevel file COPYING for license details *
***************************************************************************/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#undef BUILDING_LIBCHIPCARD2_DLL
/* You always need to include the header files of Libchipcard2 to work with
* it ;-)
*/
#include <chipcard2/chipcard2.h>
#include <chipcard2-client/client/client.h>
/**
* Please go to the source of this for a crosslinked view (see link below).
* @callgraph
*/
int main(int argc, char **argv) {
LC_CLIENT *cl;
LC_CARD *card;
cl=LC_Client_new("tutorial1a", "1.0", 0);
LC_Client_ReadConfigFile(cl, 0);
LC_Client_StartWait(cl, 0, 0);
fprintf(stderr, "Please insert a chip card.\n");
card=LC_Client_WaitForNextCard(cl, 30);
LC_Client_StopWait(cl);
LC_Card_Open(card);
LC_Card_Dump(card, stderr, 0);
LC_Card_Close(card);
LC_Card_free(card);
LC_Client_free(cl);
return 0;
}
|