1 /* 2 * Copyright 2013, Axel Dörfler, axeld@pinc-software.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef GPT_PARTITION_HANDLE_H 6 #define GPT_PARTITION_HANDLE_H 7 8 9 #include <DiskSystemAddOn.h> 10 11 #include "Header.h" 12 13 14 class GPTPartitionHandle : public BPartitionHandle { 15 public: 16 GPTPartitionHandle( 17 BMutablePartition* partition); 18 virtual ~GPTPartitionHandle(); 19 20 status_t Init(); 21 22 virtual uint32 SupportedOperations(uint32 mask); 23 virtual uint32 SupportedChildOperations( 24 const BMutablePartition* child, 25 uint32 mask); 26 27 virtual status_t GetNextSupportedType( 28 const BMutablePartition* child, 29 int32* cookie, BString* type); 30 31 virtual status_t GetPartitioningInfo(BPartitioningInfo* info); 32 33 virtual status_t GetParameterEditor( 34 B_PARAMETER_EDITOR_TYPE type, 35 BPartitionParameterEditor** editor); 36 virtual status_t ValidateCreateChild(off_t* offset, 37 off_t* size, const char* type, 38 BString* name, const char* parameters); 39 virtual status_t CreateChild(off_t offset, off_t size, 40 const char* type, const char* name, 41 const char* parameters, 42 BMutablePartition** child); 43 virtual status_t DeleteChild(BMutablePartition* child); 44 45 private: 46 EFI::Header* fHeader; 47 }; 48 49 50 #endif // GPT_PARTITION_HANDLE_H 51