[settings] add freerdp_settings_append_string

this function appends a string to an existing values, takes care of
memory allocations.
This commit is contained in:
akallabeth
2023-10-13 15:02:02 +02:00
committed by akallabeth
parent a9a879c59f
commit 71a7ffa8d8
2 changed files with 33 additions and 0 deletions

View File

@@ -2083,6 +2083,19 @@ extern "C"
FREERDP_API BOOL freerdp_settings_set_string(rdpSettings* settings, size_t id,
const char* param);
/** \brief appends a string to a settings value. The \b param is copied.
* If the initial value of the setting was not empty, <old value><separator><param> is created
*
* \param settings A pointer to the settings to query, must not be NULL.
* \param id The key to query
* \param separator The separator string to use. May be NULL (no separator)
* \param param The value to append
*
* \return \b TRUE for success, \b FALSE for failure
*/
FREERDP_API BOOL freerdp_settings_append_string(rdpSettings* settings, size_t id,
const char* separator, const char* param);
/** \brief Sets a string settings value. The \b param is converted to UTF-8 and the copy stored.
*
* \param settings A pointer to the settings to query, must not be NULL.