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 12uint32 pm_get_supported_operations(partition_data* partition, 13 uint32 mask = ~0); 14uint32 pm_get_supported_child_operations(partition_data* partition, 15 partition_data* child, uint32 mask = ~0); 16bool pm_is_sub_system_for(partition_data* partition); 17 18bool pm_validate_resize(partition_data* partition, off_t* size); 19bool pm_validate_resize_child(partition_data* partition, 20 partition_data* child, off_t* size); 21bool pm_validate_move(partition_data* partition, off_t* start); 22bool pm_validate_move_child(partition_data* partition, 23 partition_data* child, off_t* start); 24bool pm_validate_set_type(partition_data* partition, const char* type); 25bool pm_validate_initialize(partition_data* partition, char* name, 26 const char* parameters); 27bool 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 31status_t pm_get_partitionable_spaces(partition_data* partition, 32 partitionable_space_data* buffer, int32 count, 33 int32* actualCount); 34status_t pm_get_next_supported_type(partition_data* partition, 35 int32* cookie, char* _type); 36status_t pm_shadow_changed(partition_data* partition, partition_data* child, 37 uint32 operation); 38 39status_t pm_resize(int fd, partition_id partitionID, off_t size, 40 disk_job_id job); 41status_t pm_resize_child(int fd, partition_id partitionID, off_t size, 42 disk_job_id job); 43status_t pm_move(int fd, partition_id partitionID, off_t offset, 44 disk_job_id job); 45status_t pm_move_child(int fd, partition_id partitionID, 46 partition_id childID, off_t offset, disk_job_id job); 47status_t pm_set_type(int fd, partition_id partitionID, const char* type, 48 disk_job_id job); 49status_t pm_set_parameters(int fd, partition_id partitionID, 50 const char* parameters, disk_job_id job); 51status_t pm_initialize(int fd, partition_id partitionID, const char* name, 52 const char* parameters, off_t partitionSize, disk_job_id job); 53status_t pm_uninitialize(int fd, partition_id partitionID, 54 off_t partitionSize, uint32 blockSize, disk_job_id job); 55status_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); 59status_t pm_delete_child(int fd, partition_id partitionID, 60 partition_id childID, disk_job_id job); 61 62 63uint32 ep_get_supported_operations(partition_data* partition, 64 uint32 mask = ~0); 65uint32 ep_get_supported_child_operations(partition_data* partition, 66 partition_data* child, uint32 mask = ~0); 67bool ep_is_sub_system_for(partition_data* partition); 68 69bool ep_validate_resize(partition_data* partition, off_t* size); 70bool ep_validate_resize_child(partition_data* partition, 71 partition_data* child, off_t* _size); 72bool ep_validate_move(partition_data* partition, off_t* start); 73bool ep_validate_move_child(partition_data* partition, 74 partition_data* child, off_t* _start); 75bool ep_validate_set_type(partition_data* partition, const char* type); 76bool ep_validate_initialize(partition_data* partition, char* name, 77 const char* parameters); 78bool 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); 81status_t ep_get_partitionable_spaces(partition_data* partition, 82 partitionable_space_data* buffer, int32 count, 83 int32* actualCount); 84status_t ep_get_next_supported_type(partition_data* partition, 85 int32* cookie, char* _type); 86status_t ep_shadow_changed(partition_data* partition, partition_data* child, 87 uint32 operation); 88 89status_t ep_resize(int fd, partition_id partitionID, off_t size, 90 disk_job_id job); 91status_t ep_resize_child(int fd, partition_id partitionID, off_t size, 92 disk_job_id job); 93status_t ep_move(int fd, partition_id partitionID, off_t offset, 94 disk_job_id job); 95status_t ep_move_child(int fd, partition_id partitionID, 96 partition_id childID, off_t offset, disk_job_id job); 97status_t ep_set_type(int fd, partition_id partitionID, const char* type, 98 disk_job_id job); 99status_t ep_initialize(int fd, partition_id partitionID, const char* name, 100 const char* parameters, off_t partitionSize, disk_job_id job); 101status_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); 105status_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