1 /* EasyTAG - tag editor for audio files 2 * Copyright (C) 2015 David King <amigadave@amigadave.com> 3 * 4 * This program is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU General Public License as published by the Free 6 * Software Foundation; either version 2 of the License, or (at your option) 7 * any later version. 8 * 9 * This program is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 * more details. 13 * 14 * You should have received a copy of the GNU General Public License along with 15 * this program; if not, write to the Free Software Foundation, Inc., 51 16 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19 #ifndef ET_FILE_NAME_H_ 20 #define ET_FILE_NAME_H_ 21 22 #include <glib.h> 23 24 G_BEGIN_DECLS 25 26 /* 27 * Description of each item of the FileNameList list 28 */ 29 typedef struct 30 { 31 guint key; 32 gboolean saved; /* Set to TRUE if this filename had been saved */ 33 gchar *value; /* The filename containing the full path and the extension of the file */ 34 gchar *value_utf8; /* Same than "value", but converted to UTF-8 to avoid multiple call to the convertion function */ 35 gchar *value_ck; /* Collate key of "value_utf8" to speed up comparison. */ 36 } File_Name; 37 38 File_Name * et_file_name_new (void); 39 void et_file_name_free (File_Name *file_name); 40 void ET_Set_Filename_File_Name_Item (File_Name *FileName, const gchar *filename_utf8, const gchar *filename); 41 gboolean et_file_name_set_from_components (File_Name *file_name, const gchar *new_name, const gchar *dir_name, gboolean replace_illegal); 42 gboolean et_file_name_detect_difference (const File_Name *a, const File_Name *b); 43 44 G_END_DECLS 45 46 #endif /* !ET_FILE_NAME_H_ */ 47