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

YUMParserData.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:       YUMParserData.h
00014 
00015 Author:     Michael Radziej <mir@suse.de>
00016 Maintainer: Michael Radziej <mir@suse.de>
00017 
00018 Purpose: Declares the various YUMData classes, which are rather dumb
00019          structure-like classes that hold the data of specific YUM
00020          repository files. The parsers (YUM...Parser) create these objects,
00021          and the YUM installation source use them to build more sophisticated
00022          objects.
00023 /-*/
00024 
00025 #ifndef YUMParserData_h
00026 #define YUMParserData_h
00027 
00028 #include <y2util/RepDef.h>
00029 #include <string>
00030 #include <list>
00031 #include <iostream>
00032 
00033 namespace YUM {
00034 
00038   class YUMDependency {
00039   public:
00040     YUMDependency();
00041     YUMDependency(const std::string& name,
00042                   const std::string& flags,
00043                   const std::string& epoch,
00044                   const std::string& ver,
00045                   const std::string& rel,
00046                   const std::string& pre);
00047     std::string name;
00048     std::string flags;
00049     std::string epoch;
00050     std::string ver;
00051     std::string rel;
00052     std::string pre;
00053   };
00054 
00055 
00059   class YUMDirSize {
00060   public:
00061     YUMDirSize();
00062     YUMDirSize(const std::string& path,
00063               const std::string& size,
00064               const std::string& fileCount);
00065     const std::string path;
00066     const std::string sizeKByte;
00067     const std::string fileCount;
00068   };
00069 
00074   class FileData {
00075   public:
00076     std::string name;
00077     std::string type;
00078     FileData();
00079     FileData(const std::string &name,
00080              const std::string &type);
00081   };
00082 
00087   class MultiLang {
00088   public:
00089     MultiLang();
00090     MultiLang(const std::string& langugage,
00091               const std::string& text);
00092     std::string language;
00093     std::string text;
00094   };
00095 
00100   class MetaPkg {
00101   public:
00102     MetaPkg();
00103     MetaPkg(const std::string& type,
00104             const std::string& name);
00105     std::string type;
00106     std::string name;
00107   };
00108 
00113   class PackageReq {
00114   public:
00115     PackageReq();
00116     PackageReq(const std::string& type,
00117               const std::string& epoch,
00118               const std::string& ver,
00119               const std::string& rel,
00120               const std::string& name);
00121     std::string type;
00122     std::string epoch;
00123     std::string ver;
00124     std::string rel;
00125     std::string name;
00126   };
00127 
00131   class ChangelogEntry {
00132   public:
00133     ChangelogEntry();
00134     ChangelogEntry(const std::string& author,
00135                   const std::string& date,
00136                   const std::string& entry);
00137     std::string author;
00138     std::string date;
00139     std::string entry;
00140   };
00141 
00142 
00146   class YUMRepomdData : public Rep {
00147     REP_BODY(YUMRepomdData);
00148     
00149   public:
00150     YUMRepomdData();
00151     std::string type;
00152     std::string location;
00153     std::string checksumType;
00154     std::string checksum;
00155     std::string timestamp;
00156     std::string openChecksumType;
00157     std::string openChecksum;
00158   };
00159 
00160   DEFINE_BASE_POINTER(YUMRepomdData);
00161 
00162 
00166   class YUMPrimaryData : public Rep {
00167     REP_BODY(YUMPrimaryData);
00168     
00169   public:
00170     
00171     YUMPrimaryData();
00172     
00173     std::string type;
00174     std::string name;
00175     std::string arch;
00176     std::string epoch;
00177     std::string ver;
00178     std::string rel;
00179     std::string checksumType;
00180     std::string checksumPkgid;
00181     std::string checksum;
00182     std::string summary;
00183     std::string description;
00184     std::string packager;
00185     std::string url;
00186     std::string timeFile;
00187     std::string timeBuild;
00188     std::string sizePackage;
00189     std::string sizeInstalled;
00190     std::string sizeArchive;
00191     std::string location;
00192     std::string license;
00193     std::string vendor;
00194     std::string group;
00195     std::string buildhost;
00196     std::string sourcerpm;
00197     std::string headerStart;
00198     std::string headerEnd;
00199     std::list<YUMDependency> provides;
00200     std::list<YUMDependency> conflicts;
00201     std::list<YUMDependency> obsoletes;
00202     std::list<YUMDependency> requires;
00203     std::list<FileData> files;
00204     
00205     // SuSE specific data
00206     std::list<std::string> authors;
00207     std::list<std::string> keywords;
00208     std::string  media;
00209     std::list<YUMDirSize> dirSizes;
00210     std::list<YUMDependency> freshen;
00211     bool installOnly;
00212   };
00213 
00214   DEFINE_BASE_POINTER(YUMPrimaryData);
00215 
00216 
00220   class YUMGroupData : public Rep
00221   {
00222     REP_BODY(YUMGroupData);
00223     
00224   public:
00225     
00226     YUMGroupData();
00227     std::string groupId;
00228     std::list<MultiLang> name;
00229     std::string default_;
00230     std::string userVisible;
00231     std::list<MultiLang> description;
00232     std::list<MetaPkg> grouplist;
00233     std::list<PackageReq> packageList;
00234   };
00235 
00236   DEFINE_BASE_POINTER(YUMGroupData);
00237 
00241   class YUMFileListData : public Rep {
00242     REP_BODY(YUMFileListData);
00243 
00244   public:
00245 
00246     YUMFileListData();
00247 
00248     std::string pkgId;
00249     std::string name;
00250     std::string arch;
00251     std::string epoch;
00252     std::string ver;
00253     std::string rel;
00254     std::list<FileData> files;
00255   };
00256 
00257   DEFINE_BASE_POINTER(YUMFileListData);
00258 
00262   class YUMOtherData : public Rep {
00263     REP_BODY(YUMOtherData);
00264   public:
00265     YUMOtherData();
00266     std::string pkgId;
00267     std::string name;
00268     std::string arch;
00269     std::string epoch;
00270     std::string ver;
00271     std::string rel;
00272     std::list<ChangelogEntry> changelog;
00273   };
00274 
00275   DEFINE_BASE_POINTER(YUMOtherData);
00276 
00277 /* ** YUMPatchData not yet finalized **
00278 
00279   class YUMPatchData : public Rep {
00280     REP_BODY(YUMPatchData);
00281   public:
00282     YUMPatchData();
00283     std::patchId;
00284     std::timestamp;
00285     std::name;
00286     std::summary;
00287     MultiLang summary;
00288     MultiLang description;
00289     std::string epoch;
00290     std::string ver;
00291     std::string rel;
00292     std::list<YUMDependency> provides;
00293     std::list<YUMDependency> conflicts;
00294     std::list<YUMDependency> obsoletes;
00295     std::list<YUMDependency> freshen;
00296     std::list<YUMDependency> requires;
00297     std::string category;
00298     bool rebootNeeded;
00299     bool packageManager;
00300   };
00301 
00302   DEFINE_BASE_POINTER(YUMPatchData);
00303 */
00304 
00305 } /* end of namespace YUM */
00306 
00307 
00308   /* Easy output */
00309 
00310 std::ostream& operator<<(std::ostream &out, const YUM::YUMDependency& data);
00311 std::ostream& operator<<(std::ostream &out, const YUM::YUMDirSize& data);
00312 std::ostream& operator<<(std::ostream &out, const YUM::YUMRepomdData& data);
00313 std::ostream& operator<<(std::ostream &out, const YUM::FileData& data);
00314 std::ostream& operator<<(std::ostream &out, const YUM::MultiLang& data);
00315 std::ostream& operator<<(std::ostream &out, const YUM::MetaPkg& data);
00316 std::ostream& operator<<(std::ostream &out, const YUM::PackageReq& data);
00317 std::ostream& operator<<(std::ostream &out, const YUM::ChangelogEntry& data);
00318 std::ostream& operator<<(std::ostream &out, const YUM::YUMRepomdData& data);
00319 std::ostream& operator<<(std::ostream &out, const YUM::YUMPrimaryData& data);
00320 std::ostream& operator<<(std::ostream &out, const YUM::YUMGroupData& data);
00321 std::ostream& operator<<(std::ostream &out, const YUM::YUMFileListData& data);
00322 std::ostream& operator<<(std::ostream& out, const YUM::YUMOtherData& data);
00323 
00324 
00325 
00326 
00327 #endif

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