diff --git a/include/freerdp/utils/helpers.h b/include/freerdp/utils/helpers.h index 68d9898fd..52db2aa8d 100644 --- a/include/freerdp/utils/helpers.h +++ b/include/freerdp/utils/helpers.h @@ -25,30 +25,39 @@ #include -/** @brief Return the absolute path of a configuration file (the path of the configuration - * directory if \b filename is \b NULL) - * - * @param system a boolean indicating the configuration base, \b TRUE for system configuration, - * \b FALSE for user configuration - * @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 - * free to clean up the allocated string. - * - * - * @since version 3.9.0 - */ -WINPR_ATTR_MALLOC(free, 1) -FREERDP_API char* freerdp_GetConfigFilePath(BOOL system, const char* filename); +#ifdef __cplusplus +extern "C" +{ +#endif -/** @brief return a parsed JSON for a given config file name. - * - * @param system a boolean indicating the configuration base, \b TRUE for system configuration, - * \b FALSE for user configuration - * @param filename an optional configuration file name to append. - * - * @return A parsed \b WINPR_JSON object or \b NULL in case of any failure. - * @since version 3.16.0 - */ -WINPR_ATTR_MALLOC(WINPR_JSON_Delete, 1) -FREERDP_API WINPR_JSON* freerdp_GetJSONConfigFile(BOOL system, const char* filename); + /** @brief Return the absolute path of a configuration file (the path of the configuration + * directory if \b filename is \b NULL) + * + * @param system a boolean indicating the configuration base, \b TRUE for system configuration, + * \b FALSE for user configuration + * @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 + * free to clean up the allocated string. + * + * + * @since version 3.9.0 + */ + WINPR_ATTR_MALLOC(free, 1) + FREERDP_API char* freerdp_GetConfigFilePath(BOOL system, const char* filename); + + /** @brief return a parsed JSON for a given config file name. + * + * @param system a boolean indicating the configuration base, \b TRUE for system configuration, + * \b FALSE for user configuration + * @param filename an optional configuration file name to append. + * + * @return A parsed \b WINPR_JSON object or \b NULL in case of any failure. + * @since version 3.16.0 + */ + WINPR_ATTR_MALLOC(WINPR_JSON_Delete, 1) + FREERDP_API WINPR_JSON* freerdp_GetJSONConfigFile(BOOL system, const char* filename); + +#ifdef __cplusplus +} +#endif