23#ifndef FREERDP_CHANNEL_RDPDR_SERVER_RDPDR_H
24#define FREERDP_CHANNEL_RDPDR_SERVER_RDPDR_H
26#include <freerdp/api.h>
27#include <freerdp/config.h>
28#include <freerdp/types.h>
29#include <freerdp/channels/wtsvc.h>
30#include <freerdp/channels/rdpdr.h>
31#include <freerdp/utils/rdpdr_utils.h>
43 typedef struct s_rdpdr_server_private RdpdrServerPrivate;
54 UINT32 NextEntryOffset;
62 UINT32 FileAttributes;
63#if defined(WITH_WCHAR_FILE_DIRECTORY_INFORMATION)
71typedef UINT (*psRdpdrStart)(RdpdrServerContext* context);
72typedef UINT (*psRdpdrStop)(RdpdrServerContext* context);
74typedef UINT (*psRdpdrCapablityPDU)(RdpdrServerContext* context,
77typedef UINT (*psRdpdrReceivePDU)(RdpdrServerContext* context,
const RDPDR_HEADER* header,
79typedef UINT (*psRdpdrReceiveAnnounceResponse)(RdpdrServerContext* context, UINT16 VersionMajor,
80 UINT16 VersionMinor, UINT32 ClientId);
81typedef UINT (*psRdpdrSendServerAnnounce)(RdpdrServerContext* context);
82typedef UINT (*psRdpdrReceiveDeviceAnnounce)(RdpdrServerContext* context,
84typedef UINT (*psRdpdrReceiveDeviceRemove)(RdpdrServerContext* context, UINT32 deviceId,
86typedef UINT (*psRdpdrReceiveClientNameRequest)(RdpdrServerContext* context,
size_t ComputerNameLen,
89typedef UINT (*psRdpdrDriveCreateDirectory)(RdpdrServerContext* context,
void* callbackData,
90 UINT32 deviceId,
const char* path);
91typedef UINT (*psRdpdrDriveDeleteDirectory)(RdpdrServerContext* context,
void* callbackData,
92 UINT32 deviceId,
const char* path);
93typedef UINT (*psRdpdrDriveQueryDirectory)(RdpdrServerContext* context,
void* callbackData,
94 UINT32 deviceId,
const char* path);
95typedef UINT (*psRdpdrDriveOpenFile)(RdpdrServerContext* context,
void* callbackData,
96 UINT32 deviceId,
const char* path, UINT32 desiredAccess,
97 UINT32 createDisposition);
98typedef UINT (*psRdpdrDriveReadFile)(RdpdrServerContext* context,
void* callbackData,
99 UINT32 deviceId, UINT32 fileId, UINT32 length, UINT32 offset);
100typedef UINT (*psRdpdrDriveWriteFile)(RdpdrServerContext* context,
void* callbackData,
101 UINT32 deviceId, UINT32 fileId,
const char* buffer,
102 UINT32 length, UINT32 offset);
103typedef UINT (*psRdpdrDriveCloseFile)(RdpdrServerContext* context,
void* callbackData,
104 UINT32 deviceId, UINT32 fileId);
105typedef UINT (*psRdpdrDriveDeleteFile)(RdpdrServerContext* context,
void* callbackData,
106 UINT32 deviceId,
const char* path);
107typedef UINT (*psRdpdrDriveRenameFile)(RdpdrServerContext* context,
void* callbackData,
108 UINT32 deviceId,
const char* oldPath,
const char* newPath);
110typedef void (*psRdpdrOnDriveCreateDirectoryComplete)(RdpdrServerContext* context,
111 void* callbackData, UINT32 ioStatus);
112typedef void (*psRdpdrOnDriveDeleteDirectoryComplete)(RdpdrServerContext* context,
113 void* callbackData, UINT32 ioStatus);
114typedef void (*psRdpdrOnDriveQueryDirectoryComplete)(RdpdrServerContext* context,
115 void* callbackData, UINT32 ioStatus,
117typedef void (*psRdpdrOnDriveOpenFileComplete)(RdpdrServerContext* context,
void* callbackData,
118 UINT32 ioStatus, UINT32 deviceId, UINT32 fileId);
119typedef void (*psRdpdrOnDriveReadFileComplete)(RdpdrServerContext* context,
void* callbackData,
120 UINT32 ioStatus,
const char* buffer, UINT32 length);
121typedef void (*psRdpdrOnDriveWriteFileComplete)(RdpdrServerContext* context,
void* callbackData,
122 UINT32 ioStatus, UINT32 bytesWritten);
123typedef void (*psRdpdrOnDriveCloseFileComplete)(RdpdrServerContext* context,
void* callbackData,
125typedef void (*psRdpdrOnDriveDeleteFileComplete)(RdpdrServerContext* context,
void* callbackData,
127typedef void (*psRdpdrOnDriveRenameFileComplete)(RdpdrServerContext* context,
void* callbackData,
130typedef UINT (*psRdpdrOnDeviceCreate)(RdpdrServerContext* context,
const RdpdrDevice* device);
131typedef UINT (*psRdpdrOnDeviceDelete)(RdpdrServerContext* context, UINT32 deviceId);
140 RdpdrServerPrivate* priv;
158 psRdpdrSendServerAnnounce
160 psRdpdrReceiveAnnounceResponse
162 psRdpdrReceiveClientNameRequest
164 psRdpdrReceiveDeviceAnnounce
165 ReceiveDeviceAnnounce;
171 psRdpdrDriveCreateDirectory DriveCreateDirectory;
172 psRdpdrDriveDeleteDirectory DriveDeleteDirectory;
173 psRdpdrDriveQueryDirectory DriveQueryDirectory;
174 psRdpdrDriveOpenFile DriveOpenFile;
175 psRdpdrDriveReadFile DriveReadFile;
176 psRdpdrDriveWriteFile DriveWriteFile;
177 psRdpdrDriveCloseFile DriveCloseFile;
178 psRdpdrDriveDeleteFile DriveDeleteFile;
179 psRdpdrDriveRenameFile DriveRenameFile;
186 psRdpdrOnDriveCreateDirectoryComplete OnDriveCreateDirectoryComplete;
187 psRdpdrOnDriveDeleteDirectoryComplete OnDriveDeleteDirectoryComplete;
188 psRdpdrOnDriveQueryDirectoryComplete OnDriveQueryDirectoryComplete;
189 psRdpdrOnDriveOpenFileComplete OnDriveOpenFileComplete;
190 psRdpdrOnDriveReadFileComplete OnDriveReadFileComplete;
191 psRdpdrOnDriveWriteFileComplete OnDriveWriteFileComplete;
192 psRdpdrOnDriveCloseFileComplete OnDriveCloseFileComplete;
193 psRdpdrOnDriveDeleteFileComplete OnDriveDeleteFileComplete;
194 psRdpdrOnDriveRenameFileComplete OnDriveRenameFileComplete;
220 rdpContext* rdpcontext;
223FREERDP_API
void rdpdr_server_context_free(RdpdrServerContext* context);
225WINPR_ATTR_MALLOC(rdpdr_server_context_free, 1)
226FREERDP_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