xref: /haiku/src/add-ons/kernel/file_systems/iso9660/iso9660_identify.h (revision b30304acc8c37e678a1bf66976d15bdab103f931)
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 #include <SupportDefs.h>
12 
13 
14 /*! \brief Contains all the info of interest pertaining to an
15 	iso9660 volume.
16 
17 	Currently supported character set encoding styles (in decreasing
18 	order of precedence):
19 	- Joliet (UCS-12 (16-bit unicode), which is converted to UTF-8)
20 	- iso9660 (some absurdly tiny character set, but we actually allow UTF-8)
21 */
22 struct iso9660_info {
23 	iso9660_info();
24 	~iso9660_info();
25 
26 	bool IsValid();
27 
28 	void SetISO9660Name(const char *name, uint32 length);
29 	void SetJolietName(const char *name, uint32 length);
30 
31 	const char* PreferredName();
32 
33 	char *iso9660_name;
34 	char *joliet_name;
35 
36 	off_t max_blocks;
37 
38 private:
39 	void _SetString(char **string, const char *newString, uint32 newLength);
40 };
41 
42 status_t iso9660_fs_identify(int deviceFD, iso9660_info *info);
43 
44 #endif	// ISO9660_IDENTIFY_H
45 
46