FreeRDP
rdpdr_utils.h
1 
21 #ifndef FREERDP_UTILS_RDPDR_H
22 #define FREERDP_UTILS_RDPDR_H
23 
24 #include <winpr/stream.h>
25 #include <freerdp/api.h>
26 
27 #ifdef __cplusplus
28 extern "C"
29 {
30 #endif
31 
32  typedef struct
33  {
34  UINT32 DeviceType;
35  UINT32 DeviceId;
36  char PreferredDosName[8];
37  UINT32 DeviceDataLength;
38  BYTE* DeviceData;
39  } RdpdrDevice;
40 
41  typedef struct
42  {
43  UINT16 CapabilityType;
44  UINT16 CapabilityLength;
45  UINT32 Version;
47 
48  FREERDP_API const char* rdpdr_component_string(UINT16 component);
49  FREERDP_API const char* rdpdr_packetid_string(UINT16 packetid);
50  FREERDP_API const char* rdpdr_irp_string(UINT32 major);
51  FREERDP_API const char* rdpdr_cap_type_string(UINT16 capability);
52 
53  FREERDP_API LONG scard_log_status_error(const char* tag, const char* what, LONG status);
54  FREERDP_API const char* scard_get_ioctl_string(UINT32 ioControlCode, BOOL funcName);
55 
56  FREERDP_API BOOL rdpdr_write_iocompletion_header(wStream* out, UINT32 DeviceId,
57  UINT32 CompletionId, UINT32 ioStatus);
58 
59  FREERDP_API void rdpdr_dump_received_packet(wLog* log, DWORD lvl, wStream* out,
60  const char* custom);
61  FREERDP_API void rdpdr_dump_send_packet(wLog* log, DWORD lvl, wStream* out, const char* custom);
62 
63  FREERDP_API UINT rdpdr_read_capset_header(wLog* log, wStream* s,
64  RDPDR_CAPABILITY_HEADER* header);
65  FREERDP_API UINT rdpdr_write_capset_header(wLog* log, wStream* s,
66  const RDPDR_CAPABILITY_HEADER* header);
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 #endif