DmCo.h

Go to the documentation of this file.
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         void getDmData( unsigned num );
00033         bool findDm( unsigned num, DmIter& i );
00034         bool findDm( unsigned num ); 
00035         bool findDm( const string& dev, DmIter& i );
00036         bool findDm( const string& dev ); 
00037         void addDm( Dm* m );
00038         void checkDm( Dm* m );
00039         void updateEntry( const Dm* m );
00040         virtual Container* getCopy() const { return( new DmCo( *this ) ); }
00041 
00042         void init();
00043 
00044         virtual void print( std::ostream& s ) const { s << *this; }
00045 
00046         int doRemove( Volume* v );
00047 
00048         void logData( const string& Dir );
00049     };
00050 
00051 }
00052 
00053 #endif

Generated on Wed Apr 30 14:58:40 2008 for yast2-storage by  doxygen 1.4.6