mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[c23,api] replace NULL with nullptr
This commit is contained in:
@@ -85,35 +85,35 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define IFCALL(_cb, ...) \
|
#define IFCALL(_cb, ...) \
|
||||||
do \
|
|
||||||
{ \
|
|
||||||
if (_cb != NULL) \
|
|
||||||
_cb(__VA_ARGS__); \
|
|
||||||
else \
|
|
||||||
WLog_VRB("com.freerdp.api", "IFCALL(" #_cb ") == NULL"); \
|
|
||||||
} while (0)
|
|
||||||
#define IFCALLRET(_cb, _ret, ...) \
|
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
if (_cb != NULL) \
|
if (_cb != nullptr) \
|
||||||
_ret = _cb(__VA_ARGS__); \
|
_cb(__VA_ARGS__); \
|
||||||
else \
|
else \
|
||||||
WLog_VRB("com.freerdp.api", "IFCALLRET(" #_cb ") == NULL"); \
|
WLog_VRB("com.freerdp.api", "IFCALL(" #_cb ") == nullptr"); \
|
||||||
|
} while (0)
|
||||||
|
#define IFCALLRET(_cb, _ret, ...) \
|
||||||
|
do \
|
||||||
|
{ \
|
||||||
|
if (_cb != nullptr) \
|
||||||
|
_ret = _cb(__VA_ARGS__); \
|
||||||
|
else \
|
||||||
|
WLog_VRB("com.freerdp.api", "IFCALLRET(" #_cb ") == nullptr"); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#if defined(__GNUC__) || defined(__clang__)
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
#define IFCALLRESULT(_default_return, _cb, ...) \
|
#define IFCALLRESULT(_default_return, _cb, ...) \
|
||||||
__extension__({ \
|
__extension__({ \
|
||||||
if (_cb == NULL) \
|
if (_cb == nullptr) \
|
||||||
{ \
|
{ \
|
||||||
WLog_VRB("com.freerdp.api", "IFCALLRESULT(" #_cb ") == NULL"); \
|
WLog_VRB("com.freerdp.api", "IFCALLRESULT(" #_cb ") == nullptr"); \
|
||||||
} \
|
} \
|
||||||
((_cb != NULL) ? _cb(__VA_ARGS__) : (_default_return)); \
|
((_cb != nullptr) ? _cb(__VA_ARGS__) : (_default_return)); \
|
||||||
})
|
})
|
||||||
#else
|
#else
|
||||||
#define IFCALLRESULT(_default_return, _cb, ...) \
|
#define IFCALLRESULT(_default_return, _cb, ...) \
|
||||||
((_cb != NULL) ? _cb(__VA_ARGS__) : (_default_return))
|
((_cb != nullptr) ? _cb(__VA_ARGS__) : (_default_return))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ALIGN64 DECLSPEC_ALIGN(8)
|
#define ALIGN64 DECLSPEC_ALIGN(8)
|
||||||
|
|||||||
@@ -70,13 +70,13 @@ extern "C"
|
|||||||
* @note This function may be called even without the \b event-handle to be set, so it must be
|
* @note This function may be called even without the \b event-handle to be set, so it must be
|
||||||
* capable of handling these calls properly.
|
* capable of handling these calls properly.
|
||||||
*
|
*
|
||||||
* @param channels A pointer to the channels instance to register with. Must not be \b NULL
|
* @param channels A pointer to the channels instance to register with. Must not be \b nullptr
|
||||||
* @param handle A \b event-handle to be used to notify the RDP main thread that the callback
|
* @param handle A \b event-handle to be used to notify the RDP main thread that the callback
|
||||||
* function should be called again. Must not be \b INVALID_HANDLE_PARAM
|
* function should be called again. Must not be \b INVALID_HANDLE_PARAM
|
||||||
* @param fkt The callback function responsible to handle the channel specifics. Must not be \b
|
* @param fkt The callback function responsible to handle the channel specifics. Must not be \b
|
||||||
* NULL
|
* nullptr
|
||||||
* @param userdata A pointer to a channel specific context. Most likely the channel context.
|
* @param userdata A pointer to a channel specific context. Most likely the channel context.
|
||||||
* May be \b NULL if not required.
|
* May be \b nullptr if not required.
|
||||||
*
|
*
|
||||||
* @return \b TRUE if successful, \b FALSE if any error occurs.
|
* @return \b TRUE if successful, \b FALSE if any error occurs.
|
||||||
* @since version 3.9.0 */
|
* @since version 3.9.0 */
|
||||||
@@ -87,7 +87,7 @@ extern "C"
|
|||||||
|
|
||||||
/** @brief Remove an existing registration for \b event-handle from the channels instance
|
/** @brief Remove an existing registration for \b event-handle from the channels instance
|
||||||
*
|
*
|
||||||
* @param channels A pointer to the channels instance to register with. Must not be \b NULL
|
* @param channels A pointer to the channels instance to register with. Must not be \b nullptr
|
||||||
* @param handle A \b event-handle to be used to notify the RDP main thread that the callback
|
* @param handle A \b event-handle to be used to notify the RDP main thread that the callback
|
||||||
* function should be called again. Must not be \b INVALID_HANDLE_PARAM
|
* function should be called again. Must not be \b INVALID_HANDLE_PARAM
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ FREERDP_API DWORD FreeRDPAreColorFormatsEqualNoAlpha(DWORD first, DWORD second);
|
|||||||
* @param data source buffer, must be (nWidth + 7) / 8 bytes long
|
* @param data source buffer, must be (nWidth + 7) / 8 bytes long
|
||||||
*
|
*
|
||||||
* @return A buffer allocated with winpr_aligned_malloc(width * height, 16)
|
* @return A buffer allocated with winpr_aligned_malloc(width * height, 16)
|
||||||
* if successful, NULL otherwise.
|
* if successful, nullptr otherwise.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
WINPR_DEPRECATED_VAR("[since 3.21.0] use freerdp_glyph_convert_ex instead",
|
WINPR_DEPRECATED_VAR("[since 3.21.0] use freerdp_glyph_convert_ex instead",
|
||||||
@@ -320,7 +320,7 @@ FREERDP_API DWORD FreeRDPAreColorFormatsEqualNoAlpha(DWORD first, DWORD second);
|
|||||||
* @param len the length of \ref data in bytes
|
* @param len the length of \ref data in bytes
|
||||||
*
|
*
|
||||||
* @return A buffer allocated with winpr_aligned_malloc(width * height, 16)
|
* @return A buffer allocated with winpr_aligned_malloc(width * height, 16)
|
||||||
* if successful, NULL otherwise.
|
* if successful, nullptr otherwise.
|
||||||
* @since version 3.21.0
|
* @since version 3.21.0
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(winpr_aligned_free, 1)
|
WINPR_ATTR_MALLOC(winpr_aligned_free, 1)
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ extern "C"
|
|||||||
|
|
||||||
/** @brief Set a \ref NSC_PARAMETER for a \ref NSC_CONTEXT
|
/** @brief Set a \ref NSC_PARAMETER for a \ref NSC_CONTEXT
|
||||||
*
|
*
|
||||||
* @param context The \ref NSC_CONTEXT context to work on. Must not be \b NULL
|
* @param context The \ref NSC_CONTEXT context to work on. Must not be \b nullptr
|
||||||
* @param what A \ref NSC_PARAMETER to identify what to change
|
* @param what A \ref NSC_PARAMETER to identify what to change
|
||||||
* @param value The value to set
|
* @param value The value to set
|
||||||
*
|
*
|
||||||
@@ -66,7 +66,7 @@ extern "C"
|
|||||||
|
|
||||||
/** @brief decode a NSC message
|
/** @brief decode a NSC message
|
||||||
*
|
*
|
||||||
* @param context The \ref NSC_CONTEXT context to work on. Must not be \b NULL
|
* @param context The \ref NSC_CONTEXT context to work on. Must not be \b nullptr
|
||||||
* @param bpp The bit depth of the data
|
* @param bpp The bit depth of the data
|
||||||
* @param width The width in pixels of the NSC surface
|
* @param width The width in pixels of the NSC surface
|
||||||
* @param height The height in pixels of the NSC surface
|
* @param height The height in pixels of the NSC surface
|
||||||
@@ -94,8 +94,8 @@ extern "C"
|
|||||||
|
|
||||||
/** @brief Encode a bitmap with \b NSC
|
/** @brief Encode a bitmap with \b NSC
|
||||||
*
|
*
|
||||||
* @param context The \ref NSC_CONTEXT context to work on. Must not be \b NULL
|
* @param context The \ref NSC_CONTEXT context to work on. Must not be \b nullptr
|
||||||
* @param s a \ref wStream used to write \b NSC encoded data to. Must not be \b NULL
|
* @param s a \ref wStream used to write \b NSC encoded data to. Must not be \b nullptr
|
||||||
* @param bmpdata A pointer to the bitmap to encode. Format must match \b NSC_COLOR_FORMAT
|
* @param bmpdata A pointer to the bitmap to encode. Format must match \b NSC_COLOR_FORMAT
|
||||||
* @param width The width of the bitmap in pixels
|
* @param width The width of the bitmap in pixels
|
||||||
* @param height The height of the bitmap in pixels
|
* @param height The height of the bitmap in pixels
|
||||||
@@ -122,7 +122,7 @@ extern "C"
|
|||||||
|
|
||||||
/** @brief This function resets a \ref NSC_CONTEXT to a new resolution
|
/** @brief This function resets a \ref NSC_CONTEXT to a new resolution
|
||||||
*
|
*
|
||||||
* @param context The \ref NSC_CONTEXT context to work on. Must not be \b NULL
|
* @param context The \ref NSC_CONTEXT context to work on. Must not be \b nullptr
|
||||||
* @param width The width of the context in pixels
|
* @param width The width of the context in pixels
|
||||||
* @param height The height of the context in pixels
|
* @param height The height of the context in pixels
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -76,9 +76,9 @@ extern "C"
|
|||||||
FREERDP_API int region16_n_rects(const REGION16* region);
|
FREERDP_API int region16_n_rects(const REGION16* region);
|
||||||
|
|
||||||
/** returns a pointer to rectangles and the number of rectangles in this region.
|
/** returns a pointer to rectangles and the number of rectangles in this region.
|
||||||
* nbRects can be set to NULL if not interested in the number of rectangles.
|
* nbRects can be set to nullptr if not interested in the number of rectangles.
|
||||||
* @param region the input region
|
* @param region the input region
|
||||||
* @param nbRects if non-NULL returns the number of rectangles
|
* @param nbRects if non-nullptr returns the number of rectangles
|
||||||
* @return a pointer on the rectangles
|
* @return a pointer on the rectangles
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* @since version 3.0.0
|
* @since version 3.0.0
|
||||||
*
|
*
|
||||||
* @return The RFX palette that is currently in use or \b NULL
|
* @return The RFX palette that is currently in use or \b nullptr
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
FREERDP_API const BYTE* rfx_context_get_palette(RFX_CONTEXT* WINPR_RESTRICT context);
|
FREERDP_API const BYTE* rfx_context_get_palette(RFX_CONTEXT* WINPR_RESTRICT context);
|
||||||
|
|||||||
@@ -76,14 +76,14 @@ extern "C"
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Free a rdpCodecs instance
|
* @brief Free a rdpCodecs instance
|
||||||
* @param codecs A pointer to a rdpCodecs instance or NULL
|
* @param codecs A pointer to a rdpCodecs instance or nullptr
|
||||||
* @since version 3.6.0
|
* @since version 3.6.0
|
||||||
*/
|
*/
|
||||||
FREERDP_API void freerdp_client_codecs_free(rdpCodecs* codecs);
|
FREERDP_API void freerdp_client_codecs_free(rdpCodecs* codecs);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Allocate a rdpCodecs instance.
|
* @brief Allocate a rdpCodecs instance.
|
||||||
* @return A newly allocated instance or \b NULL in case of failure.
|
* @return A newly allocated instance or \b nullptr in case of failure.
|
||||||
* @since version 3.6.0
|
* @since version 3.6.0
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(freerdp_client_codecs_free, 1)
|
WINPR_ATTR_MALLOC(freerdp_client_codecs_free, 1)
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ extern "C"
|
|||||||
* @param pLength A pointer to the size in bytes of the PEM string
|
* @param pLength A pointer to the size in bytes of the PEM string
|
||||||
* @param withCertChain \b TRUE to export a full chain PEM, \b FALSE for only the last
|
* @param withCertChain \b TRUE to export a full chain PEM, \b FALSE for only the last
|
||||||
* certificate in the chain
|
* certificate in the chain
|
||||||
* @return A newly allocated string containing the requested PEM (free to deallocate) or NULL
|
* @return A newly allocated string containing the requested PEM (free to deallocate) or nullptr
|
||||||
* @since version 3.8.0
|
* @since version 3.8.0
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(free, 1)
|
WINPR_ATTR_MALLOC(free, 1)
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* @since version 3.0.0
|
* @since version 3.0.0
|
||||||
*
|
*
|
||||||
* @return The certificate store file path or \b NULL
|
* @return The certificate store file path or \b nullptr
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(free, 1)
|
WINPR_ATTR_MALLOC(free, 1)
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* @since version 3.0.0
|
* @since version 3.0.0
|
||||||
*
|
*
|
||||||
* @return The encoded BASE64 string or \b NULL if failed
|
* @return The encoded BASE64 string or \b nullptr if failed
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
FREERDP_API char* crypto_base64_encode_ex(const BYTE* WINPR_RESTRICT data, size_t length,
|
FREERDP_API char* crypto_base64_encode_ex(const BYTE* WINPR_RESTRICT data, size_t length,
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ extern "C"
|
|||||||
/** @brief Create a private key from file \b keyfile with optional password \b password
|
/** @brief Create a private key from file \b keyfile with optional password \b password
|
||||||
*
|
*
|
||||||
* @param keyfile The file to read the key from
|
* @param keyfile The file to read the key from
|
||||||
* @param password The optional password the key is enecrypted with, \b NULL for unencrypted
|
* @param password The optional password the key is enecrypted with, \b nullptr for unencrypted
|
||||||
* @return An allocated private key, \b NULL in case of failure.
|
* @return An allocated private key, \b nullptr in case of failure.
|
||||||
* @since version 3.16.0
|
* @since version 3.16.0
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(freerdp_key_free, 1)
|
WINPR_ATTR_MALLOC(freerdp_key_free, 1)
|
||||||
@@ -58,8 +58,8 @@ extern "C"
|
|||||||
/** @brief Create a private key from a PEM file with optional \b password
|
/** @brief Create a private key from a PEM file with optional \b password
|
||||||
*
|
*
|
||||||
* @param pem The PEM string to use
|
* @param pem The PEM string to use
|
||||||
* @param password The optional password, use \b NULL if no encryption is used.
|
* @param password The optional password, use \b nullptr if no encryption is used.
|
||||||
* @return An allocated private key, \b NULL in case of failure.
|
* @return An allocated private key, \b nullptr in case of failure.
|
||||||
* @since version 3.16.0
|
* @since version 3.16.0
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(freerdp_key_free, 1)
|
WINPR_ATTR_MALLOC(freerdp_key_free, 1)
|
||||||
@@ -76,8 +76,8 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* @param key The key to convert
|
* @param key The key to convert
|
||||||
* @param plen Optional pointer, value set to strlen of the PEM
|
* @param plen Optional pointer, value set to strlen of the PEM
|
||||||
* @param password Optional password string. If \b NULL an unencrypted PEM is written.
|
* @param password Optional password string. If \b nullptr an unencrypted PEM is written.
|
||||||
* @return A PEM string or \b NULL in case of errors
|
* @return A PEM string or \b nullptr in case of errors
|
||||||
*
|
*
|
||||||
* @since version 3.16.0
|
* @since version 3.16.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -98,10 +98,10 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* \param instance A pointer to the instance to work on
|
* \param instance A pointer to the instance to work on
|
||||||
* \param username A pointer to the username string. On input the current username, on output
|
* \param username A pointer to the username string. On input the current username, on output
|
||||||
* the username that should be used. Must not be NULL. \param password A pointer to the password
|
* the username that should be used. Must not be nullptr. \param password A pointer to the
|
||||||
* string. On input the current password, on output the password that sohould be used. Must not
|
* password string. On input the current password, on output the password that sohould be used.
|
||||||
* be NULL. \param domain A pointer to the domain string. On input the current domain, on output
|
* Must not be nullptr. \param domain A pointer to the domain string. On input the current
|
||||||
* the domain that sohould be used. Must not be NULL.
|
* domain, on output the domain that sohould be used. Must not be nullptr.
|
||||||
*
|
*
|
||||||
* \return \b FALSE no valid credentials supplied, continue without \b TRUE valid credentials
|
* \return \b FALSE no valid credentials supplied, continue without \b TRUE valid credentials
|
||||||
* should be available.
|
* should be available.
|
||||||
@@ -117,11 +117,11 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* @param instance A pointer to the instance to work on
|
* @param instance A pointer to the instance to work on
|
||||||
* @param username A pointer to the username string. On input the current username, on output
|
* @param username A pointer to the username string. On input the current username, on output
|
||||||
* the username that should be used instead. Must not be NULL.
|
* the username that should be used instead. Must not be nullptr.
|
||||||
* @param password A pointer to the password string. On input the current password, on output
|
* @param password A pointer to the password string. On input the current password, on output
|
||||||
* the password that sohould be used. Must not be NULL.
|
* the password that sohould be used. Must not be nullptr.
|
||||||
* @param domain A pointer to the domain string. On input the current domain, on output the
|
* @param domain A pointer to the domain string. On input the current domain, on output the
|
||||||
* domain that sohould be used. Must not be NULL.
|
* domain that sohould be used. Must not be nullptr.
|
||||||
* @param reason The reason the callback was called. (e.g. NLA, TLS, RDP, GATEWAY, ...)
|
* @param reason The reason the callback was called. (e.g. NLA, TLS, RDP, GATEWAY, ...)
|
||||||
*
|
*
|
||||||
* @return \b FALSE to abort the connection, \b TRUE otherwise.
|
* @return \b FALSE to abort the connection, \b TRUE otherwise.
|
||||||
@@ -144,7 +144,7 @@ extern "C"
|
|||||||
* @param cert_list A list of smartcard certificates
|
* @param cert_list A list of smartcard certificates
|
||||||
* @param count The number of smartcard certificates in the list
|
* @param count The number of smartcard certificates in the list
|
||||||
* @param choice A pointer to an integer that will represent the selected certificate index.
|
* @param choice A pointer to an integer that will represent the selected certificate index.
|
||||||
* Must not be \b NULL
|
* Must not be \b nullptr
|
||||||
* @param gateway A indicator if the authentication is for a session (\b FALSE) or a gateway
|
* @param gateway A indicator if the authentication is for a session (\b FALSE) or a gateway
|
||||||
* (\b TRUE)
|
* (\b TRUE)
|
||||||
*
|
*
|
||||||
@@ -481,13 +481,13 @@ owned by rdpRdp */
|
|||||||
ContextNew; /**< (offset 33)
|
ContextNew; /**< (offset 33)
|
||||||
Callback for context allocation
|
Callback for context allocation
|
||||||
Can be set before calling freerdp_context_new() to have it executed after
|
Can be set before calling freerdp_context_new() to have it executed after
|
||||||
allocation and initialization. Must be set to NULL if not needed. */
|
allocation and initialization. Must be set to nullptr if not needed. */
|
||||||
|
|
||||||
ALIGN64 pContextFree
|
ALIGN64 pContextFree
|
||||||
ContextFree; /**< (offset 34)
|
ContextFree; /**< (offset 34)
|
||||||
Callback for context deallocation
|
Callback for context deallocation
|
||||||
Can be set before calling freerdp_context_free() to have it executed before
|
Can be set before calling freerdp_context_free() to have it executed before
|
||||||
deallocation. Must be set to NULL if not needed. */
|
deallocation. Must be set to nullptr if not needed. */
|
||||||
UINT64 paddingC[47 - 35]; /* 35 */
|
UINT64 paddingC[47 - 35]; /* 35 */
|
||||||
|
|
||||||
ALIGN64 UINT ConnectionCallbackState; /* 47 */
|
ALIGN64 UINT ConnectionCallbackState; /* 47 */
|
||||||
@@ -496,13 +496,13 @@ owned by rdpRdp */
|
|||||||
PreConnect; /**< (offset 48)
|
PreConnect; /**< (offset 48)
|
||||||
Callback for pre-connect operations.
|
Callback for pre-connect operations.
|
||||||
Can be set before calling freerdp_connect() to have it executed before the
|
Can be set before calling freerdp_connect() to have it executed before the
|
||||||
actual connection happens. Must be set to NULL if not needed. */
|
actual connection happens. Must be set to nullptr if not needed. */
|
||||||
|
|
||||||
WINPR_ATTR_NODISCARD ALIGN64 pConnectCallback
|
WINPR_ATTR_NODISCARD ALIGN64 pConnectCallback
|
||||||
PostConnect; /**< (offset 49)
|
PostConnect; /**< (offset 49)
|
||||||
Callback for post-connect operations.
|
Callback for post-connect operations.
|
||||||
Can be set before calling freerdp_connect() to have it executed after the
|
Can be set before calling freerdp_connect() to have it executed after the
|
||||||
actual connection has succeeded. Must be set to NULL if not needed. */
|
actual connection has succeeded. Must be set to nullptr if not needed. */
|
||||||
|
|
||||||
WINPR_ATTR_NODISCARD ALIGN64 pAuthenticate Authenticate; /**< (offset 50)
|
WINPR_ATTR_NODISCARD ALIGN64 pAuthenticate Authenticate; /**< (offset 50)
|
||||||
Callback for authentication.
|
Callback for authentication.
|
||||||
@@ -549,7 +549,7 @@ owned by rdpRdp */
|
|||||||
Can be set after
|
Can be set after
|
||||||
rdp_client_disconnect_and_clear and applying redirection settings but before
|
rdp_client_disconnect_and_clear and applying redirection settings but before
|
||||||
rdp_client_connect() to have it executed after the actual connection has
|
rdp_client_connect() to have it executed after the actual connection has
|
||||||
succeeded. Must be set to NULL if not needed. */
|
succeeded. Must be set to nullptr if not needed. */
|
||||||
WINPR_ATTR_NODISCARD ALIGN64 pConnectCallback
|
WINPR_ATTR_NODISCARD ALIGN64 pConnectCallback
|
||||||
LoadChannels; /**< (offset 59)
|
LoadChannels; /**< (offset 59)
|
||||||
* callback for loading channel configuration. Might be called multiple
|
* callback for loading channel configuration. Might be called multiple
|
||||||
@@ -572,7 +572,7 @@ owned by rdpRdp */
|
|||||||
WINPR_ATTR_NODISCARD ALIGN64 pReceiveChannelData
|
WINPR_ATTR_NODISCARD ALIGN64 pReceiveChannelData
|
||||||
ReceiveChannelData; /* (offset 65)
|
ReceiveChannelData; /* (offset 65)
|
||||||
Callback for receiving data from a channel.
|
Callback for receiving data from a channel.
|
||||||
This is called by freerdp_channel_process() (if not NULL).
|
This is called by freerdp_channel_process() (if not nullptr).
|
||||||
Clients will typically use a function that calls freerdp_channels_data()
|
Clients will typically use a function that calls freerdp_channels_data()
|
||||||
to perform the needed tasks. */
|
to perform the needed tasks. */
|
||||||
|
|
||||||
@@ -911,7 +911,7 @@ owned by rdpRdp */
|
|||||||
* is required. If a client modifies settings during runtime after pre-connect call this
|
* is required. If a client modifies settings during runtime after pre-connect call this
|
||||||
* function or the credentials will be lost on any reconnect, redirect, ...
|
* function or the credentials will be lost on any reconnect, redirect, ...
|
||||||
*
|
*
|
||||||
* \param context The RDP context to use, must not be \b NULL
|
* \param context The RDP context to use, must not be \b nullptr
|
||||||
*
|
*
|
||||||
* \return \b TRUE if successful, \b FALSE if settings could not be applied (wrong session
|
* \return \b TRUE if successful, \b FALSE if settings could not be applied (wrong session
|
||||||
* state, ...)
|
* state, ...)
|
||||||
@@ -922,8 +922,8 @@ owned by rdpRdp */
|
|||||||
|
|
||||||
/** @brief set a new function to be called when an access token is requested.
|
/** @brief set a new function to be called when an access token is requested.
|
||||||
*
|
*
|
||||||
* @param context The rdp context to set the function for. Must not be \b NULL
|
* @param context The rdp context to set the function for. Must not be \b nullptr
|
||||||
* @param GetCommonAccessToken The function pointer to set, \b NULL to disable
|
* @param GetCommonAccessToken The function pointer to set, \b nullptr to disable
|
||||||
*
|
*
|
||||||
* @return \b TRUE for success, \b FALSE otherwise
|
* @return \b TRUE for success, \b FALSE otherwise
|
||||||
* @since version 3.16.0
|
* @since version 3.16.0
|
||||||
@@ -934,8 +934,8 @@ owned by rdpRdp */
|
|||||||
|
|
||||||
/** @brief get the current function pointer set as GetCommonAccessToken
|
/** @brief get the current function pointer set as GetCommonAccessToken
|
||||||
*
|
*
|
||||||
* @param context The rdp context to set the function for. Must not be \b NULL
|
* @param context The rdp context to set the function for. Must not be \b nullptr
|
||||||
* @return The current function pointer set or \b NULL
|
* @return The current function pointer set or \b nullptr
|
||||||
* @since version 3.16.0
|
* @since version 3.16.0
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ extern "C"
|
|||||||
* @param buffer A buffer to store the resulting string
|
* @param buffer A buffer to store the resulting string
|
||||||
* @param len The length of the buffer in bytes
|
* @param len The length of the buffer in bytes
|
||||||
*
|
*
|
||||||
* @return A pointer to \ref buffer or \b NULL in case of failure
|
* @return A pointer to \ref buffer or \b nullptr in case of failure
|
||||||
* @since version 3.19.0
|
* @since version 3.19.0
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ FREERDP_API const char* freerdp_keyboard_get_layout_name_from_id(DWORD keyboardL
|
|||||||
|
|
||||||
/** @brief Get a keyboard layout id from a string
|
/** @brief Get a keyboard layout id from a string
|
||||||
*
|
*
|
||||||
* @param name The string to convert to a layout id. Must not be \b NULL
|
* @param name The string to convert to a layout id. Must not be \b nullptr
|
||||||
*
|
*
|
||||||
* @return The keyboard layout id or \b 0 in case of no mapping
|
* @return The keyboard layout id or \b 0 in case of no mapping
|
||||||
*/
|
*/
|
||||||
@@ -286,7 +286,7 @@ WINPR_DEPRECATED_VAR("since 3.11.0, implement yourself in client",
|
|||||||
|
|
||||||
/** @brief deallocate a \b FREERDP_REMAP_TABLE
|
/** @brief deallocate a \b FREERDP_REMAP_TABLE
|
||||||
*
|
*
|
||||||
* @param table The table to deallocate, may be \b NULL
|
* @param table The table to deallocate, may be \b nullptr
|
||||||
*
|
*
|
||||||
* @since version 3.11.0
|
* @since version 3.11.0
|
||||||
*/
|
*/
|
||||||
@@ -323,7 +323,7 @@ FREERDP_API DWORD freerdp_keyboard_remap_key(const FREERDP_REMAP_TABLE* remap_ta
|
|||||||
/** @brief deallocator for a \b RDP_CODEPAGE array allocated by \ref
|
/** @brief deallocator for a \b RDP_CODEPAGE array allocated by \ref
|
||||||
* freerdp_keyboard_get_matching_codepages
|
* freerdp_keyboard_get_matching_codepages
|
||||||
*
|
*
|
||||||
* @param codepages The codepages to free, may be \b NULL
|
* @param codepages The codepages to free, may be \b nullptr
|
||||||
*/
|
*/
|
||||||
FREERDP_API void freerdp_codepages_free(RDP_CODEPAGE* codepages);
|
FREERDP_API void freerdp_codepages_free(RDP_CODEPAGE* codepages);
|
||||||
|
|
||||||
@@ -335,12 +335,12 @@ FREERDP_API void freerdp_codepages_free(RDP_CODEPAGE* codepages);
|
|||||||
* - 2 : RDP_CODEPAGE::PrimaryLanguageSymbol
|
* - 2 : RDP_CODEPAGE::PrimaryLanguageSymbol
|
||||||
* - 3 : RDP_CODEPAGE::Sublanguage
|
* - 3 : RDP_CODEPAGE::Sublanguage
|
||||||
* - 4 : RDP_CODEPAGE::SublanguageSymbol
|
* - 4 : RDP_CODEPAGE::SublanguageSymbol
|
||||||
* @param filter A filter pattern or \b NULL for no filtering. Simple string match, no expressions
|
* @param filter A filter pattern or \b nullptr for no filtering. Simple string match, no
|
||||||
* supported (e.g. \b strstr match)
|
* expressions supported (e.g. \b strstr match)
|
||||||
* @param count A pointer that will be set to the number of codepages found, may be \b NULL
|
* @param count A pointer that will be set to the number of codepages found, may be \b nullptr
|
||||||
*
|
*
|
||||||
* @return An allocated array of \b RDP_CODEPAGE of size \b count or \b NULL if no match. Must be
|
* @return An allocated array of \b RDP_CODEPAGE of size \b count or \b nullptr if no match. Must
|
||||||
* freed by \ref freerdp_codepages_free
|
* be freed by \ref freerdp_codepages_free
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(freerdp_codepages_free, 1)
|
WINPR_ATTR_MALLOC(freerdp_codepages_free, 1)
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
@@ -351,7 +351,7 @@ FREERDP_API RDP_CODEPAGE* freerdp_keyboard_get_matching_codepages(DWORD column,
|
|||||||
*
|
*
|
||||||
* @param scancode The RDP scancode to get a string for
|
* @param scancode The RDP scancode to get a string for
|
||||||
*
|
*
|
||||||
* @return A string describing the RDP scancode or \b NULL if it does not exist
|
* @return A string describing the RDP scancode or \b nullptr if it does not exist
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
FREERDP_API const char* freerdp_keyboard_scancode_name(DWORD scancode);
|
FREERDP_API const char* freerdp_keyboard_scancode_name(DWORD scancode);
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ extern "C"
|
|||||||
/**
|
/**
|
||||||
* @brief Query the list of supported system locales
|
* @brief Query the list of supported system locales
|
||||||
* @param count A pointer to hold the number of locales found
|
* @param count A pointer to hold the number of locales found
|
||||||
* @return A pointer to @ref SYSTEM_LOCALE or \b NULL in case none found
|
* @return A pointer to @ref SYSTEM_LOCALE or \b nullptr in case none found
|
||||||
* @since version 3.6.0
|
* @since version 3.6.0
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ FREERDP_API void primitives_uninit(void);
|
|||||||
* software) is returned
|
* software) is returned
|
||||||
*
|
*
|
||||||
* @param type the type of primitives desired.
|
* @param type the type of primitives desired.
|
||||||
* @return A primitive implementation matching the hint closest or \b NULL in case of failure.
|
* @return A primitive implementation matching the hint closest or \b nullptr in case of failure.
|
||||||
* @since version 3.11.0
|
* @since version 3.11.0
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
|
|||||||
@@ -592,7 +592,7 @@ FREERDP_API BOOL utf8_string_to_rail_string(const char* string,
|
|||||||
* @param buffer a string buffer to write to
|
* @param buffer a string buffer to write to
|
||||||
* @param len the size in bytes of the string buffer
|
* @param len the size in bytes of the string buffer
|
||||||
*
|
*
|
||||||
* @return A pointer to buffer or \b NULL in case of failure
|
* @return A pointer to buffer or \b nullptr in case of failure
|
||||||
* @since version 3.5.0
|
* @since version 3.5.0
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ extern "C"
|
|||||||
/**
|
/**
|
||||||
* @brief pf_server_config_free Releases all resources associated with proxyConfig
|
* @brief pf_server_config_free Releases all resources associated with proxyConfig
|
||||||
*
|
*
|
||||||
* @param config A pointer to the proxyConfig to clean up. Might be NULL.
|
* @param config A pointer to the proxyConfig to clean up. Might be nullptr.
|
||||||
*/
|
*/
|
||||||
FREERDP_API void pf_server_config_free(proxyConfig* config);
|
FREERDP_API void pf_server_config_free(proxyConfig* config);
|
||||||
|
|
||||||
@@ -140,9 +140,9 @@ extern "C"
|
|||||||
* @brief server_config_load_ini Create a proxyConfig from a already loaded
|
* @brief server_config_load_ini Create a proxyConfig from a already loaded
|
||||||
* INI file.
|
* INI file.
|
||||||
*
|
*
|
||||||
* @param ini A pointer to the parsed INI file. Must NOT be NULL.
|
* @param ini A pointer to the parsed INI file. Must NOT be nullptr.
|
||||||
*
|
*
|
||||||
* @return A proxyConfig or NULL in case of failure.
|
* @return A proxyConfig or nullptr in case of failure.
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(pf_server_config_free, 1)
|
WINPR_ATTR_MALLOC(pf_server_config_free, 1)
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
@@ -152,7 +152,7 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* @param path The path of the INI file
|
* @param path The path of the INI file
|
||||||
*
|
*
|
||||||
* @return A proxyConfig or NULL in case of failure.
|
* @return A proxyConfig or nullptr in case of failure.
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(pf_server_config_free, 1)
|
WINPR_ATTR_MALLOC(pf_server_config_free, 1)
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
@@ -164,7 +164,7 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* @param buffer A pointer to the '\0' terminated INI string.
|
* @param buffer A pointer to the '\0' terminated INI string.
|
||||||
*
|
*
|
||||||
* @return A proxyConfig or NULL in case of failure.
|
* @return A proxyConfig or nullptr in case of failure.
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(pf_server_config_free, 1)
|
WINPR_ATTR_MALLOC(pf_server_config_free, 1)
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
@@ -173,14 +173,14 @@ extern "C"
|
|||||||
/**
|
/**
|
||||||
* @brief pf_server_config_print Print the configuration to stdout
|
* @brief pf_server_config_print Print the configuration to stdout
|
||||||
*
|
*
|
||||||
* @param config A pointer to the configuration to print. Must NOT be NULL.
|
* @param config A pointer to the configuration to print. Must NOT be nullptr.
|
||||||
*/
|
*/
|
||||||
FREERDP_API void pf_server_config_print(const proxyConfig* config);
|
FREERDP_API void pf_server_config_print(const proxyConfig* config);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief pf_config_required_plugins_count
|
* @brief pf_config_required_plugins_count
|
||||||
*
|
*
|
||||||
* @param config A pointer to the proxyConfig. Must NOT be NULL.
|
* @param config A pointer to the proxyConfig. Must NOT be nullptr.
|
||||||
*
|
*
|
||||||
* @return The number of required plugins configured.
|
* @return The number of required plugins configured.
|
||||||
*/
|
*/
|
||||||
@@ -189,10 +189,10 @@ extern "C"
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief pf_config_required_plugin
|
* @brief pf_config_required_plugin
|
||||||
* @param config A pointer to the proxyConfig. Must NOT be NULL.
|
* @param config A pointer to the proxyConfig. Must NOT be nullptr.
|
||||||
* @param index The index of the plugin to return
|
* @param index The index of the plugin to return
|
||||||
*
|
*
|
||||||
* @return The name of the plugin or NULL.
|
* @return The name of the plugin or nullptr.
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
FREERDP_API const char* pf_config_required_plugin(const proxyConfig* config, size_t index);
|
FREERDP_API const char* pf_config_required_plugin(const proxyConfig* config, size_t index);
|
||||||
@@ -200,7 +200,7 @@ extern "C"
|
|||||||
/**
|
/**
|
||||||
* @brief pf_config_modules_count
|
* @brief pf_config_modules_count
|
||||||
*
|
*
|
||||||
* @param config A pointer to the proxyConfig. Must NOT be NULL.
|
* @param config A pointer to the proxyConfig. Must NOT be nullptr.
|
||||||
*
|
*
|
||||||
* @return The number of proxy modules configured.
|
* @return The number of proxy modules configured.
|
||||||
*/
|
*/
|
||||||
@@ -209,7 +209,7 @@ extern "C"
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief pf_config_modules
|
* @brief pf_config_modules
|
||||||
* @param config A pointer to the proxyConfig. Must NOT be NULL.
|
* @param config A pointer to the proxyConfig. Must NOT be nullptr.
|
||||||
*
|
*
|
||||||
* @return An array of strings of size pf_config_modules_count with the module names.
|
* @return An array of strings of size pf_config_modules_count with the module names.
|
||||||
*/
|
*/
|
||||||
@@ -240,11 +240,11 @@ extern "C"
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief pf_config_get get a value for a section/key
|
* @brief pf_config_get get a value for a section/key
|
||||||
* @param config A pointer to the proxyConfig. Must NOT be NULL.
|
* @param config A pointer to the proxyConfig. Must NOT be nullptr.
|
||||||
* @param section The name of the section the key is in, must not be \b NULL
|
* @param section The name of the section the key is in, must not be \b nullptr
|
||||||
* @param key The name of the key to look for. Must not be \b NULL
|
* @param key The name of the key to look for. Must not be \b nullptr
|
||||||
*
|
*
|
||||||
* @return A pointer to the value for \b section/key or \b NULL if not found
|
* @return A pointer to the value for \b section/key or \b nullptr if not found
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
FREERDP_API const char* pf_config_get(const proxyConfig* config, const char* section,
|
FREERDP_API const char* pf_config_get(const proxyConfig* config, const char* section,
|
||||||
|
|||||||
@@ -34,16 +34,16 @@ extern "C"
|
|||||||
/**
|
/**
|
||||||
* @brief pf_server_free Cleans up a (stopped) proxy server instance.
|
* @brief pf_server_free Cleans up a (stopped) proxy server instance.
|
||||||
*
|
*
|
||||||
* @param server The proxy server to clean up. Might be NULL.
|
* @param server The proxy server to clean up. Might be nullptr.
|
||||||
*/
|
*/
|
||||||
FREERDP_API void pf_server_free(proxyServer* server);
|
FREERDP_API void pf_server_free(proxyServer* server);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief pf_server_new Creates a new proxy server instance
|
* @brief pf_server_new Creates a new proxy server instance
|
||||||
*
|
*
|
||||||
* @param config The proxy server configuration to use. Must NOT be NULL.
|
* @param config The proxy server configuration to use. Must NOT be nullptr.
|
||||||
*
|
*
|
||||||
* @return A new proxy server instance or NULL on failure.
|
* @return A new proxy server instance or nullptr on failure.
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(pf_server_free, 1)
|
WINPR_ATTR_MALLOC(pf_server_free, 1)
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
@@ -54,9 +54,9 @@ extern "C"
|
|||||||
* built-in instead of shipped as separate
|
* built-in instead of shipped as separate
|
||||||
* module loaded at runtime.
|
* module loaded at runtime.
|
||||||
*
|
*
|
||||||
* @param server A proxy instance to add the module to. Must NOT be NULL
|
* @param server A proxy instance to add the module to. Must NOT be nullptr
|
||||||
* @param ep The proxy entry function to add. Must NOT be NULL
|
* @param ep The proxy entry function to add. Must NOT be nullptr
|
||||||
* @param userdata Custom data for the module. May be NULL
|
* @param userdata Custom data for the module. May be nullptr
|
||||||
*
|
*
|
||||||
* @return TRUE for success, FALSE otherwise.
|
* @return TRUE for success, FALSE otherwise.
|
||||||
*/
|
*/
|
||||||
@@ -67,7 +67,7 @@ extern "C"
|
|||||||
/**
|
/**
|
||||||
* @brief pf_server_start Starts the proxy, binding the configured port.
|
* @brief pf_server_start Starts the proxy, binding the configured port.
|
||||||
*
|
*
|
||||||
* @param server The server instance. Must NOT be NULL.
|
* @param server The server instance. Must NOT be nullptr.
|
||||||
*
|
*
|
||||||
* @return TRUE for success, FALSE on error
|
* @return TRUE for success, FALSE on error
|
||||||
*/
|
*/
|
||||||
@@ -77,7 +77,7 @@ extern "C"
|
|||||||
/**
|
/**
|
||||||
* @brief pf_server_start_from_socket Starts the proxy using an existing bound socket
|
* @brief pf_server_start_from_socket Starts the proxy using an existing bound socket
|
||||||
*
|
*
|
||||||
* @param server The server instance. Must NOT be NULL.
|
* @param server The server instance. Must NOT be nullptr.
|
||||||
* @param socket The bound socket to wait for events on.
|
* @param socket The bound socket to wait for events on.
|
||||||
*
|
*
|
||||||
* @return TRUE for success, FALSE on error
|
* @return TRUE for success, FALSE on error
|
||||||
@@ -88,7 +88,7 @@ extern "C"
|
|||||||
/**
|
/**
|
||||||
* @brief pf_server_start_with_peer_socket Use existing peer socket
|
* @brief pf_server_start_with_peer_socket Use existing peer socket
|
||||||
*
|
*
|
||||||
* @param server The server instance. Must NOT be NULL.
|
* @param server The server instance. Must NOT be nullptr.
|
||||||
* @param socket Ready to use peer socket
|
* @param socket Ready to use peer socket
|
||||||
*
|
*
|
||||||
* @return TRUE for success, FALSE on error
|
* @return TRUE for success, FALSE on error
|
||||||
@@ -99,7 +99,7 @@ extern "C"
|
|||||||
/**
|
/**
|
||||||
* @brief pf_server_stop Stops a server instance asynchronously.
|
* @brief pf_server_stop Stops a server instance asynchronously.
|
||||||
* Can be called from any thread to stop a running server instance.
|
* Can be called from any thread to stop a running server instance.
|
||||||
* @param server A pointer to the server instance to stop. May be NULL.
|
* @param server A pointer to the server instance to stop. May be nullptr.
|
||||||
*/
|
*/
|
||||||
FREERDP_API void pf_server_stop(proxyServer* server);
|
FREERDP_API void pf_server_stop(proxyServer* server);
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ extern "C"
|
|||||||
* @brief pf_server_run This (blocking) function runs the main loop of the
|
* @brief pf_server_run This (blocking) function runs the main loop of the
|
||||||
* proxy.
|
* proxy.
|
||||||
*
|
*
|
||||||
* @param server The server instance. Must NOT be NULL.
|
* @param server The server instance. Must NOT be nullptr.
|
||||||
*
|
*
|
||||||
* @return TRUE for successful termination, FALSE otherwise.
|
* @return TRUE for successful termination, FALSE otherwise.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Free a settings struct with all data in it
|
/** \brief Free a settings struct with all data in it
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to free, May be NULL
|
* \param settings A pointer to the settings to free, May be nullptr
|
||||||
*/
|
*/
|
||||||
FREERDP_API void freerdp_settings_free(rdpSettings* settings);
|
FREERDP_API void freerdp_settings_free(rdpSettings* settings);
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ extern "C"
|
|||||||
* \param flags Flags for creation, use \b FREERDP_SETTINGS_SERVER_MODE for server settings, 0
|
* \param flags Flags for creation, use \b FREERDP_SETTINGS_SERVER_MODE for server settings, 0
|
||||||
* for client.
|
* for client.
|
||||||
*
|
*
|
||||||
* \return A newly allocated settings struct or NULL
|
* \return A newly allocated settings struct or nullptr
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(freerdp_settings_free, 1)
|
WINPR_ATTR_MALLOC(freerdp_settings_free, 1)
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
@@ -99,9 +99,9 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Creates a deep copy of settings
|
/** \brief Creates a deep copy of settings
|
||||||
*
|
*
|
||||||
* \param settings A pointer to a settings struct to copy. May be NULL (returns NULL)
|
* \param settings A pointer to a settings struct to copy. May be nullptr (returns nullptr)
|
||||||
*
|
*
|
||||||
* \return A newly allocated copy of \b settings or NULL
|
* \return A newly allocated copy of \b settings or nullptr
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(freerdp_settings_free, 1)
|
WINPR_ATTR_MALLOC(freerdp_settings_free, 1)
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
@@ -111,8 +111,8 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* The function frees up all allocated data in \b dst before copying the data from \b src
|
* The function frees up all allocated data in \b dst before copying the data from \b src
|
||||||
*
|
*
|
||||||
* \param dst A pointer for the settings to copy data to. May be NULL (fails copy)
|
* \param dst A pointer for the settings to copy data to. May be nullptr (fails copy)
|
||||||
* \param src A pointer to the settings to copy. May be NULL (fails copy)
|
* \param src A pointer to the settings to copy. May be nullptr (fails copy)
|
||||||
*
|
*
|
||||||
* \return \b TRUE for success, \b FALSE for failure.
|
* \return \b TRUE for success, \b FALSE for failure.
|
||||||
*/
|
*/
|
||||||
@@ -123,8 +123,8 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* The function frees up all allocated data in \b dst before copying the data from \b src
|
* The function frees up all allocated data in \b dst before copying the data from \b src
|
||||||
*
|
*
|
||||||
* \param dst A pointer for the settings to copy data to. May be NULL (fails copy)
|
* \param dst A pointer for the settings to copy data to. May be nullptr (fails copy)
|
||||||
* \param src A pointer to the settings to copy. May be NULL (fails copy)
|
* \param src A pointer to the settings to copy. May be nullptr (fails copy)
|
||||||
* \param id The settings identifier to copy
|
* \param id The settings identifier to copy
|
||||||
*
|
*
|
||||||
* \return \b TRUE for success, \b FALSE for failure.
|
* \return \b TRUE for success, \b FALSE for failure.
|
||||||
@@ -135,18 +135,18 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Dumps the contents of a settings struct to a WLog logger
|
/** \brief Dumps the contents of a settings struct to a WLog logger
|
||||||
*
|
*
|
||||||
* \param log The logger to write to, must not be NULL
|
* \param log The logger to write to, must not be nullptr
|
||||||
* \param level The WLog level to use for the log entries
|
* \param level The WLog level to use for the log entries
|
||||||
* \param settings A pointer to the settings to dump. May be NULL.
|
* \param settings A pointer to the settings to dump. May be nullptr.
|
||||||
*/
|
*/
|
||||||
FREERDP_API void freerdp_settings_dump(wLog* log, DWORD level, const rdpSettings* settings);
|
FREERDP_API void freerdp_settings_dump(wLog* log, DWORD level, const rdpSettings* settings);
|
||||||
|
|
||||||
/** \brief Dumps the difference between two settings structs to a WLog
|
/** \brief Dumps the difference between two settings structs to a WLog
|
||||||
*
|
*
|
||||||
* \param log The logger to write to, must not be NULL.
|
* \param log The logger to write to, must not be nullptr.
|
||||||
* \param level The WLog level to use for the log entries.
|
* \param level The WLog level to use for the log entries.
|
||||||
* \param settings A pointer to the settings to dump. May be NULL.
|
* \param settings A pointer to the settings to dump. May be nullptr.
|
||||||
* \param other A pointer to the settings to dump. May be NULL.
|
* \param other A pointer to the settings to dump. May be nullptr.
|
||||||
*
|
*
|
||||||
* \return \b TRUE if not equal, \b FALSE otherwise
|
* \return \b TRUE if not equal, \b FALSE otherwise
|
||||||
*/
|
*/
|
||||||
@@ -201,7 +201,7 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* \since version 3.4.0
|
* \since version 3.4.0
|
||||||
*
|
*
|
||||||
* \return \b TRUE if the device was removed, \b FALSE if device was not found or is NULL
|
* \return \b TRUE if the device was removed, \b FALSE if device was not found or is nullptr
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
FREERDP_API BOOL freerdp_device_collection_del(rdpSettings* settings,
|
FREERDP_API BOOL freerdp_device_collection_del(rdpSettings* settings,
|
||||||
@@ -345,7 +345,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Returns a boolean settings value
|
/** \brief Returns a boolean settings value
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
*
|
*
|
||||||
* \return the value of the boolean key
|
* \return the value of the boolean key
|
||||||
@@ -356,7 +356,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Sets a BOOL settings value.
|
/** \brief Sets a BOOL settings value.
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
* \param val The value to set.
|
* \param val The value to set.
|
||||||
*
|
*
|
||||||
@@ -367,7 +367,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Returns a INT16 settings value
|
/** \brief Returns a INT16 settings value
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
*
|
*
|
||||||
* \return the value of the INT16 key
|
* \return the value of the INT16 key
|
||||||
@@ -378,7 +378,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Sets a INT16 settings value.
|
/** \brief Sets a INT16 settings value.
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
* \param val The value to set.
|
* \param val The value to set.
|
||||||
*
|
*
|
||||||
@@ -389,7 +389,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Returns a UINT16 settings value
|
/** \brief Returns a UINT16 settings value
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
*
|
*
|
||||||
* \return the value of the UINT16 key
|
* \return the value of the UINT16 key
|
||||||
@@ -400,7 +400,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Sets a UINT16 settings value.
|
/** \brief Sets a UINT16 settings value.
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
* \param val The value to set.
|
* \param val The value to set.
|
||||||
*
|
*
|
||||||
@@ -411,7 +411,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Returns a INT32 settings value
|
/** \brief Returns a INT32 settings value
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
*
|
*
|
||||||
* \return the value of the INT32 key
|
* \return the value of the INT32 key
|
||||||
@@ -422,7 +422,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Sets a INT32 settings value.
|
/** \brief Sets a INT32 settings value.
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
* \param val The value to set.
|
* \param val The value to set.
|
||||||
*
|
*
|
||||||
@@ -433,7 +433,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Returns a UINT32 settings value
|
/** \brief Returns a UINT32 settings value
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
*
|
*
|
||||||
* \return the value of the UINT32 key
|
* \return the value of the UINT32 key
|
||||||
@@ -444,7 +444,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Sets a UINT32 settings value.
|
/** \brief Sets a UINT32 settings value.
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
* \param val The value to set.
|
* \param val The value to set.
|
||||||
*
|
*
|
||||||
@@ -455,7 +455,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Returns a INT64 settings value
|
/** \brief Returns a INT64 settings value
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
*
|
*
|
||||||
* \return the value of the INT64 key
|
* \return the value of the INT64 key
|
||||||
@@ -466,7 +466,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Sets a INT64 settings value.
|
/** \brief Sets a INT64 settings value.
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
* \param val The value to set.
|
* \param val The value to set.
|
||||||
*
|
*
|
||||||
@@ -477,7 +477,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Returns a UINT64 settings value
|
/** \brief Returns a UINT64 settings value
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
*
|
*
|
||||||
* \return the value of the UINT64 key
|
* \return the value of the UINT64 key
|
||||||
@@ -488,7 +488,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Sets a UINT64 settings value.
|
/** \brief Sets a UINT64 settings value.
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
* \param val The value to set.
|
* \param val The value to set.
|
||||||
*
|
*
|
||||||
@@ -499,7 +499,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Returns a immutable string settings value
|
/** \brief Returns a immutable string settings value
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
*
|
*
|
||||||
* \return the immutable string pointer
|
* \return the immutable string pointer
|
||||||
@@ -510,7 +510,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Returns a string settings value
|
/** \brief Returns a string settings value
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
*
|
*
|
||||||
* \return the string pointer
|
* \return the string pointer
|
||||||
@@ -521,9 +521,9 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Sets a string settings value. The \b val is copied.
|
/** \brief Sets a string settings value. The \b val is copied.
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
* \param val The value to set. If NULL allocates an empty string buffer of \b len size,
|
* \param val The value to set. If nullptr allocates an empty string buffer of \b len size,
|
||||||
* otherwise a copy is created. \param len The length of \b val, 0 to remove the old entry.
|
* otherwise a copy is created. \param len The length of \b val, 0 to remove the old entry.
|
||||||
*
|
*
|
||||||
* \return \b TRUE for success, \b FALSE for failure
|
* \return \b TRUE for success, \b FALSE for failure
|
||||||
@@ -534,9 +534,9 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Sets a string settings value. The \b param is copied.
|
/** \brief Sets a string settings value. The \b param is copied.
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
* \param val The value to set. If NULL removes the old entry, otherwise a copy is
|
* \param val The value to set. If nullptr removes the old entry, otherwise a copy is
|
||||||
* created.
|
* created.
|
||||||
*
|
*
|
||||||
* \return \b TRUE for success, \b FALSE for failure
|
* \return \b TRUE for success, \b FALSE for failure
|
||||||
@@ -548,9 +548,9 @@ extern "C"
|
|||||||
* If the initial value of the setting was not empty, @code <old value><separator><param>
|
* If the initial value of the setting was not empty, @code <old value><separator><param>
|
||||||
* @endcode is created
|
* @endcode is created
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
* \param separator The separator string to use. May be NULL (no separator)
|
* \param separator The separator string to use. May be nullptr (no separator)
|
||||||
* \param param The value to append
|
* \param param The value to append
|
||||||
*
|
*
|
||||||
* \return \b TRUE for success, \b FALSE for failure
|
* \return \b TRUE for success, \b FALSE for failure
|
||||||
@@ -562,9 +562,10 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Sets a string settings value. The \b param is converted to UTF-8 and the copy stored.
|
/** \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.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
* \param param The value to set. If NULL removes the old entry, otherwise a copy is created.
|
* \param param The value to set. If nullptr removes the old entry, otherwise a copy is
|
||||||
|
* created.
|
||||||
*
|
*
|
||||||
* \return \b TRUE for success, \b FALSE for failure
|
* \return \b TRUE for success, \b FALSE for failure
|
||||||
*/
|
*/
|
||||||
@@ -574,9 +575,10 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Sets a string settings value. The \b param is converted to UTF-8 and the copy stored.
|
/** \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.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
* \param param The value to set. If NULL removes the old entry, otherwise a copy is created.
|
* \param param The value to set. If nullptr removes the old entry, otherwise a copy is
|
||||||
|
* created.
|
||||||
* \param length The length of the WCHAR string in number of WCHAR characters
|
* \param length The length of the WCHAR string in number of WCHAR characters
|
||||||
*
|
*
|
||||||
* \return \b TRUE for success, \b FALSE for failure
|
* \return \b TRUE for success, \b FALSE for failure
|
||||||
@@ -589,7 +591,7 @@ extern "C"
|
|||||||
* \param settings A pointer to the settings struct to use
|
* \param settings A pointer to the settings struct to use
|
||||||
* \param id The settings identifier
|
* \param id The settings identifier
|
||||||
*
|
*
|
||||||
* \return An allocated, '\0' terminated WCHAR string or NULL
|
* \return An allocated, '\0' terminated WCHAR string or nullptr
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(free, 1)
|
WINPR_ATTR_MALLOC(free, 1)
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
@@ -599,7 +601,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Returns a immutable pointer settings value
|
/** \brief Returns a immutable pointer settings value
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
*
|
*
|
||||||
* \return the immutable pointer value
|
* \return the immutable pointer value
|
||||||
@@ -610,7 +612,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Returns a mutable pointer settings value
|
/** \brief Returns a mutable pointer settings value
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to query
|
* \param id The key to query
|
||||||
*
|
*
|
||||||
* \return the mutable pointer value
|
* \return the mutable pointer value
|
||||||
@@ -621,7 +623,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Set a pointer to value \b val
|
/** \brief Set a pointer to value \b val
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to update
|
* \param id The key to update
|
||||||
* \param val The data to set (direct update, no copy created, previous value overwritten)
|
* \param val The data to set (direct update, no copy created, previous value overwritten)
|
||||||
*
|
*
|
||||||
@@ -633,7 +635,7 @@ extern "C"
|
|||||||
|
|
||||||
/** \brief Set a pointer to value \b data
|
/** \brief Set a pointer to value \b data
|
||||||
*
|
*
|
||||||
* \param settings A pointer to the settings to query, must not be NULL.
|
* \param settings A pointer to the settings to query, must not be nullptr.
|
||||||
* \param id The key to update
|
* \param id The key to update
|
||||||
* \param data The data to set (copy created, previous value freed)
|
* \param data The data to set (copy created, previous value freed)
|
||||||
*
|
*
|
||||||
@@ -666,10 +668,10 @@ extern "C"
|
|||||||
* - Strings are passed on as is
|
* - Strings are passed on as is
|
||||||
* - Pointers are also passed as is
|
* - Pointers are also passed as is
|
||||||
*
|
*
|
||||||
* @param settings The settings instance to set the value, must not be \b NULL
|
* @param settings The settings instance to set the value, must not be \b nullptr
|
||||||
* @param name The name of the settings key (like 'FreeRDP_Domain', same as output of \ref
|
* @param name The name of the settings key (like 'FreeRDP_Domain', same as output of \ref
|
||||||
* freerdp_settings_get_name_for_key ) Must not be \b NULL
|
* freerdp_settings_get_name_for_key ) Must not be \b nullptr
|
||||||
* @param value The value of the setting. Must not be \b NULL
|
* @param value The value of the setting. Must not be \b nullptr
|
||||||
*
|
*
|
||||||
* @note If the function fails check \ref wLog output for details
|
* @note If the function fails check \ref wLog output for details
|
||||||
*
|
*
|
||||||
@@ -728,7 +730,7 @@ extern "C"
|
|||||||
/** \brief Returns the type name for a \b key
|
/** \brief Returns the type name for a \b key
|
||||||
*
|
*
|
||||||
* \param key the key number to stringify
|
* \param key the key number to stringify
|
||||||
* \return the name of the key or \b NULL
|
* \return the name of the key or \b nullptr
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
FREERDP_API const char* freerdp_settings_get_name_for_key(SSIZE_T key);
|
FREERDP_API const char* freerdp_settings_get_name_for_key(SSIZE_T key);
|
||||||
@@ -771,9 +773,9 @@ extern "C"
|
|||||||
* The server name might be in key FreeRDP_ServerHostname or if used in
|
* The server name might be in key FreeRDP_ServerHostname or if used in
|
||||||
* FreeRDP_UserSpecifiedServerName. This function returns the correct name to use.
|
* FreeRDP_UserSpecifiedServerName. This function returns the correct name to use.
|
||||||
*
|
*
|
||||||
* \param settings The settings to query, must not be NULL.
|
* \param settings The settings to query, must not be nullptr.
|
||||||
*
|
*
|
||||||
* \return A string pointer or NULL in case of failure.
|
* \return A string pointer or nullptr in case of failure.
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
FREERDP_API const char* freerdp_settings_get_server_name(const rdpSettings* settings);
|
FREERDP_API const char* freerdp_settings_get_server_name(const rdpSettings* settings);
|
||||||
@@ -784,7 +786,7 @@ extern "C"
|
|||||||
* \param buffer A pointer to the string buffer to write to
|
* \param buffer A pointer to the string buffer to write to
|
||||||
* \param length The size of the string buffer
|
* \param length The size of the string buffer
|
||||||
*
|
*
|
||||||
* \return A pointer to \b buffer for success, NULL otherwise
|
* \return A pointer to \b buffer for success, nullptr otherwise
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
FREERDP_API const char* freerdp_rail_support_flags_to_string(UINT32 flags, char* buffer,
|
FREERDP_API const char* freerdp_rail_support_flags_to_string(UINT32 flags, char* buffer,
|
||||||
@@ -828,7 +830,7 @@ extern "C"
|
|||||||
size_t size);
|
size_t size);
|
||||||
|
|
||||||
/** \brief return the configuration directory for the library
|
/** \brief return the configuration directory for the library
|
||||||
* @return The current configuration path or \b NULL
|
* @return The current configuration path or \b nullptr
|
||||||
* @since version 3.6.0
|
* @since version 3.6.0
|
||||||
* @note Since 3.17.1 this is a wrapper for \b freerdp_GetConfigFilePath(FALSE, "")
|
* @note Since 3.17.1 this is a wrapper for \b freerdp_GetConfigFilePath(FALSE, "")
|
||||||
*/
|
*/
|
||||||
@@ -863,8 +865,8 @@ extern "C"
|
|||||||
* @param settings The settings instance to serialize
|
* @param settings The settings instance to serialize
|
||||||
* @param pretty Format the resulting \b JSON human readable
|
* @param pretty Format the resulting \b JSON human readable
|
||||||
* @param plength An optional pointer that receives the length (strlen) of the returned string.
|
* @param plength An optional pointer that receives the length (strlen) of the returned string.
|
||||||
* @return A \b JSON string representing the serialized form of the \b rdpSettings or \b NULL
|
* @return A \b JSON string representing the serialized form of the \b rdpSettings or \b
|
||||||
* in case of an error.
|
* nullptr in case of an error.
|
||||||
* @since version 3.16.0
|
* @since version 3.16.0
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(free, 1)
|
WINPR_ATTR_MALLOC(free, 1)
|
||||||
@@ -876,7 +878,7 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* @param jstr The \b JSON string
|
* @param jstr The \b JSON string
|
||||||
* @param length The strlen of the \b JSON string
|
* @param length The strlen of the \b JSON string
|
||||||
* @return An allocated \b rdpSettings struct or \b NULL in case of an error
|
* @return An allocated \b rdpSettings struct or \b nullptr in case of an error
|
||||||
* @since version 3.16.0
|
* @since version 3.16.0
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(freerdp_settings_free, 1)
|
WINPR_ATTR_MALLOC(freerdp_settings_free, 1)
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* @param context The RDP context the timer belongs to
|
* @param context The RDP context the timer belongs to
|
||||||
* @param intervalNS The (first) timer expiration interval in nanoseconds
|
* @param intervalNS The (first) timer expiration interval in nanoseconds
|
||||||
* @param callback The function to be called when the timer expires. Must not be \b NULL
|
* @param callback The function to be called when the timer expires. Must not be \b nullptr
|
||||||
* @param userdata Custom userdata passed to the callback. The pointer is only passed, it is up
|
* @param userdata Custom userdata passed to the callback. The pointer is only passed, it is up
|
||||||
* to the user to ensure the data exists when the timer expires.
|
* to the user to ensure the data exists when the timer expires.
|
||||||
* @param mainloop \b true run the callback in mainloop context or \b false from background
|
* @param mainloop \b true run the callback in mainloop context or \b false from background
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ extern "C"
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Free a transport layer instance
|
* @brief Free a transport layer instance
|
||||||
* @param layer A pointer to the layer to free or \b NULL
|
* @param layer A pointer to the layer to free or \b nullptr
|
||||||
* @since version 3.9.0
|
* @since version 3.9.0
|
||||||
*/
|
*/
|
||||||
FREERDP_API void transport_layer_free(rdpTransportLayer* layer);
|
FREERDP_API void transport_layer_free(rdpTransportLayer* layer);
|
||||||
@@ -172,7 +172,7 @@ extern "C"
|
|||||||
* @param transport A pointer to the transport instance to use
|
* @param transport A pointer to the transport instance to use
|
||||||
* @param contextSize The size of the context to use. If \b 0 no rdpTransportLayer::userContext
|
* @param contextSize The size of the context to use. If \b 0 no rdpTransportLayer::userContext
|
||||||
* is allocated or freed.
|
* is allocated or freed.
|
||||||
* @return A new transport layer instance or \b NULL in case of failure
|
* @return A new transport layer instance or \b nullptr in case of failure
|
||||||
* @since version 3.9.0
|
* @since version 3.9.0
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(transport_layer_free, 1)
|
WINPR_ATTR_MALLOC(transport_layer_free, 1)
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* @since version 3.0.0
|
* @since version 3.0.0
|
||||||
*
|
*
|
||||||
* @return The token string or \b NULL
|
* @return The token string or \b nullptr
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(free, 1)
|
WINPR_ATTR_MALLOC(free, 1)
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
@@ -95,7 +95,7 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* @param context The rdpContext to query for
|
* @param context The rdpContext to query for
|
||||||
* @param which The enum value of the field to query
|
* @param which The enum value of the field to query
|
||||||
* @return A constant string to be used for queries or \b NULL in case it does not exist.
|
* @return A constant string to be used for queries or \b nullptr in case it does not exist.
|
||||||
*
|
*
|
||||||
* @since version 3.10.0
|
* @since version 3.10.0
|
||||||
*/
|
*/
|
||||||
@@ -107,7 +107,7 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* @param context The rdpContext to query for
|
* @param context The rdpContext to query for
|
||||||
* @param which The raw string name of the field to query
|
* @param which The raw string name of the field to query
|
||||||
* @return A constant string to be used for queries or \b NULL in case it does not exist.
|
* @return A constant string to be used for queries or \b nullptr in case it does not exist.
|
||||||
*
|
*
|
||||||
* @since version 3.10.0
|
* @since version 3.10.0
|
||||||
*/
|
*/
|
||||||
@@ -119,7 +119,8 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* @param context The rdpContext to query for
|
* @param context The rdpContext to query for
|
||||||
* @param which The enum value of the field to query
|
* @param which The enum value of the field to query
|
||||||
* @return A \b WINPR_JSON object to be used for queries or \b NULL in case it does not exist.
|
* @return A \b WINPR_JSON object to be used for queries or \b nullptr in case it does not
|
||||||
|
* exist.
|
||||||
*
|
*
|
||||||
* @since version 3.10.0
|
* @since version 3.10.0
|
||||||
*/
|
*/
|
||||||
@@ -131,7 +132,8 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* @param context The rdpContext to query for
|
* @param context The rdpContext to query for
|
||||||
* @param which The raw string name of the field to query
|
* @param which The raw string name of the field to query
|
||||||
* @return A \b WINPR_JSON object to be used for queries or \b NULL in case it does not exist.
|
* @return A \b WINPR_JSON object to be used for queries or \b nullptr in case it does not
|
||||||
|
* exist.
|
||||||
*
|
*
|
||||||
* @since version 3.10.0
|
* @since version 3.10.0
|
||||||
*/
|
*/
|
||||||
@@ -144,7 +146,8 @@ extern "C"
|
|||||||
* @param log A logger instance to use
|
* @param log A logger instance to use
|
||||||
* @param base the base URL to connect to
|
* @param base the base URL to connect to
|
||||||
* @param tenantid the tenant to use for the connection, use \b common for default
|
* @param tenantid the tenant to use for the connection, use \b common for default
|
||||||
* @return A \b WINPR_JSON object to be used for queries or \b NULL in case it does not exist.
|
* @return A \b WINPR_JSON object to be used for queries or \b nullptr in case it does not
|
||||||
|
* exist.
|
||||||
*
|
*
|
||||||
* @since version 3.10.0
|
* @since version 3.10.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -31,14 +31,14 @@ extern "C"
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @brief Return the absolute path of a configuration file (the path of the configuration
|
/** @brief Return the absolute path of a configuration file (the path of the configuration
|
||||||
* directory if \b filename is \b NULL)
|
* directory if \b filename is \b nullptr)
|
||||||
*
|
*
|
||||||
* @param system a boolean indicating the configuration base, \b TRUE for system configuration,
|
* @param system a boolean indicating the configuration base, \b TRUE for system configuration,
|
||||||
* \b FALSE for user configuration
|
* \b FALSE for user configuration
|
||||||
* @param filename an optional configuration file name to append.
|
* @param filename an optional configuration file name to append.
|
||||||
*
|
*
|
||||||
* @return The absolute path of the desired configuration or \b NULL in case of failure. Use \b
|
* @return The absolute path of the desired configuration or \b nullptr in case of failure. Use
|
||||||
* free to clean up the allocated string.
|
* \b free to clean up the allocated string.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @since version 3.9.0
|
* @since version 3.9.0
|
||||||
@@ -53,7 +53,7 @@ extern "C"
|
|||||||
* \b FALSE for user configuration
|
* \b FALSE for user configuration
|
||||||
* @param filename an optional configuration file name to append.
|
* @param filename an optional configuration file name to append.
|
||||||
*
|
*
|
||||||
* @return A parsed \b WINPR_JSON object or \b NULL in case of any failure.
|
* @return A parsed \b WINPR_JSON object or \b nullptr in case of any failure.
|
||||||
* @since version 3.16.0
|
* @since version 3.16.0
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_MALLOC(WINPR_JSON_Delete, 1)
|
WINPR_ATTR_MALLOC(WINPR_JSON_Delete, 1)
|
||||||
@@ -73,9 +73,9 @@ extern "C"
|
|||||||
* path will always have the format 'vendor/product' or 'vendor/product1' (1 for the actual
|
* path will always have the format 'vendor/product' or 'vendor/product1' (1 for the actual
|
||||||
* version set)
|
* version set)
|
||||||
*
|
*
|
||||||
* @param vendor A vendor name to use. Must not be \b NULL. Must not contain forbidden
|
* @param vendor A vendor name to use. Must not be \b nullptr. Must not contain forbidden
|
||||||
* filesystem symbols for any os. Must be less than \b MAX_PATH bytes.
|
* filesystem symbols for any os. Must be less than \b MAX_PATH bytes.
|
||||||
* @param product A product name to use. Must not be \b NULL. Must not contain forbidden
|
* @param product A product name to use. Must not be \b nullptr. Must not contain forbidden
|
||||||
* filesystem symbols for any os. Must be less than \b MAX_PATH bytes.
|
* filesystem symbols for any os. Must be less than \b MAX_PATH bytes.
|
||||||
* @param version An optional versioning value to append to paths to settings. Use \b -1 to
|
* @param version An optional versioning value to append to paths to settings. Use \b -1 to
|
||||||
* disable.
|
* disable.
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ extern "C"
|
|||||||
* @param bufsiz The size of the buffer in bytes
|
* @param bufsiz The size of the buffer in bytes
|
||||||
* @param from_stdin \b 0 if a terminal is expected, != 0 if data is read from stdin
|
* @param from_stdin \b 0 if a terminal is expected, != 0 if data is read from stdin
|
||||||
*
|
*
|
||||||
* @return A pointer to \ref buf containing the password or \ref NULL in case of an error.
|
* @return A pointer to \ref buf containing the password or \ref nullptr in case of an error.
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
FREERDP_API const char* freerdp_passphrase_read(rdpContext* context, const char* prompt,
|
FREERDP_API const char* freerdp_passphrase_read(rdpContext* context, const char* prompt,
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ extern "C"
|
|||||||
static inline void array_##TLOWER##_init(Array##T* a) \
|
static inline void array_##TLOWER##_init(Array##T* a) \
|
||||||
{ \
|
{ \
|
||||||
WINPR_ASSERT(a); \
|
WINPR_ASSERT(a); \
|
||||||
a->values = NULL; \
|
a->values = nullptr; \
|
||||||
a->nvalues = 0; \
|
a->nvalues = 0; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
@@ -130,7 +130,7 @@ extern "C"
|
|||||||
WINPR_ASSERT(a); \
|
WINPR_ASSERT(a); \
|
||||||
free(a->values); \
|
free(a->values); \
|
||||||
\
|
\
|
||||||
a->values = NULL; \
|
a->values = nullptr; \
|
||||||
a->nvalues = 0; \
|
a->nvalues = 0; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ extern "C"
|
|||||||
|
|
||||||
/** @brief parse a proxy environment variable string and populate settings from it
|
/** @brief parse a proxy environment variable string and populate settings from it
|
||||||
*
|
*
|
||||||
* @param settings the settings to populate, must not be \b NULL
|
* @param settings the settings to populate, must not be \b nullptr
|
||||||
* @param uri_in the proxy string to parse, must not be \b NULL
|
* @param uri_in the proxy string to parse, must not be \b nullptr
|
||||||
*
|
*
|
||||||
* @return \b TRUE if parsed successfully
|
* @return \b TRUE if parsed successfully
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ extern "C"
|
|||||||
* @param ioCode1Mask A \ref RDPDR_CAPS_IRP_MJ value
|
* @param ioCode1Mask A \ref RDPDR_CAPS_IRP_MJ value
|
||||||
* @param buffer A pointer to a buffer that can hold the string representation
|
* @param buffer A pointer to a buffer that can hold the string representation
|
||||||
* @param len The length of the buffer in bytes.
|
* @param len The length of the buffer in bytes.
|
||||||
* @return A string representation of the constant mask or \b NULL in case the buffer is too
|
* @return A string representation of the constant mask or \b nullptr in case the buffer is too
|
||||||
* small
|
* small
|
||||||
*
|
*
|
||||||
* @since version 3.21.0
|
* @since version 3.21.0
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ extern "C"
|
|||||||
*
|
*
|
||||||
* @param ringbuffer the ring buffer
|
* @param ringbuffer the ring buffer
|
||||||
* @param sz the size to ensure
|
* @param sz the size to ensure
|
||||||
* @return a pointer on the write head, or NULL in case of OOM
|
* @return a pointer on the write head, or nullptr in case of OOM
|
||||||
*/
|
*/
|
||||||
WINPR_ATTR_NODISCARD
|
WINPR_ATTR_NODISCARD
|
||||||
FREERDP_API BYTE* ringbuffer_ensure_linear_write(RingBuffer* ringbuffer, size_t sz);
|
FREERDP_API BYTE* ringbuffer_ensure_linear_write(RingBuffer* ringbuffer, size_t sz);
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ extern "C"
|
|||||||
* This allows cleaning up resources like with \b atexit but for signals.
|
* This allows cleaning up resources like with \b atexit but for signals.
|
||||||
*
|
*
|
||||||
* \param context a context for the clenaup handler.
|
* \param context a context for the clenaup handler.
|
||||||
* \param handler the function to call on cleanup. Must not be \b NULL
|
* \param handler the function to call on cleanup. Must not be \b nullptr
|
||||||
*
|
*
|
||||||
* \return \b TRUE if registered successfully, \b FALSE otherwise.
|
* \return \b TRUE if registered successfully, \b FALSE otherwise.
|
||||||
*/
|
*/
|
||||||
@@ -51,7 +51,7 @@ extern "C"
|
|||||||
* This allows removal of a cleanup handler for signals.
|
* This allows removal of a cleanup handler for signals.
|
||||||
*
|
*
|
||||||
* \param context a context for the clenaup handler.
|
* \param context a context for the clenaup handler.
|
||||||
* \param handler the function to call on cleanup. Must not be \b NULL
|
* \param handler the function to call on cleanup. Must not be \b nullptr
|
||||||
*
|
*
|
||||||
* \return \b TRUE if unregistered successfully, \b FALSE otherwise.
|
* \return \b TRUE if unregistered successfully, \b FALSE otherwise.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ extern "C"
|
|||||||
|
|
||||||
/** @brief extracts <key>=<value> pairs from a string
|
/** @brief extracts <key>=<value> pairs from a string
|
||||||
*
|
*
|
||||||
* @param str The string to extract data from, must not be \b NULL
|
* @param str The string to extract data from, must not be \b nullptr
|
||||||
* @param pkey A pointer to store the key value, must not be \b NULL
|
* @param pkey A pointer to store the key value, must not be \b nullptr
|
||||||
* @param pvalue A pointer to store the value, must not be \b NULL
|
* @param pvalue A pointer to store the value, must not be \b nullptr
|
||||||
*
|
*
|
||||||
* @return \b TRUE if successfully extracted, \b FALSE if no matching data was found
|
* @return \b TRUE if successfully extracted, \b FALSE if no matching data was found
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user