#include <gwenhywfar/types.h>
#include <gwenhywfar/xml.h>
#include <gwenhywfar/stringlist.h>
#include <gwenhywfar/db.h>
#include <gwenhywfar/buffer.h>
#include <gwenhywfar/msgengine.h>
#include <chipcard2/chipcard2.h>
#include "common/card.h"


Go to the source code of this file.
Typedefs | |
| typedef struct LCCMD_COMMANDMANAGER | LCCMD_COMMANDMANAGER |
Functions | |
| LCCMD_COMMANDMANAGER * | LCCMD_CommandManager_new () |
| void | LCCMD_CommandManager_free (LCCMD_COMMANDMANAGER *mgr) |
| int | LCCMD_CommandManager_Init (LCCMD_COMMANDMANAGER *mgr, GWEN_DB_NODE *db) |
| int | LCCMD_CommandManager_Fini (LCCMD_COMMANDMANAGER *mgr, GWEN_DB_NODE *db) |
| void | LCCMD_CommandManager_NewCard (LCCMD_COMMANDMANAGER *clm, LCCO_CARD *card) |
| int | LCCMD_CommandManager_SelectCardType (LCCMD_COMMANDMANAGER *mgr, LCCO_CARD *card, const char *cardName) |
| int | LCCMD_CommandManager_BuildCommand (LCCMD_COMMANDMANAGER *mgr, LCCO_CARD *card, const char *cmdName, GWEN_DB_NODE *dbCmd, GWEN_BUFFER *apdu, const char **target, GWEN_TYPE_UINT32 *rqid) |
| int | LCCMD_CommandManager_ParseAnswer (LCCMD_COMMANDMANAGER *mgr, LCCO_CARD *card, GWEN_TYPE_UINT32 rqid, GWEN_BUFFER *gbuf, GWEN_DB_NODE *dbRsp) |
| typedef struct LCCMD_COMMANDMANAGER LCCMD_COMMANDMANAGER |
| int LCCMD_CommandManager_BuildCommand | ( | LCCMD_COMMANDMANAGER * | mgr, | |
| LCCO_CARD * | card, | |||
| const char * | cmdName, | |||
| GWEN_DB_NODE * | dbCmd, | |||
| GWEN_BUFFER * | apdu, | |||
| const char ** | target, | |||
| GWEN_TYPE_UINT32 * | rqid | |||
| ) |
Creates an APDU from the command data given for the currently selected card type.
| int LCCMD_CommandManager_Fini | ( | LCCMD_COMMANDMANAGER * | mgr, | |
| GWEN_DB_NODE * | db | |||
| ) |
| void LCCMD_CommandManager_free | ( | LCCMD_COMMANDMANAGER * | mgr | ) |
| int LCCMD_CommandManager_Init | ( | LCCMD_COMMANDMANAGER * | mgr, | |
| GWEN_DB_NODE * | db | |||
| ) |
| LCCMD_COMMANDMANAGER* LCCMD_CommandManager_new | ( | ) |
| void LCCMD_CommandManager_NewCard | ( | LCCMD_COMMANDMANAGER * | clm, | |
| LCCO_CARD * | card | |||
| ) |
This function is called by the LCS_FullServer to let the command manager extend the card and store some needed data with the new card.
| int LCCMD_CommandManager_ParseAnswer | ( | LCCMD_COMMANDMANAGER * | mgr, | |
| LCCO_CARD * | card, | |||
| GWEN_TYPE_UINT32 | rqid, | |||
| GWEN_BUFFER * | gbuf, | |||
| GWEN_DB_NODE * | dbRsp | |||
| ) |
Parses the given APDU response and creates some vars in dbRsp. If the APDU yielded some response data then the last two bytes are removed from this data (they always contain the result bytes SW1 and SW2).
| int LCCMD_CommandManager_SelectCardType | ( | LCCMD_COMMANDMANAGER * | mgr, | |
| LCCO_CARD * | card, | |||
| const char * | cardName | |||
| ) |
Selects the given card type on the card. This is used to locate commands for LCCMD_CommandManager_BuildCommand.
1.5.3