necouchman commented on a change in pull request #243: GUACAMOLE-249: Migrate to FreeRDP 2.x URL: https://github.com/apache/guacamole-server/pull/243#discussion_r365481790
########## File path: src/protocols/rdp/channels/rdpdr/rdpdr-fs-messages-dir-info.h ########## @@ -17,58 +17,76 @@ * under the License. */ - -#ifndef __GUAC_RDPDR_FS_MESSAGES_DIR_INFO_H -#define __GUAC_RDPDR_FS_MESSAGES_DIR_INFO_H +#ifndef GUAC_RDP_CHANNELS_RDPDR_FS_MESSAGES_DIR_INFO_H +#define GUAC_RDP_CHANNELS_RDPDR_FS_MESSAGES_DIR_INFO_H /** * Handlers for directory queries received over the RDPDR channel via the * IRP_MJ_DIRECTORY_CONTROL major function and the IRP_MN_QUERY_DIRECTORY minor * function. * - * @file rdpdr_fs_messages_dir_info.h + * @file rdpdr-fs-messages-dir-info.h */ -#include "config.h" - -#include "rdpdr_service.h" +#include "channels/common-svc.h" +#include "channels/rdpdr/rdpdr.h" -#ifdef ENABLE_WINPR #include <winpr/stream.h> -#else -#include "compat/winpr-stream.h" -#endif + +/** + * Handler for Device I/O Requests which query information about the files + * within a directory. + * + * @param svc + * The guac_rdp_common_svc representing the static virtual channel being + * used for RDPDR. + * + * @param device + * The guac_rdpdr_device of the relevant device, as dictated by the + * deviceId field of common RDPDR header within the received PDU. Within + * the guac_rdpdr_iorequest structure, the deviceId field is stored within + * device_id. + * + * @param iorequest + * The contents of the common RDPDR Device I/O Request header shared by all + * RDPDR devices. + * + * @param entry_name + * The filename of the file being queried. + * + * @param entry_file_id + * The ID of the file being queried. + */ +typedef void guac_rdpdr_directory_query_handler(guac_rdp_common_svc* svc, + guac_rdpdr_device* device, guac_rdpdr_iorequest* iorequest, + const char* entry_name, int entry_file_id); /** * Processes a query request for FileDirectoryInformation. From the * documentation this is "defined as the file's name, time stamp, and size, or its * attributes." */ -void guac_rdpdr_fs_process_query_directory_info(guac_rdpdr_device* device, - const char* entry_name, int file_id, int completion_id); +guac_rdpdr_directory_query_handler guac_rdpdr_fs_process_query_directory_info; /** * Processes a query request for FileFullDirectoryInformation. From the * documentation, this is "defined as all the basic information, plus extended * attribute size." */ -void guac_rdpdr_fs_process_query_full_directory_info(guac_rdpdr_device* device, - const char* entry_name, int file_id, int completion_id); +guac_rdpdr_directory_query_handler guac_rdpdr_fs_process_query_full_directory_info; /** * Processes a query request for FileBothDirectoryInformation. From the * documentation, this absurdly-named request is "basic information plus Review comment: Never noticed this comment before, but I'm glad it isn't being changed. :-D ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
