Statistics
| Branch: | Revision:

root / libcacard / vcard_emul_type.h @ 2542bfd5

History | View | Annotate | Download (1003 Bytes)

1 111a38b0 Robert Relyea
/*
2 111a38b0 Robert Relyea
 *  This header file abstracts the different card types. The goal is new card
3 111a38b0 Robert Relyea
 *  types can easily be added by simply changing this file and
4 111a38b0 Robert Relyea
 *  vcard_emul_type.c. It is currently not a requirement to dynamically add new
5 111a38b0 Robert Relyea
 *  card types.
6 111a38b0 Robert Relyea
 *
7 111a38b0 Robert Relyea
 * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
8 111a38b0 Robert Relyea
 * See the COPYING.LIB file in the top-level directory.
9 111a38b0 Robert Relyea
 */
10 111a38b0 Robert Relyea
11 111a38b0 Robert Relyea
#ifndef VCARD_EMUL_TYPE_H
12 111a38b0 Robert Relyea
#define VCARD_EMUL_TYPE_H 1
13 111a38b0 Robert Relyea
#include "vcardt.h"
14 111a38b0 Robert Relyea
#include "vreadert.h"
15 111a38b0 Robert Relyea
16 111a38b0 Robert Relyea
/*
17 111a38b0 Robert Relyea
 * types
18 111a38b0 Robert Relyea
 */
19 111a38b0 Robert Relyea
typedef enum {
20 111a38b0 Robert Relyea
     VCARD_EMUL_NONE = 0,
21 111a38b0 Robert Relyea
     VCARD_EMUL_CAC,
22 111a38b0 Robert Relyea
     VCARD_EMUL_PASSTHRU
23 111a38b0 Robert Relyea
} VCardEmulType;
24 111a38b0 Robert Relyea
25 111a38b0 Robert Relyea
/* functions used by the rest of the emulator */
26 111a38b0 Robert Relyea
VCardStatus vcard_init(VReader *vreader, VCard *vcard, VCardEmulType type,
27 111a38b0 Robert Relyea
                       const char *params, unsigned char * const *cert,
28 111a38b0 Robert Relyea
                       int cert_len[], VCardKey *key[], int cert_count);
29 111a38b0 Robert Relyea
VCardEmulType vcard_emul_type_select(VReader *vreader);
30 111a38b0 Robert Relyea
VCardEmulType vcard_emul_type_from_string(const char *type_string);
31 111a38b0 Robert Relyea
32 111a38b0 Robert Relyea
#endif