cscg24-guacamole

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

client.h (3084B)


      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_CLIENT_H
     21#define GUAC_RDP_CLIENT_H
     22
     23#include <guacamole/client.h>
     24
     25/**
     26 * The maximum duration of a frame in milliseconds.
     27 */
     28#define GUAC_RDP_FRAME_DURATION 60
     29
     30/**
     31 * The amount of time to allow per message read within a frame, in
     32 * milliseconds. If the server is silent for at least this amount of time, the
     33 * frame will be considered finished.
     34 */
     35#define GUAC_RDP_FRAME_TIMEOUT 0
     36
     37/**
     38 * The amount of time to wait for a new message from the RDP server when
     39 * beginning a new frame, in milliseconds. This value must be kept reasonably
     40 * small such that a slow RDP server will not prevent external events from
     41 * being handled (such as the stop signal from guac_client_stop()), but large
     42 * enough that the message handling loop does not eat up CPU spinning.
     43 */
     44#define GUAC_RDP_FRAME_START_TIMEOUT 250
     45
     46/**
     47 * The native resolution of most RDP connections. As Windows and other systems
     48 * rely heavily on forced 96 DPI, we must assume 96 DPI.
     49 */
     50#define GUAC_RDP_NATIVE_RESOLUTION 96
     51
     52/**
     53 * The resolution of an RDP connection that would be considered high, but is
     54 * tolerable in the case that the client display would be unreasonably small
     55 * otherwise.
     56 */
     57#define GUAC_RDP_HIGH_RESOLUTION 120
     58
     59/**
     60 * The smallest area, in pixels^2, that would be considered reasonable large
     61 * screen DPI needs to be adjusted.
     62 */
     63#define GUAC_RDP_REASONABLE_AREA (800*600)
     64
     65/**
     66 * Initial rate of audio to stream, in Hz. If the RDP server uses a different
     67 * value, the Guacamole audio stream will simply be reset appropriately.
     68 */
     69#define GUAC_RDP_AUDIO_RATE 44100
     70
     71/**
     72 * The number of channels to stream for audio. If the RDP server uses a
     73 * different value, the Guacamole audio stream will simply be reset
     74 * appropriately.
     75 */
     76#define GUAC_RDP_AUDIO_CHANNELS 2
     77
     78/**
     79 * The number of bits per sample within the audio stream. If the RDP server
     80 * uses a different value, the Guacamole audio stream will simply be reset
     81 * appropriately.
     82 */
     83#define GUAC_RDP_AUDIO_BPS 16
     84
     85/**
     86 * The maximum number of file descriptors which can be associated with an RDP
     87 * connection.
     88 */
     89#define GUAC_RDP_MAX_FILE_DESCRIPTORS 32
     90
     91/**
     92 * Handler which frees all data associated with the guac_client.
     93 */
     94guac_client_free_handler guac_rdp_client_free_handler;
     95
     96#endif