blob: 6d91a135a27d31ffa0e78b8b9bef51dbb6a891af [file] [log] [blame]
srs5694fad06422010-02-19 17:19:17 -05001/*
2 <one line to give the program's name and a brief idea of what it does.>
3 Copyright (C) <year> <name of author>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
19*/
20
21#ifndef __GPTDATATEXT_H
22#define __GPTDATATEXT_H
23
24#include "gpt.h"
25
26using namespace std;
27
28class GPTDataTextUI : public GPTData {
29 protected:
30 public:
31 GPTDataTextUI(void);
32 GPTDataTextUI(string filename);
33 ~GPTDataTextUI(void);
34
srs56945a081752010-09-24 20:39:41 -040035 // This one needs to be explicitly defined, even though it does nothing new....
36 const GPTPart & operator[](uint32_t partNum) {return GPTData::operator[](partNum);}
37
srs5694fad06422010-02-19 17:19:17 -050038 // Extended (interactive) versions of some base-class functions
39 WhichToUse UseWhichPartitions(void);
40 int XFormDisklabel(void);
41
42 // Request information from the user (& possibly do something with it)
43 uint32_t GetPartNum(void);
44 void ResizePartitionTable(void);
45 void CreatePartition(void);
46 void DeletePartition(void);
47 void ChangePartType(void);
48 void SetAttributes(uint32_t partNum);
49 int SwapPartitions(void);
50 int DestroyGPTwPrompt(void); // Returns 1 if user proceeds
51 void ShowDetails(void);
52 void MakeHybrid(void);
srs569455d92612010-03-07 22:16:07 -050053 int AssignPrimaryOrLogical(PartNotes& notes);
srs5694fad06422010-02-19 17:19:17 -050054 int XFormToMBR(void); // convert GPT to MBR, wiping GPT afterwards. Returns 1 if successful
55}; // class GPTDataTextUI
56
57int GetMBRTypeCode(int defType);
58
59#endif // __GPTDATATEXT_H