00001 #ifndef DM_CO_H 00002 #define DM_CO_H 00003 00004 #include "y2storage/PeContainer.h" 00005 #include "y2storage/Dm.h" 00006 00007 namespace storage 00008 { 00009 class ProcPart; 00010 00011 class DmCo : public PeContainer 00012 { 00013 friend class Storage; 00014 00015 public: 00016 DmCo( Storage * const s, bool detect, ProcPart& ppart ); 00017 DmCo( const DmCo& rhs ); 00018 virtual ~DmCo(); 00019 static storage::CType staticType() { return storage::DM; } 00020 friend std::ostream& operator<< (std::ostream&, const DmCo& ); 00021 bool equalContent( const Container& rhs ) const; 00022 void logDifference( const Container& d ) const; 00023 void updateDmMaps(); 00024 00025 int removeDm( const string& table ); 00026 int removeVolume( Volume* v ); 00027 00028 protected: 00029 DmCo( Storage * const s, const string& File ); 00030 00031 void getDmData( ProcPart& ppart ); 00032 bool findDm( unsigned num, DmIter& i ); 00033 bool findDm( unsigned num ); 00034 bool findDm( const string& dev, DmIter& i ); 00035 bool findDm( const string& dev ); 00036 void addDm( Dm* m ); 00037 void checkDm( Dm* m ); 00038 void updateEntry( const Dm* m ); 00039 virtual Container* getCopy() const { return( new DmCo( *this ) ); } 00040 00041 void init(); 00042 00043 storage::EncryptType detectEncryption( const string& device ) const; 00044 00045 virtual void print( std::ostream& s ) const { s << *this; } 00046 00047 int doRemove( Volume* v ); 00048 00049 void logData( const string& Dir ); 00050 }; 00051 00052 } 00053 00054 #endif
1.5.5