Main Page | Namespace List | Class Hierarchy | Class List | Directories | 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     
00106     Pathname deltaPath( const std::string &deltaName );
00107 
00114     Pathname localScriptPath( const std::string &scriptName );
00115 
00119     std::string product();
00120     
00124     std::string distProduct();
00125     
00129     std::string version();
00130     
00134     PkgArch baseArch();
00135 
00139     void setArchs( const std::list<PkgArch> & );
00143     std::list<PkgArch> archs();
00144 
00148     PkgArch arch();
00149 
00154     bool businessProduct();
00155 
00159     bool noYou();
00160 
00167     std::string youUrl();
00168 
00172     void setPatchFiles( const std::list<std::string> &patchFiles );
00173 
00177     std::list<std::string> patchFiles() const;
00178 
00179   protected:
00180     void init( const std::string &path );
00181 
00182   private:
00183     constInstSrcDescrPtr _productDescr;
00184     PMYouSettings &_settings;
00185 
00186     Pathname _patchPath;
00187     Pathname _rpmPath;
00188     Pathname _scriptPath;
00189     Pathname _deltaPath;
00190 
00191     std::string _product;
00192     std::string _version;
00193     PkgArch _baseArch;
00194 
00195     std::string _distProduct;
00196 
00197     std::list<PkgArch> _archs;
00198     PkgArch _arch;
00199     
00200     std::string _youUrl;
00201     bool _businessProduct;
00202     bool _noYou;
00203     
00204     std::list<std::string> _patchFiles;
00205 };
00206 
00207 #endif

Generated on Mon Sep 12 21:52:13 2005 for yast2-packagemanager by  doxygen 1.4.4