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 /**************************************************************************/ 14 /** */ 15 /** FileX Component */ 16 /** */ 17 /** Unicode */ 18 /** */ 19 /**************************************************************************/ 20 /**************************************************************************/ 21 22 23 /**************************************************************************/ 24 /* */ 25 /* COMPONENT DEFINITION RELEASE */ 26 /* */ 27 /* fx_unicode.h PORTABLE C */ 28 /* 6.1 */ 29 /* AUTHOR */ 30 /* */ 31 /* William E. Lamie, Microsoft Corporation */ 32 /* */ 33 /* DESCRIPTION */ 34 /* */ 35 /* This file defines the FileX Unicode component constants, data */ 36 /* definitions, and external references. It is assumed that fx_api.h */ 37 /* (and fx_port.h) have already been included. */ 38 /* */ 39 /* RELEASE HISTORY */ 40 /* */ 41 /* DATE NAME DESCRIPTION */ 42 /* */ 43 /* 05-19-2020 William E. Lamie Initial Version 6.0 */ 44 /* 09-30-2020 William E. Lamie Modified comment(s), */ 45 /* resulting in version 6.1 */ 46 /* */ 47 /**************************************************************************/ 48 49 #ifndef FX_UNICODE_H 50 #define FX_UNICODE_H 51 52 53 /* Define external data for the Unicode component. */ 54 55 extern UCHAR _fx_unicode_temp_long_file_name[FX_MAX_LONG_NAME_LEN]; 56 extern UCHAR _fx_unicode_search_name[FX_MAX_LONG_NAME_LEN * 2]; 57 58 59 /* Define the external Unicode component function prototypes. */ 60 61 UINT _fx_unicode_directory_create(FX_MEDIA *media_ptr, UCHAR *source_unicode_name, ULONG source_unicode_length, 62 CHAR *short_name); 63 UINT _fx_unicode_directory_rename(FX_MEDIA *media_ptr, UCHAR *old_unicode_name, ULONG old_unicode_length, 64 UCHAR *new_unicode_name, ULONG new_unicode_length, CHAR *new_short_name); 65 UINT _fx_unicode_file_create(FX_MEDIA *media_ptr, UCHAR *source_unicode_name, ULONG source_unicode_length, 66 CHAR *short_name); 67 ULONG _fx_unicode_length_get(UCHAR *unicode_name); 68 ULONG _fx_unicode_length_get_extended(UCHAR *unicode_name, UINT buffer_length); 69 UINT _fx_unicode_name_get(FX_MEDIA *media_ptr, CHAR *source_short_name, 70 UCHAR *destination_unicode_name, ULONG *destination_unicode_length); 71 UINT _fx_unicode_name_get_extended(FX_MEDIA *media_ptr, CHAR *source_short_name, 72 UCHAR *destination_unicode_name, ULONG *destination_unicode_length, ULONG unicode_name_buffer_length); 73 UINT _fx_unicode_file_rename(FX_MEDIA *media_ptr, UCHAR *old_unicode_name, ULONG old_unicode_length, 74 UCHAR *new_unicode_name, ULONG new_unicode_length, CHAR *new_short_name); 75 UINT _fx_unicode_short_name_get(FX_MEDIA *media_ptr, UCHAR *source_unicode_name, ULONG source_unicode_length, 76 CHAR *destination_short_name); 77 UINT _fx_unicode_short_name_get_extended(FX_MEDIA *media_ptr, UCHAR *source_unicode_name, ULONG source_unicode_length, 78 CHAR *destination_short_name, ULONG short_name_buffer_length); 79 80 UINT _fxe_unicode_directory_create(FX_MEDIA *media_ptr, UCHAR *source_unicode_name, ULONG source_unicode_length, 81 CHAR *short_name); 82 UINT _fxe_unicode_directory_rename(FX_MEDIA *media_ptr, UCHAR *old_unicode_name, ULONG old_unicode_length, 83 UCHAR *new_unicode_name, ULONG new_unicode_length, CHAR *new_short_name); 84 UINT _fxe_unicode_file_create(FX_MEDIA *media_ptr, UCHAR *source_unicode_name, ULONG source_unicode_length, 85 CHAR *short_name); 86 UINT _fxe_unicode_file_rename(FX_MEDIA *media_ptr, UCHAR *old_unicode_name, ULONG old_unicode_length, 87 UCHAR *new_unicode_name, ULONG new_unicode_length, CHAR *new_short_name); 88 UINT _fxe_unicode_name_get(FX_MEDIA *media_ptr, CHAR *source_short_name, 89 UCHAR *destination_unicode_name, ULONG *destination_unicode_length); 90 UINT _fxe_unicode_name_get_extended(FX_MEDIA *media_ptr, CHAR *source_short_name, 91 UCHAR *destination_unicode_name, ULONG *destination_unicode_length, ULONG unicode_name_buffer_length); 92 UINT _fxe_unicode_short_name_get(FX_MEDIA *media_ptr, UCHAR *source_unicode_name, ULONG source_unicode_length, 93 CHAR *destination_short_name); 94 UINT _fxe_unicode_short_name_get_extended(FX_MEDIA *media_ptr, UCHAR *source_unicode_name, ULONG source_unicode_length, 95 CHAR *destination_short_name, ULONG short_name_buffer_length); 96 97 /* Define the internal Unicode component function prototypes. */ 98 99 UINT _fx_unicode_directory_search(FX_MEDIA *media_ptr, FX_DIR_ENTRY *entry_ptr, 100 UCHAR *short_name, ULONG short_name_buffer_length, 101 UCHAR *unicode_name, ULONG *unicode_name_length, ULONG unicode_name_buffer_length); 102 UINT _fx_unicode_directory_entry_read(FX_MEDIA *media_ptr, FX_DIR_ENTRY *source_dir, 103 ULONG *entry_ptr, FX_DIR_ENTRY *destination_ptr, 104 UCHAR *unicode_name, ULONG *unicode_size); 105 UINT _fx_unicode_directory_entry_change(FX_MEDIA *media_ptr, FX_DIR_ENTRY *entry_ptr, UCHAR *unicode_name, ULONG unicode_name_length); 106 107 108 #endif 109 110