xref: /haiku/src/add-ons/disk_systems/gpt/GPTPartitionHandle.h (revision 5e7964b0a929555415798dea3373db9ac4611caa)
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 
12 class GPTPartitionHandle : public BPartitionHandle {
13 public:
14 								GPTPartitionHandle(
15 									BMutablePartition* partition);
16 	virtual						~GPTPartitionHandle();
17 
18 			status_t			Init();
19 
20 	virtual	uint32				SupportedOperations(uint32 mask);
21 	virtual	uint32				SupportedChildOperations(
22 									const BMutablePartition* child,
23 									uint32 mask);
24 
25 	virtual status_t			ValidateSetName(const BMutablePartition* child,
26 									BString* name);
27 	virtual status_t			SetName(BMutablePartition* child,
28 									const char* name);
29 
30 	virtual	status_t			GetNextSupportedType(
31 									const BMutablePartition* child,
32 									int32* cookie, BString* type);
33 
34 	virtual	status_t			GetPartitioningInfo(BPartitioningInfo* info);
35 
36 	virtual	status_t			GetParameterEditor(
37 									B_PARAMETER_EDITOR_TYPE type,
38 									BPartitionParameterEditor** editor);
39 	virtual	status_t			ValidateCreateChild(off_t* offset,
40 									off_t* size, const char* type,
41 									BString* name, const char* parameters);
42 	virtual	status_t			CreateChild(off_t offset, off_t size,
43 									const char* type, const char* name,
44 									const char* parameters,
45 									BMutablePartition** child);
46 	virtual status_t			DeleteChild(BMutablePartition* child);
47 };
48 
49 
50 #endif	// GPT_PARTITION_HANDLE_H
51