xref: /haiku/src/add-ons/kernel/partitioning_systems/intel/write_support.h (revision d4e4909c6a3fe4290b78be2b78035c4774e3ff18)
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_set_parameters(int fd, partition_id partitionID,
50 				const char* parameters, disk_job_id job);
51 status_t	pm_initialize(int fd, partition_id partitionID, const char* name,
52 				const char* parameters, off_t partitionSize, disk_job_id job);
53 status_t	pm_uninitialize(int fd, partition_id partitionID,
54 				off_t partitionSize, uint32 blockSize, disk_job_id job);
55 status_t	pm_create_child(int fd, partition_id partitionID, off_t offset,
56 				off_t size, const char* type, const char* name,
57 				const char* parameters, disk_job_id job,
58 				partition_id* childID);
59 status_t	pm_delete_child(int fd, partition_id partitionID,
60 				partition_id childID, disk_job_id job);
61 
62 
63 uint32		ep_get_supported_operations(partition_data* partition,
64 				uint32 mask = ~0);
65 uint32		ep_get_supported_child_operations(partition_data* partition,
66 				partition_data* child, uint32 mask = ~0);
67 bool		ep_is_sub_system_for(partition_data* partition);
68 
69 bool		ep_validate_resize(partition_data* partition, off_t* size);
70 bool		ep_validate_resize_child(partition_data* partition,
71 				partition_data* child, off_t* _size);
72 bool		ep_validate_move(partition_data* partition, off_t* start);
73 bool		ep_validate_move_child(partition_data* partition,
74 				partition_data* child, off_t* _start);
75 bool		ep_validate_set_type(partition_data* partition, const char* type);
76 bool		ep_validate_initialize(partition_data* partition, char* name,
77 				const char* parameters);
78 bool		ep_validate_create_child(partition_data* partition, off_t* _start,
79 				off_t* _size, const char* type, const char* name,
80 				const char* parameters, int32* index);
81 status_t	ep_get_partitionable_spaces(partition_data* partition,
82 				partitionable_space_data* buffer, int32 count,
83 				int32* actualCount);
84 status_t	ep_get_next_supported_type(partition_data* partition,
85 				int32* cookie, char* _type);
86 status_t	ep_shadow_changed(partition_data* partition, partition_data* child,
87 				uint32 operation);
88 
89 status_t	ep_resize(int fd, partition_id partitionID, off_t size,
90 				disk_job_id job);
91 status_t	ep_resize_child(int fd, partition_id partitionID, off_t size,
92 				disk_job_id job);
93 status_t	ep_move(int fd, partition_id partitionID, off_t offset,
94 				disk_job_id job);
95 status_t	ep_move_child(int fd, partition_id partitionID,
96 				partition_id childID, off_t offset, disk_job_id job);
97 status_t	ep_set_type(int fd, partition_id partitionID, const char* type,
98 				disk_job_id job);
99 status_t	ep_initialize(int fd, partition_id partitionID, const char* name,
100 				const char* parameters, off_t partitionSize, disk_job_id job);
101 status_t	ep_create_child(int fd, partition_id partitionID, off_t offset,
102 				off_t size, const char* type, const char* name,
103 				const char* parameters, disk_job_id job,
104 				partition_id* childID);
105 status_t	ep_delete_child(int fd, partition_id partitionID,
106 				partition_id childID, disk_job_id job);
107 
108 
109 #endif	// INTEL_WRITE_SUPPORT_H
110