/* BSD-2-Clause license * * Copyright (c) 2018-2023 NST , sss . * */ #pragma once #include #include #include #include #define CLRCONV_ALPHA 1 #define CLRCONV_INVERT 2 /* if defined RGB555 format is used when rendering with a 16-bit frame buffer */ #define CLRCONV_RGB555 4 /* Supported Internal Buffer Formats */ #define CLRBUF_16BPP 8 #define CLRBUF_32BPP 32 struct _CLRCONV { int alpha; int invert; int rgb555; rdpPalette *palette; }; typedef struct _CLRCONV CLRCONV; typedef CLRCONV *HCLRCONV; /* #define TAG CLIENT_TAG ("RDP")*/ typedef struct { /* TODO: make variables list instead of static set */ backend_setting_str host, pcb, user, password, /* new settings from freerdp header:*/ Domain, PasswordHash, AcceptedCert, ClientHostname, ClientProductId, AlternateShell, ShellWorkingDirectory, ClientAddress, ClientDir, DynamicDSTTimeZoneKeyName, RemoteAssistanceSessionId, RemoteAssistancePassStub, RemoteAssistancePassword, RemoteAssistanceRCTicket, AuthenticationServiceClass, AllowedTlsCiphers, NtlmSamFile, PreconnectionBlob, RedirectionAcceptedCert, KerberosKdc, KerberosRealm, CertificateName, CertificateFile, PrivateKeyFile, CertificateContent, PrivateKeyContent, WindowTitle, WmClass, ComputerName, ConnectionFile, AssistanceFile, HomePath, ConfigPath, CurrentPath, DumpRemoteFxFile, PlayRemoteFxFile, GatewayHostname, GatewayUsername, GatewayPassword, GatewayDomain, GatewayAccessToken, GatewayAcceptedCert, ProxyHostname, RemoteApplicationName, RemoteApplicationIcon, RemoteApplicationProgram, RemoteApplicationFile, RemoteApplicationGuid, RemoteApplicationCmdLine, ImeFileName, DrivesToRedirect, ActionScript; backend_setting_int port, perf, fntlm, nowallp, nowdrag, nomani, notheme, nonla, notls, width, height, /* new settings from freerdp header:*/ ServerMode, WaitForOutputBufferFlush, MaxTimeInCheckLoop, DesktopWidth, DesktopHeight, Workarea, Fullscreen, GrabKeyboard, Decorations, RdpVersion, ColorDepth, ExtSecurity, NlaSecurity, TlsSecurity, RdpSecurity, NegotiateSecurityLayer, RestrictedAdminModeRequired, MstscCookieMode, CookieMaxLength, ClientBuild, KeyboardType, KeyboardSubType, KeyboardFunctionKey, KeyboardLayout, UseRdpSecurityLayer, SaltedChecksum, ServerPort, GatewayPort, DesktopResize, ToggleFullscreen, Floatbar, DesktopPosX, DesktopPosY, SoftwareGdi, UnmapButtons, PerformanceFlags, AllowFontSmoothing, AllowDesktopComposition, DisableWallpaper, DisableFullWindowDrag, DisableMenuAnims, DisableThemes, ConnectionType, EncryptionMethods, EncryptionLevel, FIPSMode, CompressionEnabled, LogonNotify, BrushSupportLevel, RemoteApplicationMode, TcpAckTimeout; } my_rdp_settings; typedef struct { rdpPointer pointer; uint32_t id; } my_rdp_pointer; struct rdp_internals_s; typedef struct rdp_internals_s rdp_internals; struct my_rdp_clipboard_s; typedef struct my_rdp_clipboard_s my_rdp_clipboard; struct my_rdp_ft_s; typedef struct my_rdp_ft_s my_rdp_ft; typedef struct { rdpContext context; my_rdp_clipboard *clipboard; my_rdp_ft *ft_to_client, *ft_to_server; rdp_internals *my_internals; } my_rdp_context; struct rdp_internals_s { freerdp *instance; my_rdp_context *context; rdpSettings *settings; void *task_info; wrdp_core_exports *core; wrdp_backend_module *backend; my_rdp_settings my_settings; rdp_connection_state conn_state; /* libev watchers */ /* TODO: dynamic allocation */ ev_io rdp_fd[32]; int rdp_fd_count; HCLRCONV clrconv; uint32_t m_ptrId; }; bool rdp_init_internals(void *internals); bool rdp_connect(void *internals); bool rdp_init_settings(void *internals);