fx_unicode.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /***************************************************************************
  2. * Copyright (c) 2024 Microsoft Corporation
  3. *
  4. * This program and the accompanying materials are made available under the
  5. * terms of the MIT License which is available at
  6. * https://opensource.org/licenses/MIT.
  7. *
  8. * SPDX-License-Identifier: MIT
  9. **************************************************************************/
  10. /**************************************************************************/
  11. /**************************************************************************/
  12. /** */
  13. /** FileX Component */
  14. /** */
  15. /** Unicode */
  16. /** */
  17. /**************************************************************************/
  18. /**************************************************************************/
  19. /**************************************************************************/
  20. /* */
  21. /* COMPONENT DEFINITION RELEASE */
  22. /* */
  23. /* fx_unicode.h PORTABLE C */
  24. /* 6.1 */
  25. /* AUTHOR */
  26. /* */
  27. /* William E. Lamie, Microsoft Corporation */
  28. /* */
  29. /* DESCRIPTION */
  30. /* */
  31. /* This file defines the FileX Unicode component constants, data */
  32. /* definitions, and external references. It is assumed that fx_api.h */
  33. /* (and fx_port.h) have already been included. */
  34. /* */
  35. /* RELEASE HISTORY */
  36. /* */
  37. /* DATE NAME DESCRIPTION */
  38. /* */
  39. /* 05-19-2020 William E. Lamie Initial Version 6.0 */
  40. /* 09-30-2020 William E. Lamie Modified comment(s), */
  41. /* resulting in version 6.1 */
  42. /* */
  43. /**************************************************************************/
  44. #ifndef FX_UNICODE_H
  45. #define FX_UNICODE_H
  46. /* Define external data for the Unicode component. */
  47. extern UCHAR _fx_unicode_temp_long_file_name[FX_MAX_LONG_NAME_LEN];
  48. extern UCHAR _fx_unicode_search_name[FX_MAX_LONG_NAME_LEN * 2];
  49. /* Define the external Unicode component function prototypes. */
  50. UINT _fx_unicode_directory_create(FX_MEDIA *media_ptr, UCHAR *source_unicode_name, ULONG source_unicode_length,
  51. CHAR *short_name);
  52. UINT _fx_unicode_directory_rename(FX_MEDIA *media_ptr, UCHAR *old_unicode_name, ULONG old_unicode_length,
  53. UCHAR *new_unicode_name, ULONG new_unicode_length, CHAR *new_short_name);
  54. UINT _fx_unicode_file_create(FX_MEDIA *media_ptr, UCHAR *source_unicode_name, ULONG source_unicode_length,
  55. CHAR *short_name);
  56. ULONG _fx_unicode_length_get(UCHAR *unicode_name);
  57. ULONG _fx_unicode_length_get_extended(UCHAR *unicode_name, UINT buffer_length);
  58. UINT _fx_unicode_name_get(FX_MEDIA *media_ptr, CHAR *source_short_name,
  59. UCHAR *destination_unicode_name, ULONG *destination_unicode_length);
  60. UINT _fx_unicode_name_get_extended(FX_MEDIA *media_ptr, CHAR *source_short_name,
  61. UCHAR *destination_unicode_name, ULONG *destination_unicode_length, ULONG unicode_name_buffer_length);
  62. UINT _fx_unicode_file_rename(FX_MEDIA *media_ptr, UCHAR *old_unicode_name, ULONG old_unicode_length,
  63. UCHAR *new_unicode_name, ULONG new_unicode_length, CHAR *new_short_name);
  64. UINT _fx_unicode_short_name_get(FX_MEDIA *media_ptr, UCHAR *source_unicode_name, ULONG source_unicode_length,
  65. CHAR *destination_short_name);
  66. UINT _fx_unicode_short_name_get_extended(FX_MEDIA *media_ptr, UCHAR *source_unicode_name, ULONG source_unicode_length,
  67. CHAR *destination_short_name, ULONG short_name_buffer_length);
  68. UINT _fxe_unicode_directory_create(FX_MEDIA *media_ptr, UCHAR *source_unicode_name, ULONG source_unicode_length,
  69. CHAR *short_name);
  70. UINT _fxe_unicode_directory_rename(FX_MEDIA *media_ptr, UCHAR *old_unicode_name, ULONG old_unicode_length,
  71. UCHAR *new_unicode_name, ULONG new_unicode_length, CHAR *new_short_name);
  72. UINT _fxe_unicode_file_create(FX_MEDIA *media_ptr, UCHAR *source_unicode_name, ULONG source_unicode_length,
  73. CHAR *short_name);
  74. UINT _fxe_unicode_file_rename(FX_MEDIA *media_ptr, UCHAR *old_unicode_name, ULONG old_unicode_length,
  75. UCHAR *new_unicode_name, ULONG new_unicode_length, CHAR *new_short_name);
  76. UINT _fxe_unicode_name_get(FX_MEDIA *media_ptr, CHAR *source_short_name,
  77. UCHAR *destination_unicode_name, ULONG *destination_unicode_length);
  78. UINT _fxe_unicode_name_get_extended(FX_MEDIA *media_ptr, CHAR *source_short_name,
  79. UCHAR *destination_unicode_name, ULONG *destination_unicode_length, ULONG unicode_name_buffer_length);
  80. UINT _fxe_unicode_short_name_get(FX_MEDIA *media_ptr, UCHAR *source_unicode_name, ULONG source_unicode_length,
  81. CHAR *destination_short_name);
  82. UINT _fxe_unicode_short_name_get_extended(FX_MEDIA *media_ptr, UCHAR *source_unicode_name, ULONG source_unicode_length,
  83. CHAR *destination_short_name, ULONG short_name_buffer_length);
  84. /* Define the internal Unicode component function prototypes. */
  85. UINT _fx_unicode_directory_search(FX_MEDIA *media_ptr, FX_DIR_ENTRY *entry_ptr,
  86. UCHAR *short_name, ULONG short_name_buffer_length,
  87. UCHAR *unicode_name, ULONG *unicode_name_length, ULONG unicode_name_buffer_length);
  88. UINT _fx_unicode_directory_entry_read(FX_MEDIA *media_ptr, FX_DIR_ENTRY *source_dir,
  89. ULONG *entry_ptr, FX_DIR_ENTRY *destination_ptr,
  90. UCHAR *unicode_name, ULONG *unicode_size);
  91. UINT _fx_unicode_directory_entry_change(FX_MEDIA *media_ptr, FX_DIR_ENTRY *entry_ptr, UCHAR *unicode_name, ULONG unicode_name_length);
  92. #endif