Author: dmacvicar Date: Wed Jan 30 11:19:54 2008 New Revision: 8408 URL: http://svn.opensuse.org/viewcvs/zypp?rev=8408&view=rev Log: - more progress trying to adapt to the solvstore semantics Modified: branches/tmp/ma/jump_sat/libzypp/zypp/TranslatedText.h branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.cc branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.h Modified: branches/tmp/ma/jump_sat/libzypp/zypp/TranslatedText.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/TranslatedText.h?rev=8408&r1=8407&r2=8408&view=diff ============================================================================== --- branches/tmp/ma/jump_sat/libzypp/zypp/TranslatedText.h (original) +++ branches/tmp/ma/jump_sat/libzypp/zypp/TranslatedText.h Wed Jan 30 11:19:54 2008 @@ -66,6 +66,10 @@ std::string text( const Locale &lang = Locale() ) const; std::set<Locale> locales() const; + /** String representation. */ + const char * c_str( const Locale &lang = Locale() ) const + { return text(lang).c_str(); } + void setText( const std::string &text, const Locale &lang = Locale()); void setText( const std::liststd::string &text, const Locale &lang = Locale()); Modified: branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.cc?rev=8408&r1=8407&r2=8408&view=diff ============================================================================== --- branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.cc (original) +++ branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.cc Wed Jan 30 11:19:54 2008 @@ -58,9 +58,18 @@ _pool = pool_create(); _repo = repo_create(_pool, alias.c_str() ); _repodata = repo_add_repodata(_repo); - + + //_attr_resobject_summary = str2id(_pool, "summary"); + //_attr_resobject_description = str2id(_pool, "description"); + _attr_resobject_installedSize = str2id(_pool, "installedSize", 1); + _attr_resobject_buildTime = str2id(_pool, "buildTime", 1); + _attr_resobject_installOnly = str2id(_pool, "installOnly", 1); + _attr_resobject_vendor = str2id(_pool, "vendor", 1); + _attr_resobject_insnotify = str2id(_pool, "insnotify", 1); + _attr_resobject_delnotify = str2id(_pool, "delnotify", 1); + // license to confirm, insnotify, delnotify + _attr_package_authors = str2id(_pool, "package:authors", 1); - _attr_package_description = str2id(_pool, "package:description", 1); _attr_package_diskusage = str2id(_pool, "package:diskusage", 1); _attr_package_downloadsize = str2id(_pool, "package:downloadsize", 1); _attr_package_eula = str2id(_pool, "package:eula", 1); @@ -76,7 +85,6 @@ _attr_package_nosource = str2id(_pool, "package:nosource", 1); _attr_package_source = str2id(_pool, "package:source", 1); _attr_package_sourceid = str2id(_pool, "package:sourceid", 1); - _attr_package_summary = str2id(_pool, "package:summary", 1); _attr_package_time = str2id(_pool, "package:time", 1); } @@ -103,6 +111,13 @@ Pathname _cachedir; Repodata *_repodata; + Id _attr_resobject_installedSize; + Id _attr_resobject_buildTime; + Id _attr_resobject_installOnly; + Id _attr_resobject_vendor; + Id _attr_resobject_delnotify; + Id _attr_resobject_insnotify; + Id _attr_package_authors; Id _attr_package_description; Id _attr_package_diskusage; @@ -147,10 +162,11 @@ // NOOP } -void SolvStore::appendResObjectAttributes( const data::RecordId &rid, - const data::ResObject_Ptr & res ) +void SolvStore::appendResObjectAttributes( Id rid, + const data::ResObject_Ptr & res ) { - + repodata_set_str(_pimpl->_repodata, rid, _pimpl->_attr_resobject_insnotify, res->insnotify.c_str()); + repodata_set_str(_pimpl->_repodata, rid, _pimpl->_attr_resobject_delnotify, res->delnotify.c_str()); // appendTranslatedStringAttribute( rid, attrResObjectDescription(), res->description ); // appendTranslatedStringAttribute( rid, attrResObjectSummary(), res->summary ); // appendNumericAttribute( rid, attrResObjectInstalledSize(), res->installedSize ); @@ -163,8 +179,8 @@ } -void SolvStore::appendPackageBaseAttributes( const RecordId & pkgid, - const data::Packagebase_Ptr & package ) +void SolvStore::appendPackageBaseAttributes( Id rid, + const data::Packagebase_Ptr & package ) { // appendStringAttribute( pkgid, attrPackageBuildhost(), package->buildhost ); Modified: branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.h?rev=8408&r1=8407&r2=8408&view=diff ============================================================================== --- branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.h (original) +++ branches/tmp/ma/jump_sat/libzypp/zypp/cache/SolvStore.h Wed Jan 30 11:19:54 2008 @@ -263,11 +263,11 @@ * to avoid some duplication across types. */ //@{ - void appendResObjectAttributes( const data::RecordId &rid, + void appendResObjectAttributes( Id id, const data::ResObject_Ptr & res ); - void appendPackageBaseAttributes(const data::RecordId & pkgid, - const data::Packagebase_Ptr & package); + void appendPackageBaseAttributes( Id id, + const data::Packagebase_Ptr & package); //@} void cleanRepository( const std::string &alias, -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org