xref: /haiku/headers/private/system/ddm_userland_interface_defs.h (revision 899e0ef82b5624ace2ccfa5f5a58c8ebee54aaef)
1 /*
2  * Copyright 2003-2009, Haiku Inc.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Ingo Weinhold, bonefish@users.sf.net
7  */
8 #ifndef _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H
9 #define _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H
10 
11 
12 #include <OS.h>
13 
14 #include <DiskDeviceDefs.h>
15 
16 
17 // userland partition representation
18 typedef struct user_partition_data user_partition_data;
19 struct user_partition_data {
20 	partition_id			id;
21 	off_t					offset;
22 	off_t					size;
23 	off_t					content_size;
24 	uint32					block_size;
25 	uint32					physical_block_size;
26 	uint32					status;
27 	uint32					flags;
28 	dev_t					volume;
29 	int32					index;
30 	int32					change_counter;	// TODO: needed?
31 	disk_system_id			disk_system;
32 	char*					name;
33 	char*					content_name;
34 	char*					type;
35 	char*					content_type;
36 	char*					parameters;
37 	char*					content_parameters;
38 	void*					user_data;
39 	int32					child_count;
40 	user_partition_data*	children[1];
41 };
42 
43 // userland disk device representation
44 typedef struct user_disk_device_data {
45 	uint32					device_flags;
46 	char*					path;
47 	user_partition_data		device_partition_data;
48 } user_disk_device_data;
49 
50 // userland disk system representation
51 typedef struct user_disk_system_info {
52 	disk_system_id	id;
53 	char			name[B_FILE_NAME_LENGTH];
54 		// TODO: better B_PATH_NAME_LENGTH?
55 	char			short_name[B_OS_NAME_LENGTH];
56 	char			pretty_name[B_OS_NAME_LENGTH];
57 	uint32			flags;
58 } user_disk_system_info;
59 
60 // userland disk device job representation
61 typedef struct user_disk_device_job_info {
62 	disk_job_id		id;
63 	uint32			type;
64 	partition_id	partition;
65 	char			description[256];
66 } user_disk_device_job_info;
67 
68 
69 #endif	// _SYSTEM_DDM_USERLAND_INTERFACE_DEFS_H
70