1 /* 2 * Copyright 2007, Axel Dörfler, axeld@pinc-software.de. 3 * Copyright 2002, Tyler Dauwalder. 4 * 5 * This file may be used under the terms of the MIT License. 6 */ 7 #ifndef ISO9660_IDENTIFY_H 8 #define ISO9660_IDENTIFY_H 9 10 11 #if FS_SHELL 12 # include "fssh_api_wrapper.h" 13 #else 14 # include <SupportDefs.h> 15 #endif 16 17 18 /*! \brief Contains all the info of interest pertaining to an 19 iso9660 volume. 20 21 Currently supported character set encoding styles (in decreasing 22 order of precedence): 23 - Joliet (UCS-12 (16-bit unicode), which is converted to UTF-8) 24 - iso9660 (some absurdly tiny character set, but we actually allow UTF-8) 25 */ 26 struct iso9660_info { 27 iso9660_info(); 28 ~iso9660_info(); 29 30 bool IsValid(); 31 32 void SetISO9660Name(const char *name, uint32 length); 33 void SetJolietName(const char *name, uint32 length); 34 35 const char* PreferredName(); 36 37 char *iso9660_name; 38 char *joliet_name; 39 40 off_t max_blocks; 41 42 private: 43 void _SetString(char **string, const char *newString, uint32 newLength); 44 }; 45 46 status_t iso9660_fs_identify(int deviceFD, iso9660_info *info); 47 48 #endif // ISO9660_IDENTIFY_H 49 50