ResolvableData.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00009 
00010 
00011 #ifndef ResolvableData_h
00012 #define ResolvableData_h
00013 
00014 #include "zypp/base/ReferenceCounted.h"
00015 #include "zypp/base/NonCopyable.h"
00016 #include "zypp/Pathname.h"
00017 #include "zypp/Edition.h"
00018 #include "zypp/ByteCount.h"
00019 #include "zypp/Arch.h"
00020 #include "zypp/CheckSum.h"
00021 #include "zypp/Url.h"
00022 #include "zypp/Date.h"
00023 #include "zypp/TranslatedText.h"
00024 #include <string>
00025 #include <list>
00026 #include <iostream>
00027 #include <zypp/base/PtrTypes.h>
00028 
00029 using namespace zypp::base;
00030 
00031 namespace zypp
00032 {
00033 namespace data
00034 {
00035   class Dependency
00036   {
00037     public:
00038       Dependency();
00039       Dependency(const std::string& kind, const std::string& encoded );
00040       std::string kind;
00041       std::string encoded;
00042   };
00043   
00044   typedef std::list<Dependency> DependencyList;
00045   
00046   class ResObject : public base::ReferenceCounted, private base::NonCopyable
00047   {
00048     public:
00049       std::string name;
00050       Edition edition;
00051       Arch arch;
00052       
00053       TranslatedText summary;
00054       TranslatedText description;
00055       
00056       DependencyList provides;
00057       DependencyList conflicts;
00058       DependencyList obsoletes;
00059       DependencyList freshens;
00060       DependencyList requires;
00061       DependencyList prerequires;
00062       DependencyList recommends;
00063       DependencyList suggests;
00064       DependencyList supplements;
00065       DependencyList enhances;
00066   };
00067   
00068   class AtomBase : public ResObject
00069   {
00070     public:
00071       enum AtomType { TypePackage, TypeScript, TypeMessage };
00072       virtual AtomType atomType() = 0;
00073   };
00074   
00075   class Script : public AtomBase
00076   {
00077     public:
00078       Script() {};
00079       virtual AtomType atomType() { return TypeScript; };
00080       std::string do_script;
00081       std::string undo_script;
00082       std::string do_location;
00083       std::string undo_location;
00084       std::string do_media;
00085       std::string undo_media;
00086       std::string do_checksum_type;
00087       std::string do_checksum;
00088       std::string undo_checksum_type;
00089       std::string undo_checksum;
00090   };
00091 
00092   class Message : public AtomBase
00093   {
00094     public:
00095       Message() {};
00096       virtual AtomType atomType() { return TypeMessage; };
00097       TranslatedText text;
00098   };
00099   
00100   class Selection : public base::ReferenceCounted, private base::NonCopyable
00101   {
00102     public:
00103 
00104       Selection() {};
00105       std::string groupId;
00106       TranslatedText name;
00107       std::string default_;
00108       std::string user_visible;
00109       TranslatedText description;
00110       //std::list<MetaPkg> grouplist;
00111       //std::list<PackageReq> packageList;
00112   };
00113 
00114   class Patch : public ResObject
00115   {
00116     public:
00117       Patch() {};
00118   };
00119 
00120   class Pattern : public ResObject
00121   {
00122     public:
00123 
00124       Pattern() {};
00125       
00126       std::string default_;
00127       std::string user_visible;
00128       TranslatedText category;
00129       std::string icon;
00130       std::string script;
00131   };
00132 
00133   class Product : public ResObject
00134   {
00135     public:
00136       Product() {};
00137       ~Product() {};
00138 
00139       std::string type;
00140       std::string vendor;
00141       std::string name; 
00142       std::string distribution_name; 
00143       Edition distribution_edition;
00144       TranslatedText short_name;
00145         // those are suse specific tags
00146       std::string releasenotesurl;
00147   };
00148 
00149   class Package : public ResObject
00150   {
00151     public:
00152       Package() {};
00153       ~Package() {};
00154 
00155       std::string type;
00156       CheckSum checksum;
00157       std::string packager;
00158       Url url;
00159       ByteCount archive_size;
00160       ByteCount installed_size;
00161       Date build_time;
00162       Pathname location;
00163       std::string license;
00164       std::string vendor;
00165       std::string group;
00166       std::string buildhost;
00167       
00168       //std::list<FileData> files;
00169 
00170       // SuSE specific data
00171       std::list<std::string> authors;
00172       std::list<std::string> keywords;
00173       //std::string  media;
00174       //std::list<YUMDirSize> dirSizes;
00175       //bool installOnly;
00176       //TranslatedText license_to_confirm;
00177   };
00178   
00179   /* Easy output */
00180 //   std::ostream& operator<<(std::ostream &out, const Dependency& data);
00181    std::ostream& operator<<(std::ostream &out, const ResObject& data);
00182    //std::ostream& operator<<(std::ostream &out, const Package& data);
00183 //   std::ostream& operator<<(std::ostream &out, const Product& data);
00184 //   std::ostream& operator<<(std::ostream &out, const Pattern& data);
00185 //   std::ostream& operator<<(std::ostream &out, const Selection& data);
00186   
00187 } // namespace data
00188 } // namespace zypp
00189 
00190 
00191 #endif
00192 

Generated on Tue Nov 28 16:49:29 2006 for zypp by  doxygen 1.5.0