00001 // -*- c++ -*- 00002 00003 /* 00004 * Author: Arvin Schnell <arvin@suse.de> 00005 * Maintainer: Arvin Schnell <arvin@suse.de> 00006 */ 00007 00008 00009 #ifndef Partition_h 00010 #define Partition_h 00011 00012 00013 #include <ycp/YCPList.h> 00014 #include <ycp/YCPString.h> 00015 #include <y2util/ExternalProgram.h> 00016 00017 00018 class Partition 00019 { 00020 00021 public: 00022 00026 Partition (string partition_name) : 00027 partition_name (partition_name), 00028 process (0), 00029 exit_code (-1) 00030 { 00031 } 00032 00036 virtual ~Partition () 00037 { 00038 delete process; 00039 } 00040 00045 virtual int status (); 00046 00050 virtual void kill_format (); 00051 00056 virtual bool get_progress_status (double &percent); 00057 00061 virtual void format (YCPList options, 00062 ExternalProgram::Stderr_Disposition stderr_disp = 00063 ExternalProgram::Stderr_To_Stdout) = 0; 00064 00065 protected: 00066 00070 string partition_name; 00071 00075 ExternalProgram *process; 00076 00080 int exit_code; 00081 00082 }; 00083 00084 00085 #endif // Partition_h