/usr/include/libchipcard5/chipcard/client.h is in libchipcard-dev 5.1.0beta-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | /***************************************************************************
begin : Mon Mar 01 2004
copyright : (C) 2004-2010 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* Please see toplevel file COPYING for license details *
***************************************************************************/
#ifndef CHIPCARD_CLIENT_CLIENT_H
#define CHIPCARD_CLIENT_CLIENT_H
/** @addtogroup chipcardc_client_app
*/
/*@{*/
#include <gwenhywfar/inherit.h>
#include <chipcard/chipcard.h>
#ifdef __cplusplus
extern "C" {
#endif
#define LC_DEFAULT_SHORT_TIMEOUT 10
#define LC_DEFAULT_LONG_TIMEOUT 30
#define LC_DEFAULT_VERY_LONG_TIMEOUT 60
typedef struct LC_CLIENT LC_CLIENT;
GWEN_INHERIT_FUNCTION_LIB_DEFS(LC_CLIENT, CHIPCARD_API)
/**
* Result codes for operations.
*/
typedef enum {
LC_Client_ResultOk=0,
LC_Client_ResultWait,
LC_Client_ResultIpcError,
LC_Client_ResultCmdError,
LC_Client_ResultDataError,
LC_Client_ResultAborted,
LC_Client_ResultInvalid,
LC_Client_ResultInternal,
LC_Client_ResultGeneric,
LC_Client_ResultNoData,
LC_Client_ResultCardRemoved,
LC_Client_ResultNotSupported,
LC_Client_ResultCfgError,
LC_Client_ResultNotFound,
LC_Client_ResultIoError,
LC_Client_ResultBadPin,
LC_Client_ResultDontExecute,
} LC_CLIENT_RESULT;
/**
* Targets for commands (used by @ref LC_Card_ExecApdu)
*/
typedef enum {
LC_Client_CmdTargetCard=0,
LC_Client_CmdTargetReader
} LC_CLIENT_CMDTARGET;
#ifdef __cplusplus
}
#endif
#include <chipcard/card.h>
#ifdef __cplusplus
extern "C" {
#endif
/** @name Main API
*
* To work with this API you'll need to create a client object first.
* This is normally done by @ref LC_Client_new.
*/
/*@{*/
/**
* This function creates a libchipcard client.
* @param programName name of the program which wants to create the client
* @param programVersion version string of that program
*/
CHIPCARD_API
LC_CLIENT *LC_Client_new(const char *programName, const char *programVersion);
/**
* Release all ressources associated with Libchipcard3. This must be called
* at the end of the application to avoid memory leaks.
*/
CHIPCARD_API
void LC_Client_free(LC_CLIENT *cl);
/**
* Init Libchipcard. This functions reads the configuration file and
* the card command description files. It does not allocate the readers
* (see @ref LC_Client_Start), so it is perfectly save to call this function
* upon startup of the application.
*/
CHIPCARD_API
LC_CLIENT_RESULT LC_Client_Init(LC_CLIENT *cl);
/**
* Deinit Libchipcard. Unloads all data files.
*
*/
CHIPCARD_API
LC_CLIENT_RESULT LC_Client_Fini(LC_CLIENT *cl);
CHIPCARD_API
LC_CLIENT_RESULT LC_Client_Start(LC_CLIENT *cl);
CHIPCARD_API
LC_CLIENT_RESULT LC_Client_Stop(LC_CLIENT *cl);
CHIPCARD_API
LC_CLIENT_RESULT LC_Client_GetNextCard(LC_CLIENT *cl, LC_CARD **pCard, int timeout);
CHIPCARD_API
LC_CLIENT_RESULT LC_Client_ReleaseCard(LC_CLIENT *cl, LC_CARD *card);
/*@}*/
/** @name Informational Functions
*
*/
/*{@*/
CHIPCARD_API
const char *LC_Client_GetProgramName(const LC_CLIENT *cl);
CHIPCARD_API
const char *LC_Client_GetProgramVersion(const LC_CLIENT *cl);
/*@}*/
#ifdef __cplusplus
}
#endif
/*@}*/
#endif /* CHIPCARD_CLIENT_CLIENT_H */
|