From: Jiri Srain Date: Thu, 12 Jan 2006 07:48:06 +0000 (+0000) Subject: Export package attributes through public interface X-Git-Tag: BASE-SuSE-SLE-10-SP2-Branch~3420 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ade6d842884699fb392aa4674f28c4900cd40c4;p=platform%2Fupstream%2Flibzypp.git Export package attributes through public interface --- diff --git a/zypp/Package.cc b/zypp/Package.cc index acbe142..c62fd51 100644 --- a/zypp/Package.cc +++ b/zypp/Package.cc @@ -40,12 +40,88 @@ namespace zypp // /////////////////////////////////////////////////////////////////// - Changelog Package::changelog() + Changelog Package::changelog() const { return pimpl().changelog(); } /** Time of package installation */ - Date Package::installtime() + Date Package::installtime() const { return pimpl().installtime(); } + + /** */ + Date Package::buildtime() const + { return pimpl().buildtime(); } + + /** */ + std::string Package::buildhost() const + { return pimpl().buildhost(); } + + /** */ + std::string Package::distribution() const + { return pimpl().distribution(); } + + /** */ + Vendor Package::vendor() const + { return pimpl().vendor(); } + + /** */ + Label Package::license() const + { return pimpl().license(); } + + /** */ + std::string Package::packager() const + { return pimpl().packager(); } + + /** */ + PackageGroup Package::group() const + { return pimpl().group(); } + + + /** Don't ship it as class Url, because it might be + * in fact anything but a legal Url. */ + std::string Package::url() const + { return pimpl().url(); } + + /** */ + std::string Package::os() const + { return pimpl().os(); } + + /** */ + Text Package::prein() const + { return pimpl().prein(); } + + /** */ + Text Package::postin() const + { return pimpl().postin(); } + + /** */ + Text Package::preun() const + { return pimpl().preun(); } + + /** */ + Text Package::postun() const + { return pimpl().postun(); } + + /** */ + ByteCount Package::sourcesize() const + { return pimpl().sourcesize(); } + + /** */ + ByteCount Package::archivesize() const + { return pimpl().archivesize(); } + + /** */ + Text Package::authors() const + { return pimpl().authors(); } + + /** */ + Text Package::filenames() const + { return pimpl().filenames(); } + + /** */ + License Package::licenseToConfirm() const + { return pimpl().licenseToConfirm(); } + + ///////////////////////////////////////////////////////////////// } // namespace zypp /////////////////////////////////////////////////////////////////// diff --git a/zypp/Package.h b/zypp/Package.h index ce9baa0..c007c0e 100644 --- a/zypp/Package.h +++ b/zypp/Package.h @@ -36,9 +36,46 @@ namespace zypp public: /** Time of package installation */ - Date installtime(); + Date installtime() const; /** Get the package change log */ - Changelog changelog(); + Changelog changelog() const; + /** */ + Date buildtime() const; + /** */ + std::string buildhost() const; + /** */ + std::string distribution() const; + /** */ + Vendor vendor() const; + /** */ + Label license() const; + /** */ + std::string packager() const; + /** */ + PackageGroup group() 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; + /** */ + ByteCount sourcesize() const; + /** */ + ByteCount archivesize() const; + /** */ + Text authors() const; + /** */ + Text filenames() const; + /** */ + License licenseToConfirm() const; // data here: protected: