2013-12-29 04:53:12 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013 Glyptodon LLC
|
2013-07-18 00:54:28 +00:00
|
|
|
*
|
2013-12-29 04:53:12 +00:00
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* in the Software without restriction, including without limitation the rights
|
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
2013-07-18 00:54:28 +00:00
|
|
|
*
|
2013-12-29 04:53:12 +00:00
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
2013-07-18 00:54:28 +00:00
|
|
|
*
|
2013-12-29 04:53:12 +00:00
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
* THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
2013-07-18 00:54:28 +00:00
|
|
|
|
|
|
|
#ifndef __GUAC_RDP_SETTINGS_H
|
|
|
|
#define __GUAC_RDP_SETTINGS_H
|
|
|
|
|
2014-01-01 22:44:28 +00:00
|
|
|
#include "config.h"
|
2013-07-18 00:54:28 +00:00
|
|
|
|
2013-07-18 23:20:40 +00:00
|
|
|
#include "rdp_keymap.h"
|
|
|
|
|
2014-01-01 22:44:28 +00:00
|
|
|
#include <freerdp/freerdp.h>
|
|
|
|
|
2015-04-14 19:39:08 +00:00
|
|
|
/**
|
|
|
|
* The maximum number of bytes in the client hostname claimed during
|
|
|
|
* connection.
|
|
|
|
*/
|
|
|
|
#define RDP_CLIENT_HOSTNAME_SIZE 32
|
|
|
|
|
2013-07-18 00:54:28 +00:00
|
|
|
/**
|
|
|
|
* The default RDP port.
|
|
|
|
*/
|
|
|
|
#define RDP_DEFAULT_PORT 3389
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Default screen width, in pixels.
|
|
|
|
*/
|
|
|
|
#define RDP_DEFAULT_WIDTH 1024
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Default screen height, in pixels.
|
|
|
|
*/
|
|
|
|
#define RDP_DEFAULT_HEIGHT 768
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Default color depth, in bits.
|
|
|
|
*/
|
|
|
|
#define RDP_DEFAULT_DEPTH 16
|
|
|
|
|
2013-08-24 19:30:38 +00:00
|
|
|
/**
|
|
|
|
* All supported combinations of security types.
|
|
|
|
*/
|
|
|
|
typedef enum guac_rdp_security {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Standard RDP encryption.
|
|
|
|
*/
|
|
|
|
GUAC_SECURITY_RDP,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* TLS encryption.
|
|
|
|
*/
|
|
|
|
GUAC_SECURITY_TLS,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Network level authentication.
|
|
|
|
*/
|
|
|
|
GUAC_SECURITY_NLA,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Any method supported by the server.
|
|
|
|
*/
|
|
|
|
GUAC_SECURITY_ANY
|
|
|
|
|
|
|
|
} guac_rdp_security;
|
|
|
|
|
2013-07-18 00:54:28 +00:00
|
|
|
/**
|
|
|
|
* All settings supported by the Guacamole RDP client.
|
|
|
|
*/
|
|
|
|
typedef struct guac_rdp_settings {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The hostname to connect to.
|
|
|
|
*/
|
|
|
|
char* hostname;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The port to connect to.
|
|
|
|
*/
|
|
|
|
int port;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The domain of the user logging in.
|
|
|
|
*/
|
|
|
|
char* domain;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The username of the user logging in.
|
|
|
|
*/
|
|
|
|
char* username;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The password of the user logging in.
|
|
|
|
*/
|
|
|
|
char* password;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The color depth of the display to request, in bits.
|
|
|
|
*/
|
|
|
|
int color_depth;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The width of the display to request, in pixels.
|
|
|
|
*/
|
|
|
|
int width;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The height of the display to request, in pixels.
|
|
|
|
*/
|
|
|
|
int height;
|
|
|
|
|
2014-11-26 23:23:26 +00:00
|
|
|
/**
|
|
|
|
* The DPI of the remote display to assume when converting between
|
|
|
|
* client pixels and remote pixels.
|
|
|
|
*/
|
|
|
|
int resolution;
|
|
|
|
|
2013-07-18 00:54:28 +00:00
|
|
|
/**
|
|
|
|
* Whether audio is enabled.
|
|
|
|
*/
|
|
|
|
int audio_enabled;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether printing is enabled.
|
|
|
|
*/
|
|
|
|
int printing_enabled;
|
|
|
|
|
2013-07-25 19:05:15 +00:00
|
|
|
/**
|
|
|
|
* Whether the virtual drive is enabled.
|
|
|
|
*/
|
|
|
|
int drive_enabled;
|
|
|
|
|
2013-07-29 18:53:15 +00:00
|
|
|
/**
|
|
|
|
* The local system path which will be used to persist the
|
|
|
|
* virtual drive.
|
|
|
|
*/
|
|
|
|
char* drive_path;
|
|
|
|
|
2015-07-28 21:09:38 +00:00
|
|
|
/**
|
2015-07-28 21:36:08 +00:00
|
|
|
* Whether to automatically create the local system path if it does not
|
|
|
|
* exist.
|
2015-07-28 21:09:38 +00:00
|
|
|
*/
|
|
|
|
int create_drive_path;
|
|
|
|
|
2013-07-18 00:54:28 +00:00
|
|
|
/**
|
|
|
|
* Whether this session is a console session.
|
|
|
|
*/
|
|
|
|
int console;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether to allow audio in the console session.
|
|
|
|
*/
|
|
|
|
int console_audio;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The keymap chosen as the layout of the server.
|
|
|
|
*/
|
|
|
|
const guac_rdp_keymap* server_layout;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The initial program to run, if any.
|
|
|
|
*/
|
|
|
|
char* initial_program;
|
|
|
|
|
2015-04-14 19:39:08 +00:00
|
|
|
/**
|
|
|
|
* The name of the client to submit to the RDP server upon connection, or
|
|
|
|
* NULL if the name is not specified.
|
|
|
|
*/
|
|
|
|
char* client_name;
|
|
|
|
|
2013-08-24 08:17:27 +00:00
|
|
|
/**
|
2013-08-24 19:30:38 +00:00
|
|
|
* The type of security to use for the connection.
|
2013-08-24 08:17:27 +00:00
|
|
|
*/
|
2013-08-24 19:30:38 +00:00
|
|
|
guac_rdp_security security_mode;
|
2013-08-24 08:17:27 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether bad server certificates should be ignored.
|
|
|
|
*/
|
|
|
|
int ignore_certificate;
|
|
|
|
|
|
|
|
/**
|
2013-08-25 18:35:31 +00:00
|
|
|
* Whether authentication should be disabled. This is different from the
|
2013-08-24 08:17:27 +00:00
|
|
|
* authentication that takes place when a user provides their username
|
2013-08-25 18:35:31 +00:00
|
|
|
* and password. Authentication is required by definition for NLA.
|
2013-08-24 08:17:27 +00:00
|
|
|
*/
|
2013-08-25 18:35:31 +00:00
|
|
|
int disable_authentication;
|
2013-08-24 08:17:27 +00:00
|
|
|
|
2014-01-29 23:58:04 +00:00
|
|
|
/**
|
2014-01-30 08:42:37 +00:00
|
|
|
* The application to launch, if RemoteApp is in use.
|
2014-01-29 23:58:04 +00:00
|
|
|
*/
|
2014-01-30 08:42:37 +00:00
|
|
|
char* remote_app;
|
2014-01-29 23:58:04 +00:00
|
|
|
|
|
|
|
/**
|
2014-01-30 08:42:37 +00:00
|
|
|
* The working directory of the remote application, if RemoteApp is in use.
|
2014-01-29 23:58:04 +00:00
|
|
|
*/
|
2014-01-30 08:42:37 +00:00
|
|
|
char* remote_app_dir;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The arguments to pass to the remote application, if RemoteApp is in use.
|
|
|
|
*/
|
|
|
|
char* remote_app_args;
|
2014-01-29 23:58:04 +00:00
|
|
|
|
2014-03-02 00:43:55 +00:00
|
|
|
/**
|
2014-03-02 06:48:15 +00:00
|
|
|
* NULL-terminated list of all static virtual channel names, or NULL if
|
|
|
|
* no channels whatsoever.
|
2014-03-02 00:43:55 +00:00
|
|
|
*/
|
|
|
|
char** svc_names;
|
|
|
|
|
2015-06-12 23:35:38 +00:00
|
|
|
/**
|
|
|
|
* Whether the desktop wallpaper should be visible. If unset, the desktop
|
|
|
|
* wallpaper will be hidden, reducing the amount of bandwidth required.
|
|
|
|
*/
|
|
|
|
int wallpaper_enabled;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether desktop and window theming should be allowed. If unset, theming
|
|
|
|
* is temporarily disabled on the desktop of the RDP server for the sake of
|
|
|
|
* performance, reducing the amount of bandwidth required.
|
|
|
|
*/
|
|
|
|
int theming_enabled;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether glyphs should be smoothed with antialiasing (ClearType). If
|
|
|
|
* unset, glyphs will be rendered with sharp edges and using single colors,
|
|
|
|
* effectively 1-bit images, reducing the amount of bandwidth required.
|
|
|
|
*/
|
|
|
|
int font_smoothing_enabled;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether windows contents should be shown as they are moved. If unset,
|
|
|
|
* only a window border will be shown during window move operations,
|
|
|
|
* reducing the amount of bandwidth required.
|
|
|
|
*/
|
|
|
|
int full_window_drag_enabled;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether desktop composition (Aero) should be enabled during the session.
|
|
|
|
* As desktop composition provides alpha blending and other special
|
|
|
|
* effects, this increases the amount of bandwidth used. If unset, desktop
|
|
|
|
* composition will be disabled.
|
|
|
|
*/
|
|
|
|
int desktop_composition_enabled;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether menu animations should be shown. If unset, menus will not be
|
|
|
|
* animated, reducing the amount of bandwidth required.
|
|
|
|
*/
|
|
|
|
int menu_animations_enabled;
|
|
|
|
|
2015-11-03 21:29:41 +00:00
|
|
|
/**
|
|
|
|
* The preconnection ID to send within the preconnection PDU when
|
|
|
|
* initiating an RDP connection, if any. If no preconnection ID is
|
|
|
|
* specified, this will be -1.
|
|
|
|
*/
|
|
|
|
int preconnection_id;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The preconnection BLOB (PCB) to send to the RDP server prior to full RDP
|
|
|
|
* connection negotiation. This value is used by Hyper-V to select the
|
|
|
|
* destination VM.
|
|
|
|
*/
|
|
|
|
char* preconnection_blob;
|
|
|
|
|
2013-07-18 00:54:28 +00:00
|
|
|
} guac_rdp_settings;
|
|
|
|
|
|
|
|
/**
|
2013-07-20 01:37:05 +00:00
|
|
|
* Save all given settings to the given freerdp instance.
|
2013-07-18 00:54:28 +00:00
|
|
|
*/
|
2013-07-20 01:37:05 +00:00
|
|
|
void guac_rdp_push_settings(guac_rdp_settings* guac_settings, freerdp* rdp);
|
|
|
|
|
|
|
|
/**
|
2014-07-21 16:12:17 +00:00
|
|
|
* Returns the width of the RDP session display.
|
2013-07-20 01:37:05 +00:00
|
|
|
*/
|
2014-07-21 16:12:17 +00:00
|
|
|
int guac_rdp_get_width(freerdp* rdp);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the height of the RDP session display.
|
|
|
|
*/
|
|
|
|
int guac_rdp_get_height(freerdp* rdp);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the depth of the RDP session display.
|
|
|
|
*/
|
|
|
|
int guac_rdp_get_depth(freerdp* rdp);
|
2013-07-18 00:54:28 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|