eid-viewer
eid-viewer library
Loading...
Searching...
No Matches
backend.h
1#ifndef EID_VWR_BACKEND_H
2#define EID_VWR_BACKEND_H
3
4#include <eid-viewer/macros.h>
5
6#ifdef __cplusplus
7extern "C"
8{
9#endif
10
11#include <eid-viewer/oslayer.h>
12
13 void be_setcallbacks(struct eid_vwr_ui_callbacks *cb_);
14 DllExport int eid_vwr_set_cbfuncs(void (*newsrc) (enum eid_vwr_source source), // data source has changed.
15 void (*newstringdata) (const EID_CHAR * label, const EID_CHAR * data), // new string data to be displayed in UI.
16 void (*newbindata) (const EID_CHAR * label, const unsigned char *data, int datalen), // new binary data to be displayed in UI.
17 void (*log) (enum eid_vwr_loglevel loglevel, const EID_CHAR * line), // log a string at the given level.
18 //void(*logv)(enum eid_vwr_loglevel loglevel, const char* line, va_list ap), // log a string using varargs. Note: a UI needs to implement only one of log() or logv(); the backend will use whichever is implemented.
19 void (*newstate) (enum eid_vwr_states states), // issued at state machine transition
20 void (*pinop_result) (enum eid_vwr_pinops pinops, enum eid_vwr_result result), // issued when a PIN operation finished.
21 void (*readers_changed) (unsigned long nreaders, slotdesc *slots),
22 void (*challenge_result) (const unsigned char *result, int resultlen, enum eid_vwr_result)); // issued when a card challenge operation (applet 1.8) finished.
23
24 void be_log(enum eid_vwr_loglevel, const EID_CHAR * line, ...);
25
26 int be_newsource(enum eid_vwr_source which);
27 int be_newstate(enum eid_vwr_states s);
28 int be_newstringdata(const EID_CHAR * label, const EID_CHAR * data);
29 int be_newbindata(const EID_CHAR * label, const unsigned char *data, int datalen);
30 int be_pinresult(enum eid_vwr_pinops, enum eid_vwr_result);
31 int be_readers_changed(unsigned long nreaders, slotdesc * slots);
32 int be_challengeresult(const unsigned char *result, int resultlen, enum eid_vwr_result);
33
34#ifdef __cplusplus
35}
36#endif
37
38#ifdef __GNUC__
39#define EIDV_UNUSED __attribute__((unused))
40#else
41#define EIDV_UNUSED
42#endif
43
44#endif
eid_vwr_states
Possible states.
Definition oslayer.h:75
eid_vwr_result
Definition oslayer.h:63
eid_vwr_source
Definition oslayer.h:31
eid_vwr_loglevel
Log levels.
Definition oslayer.h:43
eid_vwr_pinops
Definition oslayer.h:56
contains the functions, enums and structures that need to be known by the ui
Definition oslayer.h:24
Callbacks which the backend can perform towards the UI.
Definition oslayer.h:128