xref: /haiku/src/add-ons/kernel/partitioning_systems/intel/write_support.h (revision 508f54795f39c3e7552d87c95aae9dd8ec6f505b)
1 /*
2  * Copyright 2007, Ingo Weinhold, bonefish@cs.tu-berlin.de. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef INTEL_WRITE_SUPPORT_H
6 #define INTEL_WRITE_SUPPORT_H
7 
8 
9 #include <disk_device_manager/ddm_modules.h>
10 
11 
12 uint32		pm_get_supported_operations(partition_data* partition,
13 				uint32 mask = ~0);
14 uint32		pm_get_supported_child_operations(partition_data* partition,
15 				partition_data* child, uint32 mask = ~0);
16 bool		pm_is_sub_system_for(partition_data* partition);
17 
18 bool		pm_validate_resize(partition_data* partition, off_t* size);
19 bool		pm_validate_resize_child(partition_data* partition,
20 				partition_data* child, off_t* size);
21 bool		pm_validate_move(partition_data* partition, off_t* start);
22 bool		pm_validate_move_child(partition_data* partition,
23 				partition_data* child, off_t* start);
24 bool		pm_validate_set_type(partition_data* partition, const char* type);
25 bool		pm_validate_initialize(partition_data* partition, char* name,
26 				const char* parameters);
27 bool		pm_validate_create_child(partition_data* partition, off_t* start,
28 				off_t* size, const char* type, const char* name,
29 				const char* parameters, int32* index);
30 
31 status_t	pm_get_partitionable_spaces(partition_data* partition,
32 				partitionable_space_data* buffer, int32 count,
33 				int32* actualCount);
34 status_t	pm_get_next_supported_type(partition_data* partition,
35 				int32* cookie, char* _type);
36 status_t	pm_shadow_changed(partition_data* partition, partition_data* child,
37 				uint32 operation);
38 
39 status_t	pm_resize(int fd, partition_id partitionID, off_t size,
40 				disk_job_id job);
41 status_t	pm_resize_child(int fd, partition_id partitionID, off_t size,
42 				disk_job_id job);
43 status_t	pm_move(int fd, partition_id partitionID, off_t offset,
44 				disk_job_id job);
45 status_t	pm_move_child(int fd, partition_id partitionID,
46 				partition_id childID, off_t offset, disk_job_id job);
47 status_t	pm_set_type(int fd, partition_id partitionID, const char* type,
48 				disk_job_id job);
49 status_t	pm_initialize(int fd, partition_id partitionID, const char* name,
50 				const char* parameters, off_t partitionSize, disk_job_id job);
51 status_t	pm_create_child(int fd, partition_id partitionID, off_t offset,
52 				off_t size, const char* type, const char* name,
53 				const char* parameters, disk_job_id job,
54 				partition_id* childID);
55 status_t	pm_delete_child(int fd, partition_id partitionID,
56 				partition_id childID, disk_job_id job);
57 
58 
59 uint32		ep_get_supported_operations(partition_data* partition,
60 				uint32 mask = ~0);
61 uint32		ep_get_supported_child_operations(partition_data* partition,
62 				partition_data* child, uint32 mask = ~0);
63 bool		ep_is_sub_system_for(partition_data* partition);
64 
65 bool		ep_validate_resize(partition_data* partition, off_t* size);
66 bool		ep_validate_resize_child(partition_data* partition,
67 				partition_data* child, off_t* _size);
68 bool		ep_validate_move(partition_data* partition, off_t* start);
69 bool		ep_validate_move_child(partition_data* partition,
70 				partition_data* child, off_t* _start);
71 bool		ep_validate_set_type(partition_data* partition, const char* type);
72 bool		ep_validate_initialize(partition_data* partition, char* name,
73 				const char* parameters);
74 bool		ep_validate_create_child(partition_data* partition, off_t* _start,
75 				off_t* _size, const char* type, const char* name,
76 				const char* parameters, int32* index);
77 status_t	ep_get_partitionable_spaces(partition_data* partition,
78 				partitionable_space_data* buffer, int32 count,
79 				int32* actualCount);
80 status_t	ep_get_next_supported_type(partition_data* partition,
81 				int32* cookie, char* _type);
82 status_t	ep_shadow_changed(partition_data* partition, partition_data* child,
83 				uint32 operation);
84 
85 status_t	ep_resize(int fd, partition_id partitionID, off_t size,
86 				disk_job_id job);
87 status_t	ep_resize_child(int fd, partition_id partitionID, off_t size,
88 				disk_job_id job);
89 status_t	ep_move(int fd, partition_id partitionID, off_t offset,
90 				disk_job_id job);
91 status_t	ep_move_child(int fd, partition_id partitionID,
92 				partition_id childID, off_t offset, disk_job_id job);
93 status_t	ep_set_type(int fd, partition_id partitionID, const char* type,
94 				disk_job_id job);
95 status_t	ep_initialize(int fd, partition_id partitionID, const char* name,
96 				const char* parameters, off_t partitionSize, disk_job_id job);
97 status_t	ep_create_child(int fd, partition_id partitionID, off_t offset,
98 				off_t size, const char* type, const char* name,
99 				const char* parameters, disk_job_id job,
100 				partition_id* childID);
101 status_t	ep_delete_child(int fd, partition_id partitionID,
102 				partition_id childID, disk_job_id job);
103 
104 
105 #endif	// INTEL_WRITE_SUPPORT_H
106