xref: /haiku/src/add-ons/disk_systems/gpt/GPTPartitionHandle.h (revision 4a55cc230cf7566cadcbb23b1928eefff8aea9a2)
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 	virtual status_t			ValidateSetType(const BMutablePartition* child,
30 									const char* type);
31 	virtual status_t			SetType(BMutablePartition* child, const char* type);
32 
33 	virtual	status_t			GetNextSupportedType(
34 									const BMutablePartition* child,
35 									int32* cookie, BString* type);
36 
37 	virtual	status_t			GetPartitioningInfo(BPartitioningInfo* info);
38 
39 	virtual	status_t			GetParameterEditor(
40 									B_PARAMETER_EDITOR_TYPE type,
41 									BPartitionParameterEditor** editor);
42 	virtual	status_t			ValidateCreateChild(off_t* offset,
43 									off_t* size, const char* type,
44 									BString* name, const char* parameters);
45 	virtual	status_t			CreateChild(off_t offset, off_t size,
46 									const char* type, const char* name,
47 									const char* parameters,
48 									BMutablePartition** child);
49 	virtual status_t			DeleteChild(BMutablePartition* child);
50 };
51 
52 
53 #endif	// GPT_PARTITION_HANDLE_H
54