FreeRDP
|
#include <freerdp/config.h>
#include <string.h>
#include <errno.h>
#include <math.h>
#include <limits.h>
#include <float.h>
#include <freerdp/client.h>
#include <freerdp/freerdp.h>
#include <freerdp/addin.h>
#include <freerdp/assistance.h>
#include <freerdp/client/file.h>
#include <freerdp/utils/passphrase.h>
#include <freerdp/client/cmdline.h>
#include <freerdp/client/channels.h>
#include <freerdp/utils/smartcardlogon.h>
#include <freerdp/log.h>
Macros | |
#define | TAG CLIENT_TAG("common") |
Functions | |
static void | set_default_callbacks (freerdp *instance) |
static BOOL | freerdp_client_common_new (freerdp *instance, rdpContext *context) |
static void | freerdp_client_common_free (freerdp *instance, rdpContext *context) |
rdpContext * | freerdp_client_context_new (const RDP_CLIENT_ENTRY_POINTS *pEntryPoints) |
void | freerdp_client_context_free (rdpContext *context) |
int | freerdp_client_start (rdpContext *context) |
int | freerdp_client_stop (rdpContext *context) |
freerdp * | freerdp_client_get_instance (rdpContext *context) |
HANDLE | freerdp_client_get_thread (rdpContext *context) |
static BOOL | freerdp_client_settings_post_process (rdpSettings *settings) |
int | freerdp_client_settings_parse_command_line (rdpSettings *settings, int argc, char **argv, BOOL allowUnknown) |
int | freerdp_client_settings_parse_command_line_ex (rdpSettings *settings, int argc, char **argv, BOOL allowUnknown, COMMAND_LINE_ARGUMENT_A *args, size_t count, int(*handle_option)(const COMMAND_LINE_ARGUMENT *arg, void *custom), void *handle_userdata) |
int | freerdp_client_settings_parse_connection_file (rdpSettings *settings, const char *filename) |
int | freerdp_client_settings_parse_connection_file_buffer (rdpSettings *settings, const BYTE *buffer, size_t size) |
int | freerdp_client_settings_write_connection_file (const rdpSettings *settings, const char *filename, BOOL unicode) |
int | freerdp_client_settings_parse_assistance_file (rdpSettings *settings, int argc, char *argv[]) |
static BOOL | client_cli_authenticate_raw (freerdp *instance, rdp_auth_reason reason, char **username, char **password, char **domain) |
BOOL | client_cli_authenticate_ex (freerdp *instance, char **username, char **password, char **domain, rdp_auth_reason reason) |
BOOL | client_cli_choose_smartcard (freerdp *instance, SmartcardCertInfo **cert_list, DWORD count, DWORD *choice, BOOL gateway) |
static DWORD | client_cli_accept_certificate (freerdp *instance) |
static char * | client_cli_pem_cert (const char *pem) |
DWORD | client_cli_verify_certificate_ex (freerdp *instance, const char *host, UINT16 port, const char *common_name, const char *subject, const char *issuer, const char *fingerprint, DWORD flags) |
DWORD | client_cli_verify_changed_certificate_ex (freerdp *instance, const char *host, UINT16 port, const char *common_name, const char *subject, const char *issuer, const char *fingerprint, const char *old_subject, const char *old_issuer, const char *old_fingerprint, DWORD flags) |
BOOL | client_cli_present_gateway_message (freerdp *instance, UINT32 type, BOOL isDisplayMandatory, BOOL isConsentMandatory, size_t length, const WCHAR *message) |
static char * | extract_authorization_code (char *url) |
static BOOL | client_cli_get_rdsaad_access_token (freerdp *instance, const char *scope, const char *req_cnf, char **token) |
static BOOL | client_cli_get_avd_access_token (freerdp *instance, char **token) |
BOOL | client_cli_get_access_token (freerdp *instance, AccessTokenType tokenType, char **token, size_t count,...) |
BOOL | client_common_get_access_token (freerdp *instance, const char *request, char **token) |
SSIZE_T | client_common_retry_dialog (freerdp *instance, const char *what, size_t current, void *userarg) |
BOOL | client_auto_reconnect (freerdp *instance) |
BOOL | client_auto_reconnect_ex (freerdp *instance, BOOL(*window_events)(freerdp *instance)) |
int | freerdp_client_common_stop (rdpContext *context) |
void | freerdp_client_OnChannelConnectedEventHandler (void *context, const ChannelConnectedEventArgs *e) |
void | freerdp_client_OnChannelDisconnectedEventHandler (void *context, const ChannelDisconnectedEventArgs *e) |
BOOL | freerdp_client_send_wheel_event (rdpClientContext *cctx, UINT16 mflags) |
BOOL | freerdp_client_send_button_event (rdpClientContext *cctx, BOOL relative, UINT16 mflags, INT32 x, INT32 y) |
BOOL | freerdp_client_send_extended_button_event (rdpClientContext *cctx, BOOL relative, UINT16 mflags, INT32 x, INT32 y) |
static BOOL | freerdp_handle_touch_up (rdpClientContext *cctx, const FreeRDP_TouchContact *contact) |
static BOOL | freerdp_handle_touch_down (rdpClientContext *cctx, const FreeRDP_TouchContact *contact) |
static BOOL | freerdp_handle_touch_motion (rdpClientContext *cctx, const FreeRDP_TouchContact *contact) |
static BOOL | freerdp_client_touch_update (rdpClientContext *cctx, UINT32 flags, INT32 touchId, UINT32 pressure, INT32 x, INT32 y, FreeRDP_TouchContact *pcontact) |
BOOL | freerdp_client_handle_touch (rdpClientContext *cctx, UINT32 flags, INT32 finger, UINT32 pressure, INT32 x, INT32 y) |
BOOL | freerdp_client_load_channels (freerdp *instance) |
int | client_cli_logon_error_info (freerdp *instance, UINT32 data, UINT32 type) |
static FreeRDP_PenDevice * | freerdp_client_get_pen (rdpClientContext *cctx, INT32 deviceid, size_t *pos) |
static BOOL | freerdp_client_register_pen (rdpClientContext *cctx, UINT32 flags, INT32 deviceid, double pressure) |
BOOL | freerdp_client_handle_pen (rdpClientContext *cctx, UINT32 flags, INT32 deviceid,...) |
BOOL | freerdp_client_pen_cancel_all (rdpClientContext *cctx) |
BOOL | freerdp_client_is_pen (rdpClientContext *cctx, INT32 deviceid) |
BOOL | freerdp_client_use_relative_mouse_events (rdpClientContext *ccontext) |
this function checks if relative mouse events are supported and enabled for this session. More... | |
#define TAG CLIENT_TAG("common") |
FreeRDP: A Remote Desktop Protocol Implementation FreeRDP Client Common
Copyright 2012 Marc-Andre Moreau marca ndre .more au@g mail. com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
BOOL client_auto_reconnect | ( | freerdp * | instance | ) |
BOOL client_auto_reconnect_ex | ( | freerdp * | instance, |
BOOL(*)(freerdp *instance) | window_events | ||
) |
|
static |
BOOL client_cli_authenticate_ex | ( | freerdp * | instance, |
char ** | username, | ||
char ** | password, | ||
char ** | domain, | ||
rdp_auth_reason | reason | ||
) |
|
static |
Callback set in the rdp_freerdp structure, and used to get the user's password, if required to establish the connection. This function is actually called in credssp_ntlmssp_client_init()
instance | - pointer to the rdp_freerdp structure that contains the connection settings |
username | - unused |
password | - on return: pointer to a character string that will be filled by the password entered by the user. Note that this character string will be allocated inside the function, and needs to be deallocated by the caller using free(), even in case this function fails. |
domain | - unused |
BOOL client_cli_choose_smartcard | ( | freerdp * | instance, |
SmartcardCertInfo ** | cert_list, | ||
DWORD | count, | ||
DWORD * | choice, | ||
BOOL | gateway | ||
) |
BOOL client_cli_get_access_token | ( | freerdp * | instance, |
AccessTokenType | tokenType, | ||
char ** | token, | ||
size_t | count, | ||
... | |||
) |
|
static |
|
static |
int client_cli_logon_error_info | ( | freerdp * | instance, |
UINT32 | data, | ||
UINT32 | type | ||
) |
|
static |
Callback set in the rdp_freerdp structure, and used to make a certificate validation when the connection requires it. This function will actually be called by tls_verify_certificate().
instance | - pointer to the rdp_freerdp structure that contains the connection settings |
common_name | |
subject | |
issuer | |
fingerprint | |
host_mismatch | Indicates the certificate host does not match. |
BOOL client_cli_present_gateway_message | ( | freerdp * | instance, |
UINT32 | type, | ||
BOOL | isDisplayMandatory, | ||
BOOL | isConsentMandatory, | ||
size_t | length, | ||
const WCHAR * | message | ||
) |
DWORD client_cli_verify_certificate_ex | ( | freerdp * | instance, |
const char * | host, | ||
UINT16 | port, | ||
const char * | common_name, | ||
const char * | subject, | ||
const char * | issuer, | ||
const char * | fingerprint, | ||
DWORD | flags | ||
) |
Callback set in the rdp_freerdp structure, and used to make a certificate validation when the connection requires it. This function will actually be called by tls_verify_certificate().
instance | pointer to the rdp_freerdp structure that contains the connection settings |
host | The host currently connecting to |
port | The port currently connecting to |
common_name | The common name of the certificate, should match host or an alias of it |
subject | The subject of the certificate |
issuer | The certificate issuer name |
fingerprint | The fingerprint of the certificate |
flags | See VERIFY_CERT_FLAG_* for possible values. |
DWORD client_cli_verify_changed_certificate_ex | ( | freerdp * | instance, |
const char * | host, | ||
UINT16 | port, | ||
const char * | common_name, | ||
const char * | subject, | ||
const char * | issuer, | ||
const char * | fingerprint, | ||
const char * | old_subject, | ||
const char * | old_issuer, | ||
const char * | old_fingerprint, | ||
DWORD | flags | ||
) |
Callback set in the rdp_freerdp structure, and used to make a certificate validation when a stored certificate does not match the remote counterpart. This function will actually be called by tls_verify_certificate().
instance | - pointer to the rdp_freerdp structure that contains the connection settings |
common_name | |
subject | |
issuer | |
fingerprint | |
old_subject | |
old_issuer | |
old_fingerprint |
instance | pointer to the rdp_freerdp structure that contains the connection settings |
host | The host currently connecting to |
port | The port currently connecting to |
common_name | The common name of the certificate, should match host or an alias of it |
subject | The subject of the certificate |
issuer | The certificate issuer name |
fingerprint | The fingerprint of the certificate |
old_subject | The subject of the previous certificate |
old_issuer | The previous certificate issuer name |
old_fingerprint | The fingerprint of the previous certificate |
flags | See VERIFY_CERT_FLAG_* for possible values. |
BOOL client_common_get_access_token | ( | freerdp * | instance, |
const char * | request, | ||
char ** | token | ||
) |
SSIZE_T client_common_retry_dialog | ( | freerdp * | instance, |
const char * | what, | ||
size_t | current, | ||
void * | userarg | ||
) |
|
static |
|
static |
|
static |
int freerdp_client_common_stop | ( | rdpContext * | context | ) |
void freerdp_client_context_free | ( | rdpContext * | context | ) |
rdpContext* freerdp_client_context_new | ( | const RDP_CLIENT_ENTRY_POINTS * | pEntryPoints | ) |
freerdp* freerdp_client_get_instance | ( | rdpContext * | context | ) |
|
static |
HANDLE freerdp_client_get_thread | ( | rdpContext * | context | ) |
BOOL freerdp_client_handle_pen | ( | rdpClientContext * | cctx, |
UINT32 | flags, | ||
INT32 | deviceid, | ||
... | |||
) |
BOOL freerdp_client_handle_touch | ( | rdpClientContext * | cctx, |
UINT32 | flags, | ||
INT32 | finger, | ||
UINT32 | pressure, | ||
INT32 | x, | ||
INT32 | y | ||
) |
BOOL freerdp_client_is_pen | ( | rdpClientContext * | cctx, |
INT32 | deviceid | ||
) |
BOOL freerdp_client_load_channels | ( | freerdp * | instance | ) |
void freerdp_client_OnChannelConnectedEventHandler | ( | void * | context, |
const ChannelConnectedEventArgs * | e | ||
) |
void freerdp_client_OnChannelDisconnectedEventHandler | ( | void * | context, |
const ChannelDisconnectedEventArgs * | e | ||
) |
BOOL freerdp_client_pen_cancel_all | ( | rdpClientContext * | cctx | ) |
|
static |
BOOL freerdp_client_send_button_event | ( | rdpClientContext * | cctx, |
BOOL | relative, | ||
UINT16 | mflags, | ||
INT32 | x, | ||
INT32 | y | ||
) |
BOOL freerdp_client_send_extended_button_event | ( | rdpClientContext * | cctx, |
BOOL | relative, | ||
UINT16 | mflags, | ||
INT32 | x, | ||
INT32 | y | ||
) |
BOOL freerdp_client_send_wheel_event | ( | rdpClientContext * | cctx, |
UINT16 | mflags | ||
) |
int freerdp_client_settings_parse_assistance_file | ( | rdpSettings * | settings, |
int | argc, | ||
char * | argv[] | ||
) |
int freerdp_client_settings_parse_command_line | ( | rdpSettings * | settings, |
int | argc, | ||
char ** | argv, | ||
BOOL | allowUnknown | ||
) |
int freerdp_client_settings_parse_command_line_ex | ( | rdpSettings * | settings, |
int | argc, | ||
char ** | argv, | ||
BOOL | allowUnknown, | ||
COMMAND_LINE_ARGUMENT_A * | args, | ||
size_t | count, | ||
int(*)(const COMMAND_LINE_ARGUMENT *arg, void *custom) | handle_option, | ||
void * | handle_userdata | ||
) |
int freerdp_client_settings_parse_connection_file | ( | rdpSettings * | settings, |
const char * | filename | ||
) |
int freerdp_client_settings_parse_connection_file_buffer | ( | rdpSettings * | settings, |
const BYTE * | buffer, | ||
size_t | size | ||
) |
|
static |
int freerdp_client_settings_write_connection_file | ( | const rdpSettings * | settings, |
const char * | filename, | ||
BOOL | unicode | ||
) |
int freerdp_client_start | ( | rdpContext * | context | ) |
int freerdp_client_stop | ( | rdpContext * | context | ) |
|
static |
BOOL freerdp_client_use_relative_mouse_events | ( | rdpClientContext * | cctx | ) |
this function checks if relative mouse events are supported and enabled for this session.
cctx | The rdpClientContext to check |
|
static |
|
static |
|
static |
|
static |