cscg24-guacamole

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

upload.h (1931B)


      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_UPLOAD_H
     21#define GUAC_RDP_UPLOAD_H
     22
     23#include "common/json.h"
     24
     25#include <guacamole/protocol.h>
     26#include <guacamole/stream.h>
     27#include <guacamole/user.h>
     28
     29#include <stdint.h>
     30
     31/**
     32 * Structure which represents the current state of an upload.
     33 */
     34typedef struct guac_rdp_upload_status {
     35
     36    /**
     37     * The overall offset within the file that the next write should
     38     * occur at.
     39     */
     40    uint64_t offset;
     41
     42    /**
     43     * The ID of the file being written to.
     44     */
     45    int file_id;
     46
     47} guac_rdp_upload_status;
     48
     49/**
     50 * Handler for inbound files related to file uploads.
     51 */
     52guac_user_file_handler guac_rdp_upload_file_handler;
     53
     54/**
     55 * Handler for stream data related to file uploads.
     56 */
     57guac_user_blob_handler guac_rdp_upload_blob_handler;
     58
     59/**
     60 * Handler for end-of-stream related to file uploads.
     61 */
     62guac_user_end_handler guac_rdp_upload_end_handler;
     63
     64/**
     65 * Handler for put messages. In context of uploads and the filesystem exposed
     66 * via the Guacamole protocol, put messages request write access to a file
     67 * within the filesystem.
     68 */
     69guac_user_put_handler guac_rdp_upload_put_handler;
     70
     71#endif
     72