00001
00002
00003
00004 #ifndef _PartedAcc_h
00005 #define _PartedAcc_h
00006
00007
00008 #include <string>
00009 #include <vector>
00010
00011 using std::vector;
00012
00013 #include "PartInfo.defs.h"
00014 #include "SystemCmd.h"
00015 #include "DiskAcc.h"
00016
00017 class PartedAccess : public DiskAccess
00018 {
00019 public:
00020 PartedAccess(string Disk_Cv, bool Readonly_bv);
00021 virtual ~PartedAccess();
00022 virtual bool WritePartitionTable() { return false; };
00023 virtual void Delete(const unsigned Part_iv);
00024 virtual void DeleteAll();
00025 virtual bool NewPartition(const PartitionType Part_e, const unsigned Part_nr,
00026 string Von_Cv, string Bis_Cv,
00027 const unsigned Type_iv, string DefLabel_Cv );
00028 bool Resize( const unsigned Part_iv, const unsigned NewLastCyl_iv );
00029 virtual void SetType(const unsigned Part_iv, const unsigned Type_iv);
00030
00031 protected:
00032 void CheckError( const string& CmdString_Cv, SystemCmd& Cmd_C );
00033
00034 string GetPartitionNumber(int Part_iv);
00035 void CheckOutput(SystemCmd& Cmd_C, string Pat_Cv);
00036 bool ScanLine(string Line_Cv, PartInfo& Part_rr);
00037 void GetPartitionList( bool OnlyLabel_bv );
00038 };
00039
00040 #endif