diff options
Diffstat (limited to '')
-rw-r--r-- | include/config/config.h.in | 1 | ||||
-rw-r--r-- | include/freerdp/api.h | 2 | ||||
-rw-r--r-- | include/freerdp/channels/location.h | 1 | ||||
-rw-r--r-- | include/freerdp/client/location.h | 97 | ||||
-rw-r--r-- | include/freerdp/primitives.h | 3 | ||||
-rw-r--r-- | include/freerdp/rail.h | 3 | ||||
-rw-r--r-- | include/freerdp/server/shadow.h | 30 | ||||
-rw-r--r-- | include/freerdp/settings.h | 11 | ||||
-rw-r--r-- | include/freerdp/settings_types_private.h | 6 | ||||
-rw-r--r-- | include/freerdp/utils/encoded_types.h | 9 |
10 files changed, 150 insertions, 13 deletions
diff --git a/include/config/config.h.in b/include/config/config.h.in index 0c6ec7b..460389b 100644 --- a/include/config/config.h.in +++ b/include/config/config.h.in @@ -18,7 +18,6 @@ #cmakedefine WITH_GPROF #cmakedefine WITH_SSE2 #cmakedefine WITH_NEON -#cmakedefine WITH_IPP #cmakedefine WITH_CUPS #cmakedefine WITH_JPEG #cmakedefine WITH_WIN8 diff --git a/include/freerdp/api.h b/include/freerdp/api.h index aa25555..b7655cf 100644 --- a/include/freerdp/api.h +++ b/include/freerdp/api.h @@ -103,7 +103,7 @@ ((_cb != NULL) ? _cb(__VA_ARGS__) : (_default_return)) #endif -#if defined(__GNUC__) +#if defined(__GNUC__) || defined(__clang__) #define ALIGN64 __attribute__((aligned(8))) #else #ifdef _WIN32 diff --git a/include/freerdp/channels/location.h b/include/freerdp/channels/location.h index 5b91ea4..45682b0 100644 --- a/include/freerdp/channels/location.h +++ b/include/freerdp/channels/location.h @@ -24,6 +24,7 @@ #include <freerdp/dvc.h> #include <freerdp/types.h> +#define LOCATION_CHANNEL_NAME "location" #define LOCATION_DVC_CHANNEL_NAME "Microsoft::Windows::RDS::Location" #ifdef __cplusplus diff --git a/include/freerdp/client/location.h b/include/freerdp/client/location.h new file mode 100644 index 0000000..67db655 --- /dev/null +++ b/include/freerdp/client/location.h @@ -0,0 +1,97 @@ +/** + * FreeRDP: A Remote Desktop Protocol Implementation + * Location Virtual Channel Extension + * + * Copyright 2024 Armin Novak <anovak@thincast.com> + * Copyright 2024 Thincast Technologies GmbH + * + * 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. + */ + +#ifndef FREERDP_CHANNEL_LOCATION_CLIENT_LOCATION_H +#define FREERDP_CHANNEL_LOCATION_CLIENT_LOCATION_H + +#include <freerdp/channels/location.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + + typedef struct s_location_client_context LocationClientContext; + + typedef UINT (*pcLocationStart)(LocationClientContext* context, UINT32 version, UINT32 flags); + typedef UINT (*pcLocationStop)(LocationClientContext* context); + typedef UINT (*pcLocationSend)(LocationClientContext* context, LOCATION_PDUTYPE type, + size_t count, ...); + + struct s_location_client_context + { + void* handle; + void* custom; + + /**! \brief initialize location services on client + * + * \param context The client context to operate on + * \param version The location channel version (determines which features are available. + * \param flags The location channel flags. + * + * \return \b CHANNEL_RC_OK for success, an appropriate error otherwise. + */ + pcLocationStart LocationStart; + + /**! \brief stop location services on client + * + * \param context The client context to operate on + * + * \return \b CHANNEL_RC_OK for success, an appropriate error otherwise. + */ + pcLocationStop LocationStop; + + /**! \brief Send a location update. + * + * This function sends location updates to a server. + * The following parameter formats are supported: + * + * \param type one of the following: + * PDUTYPE_BASE_LOCATION3D : count = 3 | 7 + * latitude : double, required + * longitude : double, required + * altitude : INT32, required + * speed : double, optional + * heading : double, optional + * horizontalAccuracy : double, optional + * source : int, optional + * PDUTYPE_LOCATION2D_DELTA : count = 2 | 4 + * latitudeDelta : double, required + * longitudeDelta : double, required + * speedDelta : double, optional + * headingDelta : double, optional + * PDUTYPE_LOCATION3D_DELTA : count = 3 | 5 + * latitudeDelta : double, required + * longitudeDelta : double, required + * altitudeDelta : INT32, optional + * speedDelta : double, optional + * headingDelta : double, optional + * \param count the number of variable arguments following + * + * return \b CHANNEL_RC_OK for success, an appropriate error otherwise. + */ + pcLocationSend LocationSend; + }; + +#ifdef __cplusplus +} +#endif + +#endif /* FREERDP_CHANNEL_LOCATION_CLIENT_LOCATION_H */ diff --git a/include/freerdp/primitives.h b/include/freerdp/primitives.h index 20b74d6..29f103a 100644 --- a/include/freerdp/primitives.h +++ b/include/freerdp/primitives.h @@ -70,12 +70,11 @@ enum PRIM_FLAGS_HAVE_EXTGPU = (1U << 1), /* primitives are using the GPU */ }; -/* Structures compatible with IPP */ typedef struct { UINT32 width; UINT32 height; -} prim_size_t; /* like IppiSize */ +} prim_size_t; typedef enum { diff --git a/include/freerdp/rail.h b/include/freerdp/rail.h index 66ad34b..b3cd702 100644 --- a/include/freerdp/rail.h +++ b/include/freerdp/rail.h @@ -583,6 +583,9 @@ typedef enum FREERDP_API BOOL utf8_string_to_rail_string(const char* string, RAIL_UNICODE_STRING* unicode_string); + FREERDP_API const char* rail_handshake_ex_flags_to_string(UINT32 flags, char* buffer, + size_t len); + #ifdef __cplusplus } #endif diff --git a/include/freerdp/server/shadow.h b/include/freerdp/server/shadow.h index 9ddb8ae..9544e16 100644 --- a/include/freerdp/server/shadow.h +++ b/include/freerdp/server/shadow.h @@ -302,9 +302,15 @@ extern "C" FREERDP_API void shadow_subsystem_set_entry_builtin(const char* name); FREERDP_API void shadow_subsystem_set_entry(pfnShadowSubsystemEntry pEntry); - FREERDP_API int shadow_subsystem_pointer_convert_alpha_pointer_data( - BYTE* pixels, BOOL premultiplied, UINT32 width, UINT32 height, - SHADOW_MSG_OUT_POINTER_ALPHA_UPDATE* pointerColor); + FREERDP_API WINPR_DEPRECATED_VAR( + "Use shadow_subsystem_pointer_convert_alpha_pointer_data_to_format instead", + int shadow_subsystem_pointer_convert_alpha_pointer_data( + const BYTE* WINPR_RESTRICT pixels, BOOL premultiplied, UINT32 width, UINT32 height, + SHADOW_MSG_OUT_POINTER_ALPHA_UPDATE* WINPR_RESTRICT pointerColor)); + + FREERDP_API int shadow_subsystem_pointer_convert_alpha_pointer_data_to_format( + const BYTE* WINPR_RESTRICT pixels, UINT32 format, BOOL premultiplied, UINT32 width, + UINT32 height, SHADOW_MSG_OUT_POINTER_ALPHA_UPDATE* WINPR_RESTRICT pointerColor); FREERDP_API int shadow_server_parse_command_line(rdpShadowServer* server, int argc, char** argv, COMMAND_LINE_ARGUMENT_A* cargs); @@ -325,10 +331,20 @@ extern "C" WINPR_ATTR_MALLOC(shadow_server_free, 1) FREERDP_API rdpShadowServer* shadow_server_new(void); - FREERDP_API int shadow_capture_align_clip_rect(RECTANGLE_16* rect, RECTANGLE_16* clip); - FREERDP_API int shadow_capture_compare(BYTE* pData1, UINT32 nStep1, UINT32 nWidth, - UINT32 nHeight, BYTE* pData2, UINT32 nStep2, - RECTANGLE_16* rect); + FREERDP_API int shadow_capture_align_clip_rect(RECTANGLE_16* rect, const RECTANGLE_16* clip); + + FREERDP_API WINPR_DEPRECATED_VAR( + "Use shadow_capture_compare_with_format", + int shadow_capture_compare(const BYTE* WINPR_RESTRICT pData1, UINT32 nStep1, UINT32 nWidth, + UINT32 nHeight, const BYTE* WINPR_RESTRICT pData2, UINT32 nStep2, + RECTANGLE_16* WINPR_RESTRICT rect)); + + FREERDP_API int shadow_capture_compare_with_format(const BYTE* WINPR_RESTRICT pData1, + UINT32 format1, UINT32 nStep1, UINT32 nWidth, + UINT32 nHeight, + const BYTE* WINPR_RESTRICT pData2, + UINT32 format2, UINT32 nStep2, + RECTANGLE_16* WINPR_RESTRICT rect); FREERDP_API void shadow_subsystem_frame_update(rdpShadowSubsystem* subsystem); diff --git a/include/freerdp/settings.h b/include/freerdp/settings.h index cd89b32..705ba45 100644 --- a/include/freerdp/settings.h +++ b/include/freerdp/settings.h @@ -164,6 +164,17 @@ typedef struct rdp_settings rdpSettings; const char* option, const char* value); FREERDP_API BOOL freerdp_device_collection_add(rdpSettings* settings, RDPDR_DEVICE* device); + + /** \brief Removed a device from the settings, returns ownership of the allocated device to + * caller. + * + * \param settings the settings to remove the device from + * \param device the device to remove + * + * \return \b TRUE if the device was removed, \b FALSE if device was not found or is NULL + */ + FREERDP_API BOOL freerdp_device_collection_del(rdpSettings* settings, + const RDPDR_DEVICE* device); FREERDP_API RDPDR_DEVICE* freerdp_device_collection_find(rdpSettings* settings, const char* name); FREERDP_API RDPDR_DEVICE* freerdp_device_collection_find_type(rdpSettings* settings, diff --git a/include/freerdp/settings_types_private.h b/include/freerdp/settings_types_private.h index 6d23110..4f1c71e 100644 --- a/include/freerdp/settings_types_private.h +++ b/include/freerdp/settings_types_private.h @@ -213,7 +213,8 @@ struct rdp_settings SETTINGS_DEPRECATED(ALIGN64 ARC_CS_PRIVATE_PACKET* ClientAutoReconnectCookie); /* 834 */ SETTINGS_DEPRECATED(ALIGN64 ARC_SC_PRIVATE_PACKET* ServerAutoReconnectCookie); /* 835 */ SETTINGS_DEPRECATED(ALIGN64 BOOL PrintReconnectCookie); /* 836 */ - UINT64 padding0896[896 - 837]; /* 837 */ + SETTINGS_DEPRECATED(ALIGN64 BOOL AutoReconnectionPacketSupported); /* 837 */ + UINT64 padding0896[896 - 838]; /* 838 */ /* Client Info (Time Zone) */ SETTINGS_DEPRECATED(ALIGN64 TIME_ZONE_INFORMATION* ClientTimeZone); /* 896 */ @@ -467,7 +468,8 @@ struct rdp_settings SETTINGS_DEPRECATED(ALIGN64 char* GatewayAvdDiagnosticserviceurl); /* 2009 */ SETTINGS_DEPRECATED(ALIGN64 char* GatewayAvdHubdiscoverygeourl); /* 2010 */ SETTINGS_DEPRECATED(ALIGN64 char* GatewayAvdActivityhint); /* 2011 */ - UINT64 padding2015[2015 - 2012]; /* 2012 */ + SETTINGS_DEPRECATED(ALIGN64 BOOL GatewayIgnoreRedirectionPolicy); /* 2012 */ + UINT64 padding2015[2015 - 2013]; /* 2013 */ /* Proxy */ SETTINGS_DEPRECATED(ALIGN64 UINT32 ProxyType); /* 2015 */ diff --git a/include/freerdp/utils/encoded_types.h b/include/freerdp/utils/encoded_types.h index b3852fe..c1f45e6 100644 --- a/include/freerdp/utils/encoded_types.h +++ b/include/freerdp/utils/encoded_types.h @@ -29,9 +29,18 @@ extern "C" { #endif +#define FREERDP_FOUR_BYTE_SIGNED_INT_MAX 0x1FFFFFFFl +#define FREERDP_FOUR_BYTE_SIGNED_INT_MIN -0x1FFFFFFFl + +#define FREERDP_FOUR_BYTE_FLOAT_MAX 0x3FFFFFF +#define FREERDP_FOUR_BYTE_FLOAT_MIN -0x3FFFFFF + FREERDP_API BOOL freerdp_read_four_byte_signed_integer(wStream* s, INT32* value); + FREERDP_API BOOL freerdp_write_four_byte_signed_integer(wStream* s, INT32 value); FREERDP_API BOOL freerdp_read_four_byte_float(wStream* s, double* value); + FREERDP_API BOOL freerdp_read_four_byte_float_exp(wStream* s, double* value, BYTE* exp); + FREERDP_API BOOL freerdp_write_four_byte_float(wStream* s, double value); #ifdef __cplusplus } |