[settings] added stringify function for RDPDR_RTYP_*

This commit is contained in:
akallabeth 2022-12-15 10:33:59 +01:00 committed by Martin Fleisz
parent 51e49b4329
commit b5e2c2a81d
2 changed files with 27 additions and 0 deletions

View File

@ -2209,6 +2209,14 @@ extern "C"
*/
FREERDP_API const char* freerdp_rdp_version_string(UINT32 version);
/** \brief Returns a string representation of \b RDPDR_DTYP_*
*
* \param type The integer of the \b RDPDR_DTYP_* to stringify
*
* \return A string representation of the \b RDPDR_DTYP_* or "RDPDR_DTYP_UNKNOWN"
*/
FREERDP_API const char* freerdp_rdpdr_dtyp_string(UINT32 type);
#ifdef __cplusplus
}
#endif

View File

@ -2057,3 +2057,22 @@ WCHAR* freerdp_settings_get_string_as_utf16(const rdpSettings* settings, size_t
return NULL;
return ConvertUtf8ToWCharAlloc(str, pCharLen);
}
const char* freerdp_rdpdr_dtyp_string(UINT32 type)
{
switch (type)
{
case RDPDR_DTYP_FILESYSTEM:
return "RDPDR_DTYP_FILESYSTEM";
case RDPDR_DTYP_PARALLEL:
return "RDPDR_DTYP_PARALLEL";
case RDPDR_DTYP_PRINT:
return "RDPDR_DTYP_PRINT";
case RDPDR_DTYP_SERIAL:
return "RDPDR_DTYP_SERIAL";
case RDPDR_DTYP_SMARTCARD:
return "RDPDR_DTYP_SMARTCARD";
default:
return "RDPDR_DTYP_UNKNOWN";
}
}