1 /* 2 * Copyright 2007, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Copyright 2019, Les De Ridder, les@lesderid.net 4 * 5 * Distributed under the terms of the MIT License. 6 */ 7 8 #ifndef _BTRFS_ADD_ON_H 9 #define _BTRFS_ADD_ON_H 10 11 #include <DiskSystemAddOn.h> 12 13 class BTRFSAddOn : public BDiskSystemAddOn { 14 public: 15 BTRFSAddOn(); 16 virtual ~BTRFSAddOn(); 17 18 virtual status_t CreatePartitionHandle( 19 BMutablePartition* partition, 20 BPartitionHandle** handle); 21 virtual status_t GetParameterEditor( 22 B_PARAMETER_EDITOR_TYPE type, 23 BPartitionParameterEditor** editor); 24 25 virtual bool CanInitialize( 26 const BMutablePartition* partition); 27 virtual status_t ValidateInitialize( 28 const BMutablePartition* partition, 29 BString* name, const char* parameters); 30 virtual status_t Initialize(BMutablePartition* partition, 31 const char* name, const char* parameters, 32 BPartitionHandle** handle); 33 }; 34 35 36 class BTRFSPartitionHandle : public BPartitionHandle { 37 public: 38 BTRFSPartitionHandle( 39 BMutablePartition* partition); 40 ~BTRFSPartitionHandle(); 41 42 status_t Init(); 43 44 virtual uint32 SupportedOperations(uint32 mask); 45 46 virtual status_t Repair(bool checkOnly); 47 }; 48 49 50 #endif // _BTRFS_ADD_ON_H 51