Author: dmacvicar Date: Thu Jul 5 16:32:10 2007 New Revision: 5889 URL: http://svn.opensuse.org/viewcvs/zypp?rev=5889&view=rev Log: - real implementations Modified: branches/REFACTORING-10_3/libzypp/zypp/cache/CacheAttributes.h branches/REFACTORING-10_3/libzypp/zypp/cache/CacheStore.cc branches/REFACTORING-10_3/libzypp/zypp/repo/cached/AtomImpl.cc branches/REFACTORING-10_3/libzypp/zypp/repo/cached/AtomImpl.h branches/REFACTORING-10_3/libzypp/zypp/repo/cached/MessageImpl.cc branches/REFACTORING-10_3/libzypp/zypp/repo/cached/MessageImpl.h branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PackageImpl.cc branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PackageImpl.h branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PatchImpl.cc branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PatchImpl.h branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ProductImpl.cc branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ProductImpl.h branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ScriptImpl.cc branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ScriptImpl.h branches/REFACTORING-10_3/libzypp/zypp/repo/cached/SrcPackageImpl.cc branches/REFACTORING-10_3/libzypp/zypp/repo/cached/SrcPackageImpl.h branches/REFACTORING-10_3/libzypp/zypp/repo/memory/AtomImpl.cc branches/REFACTORING-10_3/libzypp/zypp/repo/memory/AtomImpl.h branches/REFACTORING-10_3/libzypp/zypp/repo/memory/MessageImpl.cc branches/REFACTORING-10_3/libzypp/zypp/repo/memory/MessageImpl.h branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PackageImpl.cc branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PackageImpl.h branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatchImpl.cc branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatchImpl.h branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatternImpl.cc branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatternImpl.h branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ProductImpl.cc branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ProductImpl.h branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ScriptImpl.cc branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ScriptImpl.h branches/REFACTORING-10_3/libzypp/zypp/repo/memory/SrcPackageImpl.cc branches/REFACTORING-10_3/libzypp/zypp/repo/memory/SrcPackageImpl.h Modified: branches/REFACTORING-10_3/libzypp/zypp/cache/CacheAttributes.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/cache/CacheAttributes.h?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/cache/CacheAttributes.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/cache/CacheAttributes.h Thu Jul 5 16:32:10 2007 @@ -91,6 +91,12 @@ inline const Attribute & attrScriptUndoScriptChecksumType(){ static Attribute a("Script","undoScriptChecksumType"); return a; } inline const Attribute & attrScriptUndoScriptLocation() { static Attribute a("Script","undoScriptLocation"); return a; } /////////////////////////////////////////////////////////////////// + inline const Attribute & attrSrcPackageLocationFilename() { static Attribute a("SrcPackage","locationFilename"); return a; } + inline const Attribute & attrSrcPackageLocationDownloadSize() { static Attribute a("SrcPackage","locationDownloadSize"); return a; } + inline const Attribute & attrSrcPackageLocationChecksum() { static Attribute a("SrcPackage","locationChecksum"); return a; } + inline const Attribute & attrSrcPackageLocationChecksumType() { static Attribute a("SrcPackage","locationChecksumType"); return a; } + inline const Attribute & attrSrcPackageLocationMediaNr() { static Attribute a("SrcPackage","locationMediaNr"); return a; } + /////////////////////////////////////////////////////////////////// //@} ///////////////////////////////////////////////////////////////// Modified: branches/REFACTORING-10_3/libzypp/zypp/cache/CacheStore.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/cache/CacheStore.cc?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/cache/CacheStore.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/cache/CacheStore.cc Thu Jul 5 16:32:10 2007 @@ -253,8 +253,13 @@ RecordId id = appendResolvable( repository_id, ResTraits<SrcPackage>::kind, NVRA( package->name, package->edition, package->arch ), package->deps ); appendResObjectAttributes( id, package ); - //appendPackageBaseAttributes( id, package ); -#warning TBD WRONG IMPLEMENTATION + + appendStringAttribute( id, attrSrcPackageLocationFilename(), package->repositoryLocation.filename().asString() ); + appendNumericAttribute( id, attrSrcPackageLocationMediaNr(), package->repositoryLocation.medianr() ); + appendNumericAttribute( id, attrSrcPackageLocationDownloadSize(), package->repositoryLocation.downloadSize() ); + appendStringAttribute( id, attrSrcPackageLocationChecksumType(), package->repositoryLocation.checksum().type() ); + appendStringAttribute( id, attrSrcPackageLocationChecksum(), package->repositoryLocation.checksum().checksum() ); + return id; } Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/cached/AtomImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/cached/AtomImpl.cc?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/cached/AtomImpl.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/cached/AtomImpl.cc Thu Jul 5 16:32:10 2007 @@ -79,11 +79,6 @@ return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectInstalledSize() ); } -ByteCount AtomImpl::archivesize() const -{ - return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectArchiveSize() ); -} - bool AtomImpl::installOnly() const { return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrResObjectInstallOnly() ); Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/cached/AtomImpl.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/cached/AtomImpl.h?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/cached/AtomImpl.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/cached/AtomImpl.h Thu Jul 5 16:32:10 2007 @@ -38,7 +38,6 @@ virtual TranslatedText licenseToConfirm() const; virtual Vendor vendor() const; virtual ByteCount size() const; - virtual ByteCount archivesize() const; virtual bool installOnly() const; virtual Date buildtime() const; virtual Date installtime() const; Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/cached/MessageImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/cached/MessageImpl.cc?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/cached/MessageImpl.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/cached/MessageImpl.cc Thu Jul 5 16:32:10 2007 @@ -81,11 +81,6 @@ return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectInstalledSize() ); } -ByteCount MessageImpl::archivesize() const -{ - return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectArchiveSize() ); -} - bool MessageImpl::installOnly() const { return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrResObjectInstallOnly() ); Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/cached/MessageImpl.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/cached/MessageImpl.h?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/cached/MessageImpl.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/cached/MessageImpl.h Thu Jul 5 16:32:10 2007 @@ -38,7 +38,6 @@ virtual TranslatedText licenseToConfirm() const; virtual Vendor vendor() const; virtual ByteCount size() const; - virtual ByteCount archivesize() const; virtual bool installOnly() const; virtual Date buildtime() const; virtual Date installtime() const; Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PackageImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PackageImpl.cc?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PackageImpl.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PackageImpl.cc Thu Jul 5 16:32:10 2007 @@ -77,19 +77,12 @@ return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrResObjectVendor() ); } - ByteCount PackageImpl::size() const { #warning CHECK IF ATRIB IS MISSING IN DB return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectInstalledSize() ); } -ByteCount PackageImpl::archivesize() const -{ -#warning CHECK IF ATRIB IS MISSING IN DB - return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectArchiveSize() ); -} - bool PackageImpl::installOnly() const { return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrResObjectInstallOnly() ); Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PackageImpl.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PackageImpl.h?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PackageImpl.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PackageImpl.h Thu Jul 5 16:32:10 2007 @@ -38,11 +38,9 @@ virtual TranslatedText licenseToConfirm() const; virtual Vendor vendor() const; virtual ByteCount size() const; - virtual ByteCount archivesize() const; virtual bool installOnly() const; virtual Date buildtime() const; virtual Date installtime() const; - virtual OnMediaLocation location() const; // PACKAGE virtual std::string buildhost() const; @@ -62,6 +60,8 @@ virtual DiskUsage diskusage() const; virtual std::liststd::string authors() const; virtual std::liststd::string filenames() const; + virtual OnMediaLocation location() const; + /*virtual std::list<DeltaRpm> deltaRpms() const; virtual std::list<PatchRpm> patchRpms() const; */ Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PatchImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PatchImpl.cc?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PatchImpl.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PatchImpl.cc Thu Jul 5 16:32:10 2007 @@ -84,11 +84,6 @@ return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectInstalledSize() ); } -ByteCount PatchImpl::archivesize() const -{ - return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectArchiveSize() ); -} - bool PatchImpl::installOnly() const { return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrResObjectInstallOnly() ); Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PatchImpl.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PatchImpl.h?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PatchImpl.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/cached/PatchImpl.h Thu Jul 5 16:32:10 2007 @@ -38,7 +38,6 @@ virtual TranslatedText licenseToConfirm() const; virtual Vendor vendor() const; virtual ByteCount size() const; - virtual ByteCount archivesize() const; virtual bool installOnly() const; virtual Date buildtime() const; virtual Date installtime() const; Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ProductImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ProductImpl.cc?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ProductImpl.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ProductImpl.cc Thu Jul 5 16:32:10 2007 @@ -81,11 +81,6 @@ return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectInstalledSize() ); } -ByteCount ProductImpl::archivesize() const -{ - return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectArchiveSize() ); -} - bool ProductImpl::installOnly() const { return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrResObjectInstallOnly() ); Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ProductImpl.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ProductImpl.h?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ProductImpl.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ProductImpl.h Thu Jul 5 16:32:10 2007 @@ -38,7 +38,6 @@ virtual TranslatedText licenseToConfirm() const; virtual Vendor vendor() const; virtual ByteCount size() const; - virtual ByteCount archivesize() const; virtual bool installOnly() const; virtual Date buildtime() const; virtual Date installtime() const; Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ScriptImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ScriptImpl.cc?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ScriptImpl.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ScriptImpl.cc Thu Jul 5 16:32:10 2007 @@ -81,11 +81,6 @@ return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectInstalledSize() ); } -ByteCount ScriptImpl::archivesize() const -{ - return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectArchiveSize() ); -} - bool ScriptImpl::installOnly() const { return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrResObjectInstallOnly() ); Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ScriptImpl.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ScriptImpl.h?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ScriptImpl.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/cached/ScriptImpl.h Thu Jul 5 16:32:10 2007 @@ -38,7 +38,6 @@ virtual TranslatedText licenseToConfirm() const; virtual Vendor vendor() const; virtual ByteCount size() const; - virtual ByteCount archivesize() const; virtual bool installOnly() const; virtual Date buildtime() const; virtual Date installtime() const; Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/cached/SrcPackageImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/cached/SrcPackageImpl.cc?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/cached/SrcPackageImpl.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/cached/SrcPackageImpl.cc Thu Jul 5 16:32:10 2007 @@ -40,6 +40,76 @@ return _repository->selfRepository(); } +/////////////////////////////////////////////////// +// ResObject Attributes +/////////////////////////////////////////////////// + +TranslatedText SrcPackageImpl::summary() const +{ + return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectSummary() ); +} + +TranslatedText SrcPackageImpl::description() const +{ + return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDescription() ); +} + +TranslatedText SrcPackageImpl::insnotify() const +{ + return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectInsnotify() ); +} + +TranslatedText SrcPackageImpl::delnotify() const +{ + return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDelnotify() ); +} + +TranslatedText SrcPackageImpl::licenseToConfirm() const +{ + return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectLicenseToConfirm() ); +} + +Vendor SrcPackageImpl::vendor() const +{ + return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrResObjectVendor() ); +} + +ByteCount SrcPackageImpl::size() const +{ + return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectInstalledSize() ); +} + +bool SrcPackageImpl::installOnly() const +{ + return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrResObjectInstallOnly() ); +} + +Date SrcPackageImpl::buildtime() const +{ + return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectBuildTime() ); +} + +Date SrcPackageImpl::installtime() const +{ + return Date(); +} + +//////////////////////////////////////////////////////// +// SRC PACKAGE +//////////////////////////////////////////////////////// + +OnMediaLocation SrcPackageImpl::location() const +{ + OnMediaLocation loc; + string chktype = _repository->resolvableQuery().queryStringAttribute( _id, cache::attrSrcPackageLocationChecksumType() ); + string chkvalue = _repository->resolvableQuery().queryStringAttribute( _id, cache::attrSrcPackageLocationChecksum() ); + loc.setChecksum(CheckSum(chktype, chkvalue)); + loc.setFilename( _repository->resolvableQuery().queryStringAttribute( _id, cache::attrSrcPackageLocationFilename() ) ); + loc.setDownloadSize( _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrSrcPackageLocationDownloadSize() ) ); + loc.setMedianr( _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrSrcPackageLocationMediaNr() ) ); + return loc; +} + ///////////////////////////////////////////////////////////////// } } } // namespace zypp.repo.cached /////////////////////////////////////////////////////////////////// Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/cached/SrcPackageImpl.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/cached/SrcPackageImpl.h?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/cached/SrcPackageImpl.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/cached/SrcPackageImpl.h Thu Jul 5 16:32:10 2007 @@ -31,7 +31,19 @@ SrcPackageImpl( const data::RecordId &id, repo::cached::RepoImpl::Ptr repository_r ); virtual Repository repository() const; - + + virtual TranslatedText summary() const; + virtual TranslatedText description() const; + virtual TranslatedText insnotify() const; + virtual TranslatedText delnotify() const; + virtual TranslatedText licenseToConfirm() const; + virtual Vendor vendor() const; + virtual ByteCount size() const; + virtual bool installOnly() const; + virtual Date buildtime() const; + virtual Date installtime() const; + + virtual OnMediaLocation location() const; private: repo::cached::RepoImpl::Ptr _repository; data::RecordId _id; Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/memory/AtomImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/memory/AtomImpl.cc?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/memory/AtomImpl.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/memory/AtomImpl.cc Thu Jul 5 16:32:10 2007 @@ -78,11 +78,6 @@ return _size; } -ByteCount AtomImpl::archivesize() const -{ - return _archivesize; -} - bool AtomImpl::installOnly() const { return _install_only; @@ -98,11 +93,6 @@ return _installtime; } -unsigned AtomImpl::mediaNr() const -{ - return _media_nr; -} - ///////////////////////////////////////////////////////////////// } } } // namespace zypp::repo::memory /////////////////////////////////////////////////////////////////// Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/memory/AtomImpl.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/memory/AtomImpl.h?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/memory/AtomImpl.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/memory/AtomImpl.h Thu Jul 5 16:32:10 2007 @@ -38,13 +38,10 @@ virtual TranslatedText licenseToConfirm() const; virtual Vendor vendor() const; virtual ByteCount size() const; - virtual ByteCount archivesize() const; virtual bool installOnly() const; virtual Date buildtime() const; virtual Date installtime() const; - virtual unsigned mediaNr() const; - virtual Repository repository() const; protected: Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/memory/MessageImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/memory/MessageImpl.cc?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/memory/MessageImpl.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/memory/MessageImpl.cc Thu Jul 5 16:32:10 2007 @@ -29,9 +29,20 @@ /** Default ctor */ -MessageImpl::MessageImpl (const data::RecordId &id, memory::RepoImpl::Ptr repository_r) - : _repository (repository_r), - _id(id) +MessageImpl::MessageImpl ( memory::RepoImpl::Ptr repo, data::Message_Ptr ptr) + : _repository(repo), + + _summary(ptr->summary), + _description(ptr->description), + _insnotify(ptr->insnotify), + _delnotify(ptr->delnotify), + _license_to_confirm(ptr->licenseToConfirm), + _vendor(ptr->vendor), + _size(ptr->installedSize), + _install_only(false), + _buildtime(ptr->buildTime), + + _text(ptr->text) {} Repository @@ -79,11 +90,6 @@ return _size; } -ByteCount MessageImpl::archivesize() const -{ - return _archivesize; -} - bool MessageImpl::installOnly() const { return _install_only; @@ -99,23 +105,13 @@ return _installtime; } -unsigned MessageImpl::mediaNr() const -{ - return _media_nr; -} - -unsigned MessageImpl::mediaNr() const -{ - return 1; -} - ////////////////////////////////////////// // MESSAGE ///////////////////////////////////////// TranslatedText MessageImpl::text() const { - return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, "Message", "text" ); + return _text; } Patch::constPtr MessageImpl::patch() const Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/memory/MessageImpl.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/memory/MessageImpl.h?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/memory/MessageImpl.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/memory/MessageImpl.h Thu Jul 5 16:32:10 2007 @@ -29,7 +29,7 @@ { public: - MessageImpl( const data::RecordId &id, repo::memory::RepoImpl::Ptr repository_r ); + MessageImpl( memory::RepoImpl::Ptr repo, data::Message_Ptr ptr); virtual TranslatedText summary() const; virtual TranslatedText description() const; @@ -38,13 +38,10 @@ virtual TranslatedText licenseToConfirm() const; virtual Vendor vendor() const; virtual ByteCount size() const; - virtual ByteCount archivesize() const; virtual bool installOnly() const; virtual Date buildtime() const; virtual Date installtime() const; - - virtual unsigned mediaNr() const; - + // MESSAGE virtual TranslatedText text() const; virtual Patch::constPtr patch() const; @@ -67,6 +64,8 @@ Date _buildtime; Date _installtime; unsigned _media_nr; + + TranslatedText _text; }; ///////////////////////////////////////////////////////////////// } // namespace memory Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PackageImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PackageImpl.cc?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PackageImpl.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PackageImpl.cc Thu Jul 5 16:32:10 2007 @@ -40,13 +40,13 @@ _size(ptr->installedSize), _install_only(false), _buildtime(ptr->buildTime), - _location(ptr->repositoryLocation), - + _group(ptr->group), _keywords(), _authors(ptr->authors), _license(ptr->license), - _diskusage() + _diskusage(), + _location(ptr->repositoryLocation) { } Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PackageImpl.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PackageImpl.h?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PackageImpl.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PackageImpl.h Thu Jul 5 16:32:10 2007 @@ -81,13 +81,14 @@ bool _install_only; Date _buildtime; Date _installtime; - OnMediaLocation _location; + PackageGroup _group; Keywords _keywords; std::liststd::string _authors; Label _license; DiskUsage _diskusage; + OnMediaLocation _location; private: }; /////////////////////////////////////////////////////////////////// Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatchImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatchImpl.cc?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatchImpl.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatchImpl.cc Thu Jul 5 16:32:10 2007 @@ -87,11 +87,6 @@ return _size; } -ByteCount PatchImpl::archivesize() const -{ - return _archivesize; -} - bool PatchImpl::installOnly() const { return _install_only; Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatchImpl.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatchImpl.h?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatchImpl.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatchImpl.h Thu Jul 5 16:32:10 2007 @@ -35,7 +35,6 @@ virtual TranslatedText licenseToConfirm() const; virtual Vendor vendor() const; virtual ByteCount size() const; - virtual ByteCount archivesize() const; virtual bool installOnly() const; virtual Date buildtime() const; virtual Date installtime() const; Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatternImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatternImpl.cc?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatternImpl.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatternImpl.cc Thu Jul 5 16:32:10 2007 @@ -87,11 +87,6 @@ return _size; } -ByteCount PatternImpl::archivesize() const -{ - return _archivesize; -} - bool PatternImpl::installOnly() const { return _install_only; Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatternImpl.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatternImpl.h?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatternImpl.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/memory/PatternImpl.h Thu Jul 5 16:32:10 2007 @@ -41,7 +41,6 @@ virtual TranslatedText licenseToConfirm() const; virtual Vendor vendor() const; virtual ByteCount size() const; - virtual ByteCount archivesize() const; virtual bool installOnly() const; virtual Date buildtime() const; virtual Date installtime() const; Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ProductImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ProductImpl.cc?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ProductImpl.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ProductImpl.cc Thu Jul 5 16:32:10 2007 @@ -85,11 +85,6 @@ return _size; } -ByteCount ProductImpl::archivesize() const -{ - return _archivesize; -} - bool ProductImpl::installOnly() const { return _install_only; Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ProductImpl.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ProductImpl.h?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ProductImpl.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ProductImpl.h Thu Jul 5 16:32:10 2007 @@ -47,7 +47,6 @@ virtual TranslatedText licenseToConfirm() const; virtual Vendor vendor() const; virtual ByteCount size() const; - virtual ByteCount archivesize() const; virtual bool installOnly() const; virtual Date buildtime() const; virtual Date installtime() const; Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ScriptImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ScriptImpl.cc?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ScriptImpl.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ScriptImpl.cc Thu Jul 5 16:32:10 2007 @@ -29,7 +29,7 @@ /** Default ctor */ -ScriptImpl::ScriptImpl (const data::RecordId &id, memory::RepoImpl::Ptr repository_r) +ScriptImpl::ScriptImpl ( memory::RepoImpl::Ptr repo, data::Script_Ptr ptr) : _repository (repository_r), _summary(ptr->summary), _description(ptr->description), @@ -90,11 +90,6 @@ return _size; } -ByteCount ScriptImpl::archivesize() const -{ - return _archivesize; -} - bool ScriptImpl::installOnly() const { return _install_only; Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ScriptImpl.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ScriptImpl.h?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ScriptImpl.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/memory/ScriptImpl.h Thu Jul 5 16:32:10 2007 @@ -38,7 +38,6 @@ virtual TranslatedText licenseToConfirm() const; virtual Vendor vendor() const; virtual ByteCount size() const; - virtual ByteCount archivesize() const; virtual bool installOnly() const; virtual Date buildtime() const; virtual Date installtime() const; Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/memory/SrcPackageImpl.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/memory/SrcPackageImpl.cc?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/memory/SrcPackageImpl.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/memory/SrcPackageImpl.cc Thu Jul 5 16:32:10 2007 @@ -27,7 +27,20 @@ // METHOD NAME : SrcPackageImpl::SrcPackageImpl // METHOD TYPE : Ctor // -SrcPackageImpl::SrcPackageImpl(data::SrcPackage_Ptr ptr) +SrcPackageImpl::SrcPackageImpl( memory::RepoImpl::Ptr repo, data::SrcPackage_Ptr ptr) + : _repository(repo), + + _summary(ptr->summary), + _description(ptr->description), + _insnotify(ptr->insnotify), + _delnotify(ptr->delnotify), + _license_to_confirm(ptr->licenseToConfirm), + _vendor(ptr->vendor), + _size(ptr->installedSize), + _install_only(false), + _buildtime(ptr->buildTime), + + _location(ptr->repositoryLocation) {} /////////////////////////////////////////////////////////////////// @@ -38,11 +51,71 @@ SrcPackageImpl::~SrcPackageImpl() {} +/////////////////////////////////////////////////// +// ResObject Attributes +/////////////////////////////////////////////////// + +TranslatedText SrcPackageImpl::summary() const +{ + return _summary; +} + +TranslatedText SrcPackageImpl::description() const +{ + return _description; +} + +TranslatedText SrcPackageImpl::insnotify() const +{ + return _insnotify; +} + +TranslatedText SrcPackageImpl::delnotify() const +{ + return _delnotify; +} + +TranslatedText SrcPackageImpl::licenseToConfirm() const +{ + return _license_to_confirm; +} + +Vendor SrcPackageImpl::vendor() const +{ + return _vendor; +} + +ByteCount SrcPackageImpl::size() const +{ + return _size; +} + +bool SrcPackageImpl::installOnly() const +{ + return _install_only; +} + +Date SrcPackageImpl::buildtime() const +{ + return _buildtime; +} + +Date SrcPackageImpl::installtime() const +{ + return _installtime; +} + + DiskUsage SrcPackageImpl::diskusage() const { return _diskusage; } +OnMediaLocation SrcPackageImpl::location() const +{ + return _location; +} + ///////////////////////////////////////////////////////////////// } // namespace memory /////////////////////////////////////////////////////////////////// Modified: branches/REFACTORING-10_3/libzypp/zypp/repo/memory/SrcPackageImpl.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/repo/memory/SrcPackageImpl.h?rev=5889&r1=5888&r2=5889&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/repo/memory/SrcPackageImpl.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/repo/memory/SrcPackageImpl.h Thu Jul 5 16:32:10 2007 @@ -15,6 +15,7 @@ #include "zypp/detail/SrcPackageImplIf.h" #include "zypp/DiskUsage.h" #include "zypp/data/ResolvableData.h" +#include "zypp/repo/memory/RepoImpl.h" /////////////////////////////////////////////////////////////////// namespace zypp @@ -33,11 +34,38 @@ */ struct SrcPackageImpl : public zypp::detail::SrcPackageImplIf { - SrcPackageImpl(data::SrcPackage_Ptr ptr); + SrcPackageImpl( memory::RepoImpl::Ptr repo, data::SrcPackage_Ptr ptr); virtual ~SrcPackageImpl(); + virtual TranslatedText summary() const; + virtual TranslatedText description() const; + virtual TranslatedText insnotify() const; + virtual TranslatedText delnotify() const; + virtual TranslatedText licenseToConfirm() const; + virtual Vendor vendor() const; + virtual ByteCount size() const; + virtual bool installOnly() const; + virtual Date buildtime() const; + virtual Date installtime() const; + virtual DiskUsage diskusage() const; + virtual OnMediaLocation location() const; private: + repo::memory::RepoImpl::Ptr _repository; + + //ResObject + TranslatedText _summary; + TranslatedText _description; + TranslatedText _insnotify; + TranslatedText _delnotify; + TranslatedText _license_to_confirm; + Vendor _vendor; + ByteCount _size; + ByteCount _archivesize; + bool _install_only; + Date _buildtime; + Date _installtime; + OnMediaLocation _location; DiskUsage _diskusage; }; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org