23 #ifndef FREERDP_CHANNEL_RDPDR_SERVER_RDPDR_H
24 #define FREERDP_CHANNEL_RDPDR_SERVER_RDPDR_H
26 #include <freerdp/api.h>
27 #include <freerdp/types.h>
28 #include <freerdp/channels/wtsvc.h>
29 #include <freerdp/channels/rdpdr.h>
30 #include <freerdp/utils/rdpdr_utils.h>
42 typedef struct s_rdpdr_server_private RdpdrServerPrivate;
53 UINT32 NextEntryOffset;
55 LARGE_INTEGER CreationTime;
56 LARGE_INTEGER LastAccessTime;
57 LARGE_INTEGER LastWriteTime;
58 LARGE_INTEGER ChangeTime;
59 LARGE_INTEGER EndOfFile;
60 LARGE_INTEGER AllocationSize;
61 UINT32 FileAttributes;
66 typedef UINT (*psRdpdrStart)(RdpdrServerContext* context);
67 typedef UINT (*psRdpdrStop)(RdpdrServerContext* context);
69 typedef UINT (*psRdpdrCapablityPDU)(RdpdrServerContext* context,
72 typedef UINT (*psRdpdrReceivePDU)(RdpdrServerContext* context,
const RDPDR_HEADER* header,
74 typedef UINT (*psRdpdrReceiveAnnounceResponse)(RdpdrServerContext* context, UINT16 VersionMajor,
75 UINT16 VersionMinor, UINT32 ClientId);
76 typedef UINT (*psRdpdrSendServerAnnounce)(RdpdrServerContext* context);
77 typedef UINT (*psRdpdrReceiveDeviceAnnounce)(RdpdrServerContext* context,
79 typedef UINT (*psRdpdrReceiveDeviceRemove)(RdpdrServerContext* context, UINT32 deviceId,
81 typedef UINT (*psRdpdrReceiveClientNameRequest)(RdpdrServerContext* context,
size_t ComputerNameLen,
84 typedef UINT (*psRdpdrDriveCreateDirectory)(RdpdrServerContext* context,
void* callbackData,
85 UINT32 deviceId,
const char* path);
86 typedef UINT (*psRdpdrDriveDeleteDirectory)(RdpdrServerContext* context,
void* callbackData,
87 UINT32 deviceId,
const char* path);
88 typedef UINT (*psRdpdrDriveQueryDirectory)(RdpdrServerContext* context,
void* callbackData,
89 UINT32 deviceId,
const char* path);
90 typedef UINT (*psRdpdrDriveOpenFile)(RdpdrServerContext* context,
void* callbackData,
91 UINT32 deviceId,
const char* path, UINT32 desiredAccess,
92 UINT32 createDisposition);
93 typedef UINT (*psRdpdrDriveReadFile)(RdpdrServerContext* context,
void* callbackData,
94 UINT32 deviceId, UINT32 fileId, UINT32 length, UINT32 offset);
95 typedef UINT (*psRdpdrDriveWriteFile)(RdpdrServerContext* context,
void* callbackData,
96 UINT32 deviceId, UINT32 fileId,
const char* buffer,
97 UINT32 length, UINT32 offset);
98 typedef UINT (*psRdpdrDriveCloseFile)(RdpdrServerContext* context,
void* callbackData,
99 UINT32 deviceId, UINT32 fileId);
100 typedef UINT (*psRdpdrDriveDeleteFile)(RdpdrServerContext* context,
void* callbackData,
101 UINT32 deviceId,
const char* path);
102 typedef UINT (*psRdpdrDriveRenameFile)(RdpdrServerContext* context,
void* callbackData,
103 UINT32 deviceId,
const char* oldPath,
const char* newPath);
105 typedef void (*psRdpdrOnDriveCreateDirectoryComplete)(RdpdrServerContext* context,
106 void* callbackData, UINT32 ioStatus);
107 typedef void (*psRdpdrOnDriveDeleteDirectoryComplete)(RdpdrServerContext* context,
108 void* callbackData, UINT32 ioStatus);
109 typedef void (*psRdpdrOnDriveQueryDirectoryComplete)(RdpdrServerContext* context,
110 void* callbackData, UINT32 ioStatus,
112 typedef void (*psRdpdrOnDriveOpenFileComplete)(RdpdrServerContext* context,
void* callbackData,
113 UINT32 ioStatus, UINT32 deviceId, UINT32 fileId);
114 typedef void (*psRdpdrOnDriveReadFileComplete)(RdpdrServerContext* context,
void* callbackData,
115 UINT32 ioStatus,
const char* buffer, UINT32 length);
116 typedef void (*psRdpdrOnDriveWriteFileComplete)(RdpdrServerContext* context,
void* callbackData,
117 UINT32 ioStatus, UINT32 bytesWritten);
118 typedef void (*psRdpdrOnDriveCloseFileComplete)(RdpdrServerContext* context,
void* callbackData,
120 typedef void (*psRdpdrOnDriveDeleteFileComplete)(RdpdrServerContext* context,
void* callbackData,
122 typedef void (*psRdpdrOnDriveRenameFileComplete)(RdpdrServerContext* context,
void* callbackData,
125 typedef UINT (*psRdpdrOnDeviceCreate)(RdpdrServerContext* context,
const RdpdrDevice* device);
126 typedef UINT (*psRdpdrOnDeviceDelete)(RdpdrServerContext* context, UINT32 deviceId);
135 RdpdrServerPrivate* priv;
153 psRdpdrSendServerAnnounce
155 psRdpdrReceiveAnnounceResponse
157 psRdpdrReceiveClientNameRequest
159 psRdpdrReceiveDeviceAnnounce
160 ReceiveDeviceAnnounce;
166 psRdpdrDriveCreateDirectory DriveCreateDirectory;
167 psRdpdrDriveDeleteDirectory DriveDeleteDirectory;
168 psRdpdrDriveQueryDirectory DriveQueryDirectory;
169 psRdpdrDriveOpenFile DriveOpenFile;
170 psRdpdrDriveReadFile DriveReadFile;
171 psRdpdrDriveWriteFile DriveWriteFile;
172 psRdpdrDriveCloseFile DriveCloseFile;
173 psRdpdrDriveDeleteFile DriveDeleteFile;
174 psRdpdrDriveRenameFile DriveRenameFile;
181 psRdpdrOnDriveCreateDirectoryComplete OnDriveCreateDirectoryComplete;
182 psRdpdrOnDriveDeleteDirectoryComplete OnDriveDeleteDirectoryComplete;
183 psRdpdrOnDriveQueryDirectoryComplete OnDriveQueryDirectoryComplete;
184 psRdpdrOnDriveOpenFileComplete OnDriveOpenFileComplete;
185 psRdpdrOnDriveReadFileComplete OnDriveReadFileComplete;
186 psRdpdrOnDriveWriteFileComplete OnDriveWriteFileComplete;
187 psRdpdrOnDriveCloseFileComplete OnDriveCloseFileComplete;
188 psRdpdrOnDriveDeleteFileComplete OnDriveDeleteFileComplete;
189 psRdpdrOnDriveRenameFileComplete OnDriveRenameFileComplete;
215 rdpContext* rdpcontext;
218 FREERDP_API
void rdpdr_server_context_free(RdpdrServerContext* context);
220 WINPR_ATTR_MALLOC(rdpdr_server_context_free, 1)
221 FREERDP_API RdpdrServerContext* rdpdr_server_context_new(HANDLE vcm);
psRdpdrOnDeviceDelete OnParallelPortDelete
psRdpdrReceiveDeviceRemove ReceiveDeviceRemove
psRdpdrReceiveAnnounceResponse ReceiveAnnounceResponse
psRdpdrOnDeviceCreate OnSerialPortCreate
psRdpdrSendServerAnnounce SendServerAnnounce
psRdpdrOnDeviceDelete OnPrinterDelete
psRdpdrOnDeviceDelete OnDriveDelete
psRdpdrOnDeviceDelete OnSerialPortDelete
psRdpdrOnDeviceCreate OnDriveCreate
psRdpdrOnDeviceCreate OnParallelPortCreate
psRdpdrOnDeviceCreate OnPrinterCreate
psRdpdrReceiveClientNameRequest ReceiveClientNameRequest
psRdpdrOnDeviceCreate OnSmartcardCreate
psRdpdrOnDeviceDelete OnSmartcardDelete
psRdpdrCapablityPDU ReceiveCaps
psRdpdrCapablityPDU SendCaps
psRdpdrReceivePDU ReceivePDU