316 Commits

Author SHA1 Message Date
Armin Novak
cc5f1bbb82 [server,proxy] check for nullptr before using scard_call_context
* Make smartcard_call_cancel_all_context return FALSE if a NULL context
  is supplied.

* Do not call smartcard_call_context_signal_stop if the context is NULL
2026-03-02 09:45:27 +01:00
Armin Novak
65399661c4 [c23,api] replace NULL with nullptr 2026-02-26 14:03:05 +01:00
Armin Novak
0531803808 [warnings] make function declaration names consistent
Use the same parameter names for declaration and implementation.
2026-02-26 10:35:25 +01:00
Armin Novak
20a24fe36e [freerdp,api] mark API functions [[nodiscard]]
Mark (most) of the API functions returning a value [[nodiscard]]. This
will assist application developers spotting bad return checks.
2026-02-17 10:23:34 +01:00
Armin Novak
baf31336a8 [utils,helpers] add freerdp_getApplicationDetailsString 2026-02-09 19:55:48 +01:00
Armin Novak
39e33d9e9d [utils,helpers] add application details getter/setter
* Allow an application to set a vendor/product/version namespace to search
  for configuration files/settings/...
* Replace all FREERDP_VENDOR_STRING and similar macros with these
  getters.
2026-01-29 22:47:45 +01:00
Armin Novak
0a8ab5724d [utils] fix typo in doxygen 2026-01-29 22:06:55 +01:00
akallabeth
3170a21418 [utils] add WINPR_ATTR_NODISCARD
* Add WINPR_ATTR_NODISCARD to functions returning a value
* Add some missing WINPR_ATTR_MALLOC
2026-01-26 13:22:23 +01:00
akallabeth
7d943a9c21 [documentation] fix a few doxygen warnings 2026-01-25 09:38:33 +01:00
akallabeth
eb83f339b4 [channels,rdpdr] flag definition and stringify
* Use a enum to define RDPDR_DTYP_* constants
* Add public API freerdp_device_type_string for stringify
* Add WINPR_ATTR_NODISCARD in rdpdr_utils.h
2026-01-25 09:15:05 +01:00
akallabeth
09ae30a0f9 [core,settings] define OrderSupport flags and stringify
* Define OrderSupportFlags as enum
* Add public API stringify function
2026-01-25 09:14:59 +01:00
akallabeth
6673e8a86f [core,utils] add freerdp_input_touch_state_string
* Add freerdp_input_touch_state_string
* Remove duplicate from xfreerdp
2026-01-25 09:00:03 +01:00
akallabeth
a8ca59e290 [channels,disp] Unify definitions and add stringify
* Unify FreeRDP_DesktopRotationFlags definitions (needed in settings
  and display channel)
* Add stringify function for the flags
2026-01-25 08:55:58 +01:00
Armin Novak
684ddeb168 [utils,rdpdr] add RDPDR_CAPS_IRP_MJ stringify functions 2026-01-15 13:05:15 +01:00
Armin Novak
64b67c938c [utils] fix doxygen for freerdp_passphrase_read 2025-09-30 10:15:43 +02:00
akallabeth
1ada469cdd [freerdp,utils] modify freerdp_interruptible_get_line
* Make freerdp_interruptible_getc nonblocking so each typed char is
  returned
* Handle ctrl+[cdz] in freerdp_interruptible_getc so the function can be
  aborted by a user
* Handle simple input edit in freerdp_interruptible_get_line (delete
  characters, provide a suggested value)
2025-09-29 10:35:33 +02:00
akallabeth
74648eb3a9 [c,standard] use C99 inline 2025-09-26 11:29:26 +02:00
akallabeth
2552408b8a [api] fix missing C++ guards 2025-08-29 12:25:32 +02:00
akallabeth
f81c41ef6a [utils,helpers] fix missing C++ guards 2025-08-29 10:14:41 +02:00
akallabeth
6b80a2d4ef [utils,smartcard] better logging and error checks
* Use wLog as argument where possible to reduce the number of WLog_Get
  calls
* Do better failure checks to avoid reading invalid memory
2025-05-27 10:33:37 +02:00
akallabeth
50cef020de [utils,helpers] add freerdp_GetJSONConfigFile 2025-05-26 19:36:40 +02:00
akallabeth
45914466c2 [utils,helpers] add missing WINPR_ATTR_MALLOC 2025-05-26 17:06:58 +02:00
Armin Novak
f24a562f1e [utils,smartcard] check output buffer length
check the resulting length to the one preallocated.
2025-02-26 18:24:51 +01:00
akallabeth
c375ed6cb1 [utils,aad] fix freerdp_utils_aad_get_wellknown export 2025-02-14 11:29:35 +01:00
akallabeth
3092313d49 [channes,rdpdr] use NTSTATUS for IoStatus
the IoStatus will hold NTSTATUS values but is defined unsigned in
[MS-RDPEFS] whereas NTSTATUS is defined as signed integer. Ignore the
spec here and just treat it as signed (eliminates warnings and twos
complement will ensure the values are equal in bit representation)
2025-01-07 10:11:21 +01:00
akallabeth
a3db26c57a [warnings] fix cast warnings 2024-12-10 17:26:37 +01:00
Armin Novak
6506fb6b43 [core,gateway] add wellknown support for arm-transport
* fetch wellknown JSON for arm transport
* use dynamic logger for arm transport
2024-12-10 15:12:38 +01:00
akallabeth
b2756842b2 [core,aad] fetch wellknown before GetAccessToken
All of the URL we need for AAD authentication are dependent on a tenantid.
Fetch the wellknown file for the desired tenantid from
https://login.microsoftonline.com/{tenantid}/v2.0/.well-known/openid-configuration
and parse as JSON to have them available later on.
2024-12-10 15:12:30 +01:00
Martin Fleisz
966ddd13df Merge pull request #10694 from akallabeth/qa-fixes
Qa fixes
2024-10-03 13:09:06 +02:00
Armin Novak
dcdb0bb3b2 [utils,helpers] add a function to get FreeRDP config file paths 2024-10-02 23:28:00 +02:00
akallabeth
f6eb6ad4d7 [utils,string] add freerdp_extract_key_value
* Add new function freerdp_extract_key_value to extract key/value pairs
  from a string
* replace all sscanf usages with this new function
2024-10-01 13:05:34 +02:00
akallabeth
a1a8846ad2 [utils,proxy] refactor proxy_parse_uri
* eliminate deadstore warnings
* fix missing input checks
2024-10-01 13:05:14 +02:00
akallabeth
163aec7e2b [warnings] fix documentation command unknown 2024-09-12 21:21:41 +02:00
akallabeth
afff514ca7 [compiler] add WINPR_ATTR_MALLOC
Add WINPR_ATTR_MALLOC checks to allocating functions to help compilers
find memory leaks or allocation mismatches
2024-09-12 20:09:22 +02:00
akallabeth
fb5934007a [doxygen] add basic documentation for new API
* Add basic documentation for new functions/structs/data types since
  3.0.0
2024-09-12 20:09:19 +02:00
akallabeth
7aa80cb751 [documentation] update
* Fix wrong tag @version, replace with @since
* Document some functions
2024-09-12 13:30:03 +02:00
akallabeth
f891bd3646 [docs] add doxygen comments for 3.0 API 2024-09-10 08:31:30 +02:00
akallabeth
1e1e9a445b [utils,gfx] add rdpgfx_caps_version_str 2024-09-06 08:38:37 +02:00
akallabeth
3bba61bdf4 [utils,encoded_types] fix read/write, add limits
* fix read and write limits of four byte signed integers
* add definitions for value range MIN and MAX
2024-03-18 08:41:17 +01:00
akallabeth
2dd80b1e80 [utils] implement write 4byte types
* freerdp_write_four_byte_signed_integer
* freerdp_write_four_byte_float
2024-03-11 13:22:12 +01:00
akallabeth
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
akallabeth
bb42d425ed [gcc,clang] add support for attribute(malloc)
Mark all malloc like functions and add their appropriate free function
to let the compiler complain on mismatches
2024-02-02 15:10:40 +01:00
Armin Novak
e56fcb45cb [core,aad] move cJSON related parsing to core
hide cJSON parser from freerdp-client library, link privately
2023-11-02 11:30:55 +01:00
Pascal Nowack
5ec5be7ac4 utils: Add helper functions to parse encoded types into regular ones
Some virtual channels, like the location channel use encoded types to
lower the bandwidth usage.
Add common helper functions, so that each virtual channel doesn't have
to reimplement the parser functions again and again.
2023-10-17 10:18:08 +02:00
akallabeth
14d0ec9335 [core] move http status to string to utils
freerdp_http_status_string and freerdp_http_status_string_format are now
exposed as public API functions to work with http status codes
2023-07-21 14:53:19 +02:00
fifthdegree
d309fcd6e8 Restructure Azure AD related stuff
- Move responsibility for obtaining access tokens to clients
- Add function for getting access tokens for AVD
- Get correct server hostname during AVD setup
- Add utility function for doing http requests
2023-07-20 14:20:28 +02:00
akallabeth
a5b42f0f84 [includes] untangled circular includes 2023-03-15 08:22:23 +01:00
akallabeth
61779694ee [includes] improved c++ guards 2023-03-15 08:22:23 +01:00
akallabeth
157d71e802 [core,aad] migrate to cJSON parser library 2023-03-10 16:38:07 +01:00
fifthdegree
5df4d4c934 Implement a basic JSON parser 2023-03-10 16:38:07 +01:00