Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

RpmHeaderCache.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013   File:       RpmHeaderCache.h
00014 
00015   Author:     Michael Andres <ma@suse.de>
00016   Maintainer: Michael Andres <ma@suse.de>
00017 
00018   Purpose:
00019 
00020 /-*/
00021 #ifndef RpmHeaderCache_h
00022 #define RpmHeaderCache_h
00023 
00024 #include <iosfwd>
00025 
00026 #include <y2util/Pathname.h>
00027 
00028 #include <y2pm/PkgName.h>
00029 #include <y2pm/binHeaderCache.h>
00030 #include <y2pm/RpmHeaderPtr.h>
00031 
00033 //
00034 //      CLASS NAME : RpmHeaderCache
00038 class RpmHeaderCache : public binHeaderCache {
00039 
00040   friend std::ostream & operator<<( std::ostream & str, const RpmHeaderCache & obj );
00041 
00042   RpmHeaderCache & operator=( const RpmHeaderCache & );
00043   RpmHeaderCache            ( const RpmHeaderCache & );
00044 
00045   private:
00046 
00047     static const PkgNameEd & def_magic();
00048 
00049   protected:
00050 
00051     virtual bool magicOk();
00052 
00053   public:
00054 
00055     RpmHeaderCache( const Pathname & cache_r );
00056     virtual ~RpmHeaderCache();
00057 
00058     constRpmHeaderPtr getFirst( Pathname & citem_r, int & isSource_r, pos & at_r );
00059     constRpmHeaderPtr getNext( Pathname & citem_r, int & isSource_r, pos & at_r );
00060 
00061     constRpmHeaderPtr getAt( pos at_r );
00062 
00063   public:
00064 
00065     struct buildOpts {
00066       bool recurse;
00067       buildOpts()
00068         : recurse( false )
00069       {}
00070     };
00071 
00072     static int buildHeaderCache( const Pathname & cache_r, const Pathname & pkgroot_r,
00073                                  const buildOpts & options_r = buildOpts() );
00074 };
00075 
00077 
00078 #endif // RpmHeaderCache_h

Generated on Fri Nov 9 14:30:32 2007 for yast2-packagemanager by doxygen 1.3.6