+ Package::maybeUnsupported
[platform/upstream/libzypp.git] / zypp / Package.h
index 34eb641..fbfa572 100644 (file)
 #define ZYPP_PACKAGE_H
 
 #include "zypp/ResObject.h"
-#include "zypp/detail/PackageImplIf.h"
+#include "zypp/PackageKeyword.h"
+#include "zypp/Changelog.h"
+#include "zypp/VendorSupportOptions.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
 
+  DEFINE_PTR_TYPE(Package);
+
   ///////////////////////////////////////////////////////////////////
   //
   //   CLASS NAME : Package
@@ -28,75 +32,82 @@ namespace zypp
   class Package : public ResObject
   {
   public:
-    typedef detail::PackageImplIf    Impl;
     typedef Package                  Self;
     typedef ResTraits<Self>          TraitsType;
     typedef TraitsType::PtrType      Ptr;
     typedef TraitsType::constPtrType constPtr;
 
   public:
-    /** Time of package installation */
-    Date installtime() const;
+    typedef sat::ArrayAttr<PackageKeyword,IdString> Keywords;
+
+  public:
+
+    /**
+     * Returns the level of supportability the vendor
+     * gives to this package.
+     * 
+     * This is one value from \ref VendorSupportOption
+     */
+    VendorSupportOption vendorSupport() const;
+
+    /**
+     * True if the vendor support for this package
+     * is unknown or explictly unsupported.
+     */
+    bool maybeUnsupported() const;
+
     /** Get the package change log */
     Changelog changelog() const;
     /** */
-    Date buildtime() const;
-    /** */
     std::string buildhost() const;
     /** */
     std::string distribution() const;
     /** */
-    Vendor vendor() const;
-    /** */
-    Label license() const;
+    std::string license() const;
     /** */
     std::string packager() const;
     /** */
-    PackageGroup group() const;
+    std::string group() const;
+    /** */
+    Keywords keywords() const;
     /** Don't ship it as class Url, because it might be
      * in fact anything but a legal Url. */
     std::string url() const;
-    /** */
-    std::string os() const;
-    /** */
-    Text prein() const;
-    /** */
-    Text postin() const;
-    /** */
-    Text preun() const;
-    /** */
-    Text postun() const;
-    /** */
+    /** Size of corresponding the source package. */
     ByteCount sourcesize() const;
     /** */
-    ByteCount archivesize() const;
-    /** */
-    Text authors() const;
-    /** */
-    Text filenames() const;
-    /** */
-    License licenseToConfirm() const;
-    /** */
-    Pathname plainRpm() const;
+    std::list<std::string> authors() const;
     /** */
-    std::list<PatchRpm> patchRpms() const;
-    /** */
-    std::list<DeltaRpm> deltaRpms() const;
+    std::list<std::string> filenames() const;
+
+    /** Name of the source rpm this package was built from.
+     */
+    std::string sourcePkgName() const;
+
+    /** Edition of the source rpm this package was built from.
+     */
+    Edition sourcePkgEdition() const;
 
-    // data here:
+    /**
+     * Checksum the source says this package should have.
+     * \see \ref location
+     */
+    CheckSum checksum() const;
+
+    /** Location of the resolvable in the repository.
+     * \ref OnMediaLocation conatins all information required to
+     * retrieve the packge (url, checksum, etc.).
+     */
+    OnMediaLocation location() const;
 
   protected:
-    Package( const NVRAD & nvrad_r );
+    friend Ptr make<Self>( const sat::Solvable & solvable_r );
+    /** Ctor */
+    Package( const sat::Solvable & solvable_r );
     /** Dtor */
     virtual ~Package();
-
-  private:
-    /** Access implementation */
-    virtual Impl & pimpl() = 0;
-    /** Access implementation */
-    virtual const Impl & pimpl() const = 0;
   };
+
   ///////////////////////////////////////////////////////////////////
 
   /////////////////////////////////////////////////////////////////