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

PMYouProduct.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                    (C) SuSE Linux AG |
00011 \----------------------------------------------------------------------/
00012 
00013   Author:     Cornelius Schumacher <cschum@suse.de>
00014   Maintainer: Cornelius Schumacher <cschum@suse.de>
00015 
00016   Purpose: Provide product-specific information for YOU.
00017 
00018 /-*/
00019 #ifndef PMYOUPRODUCT_H
00020 #define PMYOUPRODUCT_H
00021 
00022 #include <list>
00023 #include <string>
00024 
00025 #include <y2util/Url.h>
00026 #include <y2util/Pathname.h>
00027 #include <y2util/LangCode.h>
00028 
00029 #include <y2pm/PMError.h>
00030 #include <y2pm/PMPackagePtr.h>
00031 #include <y2pm/PkgArch.h>
00032 
00033 #include <y2pm/PMYouServers.h>
00034 #include <y2pm/InstSrcDescrPtr.h>
00035 
00036 #include <y2pm/PMYouProductPtr.h>
00037 
00038 class SysConfig;
00039 
00043 class PMYouProduct : public CountedRep
00044 {
00045   REP_BODY( PMYouProduct );
00046 
00047   public:
00051     PMYouProduct( const constInstSrcDescrPtr &, PMYouSettings & );
00052 
00053     PMYouProduct( const string &product, const string &version,
00054                   const string &baseArch, PMYouSettings & );
00055 
00059     ~PMYouProduct();
00060 
00071     void init( const std::string &product, const std::string &version,
00072                const std::string &baseArch, const std::string &youUrl,
00073                const std::string &path );
00077     void init( const std::string &product, const std::string &version,
00078                const std::string &baseArch );
00079 
00084     void setPatchPath( const Pathname & );
00088     Pathname patchPath();
00089 
00097     Pathname rpmPath( const PMPackagePtr &pkg, bool patchRpm = false );
00098 
00104     Pathname scriptPath( const std::string &scriptName );
00105 
00112     Pathname localScriptPath( const std::string &scriptName );
00113 
00117     std::string product();
00118     
00122     std::string distProduct();
00123     
00127     std::string version();
00128     
00132     PkgArch baseArch();
00133 
00137     void setArchs( const std::list<PkgArch> & );
00141     std::list<PkgArch> archs();
00142 
00146     PkgArch arch();
00147 
00152     bool businessProduct();
00153 
00157     bool noYou();
00158 
00165     std::string youUrl();
00166 
00170     void setPatchFiles( const std::list<std::string> &patchFiles );
00171 
00175     std::list<std::string> patchFiles() const;
00176 
00177   protected:
00178     void init( const std::string &path );
00179 
00180   private:
00181     constInstSrcDescrPtr _productDescr;
00182     PMYouSettings &_settings;
00183 
00184     Pathname _patchPath;
00185     Pathname _rpmPath;
00186     Pathname _scriptPath;
00187 
00188     std::string _product;
00189     std::string _version;
00190     PkgArch _baseArch;
00191 
00192     std::string _distProduct;
00193 
00194     std::list<PkgArch> _archs;
00195     PkgArch _arch;
00196     
00197     std::string _youUrl;
00198     bool _businessProduct;
00199     bool _noYou;
00200     
00201     std::list<std::string> _patchFiles;
00202 };
00203 
00204 #endif

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