FreeRDP
smartcard_call.h
1 
23 #ifndef FREERDP_CHANNEL_SMARTCARD_CALL_H
24 #define FREERDP_CHANNEL_SMARTCARD_CALL_H
25 
26 #include <winpr/crt.h>
27 #include <winpr/stream.h>
28 
29 #include <freerdp/api.h>
30 #include <freerdp/settings.h>
31 #include <freerdp/channels/scard.h>
32 #include <freerdp/utils/smartcard_operations.h>
33 
34 #ifdef __cplusplus
35 extern "C"
36 {
37 #endif
38 
39  typedef struct s_scard_call_context scard_call_context;
40 
41  FREERDP_API void smartcard_call_context_free(scard_call_context* ctx);
42 
43  WINPR_ATTR_MALLOC(smartcard_call_context_free, 1)
44  FREERDP_API scard_call_context* smartcard_call_context_new(const rdpSettings* settings);
45 
46  FREERDP_API BOOL smartcard_call_context_signal_stop(scard_call_context* ctx, BOOL reset);
47  FREERDP_API BOOL smartcard_call_context_add(scard_call_context* ctx, const char* name);
48  FREERDP_API BOOL smartcard_call_cancel_context(scard_call_context* ctx, SCARDCONTEXT context);
49  FREERDP_API BOOL smartcard_call_cancel_all_context(scard_call_context* ctx);
50  FREERDP_API BOOL smartcard_call_release_context(scard_call_context* ctx, SCARDCONTEXT context);
51  FREERDP_API BOOL smartcard_call_is_configured(scard_call_context* ctx);
52 
53  FREERDP_API BOOL smarcard_call_set_callbacks(scard_call_context* ctx, void* userdata,
54  void* (*fn_new)(void*, SCARDCONTEXT),
55  void (*fn_free)(void*));
56  FREERDP_API void* smartcard_call_get_context(scard_call_context* ctx, SCARDCONTEXT hContext);
57 
58  FREERDP_API LONG smartcard_irp_device_control_call(scard_call_context* context, wStream* out,
59  UINT32* pIoStatus,
60  SMARTCARD_OPERATION* operation);
61 
62 #ifdef __cplusplus
63 }
64 #endif
65 #endif /* FREERDP_CHANNEL_SMARTCARD_CALL_H */