cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

rdpdr-fs-messages-dir-info.h (3254B)


      1/*
      2 * Licensed to the Apache Software Foundation (ASF) under one
      3 * or more contributor license agreements.  See the NOTICE file
      4 * distributed with this work for additional information
      5 * regarding copyright ownership.  The ASF licenses this file
      6 * to you under the Apache License, Version 2.0 (the
      7 * "License"); you may not use this file except in compliance
      8 * with the License.  You may obtain a copy of the License at
      9 *
     10 *   http://www.apache.org/licenses/LICENSE-2.0
     11 *
     12 * Unless required by applicable law or agreed to in writing,
     13 * software distributed under the License is distributed on an
     14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     15 * KIND, either express or implied.  See the License for the
     16 * specific language governing permissions and limitations
     17 * under the License.
     18 */
     19
     20#ifndef GUAC_RDP_CHANNELS_RDPDR_FS_MESSAGES_DIR_INFO_H
     21#define GUAC_RDP_CHANNELS_RDPDR_FS_MESSAGES_DIR_INFO_H
     22
     23/**
     24 * Handlers for directory queries received over the RDPDR channel via the
     25 * IRP_MJ_DIRECTORY_CONTROL major function and the IRP_MN_QUERY_DIRECTORY minor
     26 * function.
     27 *
     28 * @file rdpdr-fs-messages-dir-info.h
     29 */
     30
     31#include "channels/common-svc.h"
     32#include "channels/rdpdr/rdpdr.h"
     33
     34#include <winpr/stream.h>
     35
     36/**
     37 * Handler for Device I/O Requests which query information about the files
     38 * within a directory.
     39 *
     40 * @param svc
     41 *     The guac_rdp_common_svc representing the static virtual channel being
     42 *     used for RDPDR.
     43 *
     44 * @param device
     45 *     The guac_rdpdr_device of the relevant device, as dictated by the
     46 *     deviceId field of the common RDPDR header within the received PDU.
     47 *     Within the guac_rdpdr_iorequest structure, the deviceId field is stored
     48 *     within device_id.
     49 *
     50 * @param iorequest
     51 *     The contents of the common RDPDR Device I/O Request header shared by all
     52 *     RDPDR devices.
     53 *
     54 * @param entry_name
     55 *     The filename of the file being queried.
     56 *
     57 * @param entry_file_id
     58 *     The ID of the file being queried.
     59 */
     60typedef void guac_rdpdr_directory_query_handler(guac_rdp_common_svc* svc,
     61        guac_rdpdr_device* device, guac_rdpdr_iorequest* iorequest,
     62        const char* entry_name, int entry_file_id);
     63
     64/**
     65 * Processes a query request for FileDirectoryInformation. From the
     66 * documentation this is "defined as the file's name, time stamp, and size, or its
     67 * attributes."
     68 */
     69guac_rdpdr_directory_query_handler guac_rdpdr_fs_process_query_directory_info;
     70
     71/**
     72 * Processes a query request for FileFullDirectoryInformation. From the
     73 * documentation, this is "defined as all the basic information, plus extended
     74 * attribute size."
     75 */
     76guac_rdpdr_directory_query_handler guac_rdpdr_fs_process_query_full_directory_info;
     77
     78/**
     79 * Processes a query request for FileBothDirectoryInformation. From the
     80 * documentation, this absurdly-named request is "basic information plus
     81 * extended attribute size and short name about a file or directory."
     82 */
     83guac_rdpdr_directory_query_handler guac_rdpdr_fs_process_query_both_directory_info;
     84
     85/**
     86 * Processes a query request for FileNamesInformation. From the documentation,
     87 * this is "detailed information on the names of files in a directory."
     88 */
     89guac_rdpdr_directory_query_handler guac_rdpdr_fs_process_query_names_info;
     90
     91#endif
     92