Removed obsolete files and classes.
authorMichael Andres <ma@suse.de>
Mon, 21 Jan 2008 17:03:03 +0000 (17:03 +0000)
committerMichael Andres <ma@suse.de>
Mon, 21 Jan 2008 17:03:03 +0000 (17:03 +0000)
245 files changed:
zypp/Arch.cc
zypp/Arch.h
zypp/Atom.cc
zypp/Atom.h
zypp/CMakeLists.txt
zypp/CapFactory.cc [deleted file]
zypp/CapFactory.h [deleted file]
zypp/CapFilters.h
zypp/CapMatch.h
zypp/CapMatchHelper.h
zypp/CapSet.cc [deleted file]
zypp/CapSet.h [deleted file]
zypp/CapSetFwd.h [deleted file]
zypp/Capabilities.h [new file with mode: 0644]
zypp/Capability.cc [deleted file]
zypp/Capability.h
zypp/Dependencies.cc
zypp/Dependencies.h
zypp/Edition.cc
zypp/Edition.h
zypp/Language.cc
zypp/Language.h
zypp/Locks.cc
zypp/Message.cc
zypp/Message.h
zypp/NVRAD.h
zypp/NeedAType.h
zypp/Package.cc
zypp/Package.h
zypp/Patch.cc
zypp/Patch.h
zypp/Pattern.cc
zypp/Pattern.h
zypp/PoolItem.cc
zypp/Product.cc
zypp/Product.h
zypp/Rel.h
zypp/RepoManager.cc
zypp/ResKind.cc
zypp/ResKind.h
zypp/ResObject.cc
zypp/ResObject.h
zypp/ResPool.cc
zypp/ResPool.h
zypp/ResTraits.h
zypp/Resolvable.cc
zypp/Resolvable.h
zypp/Resolver.cc
zypp/Resolver.h
zypp/Script.cc
zypp/Script.h
zypp/Selection.cc
zypp/Selection.h
zypp/SrcPackage.cc
zypp/SrcPackage.h
zypp/SystemResObject.cc [deleted file]
zypp/SystemResObject.h [deleted file]
zypp/base/KindOf.h
zypp/base/Regex.cc
zypp/base/Regex.h
zypp/base/String.h
zypp/cache/ResolvableQuery.cc
zypp/cache/SolvStore.cc
zypp/cache/SolvStore.h
zypp/capability/.cvsignore [deleted file]
zypp/capability/CapTraits.cc [deleted file]
zypp/capability/CapTraits.h [deleted file]
zypp/capability/Capabilities.h [deleted file]
zypp/capability/CapabilityImpl.cc [deleted file]
zypp/capability/CapabilityImpl.h [deleted file]
zypp/capability/ConditionalCap.h [deleted file]
zypp/capability/FileCap.cc [deleted file]
zypp/capability/FileCap.h [deleted file]
zypp/capability/FilesystemCap.cc [deleted file]
zypp/capability/FilesystemCap.h [deleted file]
zypp/capability/HalCap.cc [deleted file]
zypp/capability/HalCap.h [deleted file]
zypp/capability/ModaliasCap.cc [deleted file]
zypp/capability/ModaliasCap.h [deleted file]
zypp/capability/NamedCap.cc [deleted file]
zypp/capability/NamedCap.h [deleted file]
zypp/capability/NullCap.cc [deleted file]
zypp/capability/NullCap.h [deleted file]
zypp/capability/OrCap.h [deleted file]
zypp/capability/SplitCap.cc [deleted file]
zypp/capability/SplitCap.h [deleted file]
zypp/capability/VersionedCap.cc [deleted file]
zypp/capability/VersionedCap.h [deleted file]
zypp/data/ResolvableData.h
zypp/detail/.cvsignore [deleted file]
zypp/detail/AtomImpl.cc [deleted file]
zypp/detail/AtomImpl.h [deleted file]
zypp/detail/AtomImplIf.cc [deleted file]
zypp/detail/AtomImplIf.h [deleted file]
zypp/detail/ImplConnect.h [deleted file]
zypp/detail/MessageImpl.cc [deleted file]
zypp/detail/MessageImpl.h [deleted file]
zypp/detail/MessageImplIf.cc [deleted file]
zypp/detail/MessageImplIf.h [deleted file]
zypp/detail/PackageImpl.cc [deleted file]
zypp/detail/PackageImpl.h [deleted file]
zypp/detail/PackageImplIf.cc [deleted file]
zypp/detail/PackageImplIf.h [deleted file]
zypp/detail/PatchImpl.cc [deleted file]
zypp/detail/PatchImpl.h [deleted file]
zypp/detail/PatchImplIf.cc [deleted file]
zypp/detail/PatchImplIf.h [deleted file]
zypp/detail/PatternImpl.cc [deleted file]
zypp/detail/PatternImpl.h [deleted file]
zypp/detail/PatternImplIf.cc [deleted file]
zypp/detail/PatternImplIf.h [deleted file]
zypp/detail/ProductImpl.cc [deleted file]
zypp/detail/ProductImpl.h [deleted file]
zypp/detail/ProductImplIf.cc [deleted file]
zypp/detail/ProductImplIf.h [deleted file]
zypp/detail/ResImplTraits.h [deleted file]
zypp/detail/ResObjectFactory.h [deleted file]
zypp/detail/ResObjectImplIf.cc [deleted file]
zypp/detail/ResObjectImplIf.h [deleted file]
zypp/detail/ResolvableImpl.cc [deleted file]
zypp/detail/ResolvableImpl.h [deleted file]
zypp/detail/ScriptImpl.cc [deleted file]
zypp/detail/ScriptImpl.h [deleted file]
zypp/detail/ScriptImplIf.cc [deleted file]
zypp/detail/ScriptImplIf.h [deleted file]
zypp/detail/SelectionImpl.cc [deleted file]
zypp/detail/SelectionImpl.h [deleted file]
zypp/detail/SelectionImplIf.cc [deleted file]
zypp/detail/SelectionImplIf.h [deleted file]
zypp/detail/SrcPackageImpl.cc [deleted file]
zypp/detail/SrcPackageImpl.h [deleted file]
zypp/detail/SrcPackageImplIf.cc [deleted file]
zypp/detail/SrcPackageImplIf.h [deleted file]
zypp/parser/plaindir/RepoParser.cc
zypp/parser/susetags/ContentFileReader.cc
zypp/parser/susetags/FileReaderBaseImpl.h
zypp/parser/susetags/PackagesDuFileReader.cc
zypp/parser/susetags/PackagesFileReader.cc
zypp/parser/susetags/PackagesLangFileReader.cc
zypp/parser/susetags/PatternFileReader.cc
zypp/parser/yum/FileReaderBaseImpl.cc
zypp/parser/yum/FileReaderBaseImpl.h
zypp/parser/yum/FilelistsFileReader.cc
zypp/parser/yum/OtherFileReader.cc
zypp/pool/GetResolvablesToInsDel.cc
zypp/pool/PoolImpl.cc
zypp/pool/PoolImpl.h
zypp/pool/PoolTraits.h
zypp/pool/Res2Sat.cc [deleted file]
zypp/repo/PackageProvider.cc
zypp/repo/PackageProvider.h
zypp/repo/cached/AtomImpl.cc [deleted file]
zypp/repo/cached/AtomImpl.h [deleted file]
zypp/repo/cached/MessageImpl.cc [deleted file]
zypp/repo/cached/MessageImpl.h [deleted file]
zypp/repo/cached/PackageImpl.cc [deleted file]
zypp/repo/cached/PackageImpl.h [deleted file]
zypp/repo/cached/PatchImpl.cc [deleted file]
zypp/repo/cached/PatchImpl.h [deleted file]
zypp/repo/cached/PatternImpl.cc [deleted file]
zypp/repo/cached/PatternImpl.h [deleted file]
zypp/repo/cached/ProductImpl.cc [deleted file]
zypp/repo/cached/ProductImpl.h [deleted file]
zypp/repo/cached/RepoImpl.cc
zypp/repo/cached/RepoImpl.h
zypp/repo/cached/ScriptImpl.cc [deleted file]
zypp/repo/cached/ScriptImpl.h [deleted file]
zypp/repo/cached/SrcPackageImpl.cc [deleted file]
zypp/repo/cached/SrcPackageImpl.h [deleted file]
zypp/repo/memory/AtomImpl.cc [deleted file]
zypp/repo/memory/AtomImpl.h [deleted file]
zypp/repo/memory/MessageImpl.cc [deleted file]
zypp/repo/memory/MessageImpl.h [deleted file]
zypp/repo/memory/PackageImpl.cc [deleted file]
zypp/repo/memory/PackageImpl.h [deleted file]
zypp/repo/memory/PatchImpl.cc [deleted file]
zypp/repo/memory/PatchImpl.h [deleted file]
zypp/repo/memory/PatternImpl.cc [deleted file]
zypp/repo/memory/PatternImpl.h [deleted file]
zypp/repo/memory/ProductImpl.cc [deleted file]
zypp/repo/memory/ProductImpl.h [deleted file]
zypp/repo/memory/RepoImpl.cc [deleted file]
zypp/repo/memory/RepoImpl.h [deleted file]
zypp/repo/memory/ScriptImpl.cc [deleted file]
zypp/repo/memory/ScriptImpl.h [deleted file]
zypp/repo/memory/SrcPackageImpl.cc [deleted file]
zypp/repo/memory/SrcPackageImpl.h [deleted file]
zypp/sat/Capabilities.cc
zypp/sat/Capabilities.h
zypp/sat/Capability.cc
zypp/sat/Capability.h
zypp/sat/IdString.cc
zypp/sat/IdString.h
zypp/sat/IdStringType.h
zypp/sat/SATResolver.cc
zypp/sat/Solvable.cc
zypp/sat/Solvable.h
zypp/sat/detail/PoolImpl.cc
zypp/sat/detail/PoolMember.h
zypp/solver/detail/Helper.cc
zypp/solver/detail/Helper.h
zypp/solver/detail/InstallOrder.cc
zypp/solver/detail/InstallOrder.h
zypp/solver/detail/QueueItemConflict.cc
zypp/solver/detail/QueueItemEstablish.cc
zypp/solver/detail/QueueItemEstablish.h
zypp/solver/detail/QueueItemInstall.cc
zypp/solver/detail/QueueItemInstall.h
zypp/solver/detail/QueueItemRequire.cc
zypp/solver/detail/QueueItemUninstall.cc
zypp/solver/detail/Resolver.cc
zypp/solver/detail/Resolver.h
zypp/solver/detail/ResolverContext.cc
zypp/solver/detail/ResolverQueue.cc
zypp/solver/detail/ResolverUpgrade.cc
zypp/solver/detail/SolutionAction.cc
zypp/solver/detail/Testcase.cc
zypp/solver/detail/Testcase.h
zypp/target/rpm/RpmDb.cc
zypp/target/rpm/RpmHeader.cc
zypp/target/rpm/RpmHeader.h
zypp/target/rpm/RpmPackageImpl.cc [deleted file]
zypp/target/rpm/RpmPackageImpl.h [deleted file]
zypp/target/store/PersistentStorage.cc
zypp/target/store/XMLFilesBackend.cc
zypp/target/store/XMLFilesBackend.h
zypp/target/store/serialize.cc
zypp/target/store/serialize.h
zypp/target/store/xml/XMLAtomImpl.cc [deleted file]
zypp/target/store/xml/XMLAtomImpl.h [deleted file]
zypp/target/store/xml/XMLMessageImpl.cc [deleted file]
zypp/target/store/xml/XMLMessageImpl.h [deleted file]
zypp/target/store/xml/XMLPatchImpl.cc [deleted file]
zypp/target/store/xml/XMLPatchImpl.h [deleted file]
zypp/target/store/xml/XMLPatternImpl.cc [deleted file]
zypp/target/store/xml/XMLPatternImpl.h [deleted file]
zypp/target/store/xml/XMLProductImpl.cc [deleted file]
zypp/target/store/xml/XMLProductImpl.h [deleted file]
zypp/target/store/xml/XMLScriptImpl.cc [deleted file]
zypp/target/store/xml/XMLScriptImpl.h [deleted file]
zypp/target/store/xml/XMLSelectionImpl.cc [deleted file]
zypp/target/store/xml/XMLSelectionImpl.h [deleted file]
zypp/ui/PatternExpander.cc
zypp/ui/UserWantedPackages.cc
zypp/zypp_detail/ZYppImpl.cc

index c6a333b..6d84242 100644 (file)
@@ -17,7 +17,7 @@
 #include "zypp/Arch.h"
 #include "zypp/Bit.h"
 
-using namespace std;
+using std::endl;
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -374,7 +374,6 @@ namespace zypp
     return ret;
   }
 
-
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
index 5030e1d..cc5cb45 100644 (file)
@@ -43,6 +43,9 @@ namespace zypp
   public:
     /** String representation of Arch. */
     const std::string & asString() const;
+    /** \overload */
+    const std::string & string() const
+    { return asString(); }
 
     /** Test for an empty Arch (this is "", not Arch_noarch). */
     bool empty() const
index f14572b..41e3bd7 100644 (file)
@@ -11,8 +11,6 @@
 */
 #include "zypp/Atom.h"
 
-using namespace std;
-
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
@@ -24,8 +22,8 @@ namespace zypp
   //   METHOD NAME : Atom::Atom
   //   METHOD TYPE : Ctor
   //
-  Atom::Atom( const NVRAD & nvrad_r )
-  : ResObject( TraitsType::kind, nvrad_r )
+  Atom::Atom( const sat::Solvable & solvable_r )
+  : ResObject( solvable_r )
   {}
 
   ///////////////////////////////////////////////////////////////////
index 16cb9b4..d07a49b 100644 (file)
@@ -13,7 +13,6 @@
 #define ZYPP_ATOM_H
 
 #include "zypp/ResObject.h"
-#include "zypp/detail/AtomImplIf.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -26,22 +25,15 @@ namespace zypp
   class Atom : public ResObject
   {
   public:
-    typedef detail::AtomImplIf       Impl;
     typedef Atom                     Self;
     typedef ResTraits<Self>          TraitsType;
     typedef TraitsType::PtrType      Ptr;
     typedef TraitsType::constPtrType constPtr;
 
   protected:
-    Atom( const NVRAD & nvrad_r );
+    Atom( const sat::Solvable & solvable_r );
     /** Dtor */
     virtual ~Atom();
-
-  private:
-    /** Access implementation */
-    virtual Impl & pimpl() = 0;
-    /** Access implementation */
-    virtual const Impl & pimpl() const = 0;
   };
 
   /////////////////////////////////////////////////////////////////
index f9f5488..62a109b 100644 (file)
@@ -13,10 +13,7 @@ ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_BINARY_DIR}/zypp/sqlite-schema.h PRE_BUILD CO
 SET( zypp_SRCS
   Atom.cc
   ByteCount.cc
-  Capability.cc
-  CapFactory.cc
   CapMatch.cc
-  CapSet.cc
   CheckSum.cc
   Date.cc
   Dep.cc
@@ -29,7 +26,6 @@ SET( zypp_SRCS
   Range.cc
   Rel.cc
   ResObject.cc
-  SystemResObject.cc
   Resolvable.cc
   ResStatus.cc
   ResStore.cc
@@ -99,13 +95,11 @@ SET( zypp_HEADERS
   ByteCount.h
   Callback.h
   CapAndItem.h
-  CapFactory.h
   CapFilters.h
   CapMatch.h
   CapMatchHelper.h
-  CapSet.h
-  CapSetFwd.h
   Capability.h
+  Capabilities.h
   Changelog.h
   CheckSum.h
   CountryCode.h
@@ -166,7 +160,6 @@ SET( zypp_HEADERS
   SilentCallbacks.h
   SrcPackage.h
   SysContent.h
-  SystemResObject.h
   Target.h
   TmpPath.h
   TranslatedText.h
@@ -261,40 +254,6 @@ INSTALL(  FILES
   DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/base
 )
 
-SET( zypp_capability_SRCS
-  capability/CapTraits.cc
-  capability/CapabilityImpl.cc
-  capability/FileCap.cc
-  capability/HalCap.cc
-  capability/ModaliasCap.cc
-  capability/FilesystemCap.cc
-  capability/NamedCap.cc
-  capability/NullCap.cc
-  capability/SplitCap.cc
-  capability/VersionedCap.cc
-)
-
-SET( zypp_capability_HEADERS
-  capability/CapTraits.h
-  capability/Capabilities.h
-  capability/CapabilityImpl.h
-  capability/ConditionalCap.h
-  capability/FileCap.h
-  capability/HalCap.h
-  capability/ModaliasCap.h
-  capability/FilesystemCap.h
-  capability/NamedCap.h
-  capability/NullCap.h
-  capability/OrCap.h
-  capability/SplitCap.h
-  capability/VersionedCap.h
-)
-
-INSTALL(  FILES
-  ${zypp_capability_HEADERS}
-  DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/capability
-)
-
 SET( zypp_data_SRCS
   data/ResolvableData.cc
   data/RecordId.cc
@@ -312,60 +271,6 @@ INSTALL(  FILES
   DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/data
 )
 
-SET( zypp_detail_SRCS
-  detail/AtomImpl.cc
-  detail/AtomImplIf.cc
-  detail/MessageImpl.cc
-  detail/MessageImplIf.cc
-  detail/PackageImpl.cc
-  detail/PackageImplIf.cc
-  detail/PatchImpl.cc
-  detail/PatchImplIf.cc
-  detail/PatternImpl.cc
-  detail/PatternImplIf.cc
-  detail/ProductImpl.cc
-  detail/ProductImplIf.cc
-  detail/ResObjectImplIf.cc
-  detail/ResolvableImpl.cc
-  detail/ScriptImpl.cc
-  detail/ScriptImplIf.cc
-  detail/SelectionImpl.cc
-  detail/SelectionImplIf.cc
-  detail/SrcPackageImpl.cc
-  detail/SrcPackageImplIf.cc
-)
-
-SET( zypp_detail_HEADERS
-  detail/AtomImpl.h
-  detail/AtomImplIf.h
-  detail/ImplConnect.h
-  detail/MessageImpl.h
-  detail/MessageImplIf.h
-  detail/PackageImpl.h
-  detail/PackageImplIf.h
-  detail/PatchImpl.h
-  detail/PatchImplIf.h
-  detail/PatternImpl.h
-  detail/PatternImplIf.h
-  detail/ProductImpl.h
-  detail/ProductImplIf.h
-  detail/ResImplTraits.h
-  detail/ResObjectFactory.h
-  detail/ResObjectImplIf.h
-  detail/ResolvableImpl.h
-  detail/ScriptImpl.h
-  detail/ScriptImplIf.h
-  detail/SelectionImpl.h
-  detail/SelectionImplIf.h
-  detail/SrcPackageImpl.h
-  detail/SrcPackageImplIf.h
-)
-
-INSTALL(  FILES
-  ${zypp_detail_HEADERS}
-  DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/detail
-)
-
 SET( zypp_media_SRCS
   media/MediaException.cc
   media/MediaAccess.cc
@@ -580,7 +485,6 @@ SET( zypp_pool_SRCS
   pool/GetResolvablesToInsDel.cc
   pool/PoolImpl.cc
   pool/PoolStats.cc
-  pool/Res2Sat.cc
 )
 
 SET( zypp_pool_HEADERS
@@ -768,7 +672,6 @@ SET( zypp_target_rpm_SRCS
   target/rpm/RpmDb.cc
   target/rpm/RpmException.cc
   target/rpm/RpmHeader.cc
-  target/rpm/RpmPackageImpl.cc
   target/rpm/librpmDb.cc
   target/rpm/librpmDb.cv3.cc
 )
@@ -779,7 +682,6 @@ SET( zypp_target_rpm_HEADERS
   target/rpm/RpmDb.h
   target/rpm/RpmException.h
   target/rpm/RpmHeader.h
-  target/rpm/RpmPackageImpl.h
   target/rpm/librpm.h
   target/rpm/librpmDb.h
 )
@@ -811,31 +713,6 @@ INSTALL(  FILES
   DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/target/store
 )
 
-SET( zypp_target_store_xml_SRCS
-  target/store/xml/XMLAtomImpl.cc
-  target/store/xml/XMLMessageImpl.cc
-  target/store/xml/XMLPatchImpl.cc
-  target/store/xml/XMLPatternImpl.cc
-  target/store/xml/XMLProductImpl.cc
-  target/store/xml/XMLScriptImpl.cc
-  target/store/xml/XMLSelectionImpl.cc
-)
-
-SET( zypp_target_store_xml_HEADERS
-  target/store/xml/XMLAtomImpl.h
-  target/store/xml/XMLMessageImpl.h
-  target/store/xml/XMLPatchImpl.h
-  target/store/xml/XMLPatternImpl.h
-  target/store/xml/XMLProductImpl.h
-  target/store/xml/XMLScriptImpl.h
-  target/store/xml/XMLSelectionImpl.h
-)
-
-INSTALL(  FILES
-  ${zypp_target_store_xml_HEADERS}
-  DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/target/store/xml
-)
-
 SET( zypp_thread_SRCS
   thread/Mutex.cc
 )
@@ -1003,26 +880,10 @@ INSTALL( FILES
 
 SET( zypp_repo_cached_SRCS
   repo/cached/RepoImpl.cc
-  repo/cached/PackageImpl.cc
-  repo/cached/SrcPackageImpl.cc
-  repo/cached/PatchImpl.cc
-  repo/cached/PatternImpl.cc
-  repo/cached/ProductImpl.cc
-  repo/cached/MessageImpl.cc
-  repo/cached/ScriptImpl.cc
-  repo/cached/AtomImpl.cc
 )
 
 SET( zypp_repo_cached_HEADERS
   repo/cached/RepoImpl.h
-  repo/cached/PackageImpl.h
-  repo/cached/SrcPackageImpl.h
-  repo/cached/PatchImpl.h
-  repo/cached/PatternImpl.h
-  repo/cached/ProductImpl.h
-  repo/cached/MessageImpl.h
-  repo/cached/ScriptImpl.h
-  repo/cached/AtomImpl.h
 )
 
 SET( zypp_repo_yum_SRCS
@@ -1043,32 +904,7 @@ SET( zypp_repo_susetags_HEADERS
   repo/susetags/Downloader.h
 )
 
-
-SET( zypp_repo_data_SRCS
-  repo/memory/ScriptImpl.cc
-  repo/memory/MessageImpl.cc
-  repo/memory/PackageImpl.cc
-  repo/memory/PatternImpl.cc
-  repo/memory/ProductImpl.cc
-  repo/memory/PatchImpl.cc
-  repo/memory/RepoImpl.cc
-  repo/memory/AtomImpl.cc
-  repo/memory/SrcPackageImpl.cc
-)
-
-SET( zypp_repo_data_HEADERS
-  repo/memory/PackageImpl.h
-  repo/memory/PatternImpl.h
-  repo/memory/ProductImpl.h
-  repo/memory/PatchImpl.h
-  repo/memory/RepoImpl.h
-  repo/memory/AtomImpl.h
-  repo/memory/SrcPackageImpl.h
-)
-
 SET( zypp_lib_SRCS
-${zypp_detail_SRCS}
-${zypp_capability_SRCS}
 ${zypp_cache_SRCS}
 ${zypp_cache_sqlite3x_SRCS}
 ${zypp_pool_SRCS}
@@ -1078,7 +914,6 @@ ${zypp_parser_xml_SRCS}
 ${zypp_parser_yum_SRCS}
 ${zypp_parser_plaindir_SRCS}
 ${zypp_parser_SRCS}
-${zypp_data_SRCS}
 ${zypp_media_proxyinfo_SRCS}
 ${zypp_media_SRCS}
 ${zypp_url_SRCS}
@@ -1087,13 +922,12 @@ ${zypp_repo_cached_SRCS}
 ${zypp_repo_yum_SRCS}
 ${zypp_repo_susetags_SRCS}
 ${zypp_repo_data_SRCS}
-${zypp_target_store_xml_SRCS}
 ${zypp_target_store_SRCS}
 ${zypp_target_rpm_SRCS}
 ${zypp_target_hal_SRCS}
 ${zypp_target_modalias_SRCS}
 ${zypp_target_SRCS}
-${zypp_solver_detail_SRCS}
+#${zypp_solver_detail_SRCS}
 ${zypp_ui_SRCS}
 ${zypp_thread_SRCS}
 ${zypp_SRCS}
@@ -1103,7 +937,6 @@ ${zypp_base_SRCS}
 )
 
 SET( zypp_lib_HEADERS
-${zypp_target_store_xml_HEADERS}
 ${zypp_target_rpm_HEADERS}
 ${zypp_parser_tagfile_HEADERS}
 ${zypp_parser_susetags_HEADERS}
@@ -1111,12 +944,10 @@ ${zypp_parser_yum_HEADERS}
 ${zypp_parser_plaindir_HEADERS}
 ${zypp_parser_xml_HEADERS}
 ${zypp_parser_HEADERS}
-${zypp_capability_HEADERS}
 ${zypp_cache_HEADERS}
 ${zypp_cache_sqlite3x_HEADERS}
 ${zypp_ui_HEADERS}
 ${zypp_parser_xmlstore_HEADERS}
-${zypp_data_HEADERS}
 ${zypp_media_HEADERS}
 ${zypp_target_hal_HEADERS}
 ${zypp_media_proxyinfo_HEADERS}
@@ -1132,7 +963,6 @@ ${zypp_repo_HEADERS}
 ${zypp_source_susetags_HEADERS}
 ${zypp_target_modalias_HEADERS}
 ${zypp_target_HEADERS}
-${zypp_detail_HEADERS}
 ${zypp_pool_HEADERS}
 )
 
@@ -1151,7 +981,6 @@ ENDMACRO( SET_LOGGROUP )
 SET_LOGGROUP( "zypp" ${zypp_lib_SRCS} )
 
 # override some defaults
-SET_LOGGROUP( "xmlstore" ${zypp_target_store_xml_SRCS} )
 SET_LOGGROUP( "satsolver" ${zypp_sat_SRCS} )
 #SET_LOGGROUP( "group" ${zypp_target_rpm_SRCS} )
 #SET_LOGGROUP( "group" ${zypp_parser_yum2_SRCS} )
@@ -1178,7 +1007,6 @@ SET_LOGGROUP( "satsolver" ${zypp_sat_SRCS} )
 #SET_LOGGROUP( "group" ${zypp_target_modalias_SRCS} )
 #SET_LOGGROUP( "group" ${zypp_target_SRCS} )
 #SET_LOGGROUP( "group" ${zypp_parser_yum_SRCS} )
-#SET_LOGGROUP( "group" ${zypp_detail_SRCS} )
 #SET_LOGGROUP( "group" ${zypp_pool_SRCS} )
 
 
diff --git a/zypp/CapFactory.cc b/zypp/CapFactory.cc
deleted file mode 100644 (file)
index ccbc9bb..0000000
+++ /dev/null
@@ -1,323 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/CapFactory.cc
- *
-*/
-#include <iostream>
-#include <functional>
-#include <set>
-#include <map>
-
-#include <ext/hash_set>
-
-#include "zypp/base/Logger.h"
-#include "zypp/base/Exception.h"
-#include "zypp/base/String.h"
-#include "zypp/base/Counter.h"
-
-#include "zypp/CapFactory.h"
-#include "zypp/capability/Capabilities.h"
-
-using std::endl;
-
-///////////////////////////////////////////////////////////////////
-namespace
-{ /////////////////////////////////////////////////////////////////
-  using ::zypp::Resolvable;
-  using ::zypp::capability::CapabilityImpl;
-  using ::zypp::capability::CapImplOrder;
-
-  struct CapImplHashFun
-  {
-    size_t operator() ( const CapabilityImpl::Ptr & p ) const
-    {
-      //return __gnu_cxx::hash<const char*>()( p->encode().c_str() );
-      return p->hash();
-    }
-  };
-
-  struct CapImplHashEqual
-  {
-    bool operator() ( const CapabilityImpl::Ptr & lhs, const CapabilityImpl::Ptr & rhs ) const
-    {
-      return ::zypp::capability::exactly_same_caps_p (lhs, rhs);
-      /*return (    lhs->refers() == rhs->refers()
-              && lhs->kind()   == rhs->kind()
-              && lhs->encode() == rhs->encode() );*/
-    }
-  };
-
-  /** Set of unique CapabilityImpl. */
-  //typedef std::set<CapabilityImpl::Ptr,CapImplOrder> USet;
-  typedef __gnu_cxx::hash_set<CapabilityImpl::Ptr, CapImplHashFun, CapImplHashEqual> USet;
-
-
-  /** Set to unify created capabilities.
-   *
-   * This is to unify capabilities. Each CapabilityImpl created
-   * by CapFactory, must be inserted into _uset, and the returned
-   * CapabilityImpl::Ptr has to be uset to create the Capability.
-  */
-  USet _uset;
-
-  /** Each CapabilityImpl created in CapFactory \b must be wrapped.
-   *
-   * Immediately wrap \a allocated_r, and unified by inserting it into
-   * \c _uset. Each CapabilityImpl created by CapFactory, \b must be
-   * inserted into _uset, by calling usetInsert.
-   *
-   * \return CapabilityImpl_Ptr referencing \a allocated_r (or an
-   * eqal representation, allocated is deleted then).
-  */
-  CapabilityImpl::Ptr usetInsert( CapabilityImpl::Ptr cap_ptr )
-  {
-    return *(_uset.insert( cap_ptr ).first);
-  }
-
-  /** Collect USet statistics.
-   * \ingroup DEBUG
-  */
-  struct USetStatsCollect : public std::unary_function<CapabilityImpl::constPtr, void>
-  {
-    typedef ::zypp::Counter<unsigned> Counter;
-
-    Counter _caps;
-    std::map<CapabilityImpl::Kind,Counter> _capKind;
-    std::map<Resolvable::Kind,Counter>     _capRefers;
-
-    void operator()( const CapabilityImpl::constPtr & cap_r )
-    {
-      //DBG << *cap_r << endl;
-      ++_caps;
-      ++(_capKind[cap_r->kind()]);
-      ++(_capRefers[cap_r->refers()]);
-    }
-
-    std::ostream & dumpOn( std::ostream & str ) const
-    {
-      str << "  Capabilities total: " << _caps << endl;
-      str << "  Capability kinds:" << endl;
-      for ( std::map<CapabilityImpl::Kind,Counter>::const_iterator it = _capKind.begin();
-           it != _capKind.end(); ++it )
-       {
-         str << "    " << it->first << '\t' << it->second << endl;
-       }
-      str << "  Capability refers:" << endl;
-      for ( std::map<Resolvable::Kind,Counter>::const_iterator it = _capRefers.begin();
-           it != _capRefers.end(); ++it )
-       {
-         str << "    " << it->first << '\t' << it->second << endl;
-       }
-      return str;
-    }
-  };
-
-  /////////////////////////////////////////////////////////////////
-} // namespace
-///////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   CLASS NAME : CapFactoryImpl
-  //
-  /** CapFactory implementation.
-   *
-   * Provides various functions doing checks and log and \c throw.
-   * CapFactory::parse usually combines them, and if nothing fails,
-   * finaly builds the Capability.
-   *
-   * \attention Each CapabilityImpl created by CapFactory, \b must
-   * be inserted into ::_uset, by calling ::usetInsert, \b before
-   * the Capability is created.
-   *
-   * \li \c file:     /absolute/path
-   * \li \c split:    name:/absolute/path
-   * \li \c name:     name
-   * \li \c vers:     name op edition
-   * \li \c hal:      hal(string)
-   * \li \c modalias: modalias(string)
-  */
-  struct CapFactory::Impl
-  {
-
-  };
-  ///////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   CLASS NAME : CapFactory
-  //
-  ///////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : CapFactory::CapFactory
-  //   METHOD TYPE : Ctor
-  //
-  CapFactory::CapFactory()
-  {}
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : CapFactory::~CapFactory
-  //   METHOD TYPE : Dtor
-  //
-  CapFactory::~CapFactory()
-  {}
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : CapFactory::fromImpl
-  //   METHOD TYPE : Capability
-  //
-  Capability CapFactory::fromImpl( capability::CapabilityImpl::Ptr impl ) const
-  try
-  {
-    return Capability( usetInsert( impl ) );
-  }
-  catch ( Exception & excpt )
-  {
-    ZYPP_RETHROW( excpt );
-    return Capability(); // not reached
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : CapFactory::parse
-  //   METHOD TYPE : Capability
-  //
-  Capability CapFactory::parse( const Resolvable::Kind & refers_r,
-                               const std::string & strval_r ) const
-  try
-  {
-    return Capability( usetInsert( ::zypp::capability::parse( refers_r, strval_r ) ) );
-  }
-  catch ( Exception & excpt )
-  {
-    ZYPP_RETHROW( excpt );
-    return Capability(); // not reached
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : CapFactory::parse
-  //   METHOD TYPE : Capability
-  //
-  Capability CapFactory::parse( const Resolvable::Kind & refers_r,
-                               const std::string & name_r,
-                               const std::string & op_r,
-                               const std::string & edition_r ) const
-  try
-  {
-    return Capability( usetInsert(::zypp::capability::parse( refers_r, name_r, op_r, edition_r ) ) );
-  }
-  catch ( Exception & excpt )
-  {
-    ZYPP_RETHROW( excpt );
-    return Capability(); // not reached
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : CapFactory::parse
-  //   METHOD TYPE : Capability
-  //
-  Capability CapFactory::parse( const Resolvable::Kind & refers_r,
-                               const std::string & name_r,
-                               Rel op_r,
-                               const Edition & edition_r ) const
-  try
-    {
-      return Capability( usetInsert(::zypp::capability::parse( refers_r, name_r, op_r, edition_r )) );
-    }
-  catch ( Exception & excpt )
-    {
-      ZYPP_RETHROW( excpt );
-      return Capability(); // not reached
-    }
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : CapFactory::halEvalCap
-  //   METHOD TYPE : Capability
-  //
-  Capability CapFactory::halEvalCap() const
-  try
-    {
-      return Capability( usetInsert( ::zypp::capability::buildHal( Resolvable::Kind(), "hal()" ) ) );
-    }
-  catch ( Exception & excpt )
-    {
-      ZYPP_RETHROW( excpt );
-      return Capability(); // not reached
-    }
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : CapFactory::modaliasEvalCap
-  //   METHOD TYPE : Capability
-  //
-  Capability CapFactory::modaliasEvalCap() const
-  try
-    {
-      return Capability( usetInsert( ::zypp::capability::buildModalias( Resolvable::Kind(), "modalias()" ) ) );
-    }
-  catch ( Exception & excpt )
-    {
-      ZYPP_RETHROW( excpt );
-      return Capability(); // not reached
-    }
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : CapFactory::filesystemEvalCap
-  //   METHOD TYPE : Capability
-  //
-  Capability CapFactory::filesystemEvalCap() const
-  try
-  {
-    return Capability( usetInsert( ::zypp::capability::buildFilesystem( Resolvable::Kind(), "filesystem()" ) ) );
-  }
-  catch ( Exception & excpt )
-  {
-    ZYPP_RETHROW( excpt );
-    return Capability(); // not reached
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : CapFactory::encode
-  //   METHOD TYPE : std::string
-  //
-  std::string CapFactory::encode( const Capability & cap_r ) const
-  {
-    return cap_r._pimpl->encode();
-  }
-
-  /******************************************************************
-  **
-  **   FUNCTION NAME : operator<<
-  **   FUNCTION TYPE : std::ostream &
-  */
-  std::ostream & operator<<( std::ostream & str, const CapFactory & obj )
-  {
-    str << "CapFactory stats:" << endl;
-
-    return for_each( _uset.begin(), _uset.end(), USetStatsCollect() ).dumpOn( str );
-  }
-
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/CapFactory.h b/zypp/CapFactory.h
deleted file mode 100644 (file)
index 9f608e6..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/CapFactory.h
- *
-*/
-#ifndef ZYPP_CAPFACTORY_H
-#define ZYPP_CAPFACTORY_H
-
-#include <iosfwd>
-
-#include "zypp/base/PtrTypes.h"
-
-#include "zypp/Capability.h"
-#include "zypp/capability/CapabilityImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   CLASS NAME : CapFactory
-  //
-  /** Factory for creating Capability.
-   *
-   * Besides parsing, CapFactory asserts that equal capabilites
-   * share the same implementation.
-   *
-   * \todo define EXCEPTIONS
-   * \todo Parser needs improvement in speed and accuracy.
-  */
-  class CapFactory
-  {
-    friend std::ostream & operator<<( std::ostream & str, const CapFactory & obj );
-
-  public:
-    /** Default ctor */
-    CapFactory();
-
-    /** Dtor */
-    ~CapFactory();
-
-  public:
-
-    /** Create capability from Implementation
-     * \a impl is a valid \ref CapabilityImpl Ptr
-     * \throw EXCEPTION on null capability
-    */
-    Capability fromImpl( capability::CapabilityImpl::Ptr impl ) const;
-
-    /** Parse Capability from string providing Resolvable::Kind.
-     * \a strval_r is expected to define a valid Capability.
-     * \throw EXCEPTION on parse error.
-    */
-    Capability parse( const Resolvable::Kind & refers_r,
-                      const std::string & strval_r ) const;
-    /** \overload Templating the \c Resolvable::Kind. */
-    template<class _Res>
-    Capability parse( const std::string & strval_r ) const
-    { return parse( ResTraits<_Res>::kind, strval_r ); }
-
-    /** Parse Capability providing Resolvable::Kind, name, Rel and Edition as strings.
-     * \throw EXCEPTION on parse error.
-    */
-    Capability parse( const Resolvable::Kind & refers_r,
-                      const std::string & name_r,
-                      const std::string & op_r,
-                      const std::string & edition_r ) const;
-
-    /** Parse Capability providing Resolvable::Kind, name, Rel and Edition.
-     * \throw EXCEPTION on parse error.
-    */
-    Capability parse( const Resolvable::Kind & refers_r,
-                      const std::string & name_r,
-                      Rel op_r,
-                      const Edition & edition_r ) const;
-
-    public:
-    /** Special Capability, triggering evaluation of Hal
-     * capabilities when matched.
-    */
-    Capability halEvalCap() const;
-
-    /** Special Capability, triggering evaluation of modalias
-     * capabilities when matched.
-    */
-    Capability modaliasEvalCap() const;
-
-    /** Special Capability, triggering evaluation of filesystem
-     * capabilities when matched.
-     */
-    Capability filesystemEvalCap() const;
-
-    public:
-    /** Provide a parsable string representation of \a cap_r. */
-    std::string encode( const Capability & cap_r ) const;
-
-  private:
-    /** Implementation */
-    struct Impl;
-    /** Pointer to implementation */
-    RW_pointer<Impl> _pimpl;
-  };
-  ///////////////////////////////////////////////////////////////////
-
-  /** \relates CapFactory Stream output */
-  extern std::ostream & operator<<( std::ostream & str, const CapFactory & obj );
-
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_CAPFACTORY_H
index cbe7970..03c8e6c 100644 (file)
@@ -12,6 +12,7 @@
 #ifndef ZYPP_CAPFILTERS_H
 #define ZYPP_CAPFILTERS_H
 
+#include "zypp/base/Deprecated.h"
 #include "zypp/base/Functional.h"
 #include "zypp/Capability.h"
 #include "zypp/ResObject.h"
@@ -32,38 +33,38 @@ namespace zypp
     typedef std::unary_function<Capability, bool> CapabilityFilterFunctor;
 
     /** */
-    struct ByRefers : public CapabilityFilterFunctor
+    struct ZYPP_DEPRECATED ByRefers : public CapabilityFilterFunctor
     {
-      bool operator()( const Capability & c ) const
+      ZYPP_DEPRECATED bool operator()( const Capability & c ) const
       {
-        return c.refers() == _refers;
+        return false; //c.refers() == _refers;
       }
 
-      ByRefers( Resolvable::Kind refers_r )
+      ZYPP_DEPRECATED ByRefers( Resolvable::Kind refers_r )
       : _refers( refers_r )
       {}
-      ByRefers( ResObject::constPtr p )
+      ZYPP_DEPRECATED ByRefers( ResObject::constPtr p )
       : _refers( p->kind() )
       {}
-      ByRefers( const Capability & cap_r )
-      : _refers( cap_r.refers() )
+      ZYPP_DEPRECATED ByRefers( const Capability & cap_r )
+      //: _refers( cap_r.refers() )
       {}
       Resolvable::Kind _refers;
     };
 
     /** */
-    struct ByIndex : public CapabilityFilterFunctor
+    struct ZYPP_DEPRECATED ByIndex : public CapabilityFilterFunctor
     {
-      bool operator()( const Capability & c ) const
+      ZYPP_DEPRECATED bool operator()( const Capability & c ) const
       {
-        return c.index() == _index;
+        return false; //c.index() == _index;
       }
 
-      ByIndex( const std::string & index_r )
+      ZYPP_DEPRECATED ByIndex( const std::string & index_r )
       : _index( index_r )
       {}
-      ByIndex( const Capability & cap_r )
-      : _index( cap_r.index() )
+      ZYPP_DEPRECATED ByIndex( const Capability & cap_r )
+      //: _index( cap_r.index() )
       {}
       std::string _index;
     };
index d7d4d84..3f38d05 100644 (file)
@@ -13,7 +13,7 @@
 #define ZYPP_CAPMATCH_H
 
 #include <iosfwd>
-
+#include "zypp/base/Deprecated.h"
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
@@ -32,9 +32,9 @@ namespace zypp
    *   ( !CapMatch::irrelevant )     == CapMatch::irrelevant // true
    * \endcode
   */
-  class CapMatch
+  class ZYPP_DEPRECATED CapMatch
   {
-    enum Result { NOMATCH, MATCH, IRRELEVANT };
+    enum ZYPP_DEPRECATED Result { NOMATCH, MATCH, IRRELEVANT };
 
   public:
 
@@ -42,9 +42,9 @@ namespace zypp
     : _result( val_r ? MATCH : NOMATCH )
     {}
 
-    static const CapMatch yes;
-    static const CapMatch no;
-    static const CapMatch irrelevant;
+    static ZYPP_DEPRECATED const CapMatch yes;
+    static ZYPP_DEPRECATED const CapMatch no;
+    static ZYPP_DEPRECATED const CapMatch irrelevant;
 
     friend bool operator==( const CapMatch & lhs, const CapMatch & rhs )
     { return lhs._result == rhs._result; }
index b1bdab5..9ab3f80 100644 (file)
@@ -46,24 +46,23 @@ namespace zypp
   */
   //@{
 
-  /** Algorithm invoking \c action_r on each \ref CapSet entry
+  /** Algorithm invoking \c action_r on each \ref Capabilities entry
    * that matches a given \ref Capability.
   */
-  inline int forEachMatchIn( CapSet::const_iterator begin_r,
-                             CapSet::const_iterator end_r,
+  inline int forEachMatchIn( Capabilities::const_iterator begin_r,
+                             Capabilities::const_iterator end_r,
                              const Capability & lhs_r,
                              function<bool(const Capability &)> action_r )
   {
-    std::string index( lhs_r.index() );
     return invokeOnEach( begin_r, end_r,
                          MatchesCapability( lhs_r ), // filter
                          action_r );
   }
 
-  /** Algorithm invoking \c action_r on each \ref CapSet entry
+  /** Algorithm invoking \c action_r on each \ref Capabilities entry
    * that matches a given \ref Capability.
   */
-  inline int forEachMatchIn( const CapSet & capset_r,
+  inline int forEachMatchIn( const Capabilities & capset_r,
                              const Capability & lhs_r,
                              function<bool(const Capability &)> action_r )
   {
@@ -92,29 +91,33 @@ namespace zypp
                              const Capability & lhs_r,
                              function<bool(const CapAndItem &)> action_r )
   {
+#warning FIX BROKEN BROKEN POOL byCapabilityIndex
+    return -1;
+#if 0
     std::string index( lhs_r.index() );
     return invokeOnEach( pool_r.byCapabilityIndexBegin( index, dep_r ),
                          pool_r.byCapabilityIndexEnd( index, dep_r ),
                          MatchesCapability( lhs_r ), // filter
                          action_r );
+#endif
   }
 
 
   ///////////////////////////////////////////////////////////////////
 
   /** Functor invoking \c action_r on each matching \ref Capability
-   *  in a \ref CapSet.
+   *  in a \ref Capabilities.
    *
    * Functor is provided to ease using \ref forEachMatchIn as action
-   * in other algorithms (nested loop over two CapSets).
+   * in other algorithms (nested loop over two Capabilitiess).
   */
-  class ForEachMatchInCapSet
+  class ForEachMatchInCapabilities
   {
   public:
     typedef function<bool(const Capability &, const Capability &)> Action;
 
   public:
-    ForEachMatchInCapSet( const CapSet & set_r, const Action & action_r )
+    ForEachMatchInCapabilities( const Capabilities & set_r, const Action & action_r )
     : _set( set_r )
     , _action( action_r )
     {}
@@ -126,18 +129,18 @@ namespace zypp
     }
 
   private:
-    const CapSet & _set;
+    const Capabilities & _set;
     Action         _action;
   };
 
   /** Invoke \c action_r on each matching pair of Capabilities within
-   * two CapSets. */
-  inline int forEachMatchIn( const CapSet & lhs_r,
-                             const CapSet & rhs_r,
+   * two Capabilitiess. */
+  inline int forEachMatchIn( const Capabilities & lhs_r,
+                             const Capabilities & rhs_r,
                              function<bool(const Capability &, const Capability &)> action_r )
   {
     return invokeOnEach( lhs_r.begin(), lhs_r.end(),
-                         ForEachMatchInCapSet( rhs_r, action_r ) );
+                         ForEachMatchInCapabilities( rhs_r, action_r ) );
   }
   ///////////////////////////////////////////////////////////////////
 
@@ -151,18 +154,18 @@ namespace zypp
     };
   }
 
-  /** Return \c true if the CapSet contains at least one Capabilitiy
+  /** Return \c true if the Capabilities contains at least one Capabilitiy
    *  that matches.
   */
-  inline bool hasMatches( const CapSet & lhs_r, const Capability & rhs_r )
+  inline bool hasMatches( const Capabilities & lhs_r, const Capability & rhs_r )
   {
     return( forEachMatchIn( lhs_r, rhs_r, capmatch_detail::AlwaysFalse() ) < 0 );
   }
 
-  /** Return \c true if the CapSets contain at least one pair of
+  /** Return \c true if the Capabilitiess contain at least one pair of
    *  Capabilities that match.
   */
-  inline bool hasMatches( const CapSet & lhs_r, const CapSet & rhs_r )
+  inline bool hasMatches( const Capabilities & lhs_r, const Capabilities & rhs_r )
   {
     return( forEachMatchIn( lhs_r, rhs_r, capmatch_detail::AlwaysFalse() ) < 0 );
   }
diff --git a/zypp/CapSet.cc b/zypp/CapSet.cc
deleted file mode 100644 (file)
index ecfa84f..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/CapSet.cc
- *
-*/
-#include <iostream>
-#include <iterator>
-
-#include "zypp/CapSet.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  /******************************************************************
-  **
-  **   FUNCTION NAME : operator<<
-  **   FUNCTION TYPE : std::ostream &
-  */
-  std::ostream & operator<<( std::ostream & str, const CapSet & obj )
-  {
-    copy( obj.begin(), obj.end(), ostream_iterator<Capability>(str,"\n") );
-    return str;
-  }
-
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/CapSet.h b/zypp/CapSet.h
deleted file mode 100644 (file)
index b1eed7a..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/CapSet.h
- *
-*/
-#ifndef ZYPP_CAPSET_H
-#define ZYPP_CAPSET_H
-
-#include <iosfwd>
-
-#include "zypp/Capability.h"
-#include "zypp/CapSetFwd.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  extern std::ostream & operator<<( std::ostream & str, const CapSet & obj );
-
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_CAPSET_H
diff --git a/zypp/CapSetFwd.h b/zypp/CapSetFwd.h
deleted file mode 100644 (file)
index f6d65be..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/CapSetFwd.h
- *
-*/
-#ifndef ZYPP_CAPSETFWD_H
-#define ZYPP_CAPSETFWD_H
-
-#include <set>
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  class Capability;
-  class CapOrder;
-  typedef std::set<Capability,CapOrder> CapSet;
-
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_CAPSETFWD_H
diff --git a/zypp/Capabilities.h b/zypp/Capabilities.h
new file mode 100644 (file)
index 0000000..2013b22
--- /dev/null
@@ -0,0 +1 @@
+#include "sat/Capabilities.h"
diff --git a/zypp/Capability.cc b/zypp/Capability.cc
deleted file mode 100644 (file)
index b644211..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/Capability.cc
- *
-*/
-#include <iostream>
-
-#include "zypp/Capability.h"
-#include "zypp/capability/CapabilityImpl.h"
-#include "zypp/capability/NullCap.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  const Capability Capability::noCap;
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : Capability::Capability
-  //   METHOD TYPE : Ctor
-  //
-  Capability::Capability()
-  : _pimpl( capability::NullCap::instance() )
-  {}
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : Capability::Capability
-  //   METHOD TYPE : Ctor
-  //
-  Capability::Capability( Impl_Ptr impl_r )
-  : _pimpl( impl_r )
-  {}
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : Capability::~Capability
-  //   METHOD TYPE : Dtor
-  //
-  Capability::~Capability()
-  {}
-
-  const Capability::Kind & Capability::kind() const
-  { return _pimpl->kind(); }
-
-  const Resolvable::Kind & Capability::refers() const
-  { return _pimpl->refers(); }
-
-  bool Capability::relevant() const
-  { return _pimpl->relevant(); }
-
-  CapMatch Capability::matches( const Capability & rhs ) const
-  { return _pimpl->matches( rhs._pimpl.getPtr() ); }
-
-  std::string Capability::asString() const
-  { return _pimpl->asString(); }
-
-  std::string Capability::index() const
-  { return _pimpl->index(); }
-
-//   Rel Capability::op() const
-//   { return _pimpl->op(); }
-// 
-//   Edition Capability::edition() const
-//   { return _pimpl->edition(); }
-
-  /******************************************************************
-  **
-  **   FUNCTION NAME : operator<<
-  **   FUNCTION TYPE : std::ostream &
-  */
-  std::ostream & operator<<( std::ostream & str, const Capability & obj )
-  {
-    return str << obj._pimpl;
-  }
-
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
index 37f53d6..d9d9d59 100644 (file)
@@ -1,175 +1 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/Capability.h
- *
-*/
-#ifndef ZYPP_CAPABILITY_H
-#define ZYPP_CAPABILITY_H
-
-#include <iosfwd>
-#include <functional>
-
-#include "zypp/base/PtrTypes.h"
-#include "zypp/capability/CapTraits.h"
-#include "zypp/Resolvable.h"
-#include "zypp/CapMatch.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-    DEFINE_PTR_TYPE(CapabilityImpl);
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-
-  class CapFactory;
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   CLASS NAME : Capability
-  //
-  /** Resolvable capabilitiy.
-   *
-   * Capability is created by a Factory class. Only a default ctor
-   * creating a dummy capability is provided.
-   * \code
-   *   Capability cap;
-   *   try
-   *     {
-   *       cap = CapFactory().parse( ResTraits<Patch>::kind,
-   *                                 parsed.name,
-   *                                 parsed.op,
-   *                                 Edition( parsed.ver,
-   *                                          parsed.rel,
-   *                                          parsed.epoch ) );
-   *     }
-   *   catch ( Exception & excpt_r )
-   *     {
-   *       ERR << excpt_r << endl;
-   *       ... Or maybe just WAR, or ?
-   *     }
-   * \endcode
-   * \see CapFactory: Factory creating Capability.
-   *
-   * \invariant Nonzero \c _pimpl
-   * \invariant Unified \c _pimpl asserted by CapFactory.
-   *
-   * \todo Need a trival return from matches. E.g. Conditional
-   * capabilities must be able to indicate that they should be
-   * treated as if they were not present at all, if the precondition
-   * does no apply. Same for the default Capability.
-  */
-  class Capability
-  {
-    /** Ordering for use in CapSet */
-    friend class CapOrder;
-    friend bool operator==( const Capability & lhs, const Capability & rhs );
-    friend std::ostream & operator<<( std::ostream & str, const Capability & obj );
-
-  public:
-    /** */
-    typedef capability::CapabilityTraits::KindType  Kind;
-
-  public:
-    /** DefaultCtor creating \ref noCap. */
-    Capability();
-
-    /** Dtor */
-    virtual ~Capability();
-
-    /** Constant representing no Capabiliy.
-     * It refers to no kind of Resolvable, and matches returns
-     *  returns \c CapMatch::irrelevant.
-    */
-    static const Capability noCap;
-
-  public:
-    /** Kind of Capability.  */
-    const Kind & kind() const;
-
-    /** Kind of Resolvable the Capability refers to. */
-    const Resolvable::Kind & refers() const;
-
-    /** Whether to consider this Capability.
-     * Evaluates the Capabilities pre-condition (if any), and
-     * returns whether the condition applies. If not, the Capability
-     * is to be ignored.
-    */
-    bool relevant() const;
-
-    /** Return whether the Capabilities match.
-     * If either Capability is not \ref relevant, CapMatch::irrelevant
-     * is returned.
-    */
-    CapMatch matches( const Capability & rhs ) const;
-
-    /** More or less human readable representation as string. */
-    std::string asString() const;
-
-    /** accessors needed by solver/zmd  */
-    /** Deprecated */
-    std::string index() const;
-
-  private:
-    typedef capability::CapabilityImpl          Impl;
-    typedef capability::CapabilityImpl_Ptr      Impl_Ptr ;
-    typedef capability::CapabilityImpl_constPtr Impl_constPtr;
-
-    /** Factory */
-    friend class CapFactory;
-
-    /** Factory ctor */
-    explicit
-    Capability( Impl_Ptr impl_r );
-
-  private:
-    /** */
-    friend class capability::CapabilityImpl;
-    /** Pointer to implementation */
-    RW_pointer<Impl,rw_pointer::Intrusive<Impl> > _pimpl;
-  };
-  ///////////////////////////////////////////////////////////////////
-
-  template<class _Cap>
-    inline bool isKind( const Capability & cap )
-    { return cap.kind() == capability::CapTraits<_Cap>::kind; }
-
-  template<class _Res>
-    inline bool refersTo( const Capability & cap )
-    { return cap.refers() == ResTraits<_Res>::kind; }
-
-  ///////////////////////////////////////////////////////////////////
-
-  /** Ordering relation used by ::CapSet. */
-  struct CapOrder : public std::binary_function<Capability, Capability, bool>
-  {
-    bool operator()( const Capability & lhs, const Capability & rhs ) const
-    { return lhs._pimpl.get() < rhs._pimpl.get(); }
-  };
-
-  ///////////////////////////////////////////////////////////////////
-
-  /** \relates Capability  */
-  inline bool operator==( const Capability & lhs, const Capability & rhs )
-  { return lhs._pimpl.get() == rhs._pimpl.get(); }
-
-  /** \relates Capability  */
-  inline bool operator!=( const Capability & lhs, const Capability & rhs )
-  { return ! (lhs == rhs); }
-
-  /** \relates Capability Stream output */
-  extern std::ostream & operator<<( std::ostream & str, const Capability & obj );
-
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_CAPABILITY_H
+#include "sat/Capability.h"
index 0d0b44b..8267fa5 100644 (file)
@@ -11,8 +11,9 @@
 */
 #include <iostream>
 
+#include "zypp/base/LogTools.h"
+
 #include "zypp/Dependencies.h"
-#include "zypp/CapSet.h"
 
 using std::endl;
 
index 118ae52..b4577ad 100644 (file)
@@ -16,7 +16,7 @@
 #include <map>
 
 #include "zypp/Dep.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capability.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -26,18 +26,18 @@ namespace zypp
   //
   //   CLASS NAME : Dependencies
   //
-  /** Helper keeping CapSet for all kinds of dependencies.
+  /** Helper keeping CapabilitySet for all kinds of dependencies.
   */
-  struct Dependencies
+  struct ZYPP_DEPRECATED Dependencies
   {
-    CapSet & operator[]( Dep idx_r )
+    CapabilitySet & operator[]( Dep idx_r )
     { return _capsets[idx_r]; }
 
-    const CapSet & operator[]( Dep idx_r ) const
-    { return const_cast<std::map<Dep,CapSet>&>(_capsets)[idx_r]; }
+    const CapabilitySet & operator[]( Dep idx_r ) const
+    { return const_cast<std::map<Dep,CapabilitySet>&>(_capsets)[idx_r]; }
 
   private:
-    std::map<Dep,CapSet> _capsets;
+    std::map<Dep,CapabilitySet> _capsets;
   };
   ///////////////////////////////////////////////////////////////////
 
index 26042a3..cdd9dfb 100644 (file)
@@ -18,8 +18,6 @@ extern "C"
 #include "zypp/Edition.h"
 #include "zypp/sat/Pool.h"
 
-using namespace std;
-
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
@@ -56,12 +54,24 @@ namespace zypp
   : _str( makeevrstr( version_r, release_r, epoch_r ) )
   {}
 
+  Edition::Edition( const char * version_r,
+                    const char * release_r,
+                    epoch_t epoch_r )
+  : _str( makeevrstr( version_r, release_r, epoch_r ) )
+  {}
+
   Edition::Edition( const std::string & version_r,
                     const std::string & release_r,
                     const std::string & epoch_r )
   : _str( makeevrstr( version_r, release_r, str::strtonum<epoch_t>( epoch_r ) ) )
   {}
 
+  Edition::Edition( const char * version_r,
+                    const char * release_r,
+                    const char * epoch_r )
+  : _str( makeevrstr( version_r, release_r, str::strtonum<epoch_t>( epoch_r ) ) )
+  {}
+
   Edition::epoch_t Edition::epoch() const
   {
     const char * str( c_str() );
index fbf482d..aec486d 100644 (file)
@@ -86,11 +86,19 @@ namespace zypp
       Edition( const std::string & version_r,
                const std::string & release_r,
                epoch_t epoch_r = noepoch );
+      /** \overload */
+      Edition( const char * version_r,
+               const char * release_r,
+               epoch_t epoch_r = noepoch );
 
       /** Ctor taking \a version_r, \a release_r and optional \a epoch_r as string. */
       Edition( const std::string & version_r,
                const std::string & release_r,
                const std::string & epoch_r );
+      /** \overload */
+      Edition( const char * version_r,
+               const char * release_r,
+               const char * epoch_r );
 
     public:
       /** Epoch */
index 9900362..5afbefd 100644 (file)
 */
 #include "zypp/Language.h"
 #include "zypp/TranslatedText.h"
-#include "zypp/CapFactory.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
 
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    //  CLASS NAME : LanguageImpl
-    //
-    /** Exposition only. */
-    class LanguageImpl : public LanguageImplIf
-    {
-    public:
-      LanguageImpl( const Locale & locale_r )
-      : _locale( locale_r )
-      {}
-
+#warning Check overloaded attributes
+#if 0
     public:
       virtual TranslatedText summary() const
       { return TranslatedText( _locale.name() ); }
@@ -42,26 +27,17 @@ namespace zypp
 
     private:
        Locale _locale;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-
+#endif
 
   IMPL_PTR_TYPE(Language);
 
-
-
-  ///////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
   //
   //   METHOD NAME : Language::Language
   //   METHOD TYPE : Ctor
   //
-  Language::Language( const NVRAD & nvrad_r )
-  : ResObject( TraitsType::kind, nvrad_r )
+  Language::Language( const sat::Solvable & solvable_r )
+  : ResObject( solvable_r )
   {}
 
   ///////////////////////////////////////////////////////////////////
@@ -74,6 +50,9 @@ namespace zypp
 
   Language::Ptr Language::installedInstance( const Locale & locale_r )
   {
+#warning FIX CREATION OF LANGUAGE RESOLVABLES
+    return 0;
+#if 0
     static std::map<Locale,Ptr> _ptrmap;
     Ptr ret( _ptrmap[locale_r] );
     if ( ! ret )
@@ -92,10 +71,14 @@ namespace zypp
         ret = _ptrmap[locale_r] = detail::makeResolvableFromImpl( dataCollect, langImpl );
       }
     return ret;
+#endif
   }
 
   Language::Ptr Language::availableInstance( const Locale & locale_r )
   {
+#warning FIX CREATION OF LANGUAGE RESOLVABLES
+    return 0;
+#if 0
     static std::map<Locale,Ptr> _ptrmap;
     Ptr ret( _ptrmap[locale_r] );
     if ( ! ret )
@@ -114,8 +97,9 @@ namespace zypp
         ret = _ptrmap[locale_r] = detail::makeResolvableFromImpl( dataCollect, langImpl );
       }
     return ret;
+#endif
   }
 
   /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
+  // namespace zypp
+}///////////////////////////////////////////////////////////////////
index db46fc6..73a64c4 100644 (file)
@@ -22,26 +22,6 @@ namespace zypp
   DEFINE_PTR_TYPE(Language);
 
   ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    //  CLASS NAME : LanguageImplIf
-    //
-    /** Exposition only. */
-    class LanguageImplIf : public ResObjectImplIf
-    {
-    public:
-      typedef Language ResType;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
   //
   //   CLASS NAME : Language
   //
@@ -50,7 +30,6 @@ namespace zypp
   class Language : public ResObject
   {
   public:
-    typedef detail::LanguageImplIf   Impl;
     typedef Language                 Self;
     typedef ResTraits<Self>          TraitsType;
     typedef TraitsType::PtrType      Ptr;
@@ -63,15 +42,9 @@ namespace zypp
 
   protected:
     /** Ctor */
-    Language( const NVRAD & nvrad_r );
+    Language( const sat::Solvable & solvable_r );
     /** Dtor */
     virtual ~Language();
-
-  private:
-    /** Access implementation */
-    virtual Impl & pimpl() = 0;
-    /** Access implementation */
-    virtual const Impl & pimpl() const = 0;
   };
   ///////////////////////////////////////////////////////////////////
 
index 73dceb8..fd7f2a6 100644 (file)
@@ -16,9 +16,7 @@
 #include "zypp/base/Logger.h"
 #include "zypp/base/IOStream.h"
 #include "zypp/PoolItem.h"
-#include "zypp/CapFactory.h"
 #include "zypp/CapMatchHelper.h"
-#include "zypp/capability/Capabilities.h"
 
 #undef ZYPP_BASE_LOGGER_LOGGROUP
 #define ZYPP_BASE_LOGGER_LOGGROUP "locks"
@@ -120,20 +118,25 @@ struct AddLockToPool
   : _pool(pool)
   , _count(0)
   {
-  
+
   }
-  
+
   bool operator()( const std::string & str_r )
   {
+#warning MUST FIX LOCK IMPLEMENTATION
+    // - make Capability's parse 'Name [Op edition]' available so it can be used here
+    // - provide new, or extend Capability::Matches, functor to allow pattern (glob/rx) matching
+    return false;
+#if 0
     CapFactory cap_factory;
-    
+
     std::string line( str::trim( str_r ) );
-    
+
     if ( line.empty() || line[0] == '#')
       return true;
-    
+
     MIL << "Applying locks from pattern '" << str_r << "'" << endl;
-    
+
     // zypp does not provide wildcard or regex support in the Capability matching helpers
     // but it still parses the index if it contains wildcards.
     // so we decompose the capability, and keep the op and edition, while, the name
@@ -149,7 +152,7 @@ struct AddLockToPool
     try
     {
       Capability capability = cap_factory.parse( ResTraits<zypp::Package>::kind, line );
-      
+
       capability::NamedCap::constPtr named = capability::asKind<capability::NamedCap>(capability);
       if ( named )
       {
@@ -221,8 +224,9 @@ struct AddLockToPool
       ++_count;
     }
     return true;
+#endif
   } // end operator()()
-        
+
   ResPool _pool;
   int _count;
 };
index b9da306..a8aa71c 100644 (file)
@@ -10,8 +10,7 @@
  *
 */
 #include "zypp/Message.h"
-
-using namespace std;
+#include "zypp/Message.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -24,8 +23,8 @@ namespace zypp
   //   METHOD NAME : Message::Message
   //   METHOD TYPE : Ctor
   //
-  Message::Message( const NVRAD & nvrad_r )
-  : ResObject( TraitsType::kind, nvrad_r )
+  Message::Message( const sat::Solvable & solvable_r )
+  : ResObject( solvable_r )
   {}
 
   ///////////////////////////////////////////////////////////////////
@@ -43,11 +42,12 @@ namespace zypp
   ///////////////////////////////////////////////////////////////////
 
   TranslatedText Message::text() const
-  { return pimpl().text(); }
+  { return TranslatedText(); }
 
   /** Patch the message belongs to - if any */
-  Patch::constPtr Message::patch() const
-  { return pimpl().patch(); }
+  ResTraits<Patch>::constPtrType Message::patch() const
+  { return ResTraits<Patch>::constPtrType(); }
+
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
index 6cd2edd..856f724 100644 (file)
@@ -13,7 +13,6 @@
 #define ZYPP_MESSAGE_H
 
 #include "zypp/ResObject.h"
-#include "zypp/detail/MessageImplIf.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -28,7 +27,6 @@ namespace zypp
   class Message : public ResObject
   {
   public:
-    typedef detail::MessageImplIf           Impl;
     typedef Message                         Self;
     typedef ResTraits<Self>          TraitsType;
     typedef TraitsType::PtrType      Ptr;
@@ -38,18 +36,12 @@ namespace zypp
     /** Get the text of the message */
     TranslatedText text() const;
     /** Patch the message belongs to - if any */
-    Patch::constPtr patch() const;
+    ResTraits<Patch>::constPtrType patch() const;
 
   protected:
-    Message( const NVRAD & nvrad_r );
+    Message( const sat::Solvable & solvable_r );
     /** Dtor */
     virtual ~Message();
-
-  private:
-    /** Access implementation */
-    virtual Impl & pimpl() = 0;
-    /** Access implementation */
-    virtual const Impl & pimpl() const = 0;
   };
 
   /////////////////////////////////////////////////////////////////
index 68fd458..798aa76 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "zypp/NVRA.h"
 #include "zypp/Dependencies.h"
+#include "zypp/Resolvable.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -69,7 +70,7 @@ namespace zypp
 
   /** \relates NVRAD Stream output */
   std::ostream & operator<<( std::ostream & str, const NVRAD & obj );
-  
+
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
index 902818f..bbb6aee 100644 (file)
@@ -58,7 +58,7 @@ namespace zypp
 
   /** Offer a License text and methods to remember confirmation. */
   typedef std::string License;
-  
+
   /** An rpm package group value. Also provide access to a
    * (singleton) tree like group hierarchy which contains
    * all existing groups. No more need to fiddle with YStringTreeItem
@@ -73,15 +73,6 @@ namespace zypp
   /** Vendor. Worth a typedef. Maybe a class unifying the strings. */
   typedef std::string Vendor;
 
-  /** Id used inside ZMD */
-  typedef long ZmdId;
-
-  /** Handle data depending on a locale. Translated strings, maybe
-   other too. */
-  template<class _Val>
-    struct MultiLocale : public std::map<Locale,_Val>
-    {};
-
   //@}
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
index dcef8f7..4a88e5a 100644 (file)
@@ -10,9 +10,6 @@
  *
 */
 #include "zypp/Package.h"
-#include "zypp/base/Exception.h"
-
-using namespace std;
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -25,8 +22,8 @@ namespace zypp
   //   METHOD NAME : Package::Package
   //   METHOD TYPE : Ctor
   //
-  Package::Package( const NVRAD & nvrad_r )
-  : ResObject( TraitsType::kind, nvrad_r )
+  Package::Package( const sat::Solvable & solvable_r )
+  : ResObject( solvable_r )
   {}
 
   ///////////////////////////////////////////////////////////////////
@@ -44,76 +41,76 @@ namespace zypp
   ///////////////////////////////////////////////////////////////////
 
   Changelog Package::changelog() const
-  { return pimpl().changelog(); }
+  { return Changelog(); }
 
   /** */
   std::string Package::buildhost() const
-  { return pimpl().buildhost(); }
+  { return std::string(); }
 
   /** */
   std::string Package::distribution() const
-  { return pimpl().distribution(); }
+  { return std::string(); }
 
   /** */
   Label Package::license() const
-  { return pimpl().license(); }
+  { return Label(); }
 
   /** */
   std::string Package::packager() const
-  { return pimpl().packager(); }
+  { return std::string(); }
 
   /** */
   PackageGroup Package::group() const
-  { return pimpl().group(); }
+  { return PackageGroup(); }
 
   Package::Keywords Package::keywords() const
-  { return pimpl().keywords(); }
+  { return Keywords(); }
 
   /** 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(); }
+  { return std::string(); }
 
   /** */
   std::string Package::os() const
-  { return pimpl().os(); }
+  { return std::string(); }
 
   /** */
   Text Package::prein() const
-  { return pimpl().prein(); }
+  { return Text(); }
 
   /** */
   Text Package::postin() const
-  { return pimpl().postin(); }
+  { return Text(); }
 
   /** */
   Text Package::preun() const
-  { return pimpl().preun(); }
+  { return Text(); }
 
   /** */
   Text Package::postun() const
-  { return pimpl().postun(); }
+  { return Text(); }
 
   /** */
   ByteCount Package::sourcesize() const
-  { return pimpl().sourcesize(); }
+  { return ByteCount(); }
 
   /** */
   std::list<std::string> Package::authors() const
-  { return pimpl().authors(); }
+  { return std::list<std::string>(); }
 
   /** */
   std::list<std::string> Package::filenames() const
-  { return pimpl().filenames(); }
+  { return std::list<std::string>(); }
 
   OnMediaLocation Package::location() const
-  { return pimpl().location(); }
+  { return OnMediaLocation(); }
 
   std::string Package::sourcePkgName() const
-  { return pimpl().sourcePkgName(); }
+  { return std::string(); }
 
   Edition Package::sourcePkgEdition() const
-  { return pimpl().sourcePkgEdition(); }
+  { return Edition(); }
 
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
index 3047c05..1cc1ef3 100644 (file)
@@ -13,7 +13,8 @@
 #define ZYPP_PACKAGE_H
 
 #include "zypp/ResObject.h"
-#include "zypp/detail/PackageImplIf.h"
+#include "zypp/PackageKeyword.h"
+#include "zypp/Changelog.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -30,7 +31,6 @@ namespace zypp
   class Package : public ResObject
   {
   public:
-    typedef detail::PackageImplIf    Impl;
     typedef Package                  Self;
     typedef ResTraits<Self>          TraitsType;
     typedef TraitsType::PtrType      Ptr;
@@ -98,15 +98,9 @@ namespace zypp
     OnMediaLocation location() const;
 
   protected:
-    Package( const NVRAD & nvrad_r );
+    Package( const sat::Solvable & solvable_r );
     /** Dtor */
     virtual ~Package();
-
-  private:
-    /** Access implementation */
-    virtual Impl & pimpl() = 0;
-    /** Access implementation */
-    virtual const Impl & pimpl() const = 0;
   };
   ///////////////////////////////////////////////////////////////////
 
index f3fd3f6..9954773 100644 (file)
@@ -11,8 +11,6 @@
 */
 #include "zypp/Patch.h"
 
-using namespace std;
-
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
@@ -24,8 +22,8 @@ namespace zypp
   //   METHOD NAME : Patch::Patch
   //   METHOD TYPE : Ctor
   //
-  Patch::Patch( const NVRAD & nvrad_r )
-  : ResObject( TraitsType::kind, nvrad_r )
+  Patch::Patch( const sat::Solvable & solvable_r )
+  : ResObject( solvable_r )
   {}
 
   ///////////////////////////////////////////////////////////////////
@@ -43,34 +41,89 @@ namespace zypp
   ///////////////////////////////////////////////////////////////////
 
   std::string Patch::id() const
-  { return pimpl().id(); }
+  { return std::string(); }
 
   Date Patch::timestamp() const
-  { return pimpl().timestamp(); }
+  { return Date(); }
 
   std::string Patch::category() const
-  { return pimpl().category(); }
+  { return std::string(); }
 
   bool Patch::reboot_needed() const
-  { return pimpl().reboot_needed(); }
+  { return false; }
 
   bool Patch::affects_pkg_manager() const
-  { return pimpl().affects_pkg_manager(); }
+  { return false; }
 
   Patch::AtomList Patch::atoms() const
-  { return pimpl().all_atoms(); }
+  {
+#warning Implement PATCH::ATOMS
+#if 0
+      if ( ! _atomlist )
+      {
+        if ( ! hasBackRef() )
+        {
+          // We are not jet connected to the Resolvable that
+          // contains our dependencies.
+          return AtomList();
+        }
+
+        // lazy init
+        _atomlist.reset( new AtomList );
+
+        // Build the list using the repositories resolvables.
+        // Installed Patches (no repository) have this method overloaded.
+        if ( repository() )
+        {
+          const CapSet &   requires( self()->dep( Dep::REQUIRES ) );
+          const ResStore & store( repository().resolvables() );
+
+          for_( req, requires.begin(), requires.end() )
+          {
+            // lookup Patch requirements that refer to an Atom, Script or Message.
+            if ( refersTo<Atom>( *req ) || refersTo<Script>( *req ) || refersTo<Message>( *req ) )
+            {
+              for_( res, store.begin(), store.end() )
+              {
+                // Collect ALL matches in the store.
+                if ( hasMatches( (*res)->dep( Dep::PROVIDES ), (*req) ) )
+                {
+                  _atomlist->push_back( *res );
+                }
+              }
+            }
+          }
+        }
+      }
+      return *_atomlist;
+#endif
+    return AtomList();
+  }
 
   bool Patch::interactive() const
-  { return pimpl().interactive(); }
-
-
-  // DEPRECATED:
-  void Patch::mark_atoms_to_freshen(bool freshen)
-  { ; }
-  bool Patch::any_atom_selected()
-  { return false; }
-  void Patch::select()
-  { ; }
+  {
+#warning Implement PATCH::INTERACTIVE
+#if 0
+      if ( reboot_needed()
+           || ! licenseToConfirm().empty() )
+        {
+          return true;
+        }
+
+      AtomList atoms = all_atoms();
+      for ( AtomList::const_iterator it = atoms.begin(); it != atoms.end(); it++)
+        {
+          if (    isKind<Message>( *it )
+               || ! licenseToConfirm().empty() )
+            {
+              return true;
+            }
+        }
+
+      return false;
+#endif
+    return false;
+  }
 
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
index 655f2b1..fbbe563 100644 (file)
@@ -13,7 +13,6 @@
 #define ZYPP_PATCH_H
 
 #include "zypp/ResObject.h"
-#include "zypp/detail/PatchImplIf.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -32,14 +31,13 @@ namespace zypp
   class Patch : public ResObject
   {
   public:
-    typedef detail::PatchImplIf      Impl;
     typedef Patch                    Self;
     typedef ResTraits<Self>          TraitsType;
     typedef TraitsType::PtrType      Ptr;
     typedef TraitsType::constPtrType constPtr;
 
   public:
-    typedef Impl::AtomList AtomList;
+    typedef std::list<ResObject::Ptr> AtomList;
 
   public:
     /** Patch ID */
@@ -57,22 +55,11 @@ namespace zypp
     /** Is the patch installation interactive? (does it need user input?) */
     bool interactive() const;
 
-
-    void mark_atoms_to_freshen(bool freshen) ZYPP_DEPRECATED;
-    bool any_atom_selected() ZYPP_DEPRECATED;
-    void select() ZYPP_DEPRECATED;
-
   protected:
     /** Ctor */
-    Patch( const NVRAD & nvrad_r );
+    Patch( const sat::Solvable & solvable_r );
     /** Dtor */
     virtual ~Patch();
-
-  private:
-    /** Access implementation */
-    virtual Impl & pimpl() = 0;
-    /** Access implementation */
-    virtual const Impl & pimpl() const = 0;
   };
 
   /////////////////////////////////////////////////////////////////
index 94f4218..110553a 100644 (file)
@@ -13,8 +13,6 @@
 
 #include "zypp/Pattern.h"
 
-using namespace std;
-
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
@@ -26,8 +24,8 @@ namespace zypp
   //   METHOD NAME : Pattern::Pattern
   //   METHOD TYPE : Ctor
   //
-  Pattern::Pattern( const NVRAD & nvrad_r )
-  : ResObject( TraitsType::kind, nvrad_r )
+  Pattern::Pattern( const sat::Solvable & solvable_r )
+  : ResObject( solvable_r )
   {}
 
   ///////////////////////////////////////////////////////////////////
@@ -45,31 +43,59 @@ namespace zypp
   ///////////////////////////////////////////////////////////////////
   /** */
   bool Pattern::isDefault() const
-  { return pimpl().isDefault(); }
+  { return false; }
   /** */
   bool Pattern::userVisible() const
-  { return pimpl().userVisible(); }
+  { return true; }
   /** */
   std::string Pattern::category() const
-  { return pimpl().category().text(); }
+  { return std::string(); }
   /** */
   Pathname Pattern::icon() const
-  { return pimpl().icon(); }
+  { return Pathname(); }
   /** */
   Pathname Pattern::script() const
-  { return pimpl().script(); }
+  { return Pathname(); }
 
   Label Pattern::order() const
-  { return pimpl().order(); }
+  { return Label(); }
 
   std::set<std::string> Pattern::install_packages( const Locale & lang ) const
-  { return pimpl().install_packages(); }
+  {
+#warning implement PATTERN::INSTALL_PACKAGES
+#if 0
+-    static void copycaps( std::set<std::string> & out, const CapSet & in)
+-    {
+-      for (CapSet::const_iterator it = in.begin(); it != in.end(); ++it) {
+-          if (isKind<capability::NamedCap>( *it )
+-              && it->refers() == ResTraits<zypp::Package>::kind )
+-          {
+-              out.insert( it->index() );
+-          }
+-      }
+-    }
+-
+-    std::set<std::string> PatternImplIf::install_packages( const Locale & lang) const
+-    {
+-      std::set<std::string> result;
+-
+-      copycaps( result, self()->dep( Dep::REQUIRES ) );
+-      copycaps( result, self()->dep( Dep::RECOMMENDS) );
+-      copycaps( result, self()->dep( Dep::SUGGESTS) );
+-
+-      return result;
+-    }
+-
+-
+#endif
+  return std::set<std::string>();
+  }
 
-  const CapSet & Pattern::includes() const
-  { return pimpl().includes(); }
+  const Capabilities & Pattern::includes() const
+  { return Capabilities(); }
 
-  const CapSet & Pattern::extends() const
-  { return pimpl().extends(); }
+  const Capabilities & Pattern::extends() const
+  { return Capabilities(); }
 
 
   /////////////////////////////////////////////////////////////////
index d1a0deb..2564629 100644 (file)
@@ -13,7 +13,6 @@
 #define ZYPP_PATTERN_H
 
 #include "zypp/ResObject.h"
-#include "zypp/detail/PatternImplIf.h"
 #include "zypp/Pathname.h"
 
 ///////////////////////////////////////////////////////////////////
@@ -31,8 +30,7 @@ namespace zypp
   class Pattern : public ResObject
   {
   public:
-    typedef detail::PatternImplIf  Impl;
-    typedef Pattern                Self;
+    typedef Pattern                  Self;
     typedef ResTraits<Self>          TraitsType;
     typedef TraitsType::PtrType      Ptr;
     typedef TraitsType::constPtrType constPtr;
@@ -55,21 +53,15 @@ namespace zypp
     std::set<std::string> install_packages( const Locale & lang = Locale("") ) const ZYPP_DEPRECATED;
 
     /** Ui hint. */
-    const CapSet & includes() const;
+    const Capabilities & includes() const;
     /** Ui hint. */
-    const CapSet & extends() const;
+    const Capabilities & extends() const;
 
   protected:
     /** Ctor */
-    Pattern( const NVRAD & nvrad_r );
+    Pattern( const sat::Solvable & solvable_r );
     /** Dtor */
     virtual ~Pattern();
-
-  private:
-    /** Access implementation */
-    virtual Impl & pimpl() = 0;
-    /** Access implementation */
-    virtual const Impl & pimpl() const = 0;
   };
   ///////////////////////////////////////////////////////////////////
 
index addc38d..75ff2b4 100644 (file)
@@ -14,7 +14,6 @@
 
 #include "zypp/PoolItem.h"
 #include "zypp/Package.h"
-#include "zypp/SystemResObject.h"
 #include "zypp/VendorAttr.h"
 
 #include "zypp/sat/Solvable.h"
@@ -117,13 +116,6 @@ namespace zypp
 
   inline bool PoolItem_Ref::Impl::autoprotect() const
   {
-    // always lock System resolvable
-    if ( isKind<SystemResObject>( _resolvable ) )
-      {
-        _status.setLock( true, zypp::ResStatus::USER );
-        return true;
-      }
-
     if ( _status.isInstalled()
          && isKind<Package>( _resolvable )
          && VendorAttr::instance().autoProtect( _resolvable->vendor() ) )
index aaf6675..df98da5 100644 (file)
@@ -9,12 +9,8 @@
 /** \file zypp/Product.cc
  *
 */
-#include <iostream>
-
 #include "zypp/Product.h"
 
-using namespace std;
-
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
@@ -26,8 +22,8 @@ namespace zypp
   //   METHOD NAME : Product::Product
   //   METHOD TYPE : Ctor
   //
-  Product::Product( const NVRAD & nvrad_r )
-  : ResObject( TraitsType::kind, nvrad_r )
+  Product::Product( const sat::Solvable & solvable_r )
+  : ResObject( solvable_r )
   {}
 
   ///////////////////////////////////////////////////////////////////
@@ -45,39 +41,39 @@ namespace zypp
   ///////////////////////////////////////////////////////////////////
 
   std::string Product::type() const
-  { return pimpl().type(); }
+  { return std::string(); }
 
   Label Product::vendor() const
-  { return pimpl().vendor(); }
+  { return Label(); }
 
   Url Product::releaseNotesUrl() const
-  { return pimpl().releaseNotesUrl(); }
+  { return Url(); }
 
   std::list<Url> Product::updateUrls() const
-  { return pimpl().updateUrls(); }
+  { return std::list<Url>(); }
 
   std::list<Url> Product::extraUrls() const
-  { return pimpl().extraUrls(); }
+  { return std::list<Url>(); }
 
   std::list<Url> Product::optionalUrls() const
-  { return pimpl().optionalUrls(); }
+  { return std::list<Url>(); }
 
   std::list<std::string> Product::flags() const
-  { return pimpl().flags(); }
+  { return std::list<std::string>(); }
 
   /** */
   Label Product::shortName() const
-  { return pimpl().shortName().text(); }
+  { return Label(); }
 
   /** */
   Label Product::longName() const
   { return summary(); }
 
   std::string Product::distributionName() const
-  { return pimpl().distributionName(); }
+  { return std::string(); }
 
   Edition Product::distributionEdition() const
-  { return pimpl().distributionEdition(); }
+  { return Edition(); }
 
 
   /////////////////////////////////////////////////////////////////
index 54c9748..a7e9daa 100644 (file)
@@ -16,7 +16,6 @@
 #include <string>
 
 #include "zypp/ResObject.h"
-#include "zypp/detail/ProductImplIf.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -33,7 +32,6 @@ namespace zypp
   class Product : public ResObject
   {
   public:
-    typedef detail::ProductImplIf    Impl;
     typedef Product                  Self;
     typedef ResTraits<Self>          TraitsType;
     typedef TraitsType::PtrType      Ptr;
@@ -42,9 +40,6 @@ namespace zypp
   public:
     /** Get the product type (base, add-on) */
     std::string type() const;
-    /** \deprecated Use \ref type. */
-    std::string category() const ZYPP_DEPRECATED
-    { return type(); }
 
     /** Get the vendor of the product */
     Label vendor() const;
@@ -88,15 +83,9 @@ namespace zypp
 
   protected:
     /** Ctor */
-    Product( const NVRAD & nvrad_r );
+    Product( const sat::Solvable & solvable_r );
     /** Dtor */
     virtual ~Product();
-
-  private:
-    /** Access implementation */
-    virtual Impl & pimpl() = 0;
-    /** Access implementation */
-    virtual const Impl & pimpl() const = 0;
   };
 
   /////////////////////////////////////////////////////////////////
index 9866780..a5ca5f8 100644 (file)
@@ -102,10 +102,17 @@ namespace zypp
     : _op( for_use_in_switch(bits_r & ANY_e) )
     {}
 
+    /** Test whether \a bits_r is a valid \ref Rel (no extra bits set). */
+    static bool isRel( unsigned bits_r )
+    { return (bits_r & ANY_e) == bits_r; }
+
     /** String representation of relational operator.
      * \return "==", "!=", "<", "<=", ">", ">=", "ANY" or "NONE"
     */
     const std::string & asString() const;
+    /** \overload */
+    const char * c_str() const
+    { return asString().c_str(); }
 
     /** Enumarator provided for use in \c switch statement.
      * The sole reason for providing enum \ref for_use_in_switch is,
index e3031f3..77e1cb5 100644 (file)
@@ -28,7 +28,7 @@
 #include "zypp/RepoManager.h"
 
 #include "zypp/cache/SolvStore.h"
-#include "zypp/repo/cached/RepoImpl.h"
+//#include "zypp/repo/cached/RepoImpl.h"
 #include "zypp/media/MediaManager.h"
 #include "zypp/MediaSetAccess.h"
 
@@ -123,17 +123,17 @@ namespace zypp
 
     if ( !store.isCached(info.alias()) )
       return;
-   
+
     MIL << info.alias() << " cleaning cache..." << endl;
     data::RecordId id = store.lookupRepository(info.alias());
-    
+
     CombinedProgressData subprogrcv(progress);
-    
+
     store.cleanRepository(id, subprogrcv);
   }
-  
+
   ////////////////////////////////////////////////////////////////////////////
-  
+
   /**
    * Reads RepoInfo's from a repo file.
    *
@@ -319,7 +319,7 @@ namespace zypp
   }
 
   ////////////////////////////////////////////////////////////////////////////
-      
+
   RepoStatus RepoManager::metadataStatus( const RepoInfo &info ) const
   {
     Pathname rawpath = rawcache_path_for_repoinfo( _pimpl->options, info );
@@ -528,7 +528,7 @@ namespace zypp
       ERR << "refresh check failed for " << url << endl;
       ZYPP_RETHROW(e);
     }
-    
+
     return true; // default
   }
 
@@ -635,7 +635,7 @@ namespace zypp
       {
         ZYPP_CAUGHT(e);
         ERR << "Trying another url..." << endl;
-        
+
         // remember the exception caught for the *first URL*
         // if all other URLs fail, the rexception will be thrown with the
         // cause of the problem of the first URL remembered
@@ -694,7 +694,7 @@ namespace zypp
           MIL << info.alias() << " cache rebuild is forced" << endl;
         }
       }
-      
+
       needs_cleaning = true;
     }
 
@@ -732,7 +732,7 @@ namespace zypp
       break;
     }
 
-    
+
     switch ( repokind.toEnum() )
     {
       case RepoType::RPMMD_e :
@@ -813,7 +813,7 @@ namespace zypp
         return repo::RepoType::RPMMD;
       if ( access.doesFileExist("/content") )
         return repo::RepoType::YAST2;
-  
+
       // if it is a local url of type dir
       if ( (! media::MediaManager::downloads(url)) && ( url.getScheme() == "dir" ) )
       {
@@ -842,9 +842,9 @@ namespace zypp
 
     return repo::RepoType::NONE;
   }
-    
+
   ////////////////////////////////////////////////////////////////////////////
-  
+
   void RepoManager::cleanCache( const RepoInfo &info,
                                 const ProgressData::ReceiverFnc & progressrcv )
   {
@@ -911,7 +911,7 @@ namespace zypp
     progress.sendTo(ProgressReportAdaptor( progressrcv, report ));
     //progress.sendTo( progressrcv );
     progress.name(str::form(_("Reading repository '%s' cache"), info.name().c_str()));
-    
+
     //_pimpl->options.repoCachePath
     if ( ! isCached( info ) )
       ZYPP_THROW(RepoNotCachedException());
@@ -921,24 +921,24 @@ namespace zypp
     //sat::Pool satpool( sat::Pool::instance() );
 
     //Pathname name = _pimpl->options.repoCachePath + Pathname(info.alias()).extend(".solv");
-      
+
     try
     {
       //satpool.addRepoSolv(name);
     }
     catch ( const Exception &e )
     {
-        
+
     }
-    
+
     CombinedProgressData subprogrcv(progress);
-    
+
 //     repo::cached::RepoOptions opts( info, _pimpl->options.repoCachePath, id );
 //     opts.readingResolvablesProgress = subprogrcv;
 //     //opts.repo = repo;
 //     repo::cached::RepoImpl::Ptr repoimpl =
 //         new repo::cached::RepoImpl( opts );
-// 
+//
 //     repoimpl->resolvables();
     // read the resolvables from cache
     return Repository::noRepository;
@@ -1120,7 +1120,7 @@ namespace zypp
     callback::SendReport<ProgressReport> report;
     progress.sendTo( ProgressReportAdaptor( progressrcv, report ) );
     progress.name(str::form(_("Removing repository '%s'"), info.name().c_str()));
-    
+
     MIL << "Going to delete repo " << info.alias() << endl;
 
     std::list<RepoInfo> repos = knownRepositories();
index 9a18cb0..25aa806 100644 (file)
@@ -11,6 +11,8 @@
 */
 #include <iostream>
 
+#include "zypp/base/String.h"
+
 #include "zypp/ResKind.h"
 #include "zypp/ResTraits.h"
 
@@ -30,7 +32,6 @@ namespace zypp
   const ResKind ResKind::script    ( "script" );
   const ResKind ResKind::selection ( "selection" );
   const ResKind ResKind::srcpackage( "srcpackage" );
-  const ResKind ResKind::system    ( "system" );
 
   template<>
     const ResKind ResTraits<Atom>      ::kind( ResKind::atom );
@@ -52,8 +53,13 @@ namespace zypp
     const ResKind ResTraits<Selection> ::kind( ResKind::selection );
   template<>
     const ResKind ResTraits<SrcPackage>::kind( ResKind::srcpackage );
-  template<>
-    const ResKind ResTraits<SystemResObject>::kind( ResKind::system );
+
+  std::string ResKind::satIdent( const ResKind & refers_r, const std::string & name_r )
+  {
+    if ( ! refers_r || refers_r == package || refers_r == srcpackage )
+      return name_r;
+    return str::form( "%s:%s", refers_r.c_str(), name_r.c_str() );
+  }
 
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
index 2033714..3aa078f 100644 (file)
@@ -49,7 +49,6 @@ namespace zypp
       static const ResKind script;
       static const ResKind selection;
       static const ResKind srcpackage;
-      static const ResKind system;
       //@}
 
     public:
@@ -62,6 +61,17 @@ namespace zypp
       explicit ResKind( const std::string & str_r ) : _str( str::toLower(str_r) ) {}
       explicit ResKind( const char * cstr_r )       : _str( str::toLower(cstr_r) ) {}
 
+    public:
+      /** Return the satsolver identifier for name.
+       * Libsatsolver combines the objects kind and name in a single
+       * identifier \c "pattern:kde_multimedia", \b except for packages
+       * and source packes. They are not prefixed by any kind string.
+      */
+      static std::string satIdent( const ResKind & refers_r, const std::string & name_r );
+      /** \overload */
+      std::string satIdent( const std::string & name_r ) const
+      { return satIdent( *this, name_r ); }
+
     private:
       static int _doCompare( const char * lhs,  const char * rhs )
       {
index b906b62..fe9185d 100644 (file)
@@ -11,9 +11,6 @@
 */
 #include "zypp/ResObject.h"
 #include "zypp/Repository.h"
-#include "zypp/detail/ResObjectImplIf.h"
-
-using namespace std;
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -26,9 +23,8 @@ namespace zypp
   //   METHOD NAME : ResObject::ResObject
   //   METHOD TYPE : Ctor
   //
-  ResObject::ResObject( const Kind & kind_r,
-                        const NVRAD & nvrad_r )
-  : Resolvable( kind_r, nvrad_r )
+  ResObject::ResObject( const sat::Solvable & solvable_r )
+  : Resolvable( solvable_r )
   {}
 
   ///////////////////////////////////////////////////////////////////
@@ -57,46 +53,49 @@ namespace zypp
   ///////////////////////////////////////////////////////////////////
 
   Text ResObject::summary() const
-  { return pimpl().summary().text(); }
+  { return Text(); }
 
   Text ResObject::description() const
-  { return pimpl().description().text(); }
+  { return Text(); }
 
   Text ResObject::insnotify() const
-  { return pimpl().insnotify().text(); }
+  { return Text(); }
 
   Text ResObject::delnotify() const
-  { return pimpl().delnotify().text(); }
+  { return Text(); }
 
   License ResObject::licenseToConfirm() const
-  { return pimpl().licenseToConfirm().text(); }
+  { return License(); }
 
   Vendor ResObject::vendor() const
-  { return pimpl().vendor(); }
+  { return Vendor(); }
 
   ByteCount ResObject::size() const
-  { return pimpl().size(); }
+  { return ByteCount(); }
 
   Repository ResObject::repository() const
-  { return pimpl().repository(); }
+  { return Repository(); }
 
   ByteCount ResObject::downloadSize() const
-  { return pimpl().downloadSize(); }
+  { return ByteCount(); }
 
   unsigned ResObject::mediaNr() const
-  { return pimpl().mediaNr(); }
+  { return 0; }
 
   bool ResObject::installOnly() const
-  { return pimpl().installOnly(); }
+  { return false; }
 
   Date ResObject::buildtime() const
-  { return pimpl().buildtime(); }
+  { return Date(); }
 
   Date ResObject::installtime() const
-  { return pimpl().installtime(); }
+  { return Date(); }
 
   const DiskUsage & ResObject::diskusage() const
-  { return pimpl().diskusage(); }
+  {
+    static DiskUsage _du;
+    return _du;
+  }
 
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
index 5ee8f21..e2b5bd2 100644 (file)
 
 #include "zypp/base/Deprecated.h"
 
-#include "zypp/detail/ResObjectImplIf.h"
 #include "zypp/Resolvable.h"
-#include "zypp/TranslatedText.h"
 #include "zypp/NeedAType.h"
 #include "zypp/Date.h"
+#include "zypp/ByteCount.h"
+#include "zypp/DiskUsage.h"
+#include "zypp/Repository.h"
+#include "zypp/TranslatedText.h"
 #include "zypp/OnMediaLocation.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
-  namespace detail {
-    class ImplConnect;
-    class ResObjectImplIf;
-  }
-
-  class Repository;
-  class ByteCount;
 
   ///////////////////////////////////////////////////////////////////
   //
@@ -40,11 +35,12 @@ namespace zypp
    * Interface base for resolvable objects (common data).
    * That is, all data not needed for solving, but common
    * across all Resolvable kinds.
+   *
+   * \see \ref makeResObject for how to construct ResObjects.
   */
   class ResObject : public Resolvable
   {
   public:
-    typedef detail::ResObjectImplIf  Impl;
     typedef ResObject                Self;
     typedef ResTraits<Self>          TraitsType;
     typedef TraitsType::PtrType      Ptr;
@@ -143,23 +139,34 @@ namespace zypp
 
   protected:
     /** Ctor */
-    ResObject( const Kind & kind_r,
-               const NVRAD & nvrad_r );
+    ResObject( const sat::Solvable & solvable_r );
     /** Dtor */
     virtual ~ResObject();
-
     /** Helper for stream output */
     virtual std::ostream & dumpOn( std::ostream & str ) const;
-
-  private:
-    friend class detail::ImplConnect;
-    /** Access implementation */
-    virtual Impl & pimpl() = 0;
-    /** Access implementation */
-    virtual const Impl & pimpl() const = 0;
   };
   ///////////////////////////////////////////////////////////////////
 
+  /** Create \ref ResObject from \ref sat::Solvable.
+   *
+   * This function creates the apropriate kind of ResObject
+   * depending on the sat::Solvables kind, and returns a smart
+   * pointer to it.
+   *
+   * If the sat::Solvables kind is not convertible, a NULL
+   * pointer is returned.
+   *
+   * \code
+   * sat::Solvable s;
+   * ResObject::Ptr p( makeResObject( s ) );
+   * if ( p )
+   * {
+   *
+   * }
+   * \endcode
+  */
+  inline ResObject::Ptr makeResObject( const sat::Solvable & solvable_r ) { return 0; }
+
   /** Convert ResObject::Ptr into Ptr of a certain Kind.
    * \return \c NULL iff \a p is \c NULL or points to a Resolvable
    * not of the specified Kind.
index aab4fca..c6c0523 100644 (file)
@@ -64,12 +64,6 @@ namespace zypp
   //
   ///////////////////////////////////////////////////////////////////
 
-  bool ResPool::satSynced() const
-  {  return _pimpl->satSynced(); }
-
-  void ResPool::satSync() const
-  {  return _pimpl->satSync(); }
-
   bool ResPool::empty() const
   { return _pimpl->empty(); }
 
@@ -106,19 +100,19 @@ namespace zypp
   ResPool::repository_iterator ResPool::knownRepositoriesEnd() const
   { return _pimpl->knownRepositories().end(); }
 
-  void ResPool::setAdditionalRequire( const AdditionalCapSet & capset ) const
+  void ResPool::setAdditionalRequire( const AdditionalCapabilities & capset ) const
   { _pimpl->setAdditionalRequire( capset ); }
-  ResPool::AdditionalCapSet & ResPool::additionalRequire() const
+  ResPool::AdditionalCapabilities & ResPool::additionalRequire() const
   { return _pimpl->additionalRequire(); }
 
-  void ResPool::setAdditionalConflict( const AdditionalCapSet & capset ) const
+  void ResPool::setAdditionalConflict( const AdditionalCapabilities & capset ) const
   { _pimpl->setAdditionalConflict( capset ); }
-  ResPool::AdditionalCapSet & ResPool::additionaConflict() const
+  ResPool::AdditionalCapabilities & ResPool::additionaConflict() const
   { return _pimpl->additionaConflict(); }
 
-  void ResPool::setAdditionalProvide( const AdditionalCapSet & capset ) const
+  void ResPool::setAdditionalProvide( const AdditionalCapabilities & capset ) const
   { _pimpl->setAdditionalProvide( capset ); }
-  ResPool::AdditionalCapSet & ResPool::additionaProvide() const
+  ResPool::AdditionalCapabilities & ResPool::additionaProvide() const
   { return _pimpl->additionaProvide(); }
 
   const SerialNumber & ResPool::serial() const
index aebe052..c6846d9 100644 (file)
@@ -54,7 +54,7 @@ namespace zypp
     typedef pool::PoolTraits::const_iterator            const_iterator;
     typedef pool::PoolTraits::byName_iterator            byName_iterator;
     typedef pool::PoolTraits::byCapabilityIndex_iterator byCapabilityIndex_iterator;
-    typedef pool::PoolTraits::AdditionalCapSet          AdditionalCapSet;
+    typedef pool::PoolTraits::AdditionalCapabilities            AdditionalCapabilities;
     typedef pool::PoolTraits::repository_iterator        repository_iterator;
 
   public:
@@ -70,12 +70,6 @@ namespace zypp
     */
     const SerialNumber & serial() const;
 
-    /** Wheter in sync with sat-pool. */
-    bool satSynced() const;
-
-    /** Sync with sat-pool. */
-    void satSync() const;
-
     /** Return the corresponding \ref PoolItem.
      * Pool and sat pool should be in sync. Returns an empty
      * \ref PoolItem if there is no corresponding \ref PoolItem.
@@ -162,54 +156,54 @@ namespace zypp
     *  "foo1" which has a greater version than 1.0:
     *
     *  \code
-    *  CapSet capset;
+    *  Capabilities capset;
     *  capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo"));
     *  capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo1 > 1.0"));
     *
     *  // The user is setting this capablility
-    *  ResPool::AdditionalCapSet aCapSet;
-    *  aCapSet[ResStatus::USER] = capset;
+    *  ResPool::AdditionalCapabilities aCapabilities;
+    *  aCapabilities[ResStatus::USER] = capset;
     *
-    *  setAdditionalRequire( aCapSet );
+    *  setAdditionalRequire( aCapabilities );
     *  \endcode
     */
-   void setAdditionalRequire( const AdditionalCapSet & capset ) const;
-   AdditionalCapSet & additionalRequire() const;
+   void setAdditionalRequire( const AdditionalCapabilities & capset ) const;
+   AdditionalCapabilities & additionalRequire() const;
 
    /**
     *  Handling additional conflicts. E.G. do not install anything which provides "foo":
     *
     *  \code75
-    *  CapSet capset;
+    *  Capabilities capset;
     *  capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo"));
     *
     *  // The user is setting this capablility
-    *  ResPool::AdditionalCapSet aCapSet;
-    *  aCapSet[ResStatus::USER] = capset;
+    *  ResPool::AdditionalCapabilities aCapabilities;
+    *  aCapabilities[ResStatus::USER] = capset;
     *
-    *  setAdditionalConflict( aCapSet );
+    *  setAdditionalConflict( aCapabilities );
     *  \endcode
     */
-   void setAdditionalConflict( const AdditionalCapSet & capset ) const;
-   AdditionalCapSet & additionaConflict() const;
+   void setAdditionalConflict( const AdditionalCapabilities & capset ) const;
+   AdditionalCapabilities & additionaConflict() const;
 
    /**
     *  Handling additional provides. This is used for ignoring a requirement.
     *  e.G. Do ignore the requirement "foo":
     *
     *  \code
-    *  CapSet capset;
+    *  Capabilities capset;
     *  capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo"));
     *
     *  // The user is setting this capablility
-    *  ResPool::AdditionalCapSet aCapSet;
-    *  aCapSet[ResStatus::USER] = capset;
+    *  ResPool::AdditionalCapabilities aCapabilities;
+    *  aCapabilities[ResStatus::USER] = capset;
     *
-    *  setAdditionalProvide( aCapSet );
+    *  setAdditionalProvide( aCapabilities );
     *  \endcode
     */
-   void setAdditionalProvide( const AdditionalCapSet & capset ) const;
-   AdditionalCapSet & additionaProvide() const;
+   void setAdditionalProvide( const AdditionalCapabilities & capset ) const;
+   AdditionalCapabilities & additionaProvide() const;
 
   private:
     /** */
index 438e646..f08e4c0 100644 (file)
@@ -60,8 +60,6 @@ namespace zypp
   DEFINE_PTR_TYPE( Script );
   DEFINE_PTR_TYPE( Message );
   DEFINE_PTR_TYPE( Language );
-
-  DEFINE_PTR_TYPE( SystemResObject );
   //@}
 
   /** ResTraits. Defines common types and the ResKind value. */
index 5bde091..52a2c6b 100644 (file)
@@ -9,15 +9,9 @@
 /** \file zypp/Resolvable.cc
  *
 */
-#include <iostream>
-
 #include "zypp/Resolvable.h"
-#include "zypp/detail/ResolvableImpl.h"
-
 #include "zypp/ResObject.h"
 
-using namespace std;
-
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
@@ -29,9 +23,8 @@ namespace zypp
   //   METHOD NAME : Resolvable::Resolvable
   //   METHOD TYPE : Ctor
   //
-  Resolvable::Resolvable( const Kind & kind_r,
-                          const NVRAD & nvrad_r )
-  : _pimpl( new Impl( kind_r, nvrad_r ) )
+  Resolvable::Resolvable( const sat::Solvable & solvable_r )
+  : sat::Solvable( solvable_r )
   {}
 
   ///////////////////////////////////////////////////////////////////
@@ -42,40 +35,6 @@ namespace zypp
   Resolvable::~Resolvable()
   {}
 
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   Resolvable interface forwarded to implementation
-  //
-  ///////////////////////////////////////////////////////////////////
-
-  std::ostream & Resolvable::dumpOn( std::ostream & str ) const
-  { return _pimpl->dumpOn( str ); }
-
-  const Resolvable::Kind & Resolvable::kind() const
-  { return _pimpl->kind(); }
-
-  const std::string & Resolvable::name() const
-  { return _pimpl->name(); }
-
-  const Edition & Resolvable::edition() const
-  { return _pimpl->edition(); }
-
-  const Arch & Resolvable::arch() const
-  { return _pimpl->arch(); }
-
-  const CapSet & Resolvable::dep( Dep which_r ) const
-  { return _pimpl->deps()[which_r]; }
-
-  const Dependencies & Resolvable::deps() const
-  { return _pimpl->deps(); }
-
-
-  void Resolvable::injectProvides( const Capability & cap_r )
-  { return _pimpl->injectProvides( cap_r ); }
-
-  void Resolvable::injectRequires( const Capability & cap_r )
-  { return _pimpl->injectRequires( cap_r ); }
-
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
index 483e501..258ce22 100644 (file)
 #include <iosfwd>
 #include <string>
 
+#include "zypp/base/Deprecated.h"
+
 #include "zypp/base/ReferenceCounted.h"
 #include "zypp/base/NonCopyable.h"
 #include "zypp/base/PtrTypes.h"
-#include "zypp/ResTraits.h"
 
-#include "zypp/Edition.h"
-#include "zypp/Arch.h"
-#include "zypp/CapSetFwd.h"
-#include "zypp/Dep.h"
+#include "zypp/sat/Solvable.h"
+
+#include "zypp/Dependencies.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
 
   struct NVRAD;
-  class Dependencies;
 
   ///////////////////////////////////////////////////////////////////
   //
   //   CLASS NAME : Resolvable
   //
   /** Interface base for resolvable objects (identification and dependencies).
-   * \invariant \c provides <tt>name = edition</tt>
-   * \invariant \c prerequires is a subset of \c requires
+   * \todo Merge with ResObject
   */
-  class Resolvable : public base::ReferenceCounted, private base::NonCopyable
+  class Resolvable : protected sat::Solvable,
+                     public base::ReferenceCounted, private base::NonCopyable
   {
+    friend std::ostream & operator<<( std::ostream & str, const Resolvable & obj );
+
   public:
     typedef Resolvable               Self;
     typedef ResTraits<Self>          TraitsType;
@@ -50,45 +51,59 @@ namespace zypp
     typedef TraitsType::constPtrType constPtr;
 
   public:
-    /**  */
-    const Kind & kind() const;
-    /**  */
-    const std::string & name() const;
-    /**  */
-    const Edition & edition() const;
-    /**  */
-    const Arch & arch() const;
+    /** Whether this represents a valid- or no-solvable. */
+    using sat::Solvable::operator bool_type;
+
+    using sat::Solvable::ident;
+
+    using sat::Solvable::kind;
+    using sat::Solvable::name;
+    using sat::Solvable::edition;
+    using sat::Solvable::arch;
 
     /** \name Dependencies. */
     //@{
     /** Select by Dep. */
-    const CapSet & dep( Dep which_r ) const;
-    /** All dependencies. */
-    const Dependencies & deps() const;
+    Capabilities dep( Dep which_r ) const
+    { return operator[]( which_r ); }
+    using sat::Solvable::operator[];
+    using sat::Solvable::provides;
+    using sat::Solvable::requires;
+    using sat::Solvable::conflicts;
+    using sat::Solvable::obsoletes;
+    using sat::Solvable::recommends;
+    using sat::Solvable::suggests;
+    using sat::Solvable::freshens;
+    using sat::Solvable::enhances;
+    using sat::Solvable::supplements;
+    using sat::Solvable::prerequires;
     //@}
 
-    /** \name Deprecated. */
-    //@{
-    void injectProvides( const Capability & cap_r );
-    void injectRequires( const Capability & cap_r );
-    //@}
+    ZYPP_DEPRECATED const Dependencies & deps() const
+    { static Dependencies _x; return _x; }
+    ZYPP_DEPRECATED void injectProvides( const Capability & cap_r ) {}
+    ZYPP_DEPRECATED void injectRequires( const Capability & cap_r ) {}
+
+  public:
+    const sat::Solvable & satSolvable() const { return *this; }
 
   protected:
     /** Ctor */
-    Resolvable( const Kind & kind_r,
-                const NVRAD & nvrad_r );
+    Resolvable( const sat::Solvable & solvable_r );
     /** Dtor */
     virtual ~Resolvable();
     /** Helper for stream output */
     virtual std::ostream & dumpOn( std::ostream & str ) const;
+ };
+ ///////////////////////////////////////////////////////////////////
 
-  private:
-    /** Implementation */
-    struct Impl;
-    /** Pointer to implementation */
-    RW_pointer<Impl> _pimpl;
-  };
-  ///////////////////////////////////////////////////////////////////
+ /** \relates Resolvable Stream output */
+ inline std::ostream & operator<<( std::ostream & str, const Resolvable & obj )
+ { return obj.dumpOn( str ); }
+
+ /** \relates Resolvable More verbose stream output including dependencies */
+ inline std::ostream & dumpOn( std::ostream & str, const Resolvable & obj )
+ { return dumpOn( str, obj.satSolvable() ); }
 
   /** Test whether a Resolvable::Ptr is of a certain Kind.
    * \return \c Ture iff \a p is not \c NULL and points to a Resolvable
index 9f17558..5105732 100644 (file)
@@ -108,9 +108,9 @@ namespace zypp
   { _pimpl->removeExtraCapability( capability ); }
   void Resolver::removeConflict (const Capability & capability)
   { _pimpl->removeExtraConflict( capability ); }
-  const CapSet Resolver::getRequire ()
+  const Capabilities Resolver::getRequire ()
   { return _pimpl->extraCapability();}
-  const CapSet Resolver::getConflict ()
+  const Capabilities Resolver::getConflict ()
   { return _pimpl->extraConflicts();}      
   std::list<PoolItem_Ref> Resolver::problematicUpdateItems( void ) const
   { return _pimpl->problematicUpdateItems(); }
index ee50712..be0b39d 100644 (file)
@@ -269,13 +269,13 @@ namespace zypp
      * Get all the additional requirements set by \ref addRequire(Capability).
      *
      */      
-    const CapSet getRequire ();
+    const Capabilities getRequire ();
       
     /**
      * Get all the additional conflicts set by \ref addConflict(Capability).
      *
      */            
-    const CapSet getConflict();
+    const Capabilities getConflict();
 
     /**
      * Setting solver timeout
index de771e9..4f463ec 100644 (file)
@@ -11,8 +11,6 @@
 */
 #include "zypp/Script.h"
 
-using namespace std;
-
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
@@ -24,8 +22,8 @@ namespace zypp
   //   METHOD NAME : Script::Script
   //   METHOD TYPE : Ctor
   //
-  Script::Script( const NVRAD & nvrad_r )
-  : ResObject( TraitsType::kind, nvrad_r )
+  Script::Script( const sat::Solvable & solvable_r )
+  : ResObject( solvable_r )
   {}
 
   ///////////////////////////////////////////////////////////////////
@@ -43,22 +41,22 @@ namespace zypp
   ///////////////////////////////////////////////////////////////////
 
   bool Script::doAvailable() const
-  { return pimpl().doAvailable(); }
+  { return false; }
 
   std::string Script::doScriptInlined() const
-  { return pimpl().doScriptInlined(); }
+  { return std::string(); }
 
   OnMediaLocation Script::doScriptLocation() const
-  { return pimpl().doScriptLocation(); }
+  { return OnMediaLocation(); }
 
   bool Script::undoAvailable() const
-  { return pimpl().undoAvailable(); }
+  { return false; }
 
   std::string Script::undoScriptInlined() const
-  { return pimpl().undoScriptInlined(); }
+  { return std::string(); }
 
   OnMediaLocation Script::undoScriptLocation() const
-  { return pimpl().undoScriptLocation(); }
+  { return OnMediaLocation(); }
 
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
index 6610440..ff2e168 100644 (file)
@@ -13,7 +13,6 @@
 #define ZYPP_SCRIPT_H
 
 #include "zypp/ResObject.h"
-#include "zypp/detail/ScriptImplIf.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -28,7 +27,6 @@ namespace zypp
   class Script : public ResObject
   {
   public:
-    typedef detail::ScriptImplIf     Impl;
     typedef Script                   Self;
     typedef ResTraits<Self>          TraitsType;
     typedef TraitsType::PtrType      Ptr;
@@ -63,15 +61,9 @@ namespace zypp
 
   protected:
     /** Ctor */
-    Script( const NVRAD & nvrad_r );
+    Script( const sat::Solvable & solvable_r );
     /** Dtor */
     virtual ~Script();
-
-  private:
-    /** Access implementation */
-    virtual Impl & pimpl() = 0;
-    /** Access implementation */
-    virtual const Impl & pimpl() const = 0;
   };
 
   /////////////////////////////////////////////////////////////////
index 6e0e950..039c3fc 100644 (file)
@@ -9,13 +9,9 @@
 /** \file      zypp/Selection.cc
  *
 */
-#include <iostream>
-
 #include "zypp/Selection.h"
 #include "zypp/TranslatedText.h"
 
-using namespace std;
-
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
@@ -27,8 +23,8 @@ namespace zypp
   //   METHOD NAME : Selection::Selection
   //   METHOD TYPE : Ctor
   //
-  Selection::Selection( const NVRAD & nvrad_r )
-  : ResObject( TraitsType::kind, nvrad_r )
+  Selection::Selection( const sat::Solvable & solvable_r )
+  : ResObject( solvable_r )
   {}
 
   ///////////////////////////////////////////////////////////////////
@@ -47,26 +43,18 @@ namespace zypp
 
     /** selection category */
     Label Selection::category() const
-    {
-       return pimpl().category();
-    }
+    { return Label(); }
 
     /** selection visibility (for hidden selections) */
     bool Selection::visible() const
-    {
-       return pimpl().visible();
-    }
+    { return true; }
 
     /** selection presentation order */
     Label Selection::order() const
-    {
-       return pimpl().order();
-    }
+    { return Label(); }
 
     const std::set<std::string> Selection::install_packages( const Locale & lang) const
-    {
-      return pimpl().install_packages();
-    }
+    { return std::set<std::string>(); }
 
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
index 787d1b7..6384449 100644 (file)
@@ -13,7 +13,6 @@
 #define ZYPP_SELECTION_H
 
 #include "zypp/ResObject.h"
-#include "zypp/detail/SelectionImplIf.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -30,7 +29,6 @@ namespace zypp
   class Selection : public ResObject
   {
   public:
-    typedef detail::SelectionImplIf  Impl;
     typedef Selection                Self;
     typedef ResTraits<Self>          TraitsType;
     typedef TraitsType::PtrType      Ptr;
@@ -52,15 +50,9 @@ namespace zypp
 
   protected:
     /** Ctor */
-    Selection( const NVRAD & nvrad_r );
+    Selection( const sat::Solvable & solvable_r );
     /** Dtor */
     virtual ~Selection();
-
-  private:
-    /** Access implementation */
-    virtual Impl & pimpl() = 0;
-    /** Access implementation */
-    virtual const Impl & pimpl() const = 0;
   };
   ///////////////////////////////////////////////////////////////////
 
index 9f270a1..79fff6b 100644 (file)
@@ -10,9 +10,6 @@
  *
 */
 #include "zypp/SrcPackage.h"
-#include "zypp/base/Exception.h"
-
-using namespace std;
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -25,8 +22,8 @@ namespace zypp
   //   METHOD NAME : SrcPackage::SrcPackage
   //   METHOD TYPE : Ctor
   //
-  SrcPackage::SrcPackage( const NVRAD & nvrad_r )
-  : ResObject( TraitsType::kind, nvrad_r )
+  SrcPackage::SrcPackage( const sat::Solvable & solvable_r )
+  : ResObject( solvable_r )
   {}
 
   ///////////////////////////////////////////////////////////////////
@@ -44,7 +41,7 @@ namespace zypp
   ///////////////////////////////////////////////////////////////////
 
   OnMediaLocation SrcPackage::location() const
-  { return pimpl().location(); }
+  { return OnMediaLocation(); }
 
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
index 8609ad9..18bc42f 100644 (file)
@@ -13,7 +13,6 @@
 #define ZYPP_SRCPACKAGE_H
 
 #include "zypp/ResObject.h"
-#include "zypp/detail/SrcPackageImplIf.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -31,8 +30,7 @@ namespace zypp
   {
 
   public:
-    typedef detail::SrcPackageImplIf    Impl;
-    typedef SrcPackage                  Self;
+    typedef SrcPackage               Self;
     typedef ResTraits<Self>          TraitsType;
     typedef TraitsType::PtrType      Ptr;
     typedef TraitsType::constPtrType constPtr;
@@ -42,15 +40,9 @@ namespace zypp
     OnMediaLocation location() const;
 
   protected:
-    SrcPackage( const NVRAD & nvrad_r );
+    SrcPackage( const sat::Solvable & solvable_r );
     /** Dtor */
     virtual ~SrcPackage();
-
-  private:
-    /** Access implementation */
-    virtual Impl & pimpl() = 0;
-    /** Access implementation */
-    virtual const Impl & pimpl() const = 0;
   };
   ///////////////////////////////////////////////////////////////////
 
diff --git a/zypp/SystemResObject.cc b/zypp/SystemResObject.cc
deleted file mode 100644 (file)
index 44cb757..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/SystemResObject.cc
- *
-*/
-//#include <iostream>
-//#include "zypp/base/Logger.h"
-
-#include "zypp/SystemResObject.h"
-#include "zypp/CapFactory.h"
-
-using std::endl;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  IMPL_PTR_TYPE(SystemResObject);
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : SystemResObject::SystemResObject
-  //   METHOD TYPE : Ctor
-  //
-  SystemResObject::SystemResObject( const NVRAD & nvrad_r )
-  : ResObject( TraitsType::kind, nvrad_r )
-  {}
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : SystemResObject::~SystemResObject
-  //   METHOD TYPE : Dtor
-  //
-  SystemResObject::~SystemResObject()
-  {}
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : SystemResObject::instance()
-  //   METHOD TYPE : SystemResObject::Ptr
-  //
-  SystemResObject::Ptr SystemResObject::instance()
-  {
-    static Ptr _ptr;
-    if ( ! _ptr )
-      {
-        NVRAD dataCollect( "system" );
-        dataCollect[Dep::PROVIDES].insert( CapFactory().halEvalCap() );
-        dataCollect[Dep::PROVIDES].insert( CapFactory().modaliasEvalCap() );
-        dataCollect[Dep::PROVIDES].insert( CapFactory().filesystemEvalCap() );
-
-        detail::ResImplTraits<detail::SystemResObjectImplIf>::Ptr sysImpl;
-        _ptr = detail::makeResolvableAndImpl( dataCollect, sysImpl );
-      }
-
-    return _ptr;
-  }
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/SystemResObject.h b/zypp/SystemResObject.h
deleted file mode 100644 (file)
index a0c771c..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/SystemResObject.h
- *
-*/
-#ifndef ZYPP_SYSTEMRESOBJECT_H
-#define ZYPP_SYSTEMRESOBJECT_H
-
-#include "zypp/ResObject.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  class SystemResObject;
-
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    //  CLASS NAME : SystemResObjectImplIf
-    //
-    /** Abstract SystemResObject implementation interface.
-    */
-    class SystemResObjectImplIf : public ResObjectImplIf
-    {
-    public:
-      typedef SystemResObject ResType;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   CLASS NAME : SystemResObject
-  //
-  /** */
-  class SystemResObject : public ResObject
-  {
-  public:
-    typedef detail::SystemResObjectImplIf Impl;
-    typedef SystemResObject               Self;
-    typedef ResTraits<Self>               TraitsType;
-    typedef TraitsType::PtrType           Ptr;
-    typedef TraitsType::constPtrType      constPtr;
-
-  public:
-    /** Default SystemResObject instance. */
-    static Ptr instance();
-
-  protected:
-    /** Ctor */
-    SystemResObject( const NVRAD & nvrad_r );
-    /** Dtor */
-    virtual ~SystemResObject();
-
-  private:
-    /** Access implementation */
-    virtual Impl & pimpl() = 0;
-    /** Access implementation */
-    virtual const Impl & pimpl() const = 0;
-  };
-  ///////////////////////////////////////////////////////////////////
-
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_SYSTEMRESOBJECT_H
index 72b9551..1071ed7 100644 (file)
@@ -57,7 +57,6 @@ namespace zypp
         IdString::empty;
         IdString::size;
         IdString::c_str;
-        IdString::string;
         IdString::asString;
       public:
         /** Fast compare equal. */
index b6eb990..834bb68 100644 (file)
@@ -34,7 +34,7 @@ void regex::assign(const std::string& str,int flags)
     flags |= match_extended;
     flags &= ~(normal);
   }
-  
+
   if ((err = regcomp(&m_preg, str.c_str(), flags))) {
     m_valid = false;
     regerror(err, &m_preg, errbuff, sizeof(errbuff));
@@ -53,17 +53,17 @@ regex::~regex() throw()
     regfree(&m_preg);
 }
 
-bool zypp::str::regex_match(const std::string& s, smatch& matches, const regex& regex)
+bool zypp::str::regex_match(const char * s, smatch& matches, const regex& regex)
 {
-  bool r = regex.m_valid && !regexec(&regex.m_preg, s.c_str(), 12, &matches.pmatch[0], 0);
+  bool r = s && regex.m_valid && !regexec(&regex.m_preg, s, 12, &matches.pmatch[0], 0);
   if (r)
     matches.match_str = s;
   return r;
 }
 
-bool zypp::str::regex_match(const std::string& s,  const regex& regex)
+bool zypp::str::regex_match(const char * s,  const regex& regex)
 {
-  return !regexec(&regex.m_preg, s.c_str(), 0, NULL, 0);
+  return s && !regexec(&regex.m_preg, s, 0, NULL, 0);
 }
 
 smatch::smatch()
@@ -71,7 +71,7 @@ smatch::smatch()
   memset(&pmatch, -1, sizeof(pmatch));
 }
 
-std::string smatch::operator[](unsigned i) const 
+std::string smatch::operator[](unsigned i) const
 {
   if (i < sizeof(pmatch)/sizeof(*pmatch) && pmatch[i].rm_so != -1)
     return match_str.substr(pmatch[i].rm_so, pmatch[i].rm_eo-pmatch[i].rm_so);
index 4d4cdad..f784145 100644 (file)
@@ -29,14 +29,37 @@ namespace zypp
   namespace str
   { /////////////////////////////////////////////////////////////////
 
+    ///////////////////////////////////////////////////////////////////
+    /** \defgroup ZYPP_STR_REGEX Regular expressions
+     *
+     * Namespace zypp::str regular expressions \b using the
+     * boost regex library
+     * \url http://www.boost.org/libs/regex/doc/index.html.
+     *
+     * \li \c regex
+     * \li \c regex_match
+     * \li \c regex_search
+     * \li \c regex_replace
+     * \li \c match_results
+     * \li \c cmatch
+     * \li \c wcmatch
+     * \li \c smatch
+     * \li \c wsmatch
+    */
+
     typedef Exception regex_error;
-    
+
     class smatch;
     class regex;
-    
-    bool regex_match(const std::string& s, str::smatch& matches, const regex& regex);
-    bool regex_match(const std::string& s,  const regex& regex);
-    
+
+    bool regex_match(const char * s, str::smatch& matches, const regex& regex);
+    inline bool regex_match(const std::string& s, str::smatch& matches, const regex& regex)
+    { return regex_match( s.c_str(), matches, regex ); }
+
+    bool regex_match(const char * s, const regex& regex);
+    inline bool regex_match(const std::string& s, const regex& regex)
+    { return regex_match( s.c_str(), regex ); }
+
     class regex {
     public:
 
@@ -48,17 +71,17 @@ namespace zypp
         match_extended = REG_EXTENDED,
         normal = 1<<16
       };
-  
+
       regex();
       regex(const std::string& s,int flags = match_extended);
       ~regex() throw();
 
       void assign(const std::string& s,int flags = match_extended);
-      
+
     private:
       friend class smatch;
-      friend bool regex_match(const std::string& s, str::smatch& matches, const regex& regex);
-      friend bool regex_match(const std::string& s,  const regex& regex);
+      friend bool regex_match(const char * s, str::smatch& matches, const regex& regex);
+      friend bool regex_match(const char * s,  const regex& regex);
       regex_t m_preg;
       bool m_valid;
     };
@@ -75,7 +98,7 @@ namespace zypp
       regmatch_t pmatch[12];
     };
 
-    
+
 
     /////////////////////////////////////////////////////////////////
   } // namespace str
index 9879512..6b4a236 100644 (file)
@@ -81,24 +81,6 @@ namespace zypp
     };
 
     ///////////////////////////////////////////////////////////////////
-    /** \defgroup ZYPP_STR_REGEX Regular expressions
-     *
-     * Namespace zypp::str regular expressions \b using the
-     * boost regex library
-     * \url http://www.boost.org/libs/regex/doc/index.html.
-     *
-     * \li \c regex
-     * \li \c regex_match
-     * \li \c regex_search
-     * \li \c regex_replace
-     * \li \c match_results
-     * \li \c cmatch
-     * \li \c wcmatch
-     * \li \c smatch
-     * \li \c wsmatch
-    */
-
-    ///////////////////////////////////////////////////////////////////
     /** \name String representation of number.
      *
      * Optional second argument sets the minimal string width (' ' padded).
index 9de3ecc..05d165f 100644 (file)
@@ -44,7 +44,7 @@ struct ResolvableQuery::Impl
     _cmd_attr_num.reset( new sqlite3_command( _con, "select a.value from numeric_attributes a,types t where a.weak_resolvable_id=:rid and a.attr_id=t.id and t.class=:tclass and t.name=:tname;"));
 
     _cmd_disk_usage.reset( new sqlite3_command( _con, "select d.name,du.size,du.files from resolvable_disk_usage du,dir_names d where du.resolvable_id=:rid and du.dir_name_id=d.id;"));
-    
+
     MIL << "Creating Resolvable query impl" << endl;
     //         0   1     2        3        4      5     6     7               8             9             10          11            12
     _fields = "id, name, version, release, epoch, arch, kind, installed_size, archive_size, install_only, build_time, install_time, repository_id";
@@ -78,8 +78,8 @@ struct ResolvableQuery::Impl
     // see _fields definition above for the getXXX() numbers
 
     ptr->name = reader.getstring(1);
-    //ptr->edition = reader.getstring(2) reader.getstring(3), );
-    ptr->arch = _type_cache.archFor(reader.getint(5)).asString();
+    ptr->edition = Edition( reader.getstring(2), reader.getstring(3), reader.getint(4) );
+    ptr->arch = _type_cache.archFor(reader.getint(5));
     ptr->kind = _type_cache.kindFor( reader.getint(6) );
     ptr->repository = reader.getint( 12 );
 
@@ -88,7 +88,7 @@ struct ResolvableQuery::Impl
     return ptr;
   }
 
-  
+
   void query( const data::RecordId &id,
                   ProcessResolvable fnc )
   {
@@ -104,8 +104,8 @@ struct ResolvableQuery::Impl
 
   void query( const std::string &s,
               ProcessResolvable fnc  )
-  {  
-    
+  {
+
     sqlite3_command cmd( _con, "select " + _fields + " from resolvables where name like :name;");
     cmd.bind( ":name", regex2sql( s ) );
     sqlite3_reader reader = cmd.executereader();
@@ -152,7 +152,7 @@ struct ResolvableQuery::Impl
   {
     return ( queryNumericAttributeInternal( _con, record_id, klass, name, default_value) > 0 );
   }
-      
+
   int queryNumericAttribute( const data::RecordId &record_id,
                              const std::string &klass,
                              const std::string &name,
@@ -188,7 +188,7 @@ struct ResolvableQuery::Impl
     }
     return alias;
   }
-  
+
   data::RecordId queryRepositoryId( const std::string &repo_alias )
   {
     long long id = 0;
@@ -202,7 +202,7 @@ struct ResolvableQuery::Impl
     }
     return id;
   }
-  
+
   void iterateResolvablesByKindsAndStringsAndRepos( const std::vector<zypp::Resolvable::Kind> & kinds,
                   const std::vector<std::string> &strings, int flags, const std::vector<std::string> repos, ProcessResolvable fnc )
   {
@@ -340,7 +340,7 @@ private:
 
     return default_value;
   }
-  
+
   TranslatedText queryTranslatedStringAttributeInternal( sqlite3_connection &con,
                                                          const data::RecordId &record_id,
                                                          const std::string &klass,
@@ -358,7 +358,7 @@ private:
 
     TranslatedText result;
     sqlite3_reader reader = _cmd_attr_tstr->executereader();
-    
+
     int c = 0;
     while(reader.read())
     {
@@ -412,7 +412,7 @@ private:
     _cmd_attr_str->bind(":tname", name);
 
     sqlite3_reader reader = _cmd_attr_str->executereader();
-    
+
     if ( reader.read() )
       return reader.getstring(0);
     else
index cef4617..bf56785 100644 (file)
@@ -16,7 +16,6 @@
 
 using namespace std;
 using namespace zypp;
-using namespace zypp::capability;
 using namespace zypp::cache;
 using zypp::data::RecordId;
 
@@ -147,7 +146,7 @@ RecordId SolvStore::consumePackage( const RecordId & repository_id,
                                     const data::Package_Ptr & package )
 {
   RecordId id = appendResolvable( repository_id, ResTraits<Package>::kind,
-      _NVRA( package->name, package->edition, package->arch ), package->deps, package->shareDataWith );
+                                  NVRA( package->name, package->edition, package->arch ), package->deps, package->shareDataWith );
   appendResObjectAttributes( id, package );
   appendPackageBaseAttributes( id, package );
 
@@ -164,7 +163,7 @@ RecordId SolvStore::consumeSourcePackage( const data::RecordId & repository_id,
                                        const data::SrcPackage_Ptr & package )
 {
   RecordId id = appendResolvable( repository_id, ResTraits<SrcPackage>::kind,
-      _NVRA( package->name, package->edition, package->arch ), package->deps, package->shareDataWith );
+      NVRA( package->name, package->edition, package->arch ), package->deps, package->shareDataWith );
   appendResObjectAttributes( id, package );
 
   appendOnMediaLocation( id, attrSrcPackageLocation, package->repositoryLocation );
@@ -176,7 +175,7 @@ RecordId SolvStore::consumePatch( const data::RecordId & repository_id,
 {
   RecordId id = appendResolvable(
       repository_id, ResTraits<Patch>::kind,
-      _NVRA( patch->name, patch->edition, patch->arch ), patch->deps );
+      NVRA( patch->name, patch->edition, patch->arch ), patch->deps );
 
   appendResObjectAttributes( id, patch );
 
@@ -230,7 +229,7 @@ RecordId SolvStore::consumePackageAtom( const data::RecordId & repository_id,
                                      const data::PackageAtom_Ptr & atom )
 {
   RecordId id = appendResolvable( repository_id, ResTraits<Atom>::kind,
-      _NVRA( atom->name, atom->edition, atom->arch ), atom->deps );
+      NVRA( atom->name, atom->edition, atom->arch ), atom->deps );
   appendResObjectAttributes( id, atom );
   appendPackageBaseAttributes( id, atom );
 
@@ -248,7 +247,7 @@ RecordId SolvStore::consumeMessage( const data::RecordId & repository_id,
                                  const data::Message_Ptr & message )
 {
   RecordId id = appendResolvable( repository_id, ResTraits<Message>::kind,
-      _NVRA( message->name, message->edition, message->arch ), message->deps );
+      NVRA( message->name, message->edition, message->arch ), message->deps );
   appendResObjectAttributes( id, message );
 
   appendTranslatedStringAttribute( id, attrMessageText(), message->text );
@@ -259,7 +258,7 @@ RecordId SolvStore::consumeScript( const data::RecordId & repository_id,
                                 const data::Script_Ptr & script )
 {
   RecordId id = appendResolvable( repository_id, ResTraits<Script>::kind,
-      _NVRA( script->name, script->edition, script->arch ), script->deps );
+      NVRA( script->name, script->edition, script->arch ), script->deps );
   appendResObjectAttributes( id, script );
 
   appendStringAttribute( id, attrScriptDoScript(), script->doScript );
@@ -273,7 +272,7 @@ RecordId SolvStore::consumePattern( const data::RecordId & repository_id,
                                      const data::Pattern_Ptr & pattern )
 {
   RecordId id = appendResolvable( repository_id, ResTraits<Pattern>::kind,
-      _NVRA( pattern->name, pattern->edition, pattern->arch ), pattern->deps );
+      NVRA( pattern->name, pattern->edition, pattern->arch ), pattern->deps );
   appendResObjectAttributes( id, pattern );
 
   appendBooleanAttribute( id, attrPatternIsDefault(), pattern->isDefault );
@@ -294,7 +293,7 @@ RecordId SolvStore::consumeProduct( const data::RecordId & repository_id,
                                  const data::Product_Ptr & product )
 {
   RecordId id = appendResolvable( repository_id, ResTraits<Product>::kind,
-      _NVRA( product->name, product->edition, product->arch ), product->deps );
+      NVRA( product->name, product->edition, product->arch ), product->deps );
   appendResObjectAttributes( id, product );
 
   appendStringAttribute( id, attrProductType(), product->type );
@@ -363,11 +362,11 @@ void SolvStore::updatePackageLang( const data::RecordId & resolvable_id,
   Solvable *s = pool_id2solvable(_pimpl->_pool, repo_add_solvable(repo));
   s->evr = str2id(_pimpl->_pool, res->edition.c_str(), 1);
 //   s->provides = adddep(pool, pd, s->provides, atts, 0);
-// 
+//
 //   s->name = str2id(pool, nvra.name.c_str(), 1);
 //   s->arch = str2id(pool, nvra.arch.c_str(), 1);
 //   s->vendor = str2id(pool, nvra.vendor.c_str(), 1);
-// 
+//
 //   if (!s->arch)
 //     s->arch = ARCH_NOARCH;
 
@@ -377,7 +376,7 @@ void SolvStore::updatePackageLang( const data::RecordId & resolvable_id,
 
 RecordId SolvStore::appendResolvable( const RecordId &repository_id,
                                        const Resolvable::Kind &kind,
-                                       const _NVRA &nvra,
+                                       const NVRA &nvra,
                                        const data::Dependencies &deps )
 {
   return appendResolvable( repository_id,
@@ -390,7 +389,7 @@ RecordId SolvStore::appendResolvable( const RecordId &repository_id,
 data::RecordId
     SolvStore::appendResolvable( const data::RecordId &repository_id,
                                   const Resolvable::Kind &kind,
-                                  const _NVRA &nvra,
+                                  const NVRA &nvra,
                                   const data::Dependencies &deps,
                                   const data::RecordId &shared_id )
 {
@@ -398,28 +397,28 @@ data::RecordId
 //   Solvable *s = pool_id2solvable(pool, repo_add_solvable(pd->repo));
 //   s->evr = makeevr_atts(pool, pd, atts);
 //   s->provides = adddep(pool, pd, s->provides, atts, 0);
-// 
+//
 //   s->name = str2id(pool, nvra.name.c_str(), 1);
 //   s->arch = str2id(pool, nvra.arch.c_str(), 1);
 //   s->vendor = str2id(pool, nvra.vendor.c_str(), 1);
-// 
+//
 //   if (!s->arch)
 //     s->arch = ARCH_NOARCH;
-// 
+//
 //   if (s->arch != ARCH_SRC && s->arch != ARCH_NOSRC)
 //     s->provides = repo_addid_dep(pd->repo, s->provides, rel2id(pool, s->name, s->evr, REL_EQ, 1), 0);
-//   
+//
 //    s->supplements = repo_fix_legacy(pd->repo, s->provides, s->supplements);
 
   // file
   //id = str2id(pool, pd->content, 1);
   //s->provides = repo_addid(pd->repo, s->provides, id);
 
+
 //   long long id = _pimpl->con.insertid();
-// 
+//
 //   appendDependencies( id, deps );
+
   return 0;
 }
 
@@ -431,7 +430,7 @@ void SolvStore::appendDependencies( const RecordId &resolvable_id, const data::D
   }
 }
 
-void SolvStore::appendDependencyList( const RecordId &resolvable_id, zypp::Dep deptype, const data::DependencyList &caps )
+void SolvStore::appendDependencyList( const RecordId &resolvable_id, Dep deptype, const data::DependencyList &caps )
 {
   for ( data::DependencyList::const_iterator it = caps.begin(); it != caps.end(); ++it )
   {
@@ -439,100 +438,10 @@ void SolvStore::appendDependencyList( const RecordId &resolvable_id, zypp::Dep d
   }
 }
 
-void SolvStore::appendDependency( const RecordId &resolvable_id, zypp::Dep deptype, capability::CapabilityImpl::Ptr cap )
-{
-  if ( cap == 0 )
-  {
-    DBG << "invalid capability" << endl;
-    return;
-  }
-
-  if ( capability::isKind<NamedCap>(cap) )
-  {
-      appendNamedDependency( resolvable_id, deptype, capability::asKind<NamedCap>(cap) );
-  }
-  else if ( capability::isKind<FileCap>(cap) )
-  {
-    appendFileDependency( resolvable_id, deptype, capability::asKind<FileCap>(cap) );
-    return;
-  }
-  else if ( capability::isKind<ModaliasCap>(cap) )
-  {
-      appendModaliasDependency( resolvable_id, deptype, capability::asKind<ModaliasCap>(cap) );
-  }
-  else if ( capability::isKind<HalCap>(cap) )
-  {
-      appendHalDependency( resolvable_id, deptype, capability::asKind<HalCap>(cap) );
-  }
-  else if ( capability::isKind<FilesystemCap>(cap) )
-  {
-      appendFilesystemDependency( resolvable_id, deptype, capability::asKind<FilesystemCap>(cap) );
-  }
-  else if ( capability::isKind<SplitCap>(cap) )
-  {
-      appendSplitDependency( resolvable_id, deptype, capability::asKind<SplitCap>(cap) );
-  }
-  else
-  {
-      appendUnknownDependency( resolvable_id, deptype, cap );
-  }
-}
-
-
-void SolvStore::appendNamedDependency( const RecordId &resolvable_id, zypp::Dep deptype, capability::NamedCap::Ptr cap )
-{
-  if ( !cap )
-    ZYPP_THROW(Exception("bad versioned dep"));
-  
-}
-
-void SolvStore::appendModaliasDependency( const RecordId &resolvable_id,
-                                                 zypp::Dep deptype,
-                                                 capability::ModaliasCap::Ptr cap )
-{
-  if ( !cap )
-    ZYPP_THROW(Exception("Null modalias capability"));
-}
-
-void SolvStore::appendHalDependency( const RecordId &resolvable_id,
-                                                 zypp::Dep deptype,
-                                                 capability::HalCap::Ptr cap )
-{
-  if ( !cap )
-    ZYPP_THROW(Exception("Null HAL capability"));
-}
-
-void SolvStore::appendFileDependency( const RecordId &resolvable_id, zypp::Dep deptype,
-                                       capability::FileCap::Ptr cap )
-{
-  if ( !cap )
-    ZYPP_THROW(Exception("Null file capability"));
-}
-
-void SolvStore::appendFilesystemDependency( const data::RecordId &resolvable_id,
-                                             zypp::Dep deptype,
-                                             capability::FilesystemCap::Ptr cap )
-{
-  if ( !cap )
-    ZYPP_THROW(Exception("bad versioned dep"));
-}
-
-
-void SolvStore::appendSplitDependency( const data::RecordId &resolvable_id,
-                                        zypp::Dep deptype,
-                                        capability::SplitCap::Ptr cap )
-{
-  if ( !cap )
-    ZYPP_THROW(Exception("bad versioned dep"));
-  //DBG << "versioned : " << cap << endl;
-}
-
-void SolvStore::appendUnknownDependency( const RecordId &resolvable_id,
-                                               zypp::Dep deptype,
-                                               capability::CapabilityImpl::Ptr cap )
+void SolvStore::appendDependency( const RecordId &resolvable_id, Dep deptype, Capability cap )
 {
-  if ( !cap )
-    ZYPP_THROW(Exception("Null unknown capability"));
+#warning MIGRATE TO SAT
+  // create capability from data
 }
 
 
index 9168e68..555a7e1 100644 (file)
 #include <iosfwd>
 #include <string>
 
-#include "zypp/base/ReferenceCounted.h"
-#include "zypp/base/NonCopyable.h"
 #include "zypp/base/PtrTypes.h"
 #include "zypp/Pathname.h"
 #include "zypp/ZConfig.h"
-#include "zypp/capability/CapabilityImpl.h"
-#include "zypp/capability/Capabilities.h"
 
 #include "zypp/data/ResolvableDataConsumer.h"
 #include "zypp/data/RecordId.h"
 
-#include "zypp/base/PtrTypes.h"
+#include "zypp/NVRA.h"
 #include "zypp/RepoStatus.h"
 #include "zypp/ProgressData.h"
 #include "zypp/cache/Attribute.h"
 
-#include "satsolver/solvable.h"
-
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
@@ -38,20 +32,6 @@ namespace zypp
   namespace cache
   { /////////////////////////////////////////////////////////////////
 
-    struct _NVRA
-    {
-      _NVRA( const std::string p_name = std::string(),
-             const std::string p_version = std::string(),
-             const std::string p_release = std::string(),
-             const std::string p_arch = std::string() )
-        : name(p_name), version(p_version), release(p_release), arch(p_arch)
-      {}
-      std::string name;
-      std::string version;
-      std::string release;
-      std::string arch;
-    };
-
     /**
      * The cache store caches resolvable data.
      *
@@ -198,7 +178,7 @@ namespace zypp
        */
       virtual data::RecordId consumeFilelist( const data::RecordId & resolvable_id,
                                              const data::Filenames & filenames );
-      
+
       /**
        * Implementation of the \ref ResolvableDataConsumer interface
        *
@@ -232,7 +212,7 @@ namespace zypp
        * Appends a resolvable to the store.
        *
        * You have to specify with \a kind of resolvable are you inserting
-       * and its \c _NVRA (name version release and architecture ).
+       * and its \c NVRA (name version release and architecture ).
        * Optionaly you can pass a list of \c CapabilityImpl::Ptr
        * as dependencies for the resolvable.
        *
@@ -254,7 +234,7 @@ namespace zypp
        */
       data::RecordId appendResolvable( const data::RecordId &repository_id,
                                        const Resolvable::Kind &kind,
-                                       const _NVRA &nvra,
+                                       const NVRA &nvra,
                                        const data::Dependencies &deps );
 
       /**
@@ -269,7 +249,7 @@ namespace zypp
        */
       data::RecordId appendResolvable( const data::RecordId &repository_id,
                                        const Resolvable::Kind &kind,
-                                       const _NVRA &nvra,
+                                       const NVRA &nvra,
                                        const data::Dependencies &deps,
                                        const data::RecordId &shared_id );
       /**
@@ -299,9 +279,8 @@ namespace zypp
        * FIXME should it \throw if the resolvable does not exist?
        */
       void appendDependencyList( const data::RecordId &resolvable_id,
-                                 zypp::Dep deptype,
+                                 Dep deptype,
                                  const data::DependencyList &dlist );
-
       /**
        * Adds a dependency to the store.
        *
@@ -315,139 +294,8 @@ namespace zypp
        * FIXME should it \throw if the resolvable does not exist?
        */
       void appendDependency( const data::RecordId &resolvable_id,
-                             zypp::Dep deptype,
-                             capability::CapabilityImpl::Ptr cap );
-
-      /**
-       * Adds a Named dependency to the store.
-       *
-       * A \ref NamedCap::Ptr \a dlist to be specified. Among
-       * which type of dependency \ref zypp::Dep it is as
-       * the \a deptype argument.
-       *
-       * \a resolvable_id is the resolvable Id in the SolvStore
-       * that will own the capability
-       *
-       * You can create the named capability using either
-       * \ref capability::parse or \ref capability::buildNamed
-       *
-       * FIXME should it \throw if the resolvable does not exist?
-       */
-      void appendNamedDependency( const data::RecordId &, zypp::Dep,
-                                  capability::NamedCap::Ptr);
-
-      /**
-       * Adds a file dependency to the store.
-       *
-       * A \ref FileCap::Ptr \a dlist to be specified. Among
-       * which type of dependency \ref zypp::Dep it is as
-       * the \a deptype argument.
-       *
-       * \a resolvable_id is the resolvable Id in the SolvStore
-       * that will own the capability
-       *
-       * You can create the file capability using either
-       * \ref capability::parse or \ref capability::buildFile
-       *
-       * FIXME should it \throw if the resolvable does not exist?
-       */
-      void appendFileDependency( const data::RecordId &, zypp::Dep,
-                                 capability::FileCap::Ptr);
-
-      /**
-       * Adds a Modalias dependency to the store.
-       *
-       * A \ref ModaliasCap::Ptr \a cap to be specified. Among
-       * which type of dependency \ref zypp::Dep it is as
-       * the \a deptype argument.
-       *
-       * \a resolvable_id is the resolvable Id in the SolvStore
-       * that will own the capability
-       *
-       * You can create the modalias capability using either
-       * \ref capability::parse or \ref capability::buildModalias
-       *
-       * FIXME should it \throw if the resolvable does not exist?
-       */
-      void appendModaliasDependency( const data::RecordId &resolvable_id,
-                                     zypp::Dep deptype,
-                                     capability::ModaliasCap::Ptr cap);
-
-      /**
-       * Adds a Hal dependency to the store.
-       *
-       * A \ref HalCap::Ptr \a cap to be specified. Among
-       * which type of dependency \ref zypp::Dep it is as
-       * the \a deptype argument.
-       *
-       * \a resolvable_id is the resolvable Id in the SolvStore
-       * that will own the capability
-       *
-       * You can create the modalias capability using either
-       * \ref capability::parse or \ref capability::buildHal
-       *
-       * FIXME should it \throw if the resolvable does not exist?
-       */
-      void appendHalDependency( const data::RecordId &resolvable_id,
-                                      zypp::Dep deptype,
-                                      capability::HalCap::Ptr cap );
-
-      /**
-       * Adds a Filesystem dependency to the store.
-       *
-       * A \ref FilesystemCap::Ptr \a cap to be specified. Among
-       * which type of dependency \ref zypp::Dep it is as
-       * the \a deptype argument.
-       *
-       * \a resolvable_id is the resolvable Id in the SolvStore
-       * that will own the capability
-       *
-       * You can create the filesystem capability using either
-       * \ref capability::parse or \ref capability::buildFilesystem
-       *
-       * FIXME should it \throw if the resolvable does not exist?
-       */
-      void appendFilesystemDependency( const data::RecordId &resolvable_id,
-                                       zypp::Dep deptype,
-                                       capability::FilesystemCap::Ptr cap );
-      
-      /**
-       * Adds a split dependency to the store.
-       *
-       * A \ref SplitCap::Ptr \a cap to be specified. Among
-       * which type of dependency \ref zypp::Dep it is as
-       * the \a deptype argument.
-       *
-       * \a resolvable_id is the resolvable Id in the SolvStore
-       * that will own the capability
-       *
-       * You can create the filesystem capability using either
-       * \ref capability::parse or \ref capability::buildSplit
-       *
-       * FIXME should it \throw if the resolvable does not exist?
-       */
-      void appendSplitDependency( const data::RecordId &resolvable_id,
-                                  zypp::Dep deptype,
-                                  capability::SplitCap::Ptr cap );
-      
-      /**
-       * Adds a unknown dependency to the store.
-       *
-       * A \ref Capability::Ptr \a cap to be specified. Among
-       * which type of dependency \ref zypp::Dep it is as
-       * the \a deptype argument.
-       *
-       * \a resolvable_id is the resolvable Id in the SolvStore
-       * that will own the capability
-       *
-       * You can create the capability using either
-       * \ref capability::parse
-       *
-       * FIXME should it \throw if the resolvable does not exist?
-       */
-      void appendUnknownDependency( const data::RecordId &resolvable_id,
-                                    zypp::Dep deptype,
-                                    capability::CapabilityImpl::Ptr cap );
+                             Dep deptype,
+                             Capability cap );
 
       /**
        * Insert patch RPM data into <tt>patch_packages</tt> table.
@@ -766,7 +614,7 @@ namespace zypp
        * Appends a solvable to the store.
        *
        * You have to specify with \a kind of resolvable are you inserting
-       * and its \c _NVRA (name version release and architecture ).
+       * and its \c NVRA (name version release and architecture ).
        * Optionaly you can pass a list of \c CapabilityImpl::Ptr
        * as dependencies for the resolvable.
        *
diff --git a/zypp/capability/.cvsignore b/zypp/capability/.cvsignore
deleted file mode 100644 (file)
index 5c94a2f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Makefile.in
-Makefile
-.deps
-.libs
-*.o
-*.lo
-*.a
-*.la
diff --git a/zypp/capability/CapTraits.cc b/zypp/capability/CapTraits.cc
deleted file mode 100644 (file)
index f6b3aa0..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/capability/CapTraits.cc
- *
-*/
-
-#include "zypp/capability/CapTraits.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    template<>
-      const CapabilityTraits::KindType CapTraits<NullCap>       ::kind( "NullCap" );
-    template<>
-      const CapabilityTraits::KindType CapTraits<FileCap>       ::kind( "FileCap" );
-    template<>
-      const CapabilityTraits::KindType CapTraits<NamedCap>      ::kind( "NamedCap" );
-    template<>                                               // VersionedCap IsA NamedCap
-      const CapabilityTraits::KindType CapTraits<VersionedCap>  ::kind( "NamedCap" );
-    template<>
-      const CapabilityTraits::KindType CapTraits<SplitCap>      ::kind( "SplitCap" );
-    template<>
-      const CapabilityTraits::KindType CapTraits<HalCap>        ::kind( "HalCap" );
-    template<>
-      const CapabilityTraits::KindType CapTraits<ModaliasCap>   ::kind( "ModaliasCap" );
-    template<>
-      const CapabilityTraits::KindType CapTraits<FilesystemCap> ::kind( "FilesystemCap" );
-    template<>
-      const CapabilityTraits::KindType CapTraits<OrCap>         ::kind( "OrCap" );
-    template<>
-      const CapabilityTraits::KindType CapTraits<ConditionalCap>::kind( "ConditionalCap" );
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/capability/CapTraits.h b/zypp/capability/CapTraits.h
deleted file mode 100644 (file)
index 186df7d..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/capability/CapTraits.h
- *
-*/
-#ifndef ZYPP_CAPABILITY_CAPTRAITS_H
-#define ZYPP_CAPABILITY_CAPTRAITS_H
-
-#include "zypp/base/PtrTypes.h"
-#include "zypp/base/KindOf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  class Capability;
-
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    /** Base of CapTraits. Defines the Capability::Kind type. */
-    struct CapabilityTraits
-    {
-      typedef KindOf<Capability>  KindType;
-    };
-
-    class NullCap;
-    class FileCap;
-    class NamedCap;
-    class VersionedCap;
-    class SplitCap;
-    class HalCap;
-    class ModaliasCap;
-    class FilesystemCap;
-    class OrCap;
-    class ConditionalCap;
-
-    /** CapTraits. Defines common types and the Kind value. */
-    template<typename _Cap>
-      struct CapTraits : public CapabilityTraits
-      {
-        static const KindType kind;
-      };
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_CAPABILITY_CAPTRAITS_H
diff --git a/zypp/capability/Capabilities.h b/zypp/capability/Capabilities.h
deleted file mode 100644 (file)
index 942324c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/capability/Capabilities.h
- *
-*/
-#ifndef ZYPP_CAPABILITY_CAPABILITIES_H
-#define ZYPP_CAPABILITY_CAPABILITIES_H
-
-#include "zypp/capability/CapabilityImpl.h"
-
-#include "zypp/capability/NullCap.h"
-#include "zypp/capability/FileCap.h"
-#include "zypp/capability/NamedCap.h"
-#include "zypp/capability/VersionedCap.h"
-#include "zypp/capability/SplitCap.h"
-#include "zypp/capability/HalCap.h"
-#include "zypp/capability/ModaliasCap.h"
-#include "zypp/capability/FilesystemCap.h"
-
-//#include "zypp/capability/OrCap.h"
-//#include "zypp/capability/ConditionalCap.h"
-
-#endif // ZYPP_CAPABILITY_CAPABILITIES_H
diff --git a/zypp/capability/CapabilityImpl.cc b/zypp/capability/CapabilityImpl.cc
deleted file mode 100644 (file)
index f2518d7..0000000
+++ /dev/null
@@ -1,402 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/CapabilityImpl.cc
- *
-*/
-#include <iostream>
-
-#include "zypp/base/Logger.h"
-#include "zypp/base/Regex.h"
-#include "zypp/base/Exception.h"
-#include "zypp/base/Hash.h"
-#include "zypp/capability/CapabilityImpl.h"
-#include "zypp/capability/Capabilities.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-    IMPL_PTR_TYPE(CapabilityImpl)
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // METHOD NAME : CapabilityImpl::CapabilityImpl
-    // METHOD TYPE : Ctor
-    //
-    CapabilityImpl::CapabilityImpl( const Resolvable::Kind & refers_r )
-    : _refers( refers_r )
-    {}
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // METHOD NAME : CapabilityImpl::capImplOrderLess
-    // METHOD TYPE : bool
-    //
-    bool CapabilityImpl::capImplOrderLess( const constPtr & rhs ) const
-    {
-      return encode() < rhs->encode();
-    }
-
-    std::size_t CapabilityImpl::hash() const
-    {
-      std::size_t ret = __gnu_cxx::__stl_hash_string( encode().c_str() );
-      return ret;
-    }
-
-    bool CapabilityImpl::same (const constPtr &rhs) const
-    {
-      /* refers and kind are known to be the same */
-      return encode() == rhs->encode();
-    }
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // METHOD NAME : CapabilityImpl::capImplOrderLess
-    // METHOD TYPE : bool
-    //
-    std::ostream & CapabilityImpl::dumpOn( std::ostream & str ) const
-    {
-      return str << '[' << refers() << "] "
-                 << '(' << kind() << ") "
-                 << asString();
-    }
-
-    /** Assert a valid Resolvable::Kind. */
-    static void assertResKind( const Resolvable::Kind & refers_r )
-    {
-      if ( refers_r == Resolvable::Kind() )
-       ZYPP_THROW( Exception("Missing or empty  Resolvable::Kind in Capability") );
-    }
-
-    bool isEditionSpec( Rel op_r, const Edition & edition_r )
-    {
-      switch ( op_r.inSwitch() )
-       {
-       case Rel::ANY_e:
-         if ( edition_r != Edition::noedition )
-           WAR << "Operator " << op_r << " causes Edition "
-           << edition_r << " to be ignored." << endl;
-         return false;
-         break;
-
-       case Rel::NONE_e:
-         ZYPP_THROW( Exception("Operator NONE is not allowed in Capability") );
-         break;
-
-       case Rel::EQ_e:
-       case Rel::NE_e:
-       case Rel::LT_e:
-       case Rel::LE_e:
-       case Rel::GT_e:
-       case Rel::GE_e:
-         return true;
-         break;
-       }
-      // SHOULD NOT GET HERE
-      ZYPP_THROW( Exception("Unknown Operator NONE is not allowed in Capability") );
-      return false; // not reached
-    }
-
-    bool isFileSpec( const std::string & name_r )
-    {
-      return *name_r.c_str() == '/';
-    }
-
-    bool isInterestingFileSpec( const std::string & name_r )
-    {
-      static str::smatch what;
-      static const str::regex filenameRegex(
-          "/(s?bin|lib(64)?|etc)/|^/usr/(games/|share/(dict/words|magic\\.mime)$)|^/opt/gnome/games/",
-          str::regex::optimize|str::regex::nosubs );
-
-      return str::regex_match( name_r, what, filenameRegex );
-    }
-
-    bool isSplitSpec( const std::string & name_r )
-    {
-      return name_r.find( ":/" ) != std::string::npos;
-    }
-
-    bool isHalSpec( const std::string & name_r )
-    {
-      return name_r.substr(0,4) == "hal(";
-    }
-
-    bool isModaliasSpec( const std::string & name_r )
-    {
-      return name_r.substr(0,9) == "modalias(";
-    }
-
-    bool isFilesystemSpec( const std::string & name_r )
-    {
-      return name_r.substr(0,11) == "filesystem(";
-    }
-
-    CapabilityImpl::Ptr buildFile( const Resolvable::Kind & refers_r,
-                                          const std::string & name_r )
-    {
-      // NullCap check first:
-      if ( name_r.empty() )
-       {
-         // Singleton, so no need to put it into _uset !?
-         return capability::NullCap::instance();
-       }
-
-      assertResKind( refers_r );
-
-      return new capability::FileCap( refers_r, name_r );
-    }
-
-    CapabilityImpl::Ptr buildNamed( const Resolvable::Kind & refers_r,
-                                          const std::string & name_r )
-    {
-      // NullCap check first:
-      if ( name_r.empty() )
-      {
-        // Singleton, so no need to put it into _uset !?
-        return capability::NullCap::instance();
-      }
-
-      assertResKind( refers_r );
-
-      // file:    /absolute/path
-      if ( isFileSpec( name_r ) )
-      {
-        return new capability::FileCap( refers_r, name_r );
-      }
-      if ( isFilesystemSpec( name_r ) )
-      {
-       return buildFilesystem( refers_r, name_r );
-      }
-
-      //split:   name:/absolute/path
-      if (isSplitSpec (name_r))
-      {
-        static const str::regex  rx( "([^/]*):(/.*)" );
-        str::smatch what;
-        if( str::regex_match( name_r, what, rx ) )
-        {
-          return new capability::SplitCap( refers_r, what[1], what[2] );
-        }
-      }
-
-      //name:    name
-      return new capability::NamedCap( refers_r, name_r );
-    }
-
-    CapabilityImpl::Ptr buildVersioned( const Resolvable::Kind & refers_r,
-                                              const std::string & name_r,
-                                              Rel op_r,
-                                              const Edition & edition_r )
-    {
-      if ( isEditionSpec( op_r, edition_r ) )
-       {
-         assertResKind( refers_r );
-
-         // build a VersionedCap
-         return new capability::VersionedCap( refers_r, name_r, op_r, edition_r );
-       }
-      //else
-      // build a NamedCap
-
-      return buildNamed( refers_r, name_r );
-    }
-
-    CapabilityImpl::Ptr buildHal( const Resolvable::Kind & refers_r,
-                                         const std::string & name_r,
-                                         Rel op_r,
-                                         const std::string & value_r )
-    {
-      if ( op_r != Rel::ANY )
-       {
-         ZYPP_THROW( Exception("Unsupported kind of Hal Capability '" + op_r.asString() + "'") );
-       }
-
-      //split:   hal(name) [op string]
-      static const str::regex  rx( "hal\\(([^)]*)\\)" );
-      str::smatch what;
-      if( str::regex_match( name_r, what, rx ) )
-       {
-         // Hal always refers to 'System' kind of Resolvable.
-         return new capability::HalCap( ResTraits<SystemResObject>::kind,
-                                   what[1] );
-       }
-      // otherwise
-      ZYPP_THROW( Exception("Unsupported kind of Hal Capability '" + name_r + "'") );
-      return NULL; // make gcc happy
-    }
-
-    CapabilityImpl::Ptr buildModalias( const Resolvable::Kind & refers_r,
-                                              const std::string & name_r,
-                                              Rel op_r,
-                                              const std::string & value_r )
-    {
-      if ( op_r != Rel::ANY )
-       {
-         ZYPP_THROW( Exception("Unsupported kind of Modalias Capability  '" + op_r.asString() + "'") );
-       }
-
-      //split:   modalias(name) [op string]
-      static const str::regex  rx( "modalias\\(([^)]*)\\)" );
-      str::smatch what;
-      if( str::regex_match( name_r, what, rx ) )
-       {
-         // Modalias always refers to 'System' kind of Resolvable
-         return new capability::ModaliasCap( ResTraits<SystemResObject>::kind,
-                                         what[1] );
-       }
-      // otherwise
-      ZYPP_THROW( Exception("Unsupported kind of Modalias Capability'" + name_r + "'") );
-      return NULL; // make gcc happy
-    }
-
-    /******************************************************************
-    **
-    ** FUNCTION NAME : buildFilesystem
-    ** FUNCTION TYPE : CapabilityImpl::Ptr
-    */
-    CapabilityImpl::Ptr buildFilesystem( const Resolvable::Kind & refers_r,
-                                      const std::string & name_r )
-    {
-      //split:   filesystem(name) [op string]
-      static const str::regex  rx( "filesystem\\(([^)]*)\\)" );
-      str::smatch what;
-      if( str::regex_match( name_r, what, rx ) )
-      {
-       // Filesystem always refers to 'System' kind of Resolvable
-       return new capability::FilesystemCap( ResTraits<SystemResObject>::kind,
-                                             what[1] );
-      }
-      // otherwise
-      ZYPP_THROW( Exception("Unsupported kind of Filesystem Capability'" + name_r + "'") );
-      return NULL; // make gcc happy
-    }
-
-
-    CapabilityImpl::Ptr parse( const Resolvable::Kind & refers_r,
-                              const std::string & strval_r )
-  try
-    {
-      if ( isHalSpec( strval_r ) )
-       {
-         return buildHal( refers_r, strval_r );
-        }
-      if ( isModaliasSpec( strval_r ) )
-        {
-          return buildModalias( refers_r, strval_r );
-        }
-      if ( isFilesystemSpec( strval_r ) )
-        {
-          return buildFilesystem( refers_r, strval_r );
-        }
-      if ( isFileSpec( strval_r ) )
-        {
-          return buildFile( refers_r, strval_r );
-        }
-
-      // strval_r has at least two words which could make 'op edition'?
-      // improve regex!
-      static const str::regex  rx( "(.*[^ \t])([ \t]+)([^ \t]+)([ \t]+)([^ \t]+)" );
-      str::smatch what;
-      if( strval_r.find(' ') != std::string::npos
-         && str::regex_match( strval_r,what, rx ) )
-        {
-          Rel op;
-          Edition edition;
-          try
-            {
-              op = Rel(what[3]);
-              edition = Edition(what[5]);
-            }
-          catch ( Exception & excpt )
-            {
-              // So they don't make valid 'op edition'
-              ZYPP_CAUGHT( excpt );
-              DBG << "Trying named cap for: " << strval_r << endl;
-              // See whether it makes a named cap.
-              return buildNamed( refers_r, strval_r );
-            }
-
-          // Valid 'op edition'
-          return buildVersioned( refers_r,
-                                 what[1], op, edition );
-        }
-      //else
-      // not a VersionedCap
-      return buildNamed( refers_r, strval_r );
-    }
-  catch ( Exception & excpt )
-    {
-      ZYPP_RETHROW( excpt );
-      return NULL; // not reached
-    }
-
-
-  CapabilityImpl::Ptr parse( const Resolvable::Kind & refers_r,
-                               const std::string & name_r,
-                               const std::string & op_r,
-                               const std::string & edition_r )
-    try
-    {
-      if ( isHalSpec( name_r ) )
-      {
-        return buildHal( refers_r, name_r, Rel(op_r), edition_r );
-      }
-      if ( isModaliasSpec( name_r ) )
-       {
-         return buildModalias( refers_r, name_r, Rel(op_r), edition_r );
-       }
-      // Try creating Rel and Edition, then parse
-      return parse( refers_r, name_r, Rel(op_r), Edition(edition_r) );
-    }
-    catch ( Exception & excpt )
-    {
-      ZYPP_RETHROW( excpt );
-      return NULL; // not reached
-    }
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : CapFactory::parse
-  //   METHOD TYPE : Capability
-  //
-  CapabilityImpl::Ptr parse( const Resolvable::Kind & refers_r,
-                            const std::string & name_r,
-                            Rel op_r,
-                            const Edition & edition_r )
-  try
-  {
-      if ( isHalSpec( name_r ) )
-      {
-        return buildHal( refers_r, name_r, op_r, edition_r.asString() );
-      }
-      if ( isModaliasSpec( name_r ) )
-      {
-        return buildModalias( refers_r, name_r, op_r, edition_r.asString() );
-      }
-      return buildVersioned( refers_r, name_r, op_r, edition_r );
-  }
-  catch ( Exception & excpt )
-  {
-      ZYPP_RETHROW( excpt );
-      return NULL; // not reached
-  }
-
-  ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/capability/CapabilityImpl.h b/zypp/capability/CapabilityImpl.h
deleted file mode 100644 (file)
index 0a304b7..0000000
+++ /dev/null
@@ -1,338 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/CapabilityImpl.h
- *
-*/
-#ifndef ZYPP_CAPABILITY_CAPABILITYIMPL_H
-#define ZYPP_CAPABILITY_CAPABILITYIMPL_H
-
-#include "zypp/base/ReferenceCounted.h"
-#include "zypp/base/NonCopyable.h"
-
-#include "zypp/Capability.h"
-#include "zypp/Resolvable.h"
-#include "zypp/CapMatch.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-    DEFINE_PTR_TYPE(CapabilityImpl)
-
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : CapabilityImpl
-    //
-    /** Abstract base for Capability implementations.
-     *
-     * Example: Adding a new kind of capability: FilesystemCap
-     * \code
-     * 1) Create the implementataion files
-     *       zypp/capability/FilesystemCap.h
-     *       zypp/capability/FilesystemCap.cc
-     *    for
-     *       class FilesystemCap : public CapabilityImpl
-     *
-     * 2) Add include in zypp/capability/Capabilities.h
-     *       #include "zypp/capability/FilesystemCap.h"
-     *
-     * 3) Add forward declaration in zypp/capability/CapTraits.h
-     *       class FilesystemCap;
-     *
-     * 4) Define the capabilities kind in zypp/capability/CapTraits.cc
-     *       template<>
-     *       const CapabilityTraits::KindType CapTraits<FilesystemCap> ::kind( "FilesystemCap" );
-     *
-     * 5) If needed, define the EvalCap in zypp/CapFactory.h
-     *       Capability filesystemEvalCap() const;
-     *    What's this?
-     *    Some capabilities are not evaluated by comparing 2 capabilities, but represent a query
-     *    for some system property: 'filesystem(xfs)' -> 'xfs is listed in /etc/sysconfig/stoage'.
-     *    The query is performed iff the capability is compared to a special EvalCap, which is usg.
-     *    provided by a special SystemResolvable>
-     *       <System> : provides    : filesystem()    // the filesystemEvalCap
-     *       <Package>: supplements : filesystem(xfs) // a package that supplements xfs filesystem
-     * \endcode
-    */
-    class CapabilityImpl : public base::ReferenceCounted, private base::NonCopyable
-    {
-    public:
-      typedef CapabilityImpl           Self;
-      typedef CapabilityImpl_Ptr       Ptr;
-      typedef CapabilityImpl_constPtr  constPtr;
-
-      typedef CapabilityTraits::KindType  Kind;
-
-    public:
-      /** Kind of capability.  */
-      virtual const Kind & kind() const = 0;
-
-      /** Kind of Resolvable \c this refers to. */
-      const Resolvable::Kind & refers() const
-      { return _refers; }
-
-      /** Relevant per default. */
-      virtual bool relevant() const
-      { return true; }
-
-      /** Return whether the Capabilities match.
-       * \note We rely on Capability passing non NULL pointers.
-      */
-      virtual CapMatch matches( const constPtr & rhs ) const = 0;
-
-      /** The string representation that enables \ref CapFactory
-       * to recreate this capability.
-       * \todo check it!
-      */
-      virtual std::string encode() const = 0;
-
-      /** More or less human readable representation as string.
-       * Suitable for displaying it at the UI. Defaults to
-       * \ref encode.
-      */
-      virtual std::string asString() const
-      { return encode(); }
-
-      /** \deprecated A string representation usg. without
-       * edition range. All Capabilities that may match each other
-       * must have the same index. That's ugly, but the way the
-       * solver currently uses it.
-      */
-      virtual std::string index() const
-      { return encode(); }
-
-      virtual size_t hash() const;
-      virtual bool same (const constPtr &rhs) const;
-
-    public:
-      /** Solver hack. */
-      struct SplitInfo
-      {
-        std::string name;
-        std::string path;
-      };
-      /** Solver hack. */
-      static SplitInfo getSplitInfo( const Capability & cap );
-
-      /** Access to Capability details. */
-      static constPtr backdoor( const Capability & cap )
-      { return cap._pimpl.getPtr(); }
-
-    protected:
-      /** Ctor taking the kind of Resolvable \c this refers to.*/
-      CapabilityImpl( const Resolvable::Kind & refers_r );
-
-    protected: // Match helpers
-      bool sameKind( const constPtr & rhs ) const
-      { return kind() == rhs->kind(); }
-
-      bool sameRefers( const constPtr & rhs ) const
-      { return _refers == rhs->_refers; }
-
-      bool sameKindAndRefers( const constPtr & rhs ) const
-      { return sameKind( rhs ) && sameRefers( rhs ); }
-
-    protected:
-      /** Helper for stream output. */
-      virtual std::ostream & dumpOn( std::ostream & str ) const;
-
-    private:
-      /** Kind of Resolvable \c this refers to. */
-      Resolvable::Kind _refers;
-
-    private:
-      friend struct CapImplOrder;
-      /** Helper for CapImplOrder to define an order relation.
-       * \invariant CapImplOrder asserts that \a rhs \c refers
-       * and \c kind values are equal to \c this. Implementation
-       * may concentrate on the remaining values.
-       *
-       * Default compares \ref encoded.
-      */
-      virtual bool capImplOrderLess( const constPtr & rhs ) const;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /** Check whether \a op_r and \a edition_r make a valid edition spec.
-     *
-     * Rel::NONE is not usefull thus forbidden. Rel::ANY can be ignored,
-     * so no VersionedCap is needed for this. Everything else requires
-     * a VersionedCap.
-     *
-     * \return Whether to build a VersionedCap (i.e. \a op_r
-     * is not Rel::ANY.
-    */
-    bool isEditionSpec( Rel op_r, const Edition & edition_r );
-
-    /** Test for a FileCap. \a name_r starts with \c "/". */
-    bool isFileSpec( const std::string & name_r );
-
-    /** Test for a FileCap that is likely being REQUIRED.
-     * Files below \c /bin , \c /sbin ,  \c /lib etc. Scanning a
-     * packages filelist, an \e interesting FileCap might be worth
-     * being remembered in PROVIDES.
-    */
-    bool isInterestingFileSpec( const std::string & name_r );
-
-    /** Test for a SplitCap. \a name_r constains \c ":/". */
-    bool isSplitSpec( const std::string & name_r );
-
-    /** Test for a HalCap. \a name_r starts with  "hal(". */
-    bool isHalSpec( const std::string & name_r );
-
-    /** Test for a ModaliasCap. \a name_r starts with  "modalias(". */
-    bool isModaliasSpec( const std::string & name_r );
-
-    /** Test for a FilesystemCap. \a name_r starts with  "filesystem(". */
-    bool isFilesystemSpec( const std::string & name_r );
-
-    /** Try to build a file cap from \a name_r .
-     *
-     * The CapabilityImpl is built here and inserted into _uset.
-     * The final Capability must be created by CapFactory, as it
-     * is a friend of Capability. Here we can't access the ctor.
-     */
-    CapabilityImpl::Ptr buildFile( const Resolvable::Kind & refers_r,
-                                  const std::string & name_r );
-
-    /** Try to build a non versioned cap from \a name_r .
-     *
-     * The CapabilityImpl is built here and inserted into _uset.
-     * The final Capability must be created by CapFactory, as it
-     * is a friend of Capability. Here we can't access the ctor.
-    */
-    CapabilityImpl::Ptr buildNamed( const Resolvable::Kind & refers_r,
-                                   const std::string & name_r );
-
-    /** Try to build a versioned cap from \a name_r .
-     *
-     * The CapabilityImpl is built here and inserted into _uset.
-     * The final Capability must be created by CapFactory, as it
-     * is a friend of Capability. Here we can't access the ctor.
-     *
-     * \todo Quick check for name not being filename or split.
-    */
-    CapabilityImpl::Ptr buildVersioned( const Resolvable::Kind & refers_r,
-                                       const std::string & name_r,
-                                       Rel op_r,
-                                       const Edition & edition_r );
-
-    /** Try to build a hal cap from \a name_r .
-     *
-     * The CapabilityImpl is built here
-     * The final Capability must be created by CapFactory, as it
-     * is a friend of Capability. Here we can't access the ctor.
-     *
-     * \todo Fix incaccuracy.
-    */
-    CapabilityImpl::Ptr buildHal( const Resolvable::Kind & refers_r,
-                                 const std::string & name_r,
-                                 Rel op_r = Rel::ANY,
-                                 const std::string & value_r = std::string() );
-
-    /** Try to build a modalias cap from \a name_r .
-     *
-     * The CapabilityImpl is built here
-     * The final Capability must be created by CapFactory, as it
-     * is a friend of Capability. Here we can't access the ctor.
-     *
-     * \todo Fix incaccuracy.
-    */
-    CapabilityImpl::Ptr buildModalias( const Resolvable::Kind & refers_r,
-                                      const std::string & name_r,
-                                      Rel op_r = Rel::ANY,
-                                      const std::string & value_r = std::string() );
-
-    /** Try to build a filesystem cap from \a name_r .
-     *
-     * The CapabilityImpl is built here
-     * The final Capability must be created by CapFactory, as it
-     * is a friend of Capability. Here we can't access the ctor.
-     *
-     * \todo Fix incaccuracy.
-    */
-    CapabilityImpl::Ptr buildFilesystem( const Resolvable::Kind & refers_r,
-                                        const std::string & name_r );
-
-    ///////////////////////////////////////////////////////////////////
-
-    CapabilityImpl::Ptr parse( const Resolvable::Kind & refers_r,
-                              const std::string & strval_r );
-
-    CapabilityImpl::Ptr parse( const Resolvable::Kind & refers_r,
-                              const std::string & name_r,
-                              const std::string & op_r,
-                              const std::string & edition_r );
-
-    CapabilityImpl::Ptr parse( const Resolvable::Kind & refers_r,
-                              const std::string & name_r,
-                              Rel op_r,
-                              const Edition & edition_r );
-
-    /** Test whether a CapabilityImpl is of a certain Kind.
-     * \code
-     * isKind<FileCap>(cap);
-     * \endcode
-    */
-    template<class _Cap>
-      inline bool isKind( const CapabilityImpl::constPtr & cap )
-      { return cap && cap->kind() == CapTraits<_Cap>::kind; }
-
-    /** Short for dynamic_pointer_cast. */
-    template<class _Cap>
-      inline intrusive_ptr<const _Cap> asKind( const CapabilityImpl::constPtr & cap )
-      { return dynamic_pointer_cast<const _Cap>(cap); }
-
-    /** Short for dynamic_pointer_cast. */
-    template<class _Cap>
-      inline intrusive_ptr<_Cap> asKind( const CapabilityImpl::Ptr & cap )
-      { return dynamic_pointer_cast<_Cap>(cap); }
-
-    /** Access to Capability details. */
-    template<class _Cap>
-      inline intrusive_ptr<const _Cap> asKind( const Capability & cap )
-      { return dynamic_pointer_cast<const _Cap>( CapabilityImpl::backdoor(cap) ); }
-
-    ///////////////////////////////////////////////////////////////////
-
-    /** Ordering relation used by ::CapFactory to unify CapabilityImpl. */
-    struct CapImplOrder : public std::binary_function<CapabilityImpl::constPtr, CapabilityImpl::constPtr, bool>
-    {
-      /** */
-      bool operator()( const CapabilityImpl::constPtr & lhs,
-                       const CapabilityImpl::constPtr & rhs ) const
-      {
-        if ( lhs->refers() != rhs->refers() )
-          return lhs->refers() < rhs->refers();
-        if ( lhs->kind() != rhs->kind() )
-          return lhs->kind() < rhs->kind();
-        return lhs->capImplOrderLess( rhs );
-      }
-    };
-
-    typedef std::set<CapabilityImpl::Ptr> CapabilityImplPtrSet;
-
-    inline bool exactly_same_caps_p (const CapabilityImpl::constPtr & lhs,
-                             const CapabilityImpl::constPtr & rhs )
-    {
-      return (   lhs->refers() == rhs->refers()
-             && lhs->kind() == rhs->kind()
-             && lhs->same(rhs) );
-    }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_CAPABILITY_CAPABILITYIMPL_H
diff --git a/zypp/capability/ConditionalCap.h b/zypp/capability/ConditionalCap.h
deleted file mode 100644 (file)
index f9e7bf7..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/ConditionalCap.h
- *
-*/
-#ifndef ZYPP_CAPABILITY_CONDITIONALCAP_H
-#define ZYPP_CAPABILITY_CONDITIONALCAP_H
-
-#include "zypp/capability/CapabilityImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : ConditionalCap
-    //
-    /** \todo Implement it. */
-    class ConditionalCap : public CapabilityImpl
-    {
-    public:
-      /** Return whether the Capabilities match. */
-      virtual CapMatch matches( const CapabilityImpl & rhs ) const
-      { return false; }
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_CAPABILITY_CONDITIONALCAP_H
diff --git a/zypp/capability/FileCap.cc b/zypp/capability/FileCap.cc
deleted file mode 100644 (file)
index 6d68f60..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/FileCap.cc
- *
-*/
-#include "zypp/capability/FileCap.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    IMPL_PTR_TYPE(FileCap)
-    
-    const CapabilityImpl::Kind & FileCap::kind() const
-    { return CapTraits<Self>::kind; }
-
-    CapMatch FileCap::matches( const CapabilityImpl::constPtr & rhs ) const
-    {
-      return (    sameKindAndRefers( rhs )
-               && _fname == asKind<Self>(rhs)->_fname );
-    }
-
-    std::string FileCap::encode() const
-    { return _fname; }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/capability/FileCap.h b/zypp/capability/FileCap.h
deleted file mode 100644 (file)
index f5a3f33..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/FileCap.h
- *
-*/
-#ifndef ZYPP_CAPABILITY_FILECAP_H
-#define ZYPP_CAPABILITY_FILECAP_H
-
-#include "zypp/capability/CapabilityImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    DEFINE_PTR_TYPE(FileCap)
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : FileCap
-    //
-    /** A \c filename matching if some Resolvable provides it.
-     *
-     * \see \ref capability::isInterestingFileSpec to test whether some
-     * filename is likely targeted by some requires, thus worth being
-     * provided.
-     *
-     * \todo Check whether we have to look into the Resolable filelist as well.
-    */
-    class FileCap : public CapabilityImpl
-    {
-    public:
-      typedef FileCap Self;
-      typedef FileCap_Ptr Ptr;
-      typedef FileCap_constPtr constPtr;
-
-      /** Ctor */
-      FileCap( const Resolvable::Kind & refers_r, const std::string & fname_r )
-      : CapabilityImpl( refers_r )
-      , _fname( fname_r )
-      {}
-
-    public:
-      std::string filename() const
-      { return _fname; }
-
-      /**  */
-      virtual const Kind & kind() const;
-
-      /** Same kind, refers and filename. */
-      virtual CapMatch matches( const CapabilityImpl::constPtr & rhs ) const;
-
-      /** Filename. */
-      virtual std::string encode() const;
-
-    private:
-      /**  */
-      std::string _fname;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_CAPABILITY_FILECAP_H
diff --git a/zypp/capability/FilesystemCap.cc b/zypp/capability/FilesystemCap.cc
deleted file mode 100644 (file)
index 9ae2f6c..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/FilesystemCap.cc
- *
-*/
-#include <iostream>
-
-#include "zypp/base/Logger.h"
-#include "zypp/base/WatchFile.h"
-#include "zypp/base/Sysconfig.h"
-#include "zypp/base/SerialNumber.h"
-
-#include "zypp/capability/FilesystemCap.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    namespace
-    {
-      const Pathname & sysconfigStoragePath()
-      {
-        static Pathname _p( "/etc/sysconfig/storage" );
-        return _p;
-      }
-    }
-
-    IMPL_PTR_TYPE(FilesystemCap)
-
-    /** Ctor */
-    FilesystemCap::FilesystemCap( const Resolvable::Kind & refers_r,
-                                 const std::string & name_r )
-    : CapabilityImpl( refers_r )
-    , _name( name_r )
-    {}
-
-    const CapabilityImpl::Kind & FilesystemCap::kind() const
-    { return CapTraits<Self>::kind; }
-
-    CapMatch FilesystemCap::matches( const CapabilityImpl::constPtr & rhs ) const
-    {
-      if ( sameKindAndRefers( rhs ) )
-        {
-          intrusive_ptr<const Self> filesystemrhs( asKind<Self>(rhs) );
-          if ( isEvalCmd() == filesystemrhs->isEvalCmd() )
-            return CapMatch::irrelevant;
-
-          return( isEvalCmd() ? filesystemrhs->evaluate() : evaluate() );
-        }
-      return false;
-    }
-
-    std::string FilesystemCap::encode() const
-    {
-      std::string ret( "filesystem(" );
-      ret += _name;
-      ret += ")";
-      return ret;
-    }
-
-    std::string FilesystemCap::index() const
-    {
-      return "filesystem()";
-    }
-
-    bool FilesystemCap::isEvalCmd() const
-    { return _name.empty(); }
-
-
-
-    bool FilesystemCap::evaluate() const
-    {
-      static SerialNumberWatcher sysconfigStorage;
-      static std::set<std::string> fs;
-
-      if ( sysconfigStorage.remember( sysconfigStorageSerial() ) )
-      {
-       std::set<std::string> newfs;
-       str::split( base::sysconfig::read( sysconfigStoragePath() )["USED_FS_LIST"],
-                   std::inserter( newfs, newfs.end() ) );
-       fs.swap( newfs );
-      }
-
-      return( fs.find( _name ) != fs.end() );
-    }
-
-    const SerialNumber & FilesystemCap::sysconfigStorageSerial()
-    {
-      static WatchFile    _sysconfigFile( sysconfigStoragePath(), WatchFile::NO_INIT );
-      static SerialNumber _serial;
-
-      if ( _sysconfigFile.hasChanged() )
-      {
-        _serial.setDirty();
-      }
-      return _serial;
-    }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/capability/FilesystemCap.h b/zypp/capability/FilesystemCap.h
deleted file mode 100644 (file)
index 9205216..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/FilesystemCap.h
- *
-*/
-#ifndef ZYPP_CAPABILITY_FILESYSTEMCAP_H
-#define ZYPP_CAPABILITY_FILESYSTEMCAP_H
-
-#include "zypp/capability/CapabilityImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  class SerialNumber;
-
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    DEFINE_PTR_TYPE(FilesystemCap)
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : FilesystemCap
-    //
-    /** A Capability resolved by a query to /etc/sysconfig/storage:USED_FS_LIST
-     *
-     * \note FilesystemCap is special as it is self evaluating, and does not
-     * comapre to the \a rhs (or \a lhs). This is currently solved by
-     * treating a FilesystemCap with an empty name as evaluate command.
-     *
-     * \ref matches returns \c CapMatch::irrelevant, if either both sides
-     * are evaluate commands, or both are not.
-     *
-     * Otherwise the result of the query /etc/sysconfig/storage:USED_FS_LIST
-     * is returned. Either from \a lhs or \a rhs, dependent on which one is the
-     * evaluate command.
-    */
-    class FilesystemCap : public CapabilityImpl
-    {
-    public:
-      typedef FilesystemCap Self;
-      typedef FilesystemCap_Ptr Ptr;
-      typedef FilesystemCap_constPtr constPtr;
-
-    public:
-      /** Ctor */
-      FilesystemCap( const Resolvable::Kind & refers_r, const std::string & name_r );
-
-    public:
-      /**  */
-      virtual const Kind & kind() const;
-
-      /** Query USED_FS_LIST. */
-      virtual CapMatch matches( const CapabilityImpl::constPtr & rhs ) const;
-
-      /** <tt>filesystem(name)</tt> */
-      virtual std::string encode() const;
-
-      /** <tt>filesystem()</tt> */
-      virtual std::string index() const;
-
-    public:
-      const std::string & name() const
-      { return _name; }
-
-    private:
-      /** Empty FilesystemCap <tt>filesystem()</tt> */
-      bool isEvalCmd() const;
-
-      /** Query USED_FS_LIST. */
-      bool evaluate() const;
-
-    private:
-      /**  */
-      std::string _name;
-
-    public:
-      /** Serial number indicating a change in /etc/sysconfig/storage */
-      static const SerialNumber & sysconfigStorageSerial();
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_CAPABILITY_FILESYSTEMCAP_H
diff --git a/zypp/capability/HalCap.cc b/zypp/capability/HalCap.cc
deleted file mode 100644 (file)
index 6440542..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/HalCap.cc
- *
-*/
-#include "zypp/capability/HalCap.h"
-#include "zypp/target/hal/Hal.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    IMPL_PTR_TYPE(HalCap)
-    
-    const CapabilityImpl::Kind & HalCap::kind() const
-    { return CapTraits<Self>::kind; }
-
-    CapMatch HalCap::matches( const CapabilityImpl::constPtr & rhs ) const
-    {
-      if ( sameKindAndRefers( rhs ) )
-        {
-          intrusive_ptr<const Self> halrhs( asKind<Self>(rhs) );
-          if ( isEvalCmd() == halrhs->isEvalCmd() )
-            return CapMatch::irrelevant;
-
-          return( isEvalCmd() ? halrhs->evaluate() : evaluate() );
-        }
-      return false;
-    }
-
-    std::string HalCap::encode() const
-    {
-      std::string ret( "hal(" );
-      ret += _name;
-      ret += ")";
-      if ( _op != Rel::ANY )
-        {
-          ret += " ";
-          ret += _op.asString();
-          ret += " ";
-          ret += _value;
-        }
-      return ret;
-    }
-
-    std::string HalCap::index() const
-    {
-      return "hal()";
-    }
-
-    bool HalCap::isEvalCmd() const
-    { return _name.empty(); }
-
-    bool HalCap::evaluate() const
-    {
-      return target::hal::Hal::instance().query( _name, _op, _value );
-    }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/capability/HalCap.h b/zypp/capability/HalCap.h
deleted file mode 100644 (file)
index dcc3817..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/HalCap.h
- *
-*/
-#ifndef ZYPP_CAPABILITY_HALCAP_H
-#define ZYPP_CAPABILITY_HALCAP_H
-
-#include "zypp/capability/CapabilityImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    DEFINE_PTR_TYPE(HalCap)
-    
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : HalCap
-    //
-    /** A Capability resolved by a query to target::hal.
-     *
-     * \note HalCap is special as it is self evaluating, and does not
-     * comapre to the \a rhs (or \a lhs). This is currently solved by
-     * treating a HalCap with an empty name as evaluate command.
-     *
-     * \ref matches returns \c CapMatch::irrelevant, if either both sides
-     * are evaluate commands, or both are not.
-     *
-     * Otherwise the result of the query to target::hal is returned.
-     * Either from \a lhs or \a rhs, dependent on which one is the
-     * evaluate command.
-    */
-    class HalCap : public CapabilityImpl
-    {
-    public:
-      typedef HalCap Self;
-      typedef HalCap_Ptr       Ptr;
-      typedef HalCap_constPtr  constPtr;
-
-    public:
-      /** Ctor */
-      HalCap( const Resolvable::Kind & refers_r, const std::string & name_r )
-      : CapabilityImpl( refers_r )
-      , _name( name_r )
-      {}
-
-      /** Ctor */
-      HalCap( const Resolvable::Kind & refers_r,
-              const std::string & name_r,
-              Rel op_r,
-              const std::string & value_r )
-      : CapabilityImpl( refers_r )
-      , _name( name_r )
-      , _op( op_r )
-      , _value( value_r )
-      {}
-
-    public:
-      /**  */
-      virtual const Kind & kind() const;
-
-      /** Query target::Hal. */
-      virtual CapMatch matches( const CapabilityImpl::constPtr & rhs ) const;
-
-      /** <tt>hal(name) [op value]</tt> */
-      virtual std::string encode() const;
-
-      /** <tt>hal(name)</tt> */
-      virtual std::string index() const;
-      
-    public:
-      const std::string & name() const
-      { return _name; }
-      
-      Rel op() const
-      { return _op; }
-      
-      const std::string & value() const
-      { return _value; }
-
-    private:
-      /** Empty HalCap <tt>hal()</tt> */
-      bool isEvalCmd() const;
-
-      /** Query target::Hal. */
-      bool evaluate() const;
-
-    private:
-      /**  */
-      std::string _name;
-      Rel _op;
-      std::string _value;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_CAPABILITY_HALCAP_H
diff --git a/zypp/capability/ModaliasCap.cc b/zypp/capability/ModaliasCap.cc
deleted file mode 100644 (file)
index dd30b5d..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/ModaliasCap.cc
- *
-*/
-#include <iostream>
-#include "zypp/base/Logger.h"
-
-#include "zypp/capability/ModaliasCap.h"
-#include "zypp/target/modalias/Modalias.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    IMPL_PTR_TYPE(ModaliasCap)
-    
-    /** If name_r contains 2 ':', the 1st part is a package name. */
-    inline void modsplit( std::string & name_r, std::string & pkgname_r )
-    {
-      std::string::size_type pos1( name_r.find_first_of( ":" ) );
-      std::string::size_type pos2( name_r.find_last_of( ":" ) );
-      if ( pos1 != pos2 )
-        {
-          pkgname_r = name_r.substr( 0, pos1 );
-          name_r.erase( 0, pos1+1 );
-        }
-    }
-
-    /** Ctor */
-    ModaliasCap::ModaliasCap( const Resolvable::Kind & refers_r,
-                              const std::string & name_r )
-    : CapabilityImpl( refers_r )
-    , _name( name_r )
-    { modsplit( _name, _pkgname ); }
-
-    /** Ctor */
-    ModaliasCap::ModaliasCap( const Resolvable::Kind & refers_r,
-                              const std::string & name_r,
-                              Rel op_r,
-                              const std::string & value_r )
-    : CapabilityImpl( refers_r )
-    , _name( name_r )
-    , _op( op_r )
-    , _value( value_r )
-    { modsplit( _name, _pkgname ); }
-
-    const CapabilityImpl::Kind & ModaliasCap::kind() const
-    { return CapTraits<Self>::kind; }
-
-    CapMatch ModaliasCap::matches( const CapabilityImpl::constPtr & rhs ) const
-    {
-      if ( sameKindAndRefers( rhs ) )
-        {
-          intrusive_ptr<const Self> modaliasrhs( asKind<Self>(rhs) );
-          if ( isEvalCmd() == modaliasrhs->isEvalCmd() )
-            return CapMatch::irrelevant;
-
-          return( isEvalCmd() ? modaliasrhs->evaluate() : evaluate() );
-        }
-      return false;
-    }
-
-    std::string ModaliasCap::encode() const
-    {
-      std::string ret( "modalias(" );
-      if ( !_pkgname.empty() )
-        {
-          ret += _pkgname;
-          ret += ":";
-        }
-      ret += _name;
-      ret += ")";
-      if ( _op != Rel::ANY )
-        {
-          ret += " ";
-          ret += _op.asString();
-          ret += " ";
-          ret += _value;
-        }
-      return ret;
-    }
-
-    std::string ModaliasCap::index() const
-    {
-      return "modalias()";
-    }
-
-    bool ModaliasCap::isEvalCmd() const
-    { return _name.empty(); }
-
-    bool ModaliasCap::evaluate() const
-    {
-      return target::modalias::Modalias::instance().query( _name, _op, _value );
-    }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/capability/ModaliasCap.h b/zypp/capability/ModaliasCap.h
deleted file mode 100644 (file)
index cd41635..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/ModaliasCap.h
- *
-*/
-#ifndef ZYPP_CAPABILITY_MODALIASCAP_H
-#define ZYPP_CAPABILITY_MODALIASCAP_H
-
-#include "zypp/base/Deprecated.h"
-#include "zypp/capability/CapabilityImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    DEFINE_PTR_TYPE(ModaliasCap)
-    
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : ModaliasCap
-    //
-    /** A Capability resolved by a query to target::modalias.
-     *
-     * \note ModaliasCap is special as it is self evaluating, and does not
-     * comapre to the \a rhs (or \a lhs). This is currently solved by
-     * treating a ModaliasCap with an empty name as evaluate command.
-     *
-     * \ref matches returns \c CapMatch::irrelevant, if either both sides
-     * are evaluate commands, or both are not.
-     *
-     * Otherwise the result of the query to target::modalias is returned.
-     * Either from \a lhs or \a rhs, dependent on which one is the
-     * evaluate command.
-    */
-    class ModaliasCap : public CapabilityImpl
-    {
-    public:
-      typedef ModaliasCap Self;
-      typedef ModaliasCap_Ptr Ptr;
-      typedef ModaliasCap_constPtr constPtr;
-      
-    public:
-      /** Ctor */
-      ModaliasCap( const Resolvable::Kind & refers_r, const std::string & name_r );
-
-      /** Ctor */
-      ModaliasCap( const Resolvable::Kind & refers_r,
-                   const std::string & name_r,
-                   Rel op_r,
-                   const std::string & value_r );
-
-    public:
-      /**  */
-      virtual const Kind & kind() const;
-
-      /** Query target::Modalias. */
-      virtual CapMatch matches( const CapabilityImpl::constPtr & rhs ) const;
-
-      /** <tt>modalias(name) [op value]</tt> */
-      virtual std::string encode() const;
-
-      /** <tt>modalias()</tt> */
-      virtual std::string index() const;
-
-    public:
-      const std::string & pkgname() const
-      { return _pkgname; }
-
-      void setPkgname( const std::string &pn )
-      { _pkgname = pn; }
-      
-      ZYPP_DEPRECATED const std::string & querystring() const
-      { return _name; }
-
-      const std::string & name() const
-      { return _name; }
-      
-      Rel op() const
-      { return _op; }
-      
-      const std::string & value() const
-      { return _value; }
-      
-    private:
-      /** Empty ModaliasCap <tt>modalias()</tt> */
-      bool isEvalCmd() const;
-
-      /** Query target::Modalias. */
-      bool evaluate() const;
-
-    private:
-      /**  */
-      std::string _pkgname;
-      std::string _name;
-      Rel _op;
-      std::string _value;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_CAPABILITY_MODALIASCAP_H
diff --git a/zypp/capability/NamedCap.cc b/zypp/capability/NamedCap.cc
deleted file mode 100644 (file)
index 1e2d623..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/NamedCap.cc
- *
-*/
-#include "zypp/capability/NamedCap.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    IMPL_PTR_TYPE(NamedCap)
-
-    const CapabilityImpl::Kind & NamedCap::kind() const
-    { return CapTraits<Self>::kind; }
-
-    CapMatch NamedCap::matches( const CapabilityImpl::constPtr & rhs ) const
-    {
-      if ( sameKindAndRefers( rhs ) )
-        {
-          intrusive_ptr<const Self> namedrhs( asKind<Self>(rhs) );
-          return(    _name == namedrhs->_name
-                  && range().overlaps( namedrhs->range() ) );
-        }
-      return false;
-    }
-
-    bool NamedCap::same( const CapabilityImpl_constPtr & rhs ) const
-    {
-      intrusive_ptr<const Self> namedrhs( asKind<Self>(rhs) );
-      if ( ! ( namedrhs && sameRefers( namedrhs ) ) )
-        return false;
-
-      if ( name() != namedrhs->name() )
-        return false;
-
-      const Edition::MatchRange & myrange( range() );
-      const Edition::MatchRange & otherrange( namedrhs->range() );
-
-      if ( myrange.op != otherrange.op )
-        return false;
-
-      if ( myrange.op == Rel::ANY ) // ANY ==> editions are irrelevant
-        return true;
-
-      return( myrange.value == otherrange.value );
-    }
-
-    std::string NamedCap::encode() const
-    { return _name; }
-
-    const Edition::MatchRange & NamedCap::range() const
-    {
-      static Edition::MatchRange _range;
-      return _range;
-    }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/capability/NamedCap.h b/zypp/capability/NamedCap.h
deleted file mode 100644 (file)
index a100ebf..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/NamedCap.h
- *
-*/
-#ifndef ZYPP_CAPABILITY_NAMEDCAP_H
-#define ZYPP_CAPABILITY_NAMEDCAP_H
-
-#include "zypp/capability/CapabilityImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    DEFINE_PTR_TYPE(NamedCap)
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : NamedCap
-    //
-    /** A \c name and optional Edition::MatchRange.
-     * To provide an Edition::MatchRange create a \ref VersionedCap.
-    */
-    class NamedCap : public CapabilityImpl
-    {
-    public:
-      typedef NamedCap Self;
-      typedef NamedCap_Ptr Ptr;
-      typedef NamedCap_constPtr constPtr;
-
-      /** Ctor */
-      NamedCap( const Resolvable::Kind & refers_r, const std::string & name_r )
-      : CapabilityImpl( refers_r )
-      , _name( name_r )
-      {}
-
-    public:
-      /**  */
-      virtual const Kind & kind() const;
-
-      /** Return whether the Capabilities match. */
-      virtual CapMatch matches( const CapabilityImpl::constPtr & rhs ) const;
-
-      /** Name. */
-      virtual std::string encode() const;
-
-      /** The name. */
-      const std::string & name() const
-      { return _name; }
-      /** The operator (defaults to Rel::NONE) */
-      virtual Rel op() const
-      { return Rel::NONE; }
-      /** The edition (defaults to Edition::noedition) */
-      virtual Edition edition() const
-      { return Edition::noedition; }
-
-      virtual bool same( const CapabilityImpl_constPtr & rhs ) const;
-
-    protected:
-      /**  Rel::ANY. */
-      virtual const Edition::MatchRange & range() const;
-
-    private:
-      /**  */
-      std::string _name;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_CAPABILITY_NAMEDCAP_H
diff --git a/zypp/capability/NullCap.cc b/zypp/capability/NullCap.cc
deleted file mode 100644 (file)
index 9dd7ddc..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/NullCap.cc
- *
-*/
-#include "zypp/capability/NullCap.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    NullCap::NullCap()
-    : CapabilityImpl( Resolvable::Kind() ) // no Kind!
-    {}
-
-    CapabilityImpl_Ptr NullCap::instance()
-    {
-      static CapabilityImpl_Ptr _instance( new NullCap );
-      return _instance;
-    }
-
-    const CapabilityImpl::Kind & NullCap::kind() const
-    { return CapTraits<Self>::kind; }
-
-    bool NullCap::relevant() const
-    { return false; }
-
-    CapMatch NullCap::matches( const CapabilityImpl::constPtr & rhs ) const
-    { return CapMatch::irrelevant; }
-
-    std::string NullCap::encode() const
-    { return std::string(); }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/capability/NullCap.h b/zypp/capability/NullCap.h
deleted file mode 100644 (file)
index 18157dc..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/NullCap.h
- *
-*/
-#ifndef ZYPP_CAPABILITY_NULLCAP_H
-#define ZYPP_CAPABILITY_NULLCAP_H
-
-#include "zypp/capability/CapabilityImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : NullCap
-    //
-    /** A dummy Capability.
-     *
-     * It's a singleton, so you can't construct one. Call \ref instance to
-     * get a CapabilityImpl_Ptr to the NullCap.
-    */
-    class NullCap : public CapabilityImpl
-    {
-    public:
-      /** Get a Ptr to the NULLCap. */
-      static CapabilityImpl_Ptr instance();
-
-    private:
-      /** Private Ctor.
-       * Call \ref instance to get a CapabilityImpl_Ptr to the NullCap.
-      */
-      NullCap();
-
-    public:
-      typedef NullCap Self;
-
-      /**  */
-      virtual const Kind & kind() const;
-
-      /** Not relevant. */
-      virtual bool relevant() const;
-
-      /** Iirrelevant. */
-      virtual CapMatch matches( const CapabilityImpl::constPtr & rhs ) const;
-
-      /** Empty string. */
-      virtual std::string encode() const;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_CAPABILITY_NULLCAP_H
diff --git a/zypp/capability/OrCap.h b/zypp/capability/OrCap.h
deleted file mode 100644 (file)
index 6a94dcb..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/OrCap.h
- *
-*/
-#ifndef ZYPP_CAPABILITY_ORCAP_H
-#define ZYPP_CAPABILITY_ORCAP_H
-
-#include "zypp/capability/CapabilityImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : OrCap
-    //
-    /** \todo Implement it. */
-    class OrCap : public CapabilityImpl
-    {
-    public:
-      /** Return whether the Capabilities match. */
-      virtual CapMatch matches( const CapabilityImpl & rhs ) const
-      { return false; }
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_CAPABILITY_ORCAP_H
diff --git a/zypp/capability/SplitCap.cc b/zypp/capability/SplitCap.cc
deleted file mode 100644 (file)
index c275439..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/SplitCap.cc
- *
-*/
-#include "zypp/capability/SplitCap.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    IMPL_PTR_TYPE(SplitCap)
-    
-    const CapabilityImpl::Kind & SplitCap::kind() const
-    { return CapTraits<Self>::kind; }
-
-    CapMatch SplitCap::matches( const CapabilityImpl::constPtr & rhs ) const
-    {
-      return CapMatch::irrelevant;
-    }
-
-    std::string SplitCap::encode() const
-    { return _name + ":" + _path; }
-
-    ///////////////////////////////////////////////////////////////////
-    // CLASS NAME : CapabilityImpl
-    ///////////////////////////////////////////////////////////////////
-    /** Solver hack. */
-    CapabilityImpl::SplitInfo CapabilityImpl::getSplitInfo( const Capability & cap )
-    {
-      SplitInfo ret;
-      intrusive_ptr<const SplitCap> splitPtr( asKind<SplitCap>( cap._pimpl.getPtr() ) );
-      if ( splitPtr )
-        {
-          ret.name = splitPtr->name();
-          ret.path = splitPtr->path();
-        }
-      return ret;
-    }
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/capability/SplitCap.h b/zypp/capability/SplitCap.h
deleted file mode 100644 (file)
index a01b59c..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/SplitCap.h
- *
-*/
-#ifndef ZYPP_CAPABILITY_SPLITCAP_H
-#define ZYPP_CAPABILITY_SPLITCAP_H
-
-#include "zypp/capability/CapabilityImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    DEFINE_PTR_TYPE(SplitCap)
-    
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : SplitCap
-    //
-    /** A pseudo Capability indicating a package split.
-     *
-     * <tt>packagename:/absolute/path</tt> means: If \c packagename is
-     * installed on system, and has <tt>/absolute/path</tt> in it's
-     * filelist, and is to be replaced/updated, then this package
-     * (the one providing the SplitCap) should be installed too.
-     *
-     * \todo implement matches().
-     * \todo See where and how we handle it. Currently the info is
-     * just stored here. Splits <tt>packagename:/absolute/path</tt>
-     * are shipped as \c provides (SuSE packages file), but have to
-     * be freshens, and implemented as ConditionalCap.
-    */
-    class SplitCap : public CapabilityImpl
-    {
-    public:
-      typedef SplitCap Self;
-      typedef SplitCap_Ptr Ptr;
-      typedef SplitCap_constPtr constPtr;
-      
-      /** Ctor */
-      SplitCap( const Resolvable::Kind & refers_r,
-                const std::string & name_r,
-                const std::string & path_r )
-      : CapabilityImpl( refers_r )
-      , _name( name_r )
-      , _path( path_r )
-      {}
-    public:
-      /**  */
-      virtual const Kind & kind() const;
-
-      virtual bool relevant() const
-      { return false; }
-
-      /** */
-      virtual CapMatch matches( const CapabilityImpl::constPtr & rhs ) const;
-
-      /**  <tt>name:/path</tt> */
-      virtual std::string encode() const;
-
-      const std::string & name() const
-      { return _name; }
-
-      const std::string & path() const
-      { return _path; }
-
-    private:
-      /**  */
-      std::string _name;
-      /**  */
-      std::string _path;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_CAPABILITY_SPLITCAP_H
diff --git a/zypp/capability/VersionedCap.cc b/zypp/capability/VersionedCap.cc
deleted file mode 100644 (file)
index e86aee1..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/VersionedCap.cc
- *
-*/
-#include <iostream>
-#include "zypp/base/Hash.h"
-#include "zypp/capability/VersionedCap.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    IMPL_PTR_TYPE(VersionedCap)
-
-    std::string VersionedCap::encode() const
-    {
-      std::string ret( name() );
-      if ( _range.op != Rel::ANY )
-        {
-          ret += " ";
-          ret += _range.op.asString();
-          ret += " ";
-          ret += _range.value.asString();
-        }
-      return ret;
-    }
-
-    size_t VersionedCap::hash() const
-    {
-      size_t ret = __gnu_cxx::hash<const char*>()( name().c_str() );
-      ret ^= __gnu_cxx::hash<const char*>()( _range.value.version().c_str() );
-      return ret;
-    }
-
-    std::string VersionedCap::index() const
-    { return name(); }
-
-    Rel VersionedCap::op() const
-    { return _range.op; }
-
-    Edition VersionedCap::edition () const
-    { return _range.value; }
-
-    const Edition::MatchRange & VersionedCap::range() const
-    { return _range; }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/capability/VersionedCap.h b/zypp/capability/VersionedCap.h
deleted file mode 100644 (file)
index c93b502..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/capability/VersionedCap.h
- *
-*/
-#ifndef ZYPP_CAPABILITY_VERSIONEDCAP_H
-#define ZYPP_CAPABILITY_VERSIONEDCAP_H
-
-#include "zypp/capability/NamedCap.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace capability
-  { /////////////////////////////////////////////////////////////////
-
-    DEFINE_PTR_TYPE(VersionedCap)
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : VersionedCap
-    //
-    /** A \ref NamedCap providing an Edition::MatchRange.
-     * Overloads \ref encode and provides the \ref range.
-     * Remaining stuff is handles in \ref NamedCap.
-    */
-    class VersionedCap : public NamedCap
-    {
-      public:
-      typedef VersionedCap Self;
-
-      /** Ctor */
-      VersionedCap( const Resolvable::Kind & refers_r,
-                    const std::string & name_r,
-                    Rel op_r,
-                    const Edition & edition_r )
-      : NamedCap( refers_r, name_r )
-      , _range( op_r, edition_r )
-      {}
-
-    public:
-      /** Name Op Edition. */
-      virtual std::string encode() const;
-
-      /** Name only. */
-      virtual std::string index() const;
-      /** Rel op. */
-      virtual Rel op() const;
-      /** Edition. */
-      virtual Edition edition () const;
-
-      virtual size_t hash() const;
-
-    protected:
-      /** Implementation dependent value. */
-      virtual const Edition::MatchRange & range() const;
-
-    private:
-      /**  */
-      Edition::MatchRange _range;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace capability
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_CAPABILITY_VERSIONEDCAP_H
index bf05121..2413d92 100644 (file)
@@ -20,7 +20,6 @@
 #include "zypp/base/NonCopyable.h"
 
 #include "zypp/data/RecordId.h"
-#include "zypp/capability/CapabilityImpl.h"
 #include "zypp/Pathname.h"
 #include "zypp/Resolvable.h"
 #include "zypp/NVR.h"
@@ -39,8 +38,7 @@ namespace zypp
 {
 namespace data
 {
-  /** ::data dependencies are CapabilityImpl. */
-  typedef std::set<capability::CapabilityImpl::Ptr> DependencyList;
+  typedef CapabilitySet                             DependencyList;
   typedef std::map<zypp::Dep, DependencyList>       Dependencies;
 
   typedef DefaultIntegral<unsigned,0u>              MediaNr;
@@ -60,13 +58,13 @@ namespace data
       {};
 
       /** Kind */
-      zypp::Resolvable::Kind kind;
+      ResKind     kind;
       /** Name */
       std::string name;
       /** Edition */
-      std::string edition;
+      Edition     edition;
       /** Architecture */
-      std::string arch;
+      Arch        arch;
       /** Dependencies */
       Dependencies deps;
   };
diff --git a/zypp/detail/.cvsignore b/zypp/detail/.cvsignore
deleted file mode 100644 (file)
index 5c94a2f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Makefile.in
-Makefile
-.deps
-.libs
-*.o
-*.lo
-*.a
-*.la
diff --git a/zypp/detail/AtomImpl.cc b/zypp/detail/AtomImpl.cc
deleted file mode 100644 (file)
index 7d934af..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/detail/AtomImpl.cc
- *
-*/
-
-#include "zypp/detail/AtomImpl.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : AtomImpl
-    //
-    ///////////////////////////////////////////////////////////////////
-
-    /** Default ctor */
-    AtomImpl::AtomImpl()
-    {}
-    /** Dtor */
-    AtomImpl::~AtomImpl()
-    {}
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/AtomImpl.h b/zypp/detail/AtomImpl.h
deleted file mode 100644 (file)
index 71870f1..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/detail/AtomImpl.h
- *
-*/
-#ifndef ZYPP_DETAIL_ATOMIMPL_H
-#define ZYPP_DETAIL_ATOMIMPL_H
-
-#include "zypp/detail/AtomImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : AtomImpl
-    //
-    /** Class representing the link between a patch and a package */
-    class AtomImpl : public AtomImplIf
-    {
-    public:
-      /** Default ctor */
-      AtomImpl();
-      /** Dtor */
-      virtual ~AtomImpl();
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_ATOMIMPL_H
diff --git a/zypp/detail/AtomImplIf.cc b/zypp/detail/AtomImplIf.cc
deleted file mode 100644 (file)
index 261a359..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/AtomImplIf.cc
- *
-*/
-#include "zypp/detail/AtomImplIf.h"
-#include <iostream>
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-    // Default implementation of AtomImplIf attributes,
-    // as far as reasonable.
-    /////////////////////////////////////////////////////////////////
-
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/AtomImplIf.h b/zypp/detail/AtomImplIf.h
deleted file mode 100644 (file)
index 9e2b265..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/AtomImplIf.h
- *
-*/
-#ifndef ZYPP_DETAIL_ATOMIMPLIF_H
-#define ZYPP_DETAIL_ATOMIMPLIF_H
-
-#include "zypp/detail/ResObjectImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  class Atom;
-
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : AtomImplIf
-    //
-    /** Abstract Atom implementation interface.
-    */
-    class AtomImplIf : public ResObjectImplIf
-    {
-    public:
-      typedef Atom ResType;
-
-    public:
-
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_ATOMIMPLIF_H
diff --git a/zypp/detail/ImplConnect.h b/zypp/detail/ImplConnect.h
deleted file mode 100644 (file)
index bcfd319..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/ImplConnect.h
- *
-*/
-#ifndef ZYPP_DETAIL_IMPLCONNECT_H
-#define ZYPP_DETAIL_IMPLCONNECT_H
-
-#include "zypp/detail/ResObjectImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : ImplConnect
-    //
-    /** Connect to an implementation (internal).
-     * \note This is not to be exposed in some public interface!
-     * ImplConnect::resimpl takes a _Ptr to a resolvable as argument, and returns
-     * a _Ptr to it's implementation class:
-     * \code
-     * // ResObject::Ptr      -> detail::ResImplTraits<ResObject::Impl>::Ptr
-     * // ResObject::constPtr -> detail::ResImplTraits<ResObject::Impl>::constPtr
-     * // Package::Ptr        -> detail::ResImplTraits<Package::Impl>::Ptr
-     * // Package::constPtr   -> detail::ResImplTraits<Package::Impl>::constPtr
-     *
-     * ResObject::constPtr ptr;
-     * detail::ResImplTraits<Package::Impl>::constPtr implPtr;
-     *
-     * implPtr = detail::ImplConnect::resimpl( asKind<Package>(ptr) );
-     *
-     * // implPtr will be NULL, if ptr is NULL or does not refer to a Package.
-     * \endcode
-     * Basically makes a ResObjectImplIf
-    */
-    struct ImplConnect
-    {
-      template<class _Res>
-        static typename ResImplTraits<typename _Res::Impl>::Ptr resimpl( const intrusive_ptr<_Res> & obj )
-        { return dynamic_pointer_cast<typename _Res::Impl>(getImpl( obj )); }
-
-      template<class _Res>
-        static typename ResImplTraits<typename _Res::Impl>::constPtr resimpl( const intrusive_ptr<const _Res> & obj )
-        { return dynamic_pointer_cast<const typename _Res::Impl>(getConstImpl( obj )); }
-
-    private:
-      static ResImplTraits<ResObject::Impl>::Ptr getImpl( const ResObject::Ptr & obj )
-      { return( obj ? &obj->pimpl() : NULL ); }
-
-      static ResImplTraits<ResObject::Impl>::constPtr getConstImpl( const ResObject::constPtr & obj )
-      { return( obj ? &obj->pimpl() : NULL ); }
-     };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_IMPLCONNECT_H
diff --git a/zypp/detail/MessageImpl.cc b/zypp/detail/MessageImpl.cc
deleted file mode 100644 (file)
index c56a82f..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/detail/MessageImpl.cc
- *
-*/
-
-#include "zypp/detail/MessageImpl.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : MessageImpl
-    //
-    ///////////////////////////////////////////////////////////////////
-
-    /** Default ctor */
-    MessageImpl::MessageImpl()
-    {}
-    /** Dtor */
-    MessageImpl::~MessageImpl()
-    {}
-
-    TranslatedText MessageImpl::text() const {
-      return _text;
-    }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/MessageImpl.h b/zypp/detail/MessageImpl.h
deleted file mode 100644 (file)
index 43fbd0a..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/detail/MessageImpl.h
- *
-*/
-#ifndef ZYPP_DETAIL_MESSAGEIMPL_H
-#define ZYPP_DETAIL_MESSAGEIMPL_H
-
-#include "zypp/detail/MessageImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : MessageImpl
-    //
-    /** Class representing the message to be shown during update */
-    class MessageImpl : public MessageImplIf
-    {
-    public:
-      /** Default ctor */
-      MessageImpl();
-      /** Dtor */
-      virtual ~MessageImpl();
-
-    public:
-      /** Get the text of the message */
-      virtual TranslatedText text() const;
-    protected:
-      /** The text of the message */
-      TranslatedText _text;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_MESSAGEIMPL_H
diff --git a/zypp/detail/MessageImplIf.cc b/zypp/detail/MessageImplIf.cc
deleted file mode 100644 (file)
index b8f9cdc..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/MessageImplIf.cc
- *
-*/
-#include "zypp/detail/MessageImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-    // Default implementation of MessageImplIf attributes,
-    // as far as resonable.
-    /////////////////////////////////////////////////////////////////
-
-      TranslatedText MessageImplIf::text() const
-      { return TranslatedText(); }
-
-      /** Patch the message belongs to - if any */
-      Patch::constPtr MessageImplIf::patch() const
-      { return Patch::constPtr(); }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/MessageImplIf.h b/zypp/detail/MessageImplIf.h
deleted file mode 100644 (file)
index 68a8c0d..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/detail/MessageImplIf.h
- *
-*/
-#ifndef ZYPP_DETAIL_MESSAGEIMPLIF_H
-#define ZYPP_DETAIL_MESSAGEIMPLIF_H
-
-#include "zypp/detail/ResObjectImplIf.h"
-#include "zypp/Patch.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  class Message;
-
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : MessageImplIf
-    //
-    /** Abstract Message implementation interface.
-    */
-    class MessageImplIf : public ResObjectImplIf
-    {
-    public:
-      typedef Message ResType;
-
-    public:
-      /** Get the text of the message */
-      virtual TranslatedText text() const PURE_VIRTUAL;
-      /** Patch the message belongs to - if any */
-      virtual Patch::constPtr patch() const; // TODO make it abstract = 0;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_MESSAGEIMPLIF_H
diff --git a/zypp/detail/PackageImpl.cc b/zypp/detail/PackageImpl.cc
deleted file mode 100644 (file)
index e966eb5..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/PackageImpl.cc
- *
-*/
-#include "zypp/detail/PackageImpl.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // METHOD NAME : PackageImpl::PackageImpl
-    // METHOD TYPE : Ctor
-    //
-    PackageImpl::PackageImpl()
-    {}
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // METHOD NAME : PackageImpl::~PackageImpl
-    // METHOD TYPE : Dtor
-    //
-    PackageImpl::~PackageImpl()
-    {}
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/PackageImpl.h b/zypp/detail/PackageImpl.h
deleted file mode 100644 (file)
index 5ecd58c..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/PackageImpl.h
- *
-*/
-#ifndef ZYPP_DETAIL_PACKAGEIMPL_H
-#define ZYPP_DETAIL_PACKAGEIMPL_H
-
-#include "zypp/detail/PackageImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : PackageImpl
-    //
-    /**
-    */
-    class PackageImpl : public PackageImplIf
-    {
-    public:
-      PackageImpl();
-      virtual ~PackageImpl();
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_PACKAGEIMPL_H
diff --git a/zypp/detail/PackageImplIf.cc b/zypp/detail/PackageImplIf.cc
deleted file mode 100644 (file)
index a1203ac..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/PackageImplIf.cc
- *
-*/
-#include "zypp/detail/PackageImplIf.h"
-#include <iostream>
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ByteCount PackageImplIf::downloadSize() const
-    { return location().downloadSize(); }
-
-    unsigned PackageImplIf::mediaNr() const
-    { return location().medianr(); }
-
-    /////////////////////////////////////////////////////////////////
-    // Default implementation of PackageImplIf attributes,
-    // as far as resonable.
-    /////////////////////////////////////////////////////////////////
-
-      std::string PackageImplIf::buildhost() const
-      { return std::string(); }
-
-      std::string PackageImplIf::distribution() const
-      { return std::string(); }
-
-      Label PackageImplIf::license() const
-      { return Label(); }
-
-      std::string PackageImplIf::packager() const
-      { return std::string(); }
-
-      PackageGroup PackageImplIf::group() const
-      { return PackageGroup(); }
-
-      PackageImplIf::Keywords PackageImplIf::keywords() const
-      { return std::set<PackageKeyword>(); }
-
-      Changelog PackageImplIf::changelog() const
-      { return Changelog(); }
-
-      std::string PackageImplIf::url() const
-      { return std::string(); }
-
-      std::string PackageImplIf::os() const
-      { return std::string(); }
-
-      Text PackageImplIf::prein() const
-      { return Text(); }
-
-      Text PackageImplIf::postin() const
-      { return Text(); }
-
-      Text PackageImplIf::preun() const
-      { return Text(); }
-
-      Text PackageImplIf::postun() const
-      { return Text(); }
-
-      ByteCount PackageImplIf::sourcesize() const
-      { return ByteCount(); }
-
-      OnMediaLocation PackageImplIf::location() const
-      { return OnMediaLocation(); }
-
-      std::list<std::string> PackageImplIf::authors() const
-      { return std::list<std::string>(); }
-
-      std::list<std::string> PackageImplIf::filenames() const
-      { return std::list<std::string>(); }
-
-      std::list<PackageImplIf::DeltaRpm> PackageImplIf::deltaRpms() const
-      { return std::list<DeltaRpm>(); }
-
-      std::list<PackageImplIf::PatchRpm> PackageImplIf::patchRpms() const
-      { return std::list<PatchRpm>(); }
-
-      std::string PackageImplIf::sourcePkgName() const
-      { return std::string(); }
-
-      Edition PackageImplIf::sourcePkgEdition() const
-      { return Edition(); }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/PackageImplIf.h b/zypp/detail/PackageImplIf.h
deleted file mode 100644 (file)
index fcaf9ad..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/PackageImplIf.h
- *
-*/
-#ifndef ZYPP_DETAIL_PACKAGEIMPLIF_H
-#define ZYPP_DETAIL_PACKAGEIMPLIF_H
-
-#include <set>
-
-#include "zypp/detail/ResObjectImplIf.h"
-#include "zypp/CheckSum.h"
-#include "zypp/Edition.h"
-#include "zypp/Arch.h"
-#include "zypp/Changelog.h"
-#include "zypp/DiskUsage.h"
-#include "zypp/PackageKeyword.h"
-#include "zypp/repo/PackageDelta.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  class Package;
-
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : PackageImplIf
-    //
-    /** Abstract Package implementation interface.
-    */
-    class PackageImplIf : public ResObjectImplIf
-    {
-    public:
-      typedef Package ResType;
-
-    public:
-      typedef packagedelta::DeltaRpm    DeltaRpm;
-      typedef packagedelta::PatchRpm    PatchRpm;
-      typedef std::set<PackageKeyword>  Keywords;
-
-    public:
-      /** Overloaded ResObjectImpl attribute.
-       * \return The \ref location media number.
-       */
-      virtual unsigned mediaNr() const;
-
-      /** Overloaded ResObjectImpl attribute.
-       * \return The \ref location downloadSize.
-       */
-      virtual ByteCount downloadSize() const;
-
-    public:
-      /** \name Rpm Package Attributes. */
-      //@{
-
-      virtual std::string buildhost() const PURE_VIRTUAL;
-      /** */
-      virtual std::string distribution() const PURE_VIRTUAL;
-      /** */
-      virtual Label license() const PURE_VIRTUAL;
-      /** */
-      virtual std::string packager() const PURE_VIRTUAL;
-      /** */
-      virtual PackageGroup group() const PURE_VIRTUAL;
-      /** */
-      virtual Keywords keywords() const PURE_VIRTUAL;
-      /** */
-      virtual Changelog changelog() const PURE_VIRTUAL;
-      /** */
-      /** Don't ship it as class Url, because it might be
-       * in fact anything but a legal Url. */
-      virtual std::string url() const PURE_VIRTUAL;
-      /** */
-      virtual std::string os() const PURE_VIRTUAL;
-      /** */
-      virtual Text prein() const PURE_VIRTUAL;
-      /** */
-      virtual Text postin() const PURE_VIRTUAL;
-      /** */
-      virtual Text preun() const PURE_VIRTUAL;
-      /** */
-      virtual Text postun() const PURE_VIRTUAL;
-      /** */
-      virtual ByteCount sourcesize() const PURE_VIRTUAL;
-      /** */
-      virtual std::list<std::string> authors() const PURE_VIRTUAL;
-      /** */
-      virtual std::list<std::string> filenames() const PURE_VIRTUAL;
-      /** */
-      virtual std::list<DeltaRpm> deltaRpms() const PURE_VIRTUAL;
-      /** */
-      virtual std::list<PatchRpm> patchRpms() const PURE_VIRTUAL;
-
-      virtual OnMediaLocation location() const PURE_VIRTUAL;
-
-      /** Name of the source rpm this package was built from.
-       * Empty if unknown.
-       */
-      virtual std::string sourcePkgName() const PURE_VIRTUAL;
-
-      /** Edition of the source rpm this package was built from.
-       * Empty if unknown.
-       */
-      virtual Edition sourcePkgEdition() const PURE_VIRTUAL;
-
-      //@}
-
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_PACKAGEIMPLIF_H
diff --git a/zypp/detail/PatchImpl.cc b/zypp/detail/PatchImpl.cc
deleted file mode 100644 (file)
index 3daa808..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/detail/PatchImpl.cc
- *
-*/
-#include <iostream>
-
-#include "zypp/base/Logger.h"
-#include "zypp/detail/PatchImpl.h"
-#include "zypp/Package.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : PatchImpl
-    //
-    ///////////////////////////////////////////////////////////////////
-
-    /** Default ctor */
-    PatchImpl::PatchImpl()
-    {}
-
-    /** Dtor */
-    PatchImpl::~PatchImpl()
-    {}
-
-    std::string PatchImpl::id() const
-    {
-      return _patch_id;
-    }
-    Date PatchImpl::timestamp() const
-    {
-      return _timestamp;
-    }
-
-    TranslatedText PatchImpl::summary() const
-    {
-      return _summary;
-    }
-
-    TranslatedText PatchImpl::description() const
-    {
-      return _description;
-    }
-
-    std::string PatchImpl::category() const
-    {
-      return _category;
-    }
-
-    bool PatchImpl::reboot_needed() const
-    {
-      return _reboot_needed;
-    }
-
-    bool PatchImpl::affects_pkg_manager() const
-    {
-      return _affects_pkg_manager;
-    }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/PatchImpl.h b/zypp/detail/PatchImpl.h
deleted file mode 100644 (file)
index f1fb2fe..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/detail/PatchImpl.h
- *
-*/
-#ifndef ZYPP_DETAIL_PATCHIMPL_H
-#define ZYPP_DETAIL_PATCHIMPL_H
-
-#include "zypp/detail/PatchImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : PatchImpl
-    //
-    /** Class representing a patch
-     * \todo Get rid of string based ResKind detection in e.g.
-     * PatchImpl::interactive.
-    */
-    class PatchImpl : public PatchImplIf
-    {
-    public:
-      /** Default ctor */
-      PatchImpl();
-      /** Dtor */
-      ~PatchImpl();
-
-    public:
-      /** Patch ID */
-      virtual std::string id() const;
-      /** Patch time stamp */
-      virtual Date timestamp() const;
-      /** Patch summary */
-      virtual TranslatedText summary() const;
-      /** Patch description */
-      virtual TranslatedText description() const;
-      /** Patch category (recommended, security,...) */
-      virtual std::string category() const;
-      /** Does the system need to reboot to finish the update process? */
-      virtual bool reboot_needed() const;
-      /** Does the patch affect the package manager itself? */
-      virtual bool affects_pkg_manager() const;
-
-    protected:
-      /** Patch ID */
-      std::string _patch_id;
-      /** Patch time stamp */
-      Date _timestamp;
-      /** Patch summary */
-      TranslatedText _summary;
-      /** Patch description */
-      TranslatedText _description;
-      /** Patch category (recommended, security,...) */
-      std::string _category;
-      /** Does the system need to reboot to finish the update process? */
-      bool _reboot_needed;
-      /** Does the patch affect the package manager itself? */
-      bool _affects_pkg_manager;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_PATCHIMPL_H
diff --git a/zypp/detail/PatchImplIf.cc b/zypp/detail/PatchImplIf.cc
deleted file mode 100644 (file)
index 959f3a2..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/PatchImplIf.cc
- *
-*/
-#include <iostream>
-
-#include "zypp/base/Easy.h"
-#include "zypp/base/Logger.h"
-#include "zypp/ResStore.h"
-#include "zypp/CapMatchHelper.h"
-
-#include "zypp/detail/PatchImplIf.h"
-
-using std::endl;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-    // Default implementation of PatchImplIf attributes,
-    // as far as resonable.
-    /////////////////////////////////////////////////////////////////
-
-    std::string PatchImplIf::id() const
-    { return std::string(); }
-
-    Date PatchImplIf::timestamp() const
-    { return Date(); }
-
-    std::string PatchImplIf::category() const
-    { return std::string(); }
-
-    bool PatchImplIf::reboot_needed() const
-    { return false; }
-
-    bool PatchImplIf::affects_pkg_manager() const
-    { return false; }
-
-    bool PatchImplIf::interactive() const
-    {
-      if ( reboot_needed()
-           || ! licenseToConfirm().empty() )
-        {
-          return true;
-        }
-
-      AtomList atoms = all_atoms();
-      for ( AtomList::const_iterator it = atoms.begin(); it != atoms.end(); it++)
-        {
-          if (    isKind<Message>( *it )
-               || ! licenseToConfirm().empty() )
-            {
-              return true;
-            }
-        }
-
-      return false;
-    }
-
-    PatchImplIf::AtomList PatchImplIf::all_atoms() const
-    {
-      if ( ! _atomlist )
-      {
-        if ( ! hasBackRef() )
-        {
-          // We are not jet connected to the Resolvable that
-          // contains our dependencies.
-          return AtomList();
-        }
-
-        // lazy init
-        _atomlist.reset( new AtomList );
-
-        // Build the list using the repositories resolvables.
-        // Installed Patches (no repository) have this method overloaded.
-        if ( repository() )
-        {
-          const CapSet &   requires( self()->dep( Dep::REQUIRES ) );
-          const ResStore & store( repository().resolvables() );
-
-          for_( req, requires.begin(), requires.end() )
-          {
-            // lookup Patch requirements that refer to an Atom, Script or Message.
-            if ( refersTo<Atom>( *req ) || refersTo<Script>( *req ) || refersTo<Message>( *req ) )
-            {
-              for_( res, store.begin(), store.end() )
-              {
-                // Collect ALL matches in the store.
-                if ( hasMatches( (*res)->dep( Dep::PROVIDES ), (*req) ) )
-                {
-                  _atomlist->push_back( *res );
-                }
-              }
-            }
-          }
-        }
-      }
-      return *_atomlist;
-    }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/PatchImplIf.h b/zypp/detail/PatchImplIf.h
deleted file mode 100644 (file)
index 6b43c10..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/detail/PatchImplIf.h
- *
-*/
-#ifndef ZYPP_DETAIL_PATCHIMPLIF_H
-#define ZYPP_DETAIL_PATCHIMPLIF_H
-
-#include "zypp/detail/ResObjectImplIf.h"
-#include "zypp/ResObject.h"
-
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  class Patch;
-
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : PatchImplIf
-    //
-    /** Abstract Patch implementation interface.
-     */
-    class PatchImplIf : public ResObjectImplIf
-    {
-    public:
-      typedef Patch ResType;
-
-    public:
-      typedef std::list<ResObject::Ptr> AtomList;
-
-    public:
-      /** Patch ID */
-      virtual std::string id() const PURE_VIRTUAL;
-      /** Patch time stamp */
-      virtual Date timestamp() const PURE_VIRTUAL;
-      /** Patch category (recommended, security,...) */
-      virtual std::string category() const PURE_VIRTUAL;
-      /** Does the system need to reboot to finish the update process? */
-      virtual bool reboot_needed() const PURE_VIRTUAL;
-      /** Does the patch affect the package manager itself? */
-      virtual bool affects_pkg_manager() const PURE_VIRTUAL;
-
-      /** Is the patch installation interactive? (does it need user input?)
-       * \warning Computed here, usually no need to overload this.
-      */
-      virtual bool interactive() const PURE_VIRTUAL;
-      /** The list of all atoms building the patch
-       * \warning Computed here, usually no need to overload this.
-      */
-      virtual AtomList all_atoms() const PURE_VIRTUAL;
-
-    private:
-      mutable scoped_ptr<AtomList> _atomlist;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_PATCHIMPLIF_H
diff --git a/zypp/detail/PatternImpl.cc b/zypp/detail/PatternImpl.cc
deleted file mode 100644 (file)
index 3ba43bf..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/PatternImpl.cc
- *
-*/
-#include "zypp/detail/PatternImpl.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // METHOD NAME : PatternImpl::PatternImpl
-    // METHOD TYPE : Ctor
-    //
-    PatternImpl::PatternImpl()
-    {}
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // METHOD NAME : PatternImpl::~PatternImpl
-    // METHOD TYPE : Dtor
-    //
-    PatternImpl::~PatternImpl()
-    {}
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/PatternImpl.h b/zypp/detail/PatternImpl.h
deleted file mode 100644 (file)
index a1cb9b4..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/PatternImpl.h
- *
-*/
-#ifndef ZYPP_DETAIL_PATTERNIMPL_H
-#define ZYPP_DETAIL_PATTERNIMPL_H
-
-#include "zypp/detail/PatternImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : PatternImpl
-    //
-    /**
-    */
-    class PatternImpl : public PatternImplIf
-    {
-    public:
-      PatternImpl();
-      virtual ~PatternImpl();
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_PATTERNIMPL_H
diff --git a/zypp/detail/PatternImplIf.cc b/zypp/detail/PatternImplIf.cc
deleted file mode 100644 (file)
index 1bd146a..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/PatternImplIf.cc
- *
-*/
-
-#include "zypp/detail/PatternImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    bool PatternImplIf::isDefault() const
-    { return false; }
-
-    bool PatternImplIf::userVisible() const
-    { return true; }
-
-    TranslatedText PatternImplIf::category() const
-    { return TranslatedText(); }
-
-    Pathname PatternImplIf::icon() const
-    { return Pathname(); }
-
-    Pathname PatternImplIf::script() const
-    { return Pathname(); }
-
-    Label PatternImplIf::order() const
-    { return Label(); }
-
-    static void copycaps( std::set<std::string> & out, const CapSet & in)
-    {
-       for (CapSet::const_iterator it = in.begin(); it != in.end(); ++it) {
-           if (isKind<capability::NamedCap>( *it )
-               && it->refers() == ResTraits<zypp::Package>::kind )
-           {
-               out.insert( it->index() );
-           }
-       }
-    }
-
-    std::set<std::string> PatternImplIf::install_packages( const Locale & lang) const
-    {
-       std::set<std::string> result;
-
-       copycaps( result, self()->dep( Dep::REQUIRES ) );
-       copycaps( result, self()->dep( Dep::RECOMMENDS) );
-       copycaps( result, self()->dep( Dep::SUGGESTS) );
-
-       return result;
-    }
-
-    const CapSet & PatternImplIf::includes() const
-    { static CapSet _v; return _v; }
-
-    const CapSet & PatternImplIf::extends() const
-    { static CapSet _v; return _v; }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/PatternImplIf.h b/zypp/detail/PatternImplIf.h
deleted file mode 100644 (file)
index 2c1edc3..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/PatternImplIf.h
- *
-*/
-#ifndef ZYPP_DETAIL_PATTERNIMPLIF_H
-#define ZYPP_DETAIL_PATTERNIMPLIF_H
-
-#include "zypp/detail/ResObjectImplIf.h"
-#include "zypp/Pathname.h"
-#include <string>
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  class Pattern;
-
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : PatternImplIf
-    //
-    /** Abstract Pattern implementation interface.
-    */
-    class PatternImplIf : public ResObjectImplIf
-    {
-    public:
-      typedef Pattern ResType;
-
-    public:
-      virtual bool isDefault() const PURE_VIRTUAL;
-
-      virtual bool userVisible() const PURE_VIRTUAL;
-
-      virtual TranslatedText category() const PURE_VIRTUAL;
-
-      virtual Pathname icon() const PURE_VIRTUAL;
-
-      virtual Pathname script() const PURE_VIRTUAL;
-
-      virtual Label order() const PURE_VIRTUAL;
-
-      /** ui helper */
-      virtual std::set<std::string> install_packages( const Locale & lang = Locale("") ) const;
-
-      virtual const CapSet & includes() const PURE_VIRTUAL;
-
-      virtual const CapSet & extends() const PURE_VIRTUAL;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_PATTERNIMPLIF_H
diff --git a/zypp/detail/ProductImpl.cc b/zypp/detail/ProductImpl.cc
deleted file mode 100644 (file)
index 2c5f011..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/detail/ProductImpl.cc
- *
-*/
-
-#include "zypp/detail/ProductImpl.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : ProductImpl
-    //
-    ///////////////////////////////////////////////////////////////////
-
-    /** Default ctor */
-    ProductImpl::ProductImpl()
-    {}
-    /** Dtor */
-    ProductImpl::~ProductImpl()
-    {}
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/ProductImpl.h b/zypp/detail/ProductImpl.h
deleted file mode 100644 (file)
index f94dca1..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/detail/ProductImpl.h
- *
-*/
-#ifndef ZYPP_DETAIL_PRODUCTIMPL_H
-#define ZYPP_DETAIL_PRODUCTIMPL_H
-
-#include "zypp/detail/ProductImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : ProductImpl
-    //
-    /** */
-    class ProductImpl : public ProductImplIf
-    {
-    public:
-      ProductImpl();
-      ~ProductImpl();
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_PRODUCTIMPL_H
diff --git a/zypp/detail/ProductImplIf.cc b/zypp/detail/ProductImplIf.cc
deleted file mode 100644 (file)
index b93228e..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/detail/ProductImplIf.cc
- *
-*/
-
-#include "zypp/detail/ProductImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-      std::string ProductImplIf::type() const
-      { return std::string(); }
-
-      Url ProductImplIf::releaseNotesUrl() const
-      { return Url(); }
-
-      std::list<Url> ProductImplIf::updateUrls() const
-      { return std::list<Url>(); }
-
-      std::list<Url>  ProductImplIf::extraUrls() const
-      { return std::list<Url>(); }
-
-      std::list<Url>  ProductImplIf::optionalUrls() const
-      { return std::list<Url>(); }
-
-      std::list<std::string> ProductImplIf::flags() const
-      { return std::list<std::string>(); }
-
-      TranslatedText ProductImplIf::shortName() const
-      { return TranslatedText(); }
-
-      std::string ProductImplIf::distributionName() const
-      { return std::string(); }
-
-      Edition ProductImplIf::distributionEdition() const
-      { return Edition(); }
-
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-
diff --git a/zypp/detail/ProductImplIf.h b/zypp/detail/ProductImplIf.h
deleted file mode 100644 (file)
index 25b1687..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/detail/ProductImplIf.h
- *
-*/
-#ifndef ZYPP_DETAIL_PRODUCTIMPLIF_H
-#define ZYPP_DETAIL_PRODUCTIMPLIF_H
-
-#include "zypp/Locale.h"
-#include "zypp/Url.h"
-#include "zypp/detail/ResObjectImplIf.h"
-
-#ifndef PURE_VIRTUAL
-#define PURE_VIRTUAL = 0
-#endif
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  class Product;
-
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : ProductImplIf
-    //
-    /** Abstract Product implementation interface.
-    */
-    class ProductImplIf : public ResObjectImplIf
-    {
-    public:
-      typedef Product ResType;
-
-    public:
-      /** Get the type of the product - addon or base*/
-      virtual std::string type() const PURE_VIRTUAL;
-
-      virtual Url releaseNotesUrl() const PURE_VIRTUAL;
-
-      virtual std::list<Url> updateUrls() const PURE_VIRTUAL;
-
-      /**
-       * Additional software for the product
-       * They are complementary, not alternatives.
-       */
-      virtual std::list<Url> extraUrls() const  PURE_VIRTUAL;
-
-      /**
-       * Optional software for the product
-       * (for example. Non OSS repositories)
-       * They are complementary, not alternatives.
-       */
-      virtual std::list<Url> optionalUrls() const  PURE_VIRTUAL;
-
-      /** The product flags */
-      virtual std::list<std::string> flags() const PURE_VIRTUAL;
-
-      virtual TranslatedText shortName() const PURE_VIRTUAL;
-
-      /** Vendor specific distribution id. */
-      virtual std::string distributionName() const PURE_VIRTUAL;
-
-      /** Vendor specific distribution version. */
-      virtual Edition distributionEdition() const PURE_VIRTUAL;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_PRODUCTIMPLIF_H
diff --git a/zypp/detail/ResImplTraits.h b/zypp/detail/ResImplTraits.h
deleted file mode 100644 (file)
index 34e34e6..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/ResImplTraits.h
- *
-*/
-#ifndef ZYPP_DETAIL_RESIMPLTRAITS_H
-#define ZYPP_DETAIL_RESIMPLTRAITS_H
-
-#include "zypp/base/PtrTypes.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : ResImplTraits
-    //
-    /** Defines common types for Resolvable implementations. */
-    template<class _ResImpl>
-      struct ResImplTraits
-      {
-        typedef intrusive_ptr<_ResImpl>       Ptr;
-        typedef intrusive_ptr<const _ResImpl> constPtr;
-      };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_RESIMPLTRAITS_H
diff --git a/zypp/detail/ResObjectFactory.h b/zypp/detail/ResObjectFactory.h
deleted file mode 100644 (file)
index afa36d9..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/ResObjectFactory.h
- *
-*/
-#ifndef ZYPP_DETAIL_RESOBJECTFACTORY_H
-#define ZYPP_DETAIL_RESOBJECTFACTORY_H
-
-#include "zypp/detail/ResImplTraits.h"
-#include "zypp/NVRAD.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  class Edition;
-  class Arch;
-  struct NVRAD;
-
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-    ///////////////////////////////////////////////////////////////////
-    namespace _resobjectfactory_detail
-    { /////////////////////////////////////////////////////////////////
-
-      /** Glues a Resolvable to it's implementation. */
-      template<class _Res>
-        class ResImplConnect : public _Res
-        {
-        public:
-          typedef ResImplConnect                    Self;
-          typedef typename _Res::Impl               Impl;
-          typedef typename ResImplTraits<Impl>::Ptr Impl_Ptr;
-        public:
-          /** Ctor */
-          ResImplConnect( const NVRAD & nvrad_r,
-                          Impl_Ptr impl_r )
-          : _Res( nvrad_r )
-          , _impl( impl_r )
-          { _impl->_backRef = this; }
-
-          virtual ~ResImplConnect()
-          { _impl->_backRef = 0; }
-
-        private:
-          Impl_Ptr _impl;
-          virtual Impl &       pimpl()       { return *_impl; }
-          virtual const Impl & pimpl() const { return *_impl; }
-        };
-
-    /////////////////////////////////////////////////////////////////
-    } // namespace _resobjectfactory
-    ///////////////////////////////////////////////////////////////////
-
-    template<class _Impl>
-      typename _Impl::ResType::Ptr
-      makeResolvableAndImpl( const NVRAD & nvrad_r,
-                             intrusive_ptr<_Impl> & impl_r )
-      {
-        impl_r = new _Impl;
-        return new
-               _resobjectfactory_detail::ResImplConnect<typename _Impl::ResType>
-               ( nvrad_r, impl_r );
-      }
-
-    template<class _Impl>
-      typename _Impl::ResType::Ptr
-      makeResolvableFromImpl( const NVRAD & nvrad_r,
-                              intrusive_ptr<_Impl> impl_r )
-      {
-        if ( ! impl_r )
-          throw ( "makeResolvableFromImpl: NULL Impl " );
-        if ( impl_r->hasBackRef() )
-          throw ( "makeResolvableFromImpl: Impl already managed" );
-        return new
-               _resobjectfactory_detail::ResImplConnect<typename _Impl::ResType>
-               ( nvrad_r, impl_r );
-      }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_RESOBJECTFACTORY_H
diff --git a/zypp/detail/ResObjectImplIf.cc b/zypp/detail/ResObjectImplIf.cc
deleted file mode 100644 (file)
index 4610c27..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/ResObjectImplIf.cc
- *
-*/
-#include "zypp/detail/ResObjectImplIf.h"
-#include "zypp/Repository.h"
-#include "zypp/DiskUsage.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-    // Default implementation of ResObjectImplIf attributes,
-    // as far as resonable.
-    /////////////////////////////////////////////////////////////////
-
-      TranslatedText ResObjectImplIf::summary() const
-      { return TranslatedText::notext; }
-
-      TranslatedText ResObjectImplIf::description() const
-      { return TranslatedText::notext; }
-
-      TranslatedText ResObjectImplIf::insnotify() const
-      { return TranslatedText::notext; }
-
-      TranslatedText ResObjectImplIf::delnotify() const
-      { return TranslatedText::notext; }
-
-      TranslatedText ResObjectImplIf::licenseToConfirm() const
-      { return TranslatedText::notext; }
-
-      Vendor ResObjectImplIf::vendor() const
-      { return Vendor(); }
-
-      Repository ResObjectImplIf::repository() const
-      { return Repository::noRepository; }
-
-      bool ResObjectImplIf::installOnly() const
-      { return false; }
-
-      Date ResObjectImplIf::buildtime() const
-      { return Date(); }
-
-      Date ResObjectImplIf::installtime() const
-      { return Date(); }
-
-      unsigned ResObjectImplIf::mediaNr() const
-      { return 0; }
-
-      ByteCount ResObjectImplIf::size() const
-      { return ByteCount(); }
-
-      ByteCount ResObjectImplIf::downloadSize() const
-      { return ByteCount(); }
-
-      const DiskUsage & ResObjectImplIf::diskusage() const
-      {
-        static DiskUsage _du;
-        return _du;
-      }
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/ResObjectImplIf.h b/zypp/detail/ResObjectImplIf.h
deleted file mode 100644 (file)
index 10bf7f6..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/ResObjectImplIf.h
- *
-*/
-#ifndef ZYPP_DETAIL_RESOBJECTIMPLIF_H
-#define ZYPP_DETAIL_RESOBJECTIMPLIF_H
-
-#include <list>
-#include <string>
-
-#include "zypp/base/Deprecated.h"
-#include "zypp/detail/ResImplTraits.h"
-#include "zypp/detail/ResObjectFactory.h"
-#include "zypp/Repository.h"
-#include "zypp/Locale.h"
-#include "zypp/ByteCount.h"
-#include "zypp/Date.h"
-#include "zypp/TranslatedText.h"
-
-#include "zypp/NeedAType.h" // volatile include propagating type drafts
-
-// will be defined =0 later
-#define PURE_VIRTUAL
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  class Resolvable;
-  class Repository;
-  class DiskUsage;
-
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : ResObjectImplIf
-    //
-    /** Abstact ResObject implementation interface.
-     * \todo We should rename the detail::*Impl classes, and classify
-     * them into Dumb (holding no real data, provided the ImplIf dtor is
-     * the only prure virtual) and FullStore (providing a protected variable
-     * and interface methods returning them for each datum). The todo hook is
-     * here, because it#s the common base of the *Impl classes.
-    */
-    class ResObjectImplIf : public base::ReferenceCounted, private base::NonCopyable
-    {
-    public:
-      /** \name Common Attributes.
-       * These should be provided by each kind of Resolvable. Call the
-       * default implementation if you don't have a value for it.
-      */
-      //@{
-      /** Short label. */
-      virtual TranslatedText summary() const PURE_VIRTUAL;
-
-      /** Long description */
-      virtual TranslatedText description() const PURE_VIRTUAL;
-
-      /** \todo well define! */
-      virtual TranslatedText insnotify() const PURE_VIRTUAL;
-
-      /** \todo well define! */
-      virtual TranslatedText delnotify() const PURE_VIRTUAL;
-
-      /** */
-      virtual TranslatedText licenseToConfirm() const PURE_VIRTUAL;
-
-      /** */
-      virtual Vendor vendor() const PURE_VIRTUAL;
-
-      /** Size.  \todo well define which size. */
-      virtual ByteCount size() const PURE_VIRTUAL;
-
-      /** */
-      virtual ByteCount downloadSize() const PURE_VIRTUAL;
-
-      /** Backlink to the source providing this. */
-      virtual Repository repository() const PURE_VIRTUAL;
-
-      /** Number of the source media that provides the data
-       *  required for installation. Zero, if no media access
-       *  is required.
-      */
-      virtual unsigned mediaNr() const PURE_VIRTUAL;
-
-      /** */
-      virtual bool installOnly() const PURE_VIRTUAL;
-
-      /** */
-      virtual Date buildtime() const;
-
-      /** Time of installation, or \c 0 */
-      virtual Date installtime() const;
-
-      /** Disk usage per directory
-       * A common attribute, although mostly packages require
-       * noticeable disk space. An e.g product could try to reserve
-       * a certain ammount of diskspace by providing DiskUsage data.
-       */
-      virtual const DiskUsage & diskusage() const;
-      //@}
-
-    public:
-      /** Ctor */
-      ResObjectImplIf()
-      : _backRef( 0 )
-      {}
-      /** Dtor. Makes this an abstract class. */
-      virtual ~ResObjectImplIf() = 0;
-
-    public:
-      /** Test whether \c this is already connected to Resolvable. */
-      bool hasBackRef() const
-      { return _backRef; }
-
-      /** Access to Resolvable data if connected. */
-      const Resolvable * self() const
-      { return _backRef; }
-
-    private:
-      /** Manages _backRef when glued to a Resolvable. */
-      template<class _Res>
-        friend class _resobjectfactory_detail::ResImplConnect;
-      /** Backlink to Resolvable.*/
-      Resolvable * _backRef;
-    };
-    /////////////////////////////////////////////////////////////////
-
-    /* Implementation of pure virtual dtor is required! */
-    inline ResObjectImplIf::~ResObjectImplIf()
-    {}
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_RESOBJECTIMPLIF_H
diff --git a/zypp/detail/ResolvableImpl.cc b/zypp/detail/ResolvableImpl.cc
deleted file mode 100644 (file)
index 5d08d03..0000000
+++ /dev/null
@@ -1,308 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/detail/ResolvableImpl.cc
- *
-*/
-#include <iostream>
-#include <string>
-#include <map>
-#include "zypp/base/Logger.h"
-
-#include "zypp/ZYpp.h"
-#include "zypp/ZYppFactory.h"
-
-#include "zypp/base/Algorithm.h"
-#include "zypp/base/Sysconfig.h"
-#include "zypp/detail/ResolvableImpl.h"
-#include "zypp/capability/CapabilityImpl.h"
-#include "zypp/capability/Capabilities.h"
-
-using std::endl;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  namespace
-  {
-    struct FilterUnwantedReq
-    {
-      bool operator()( const Capability & cap_r ) const
-      {
-        return cap_r.index().substr( 0, 7 ) == "rpmlib(";
-      }
-    };
-
-    void filterUnwantedReq( const CapSet & from, CapSet & to )
-    {
-      to.clear();
-      std::remove_copy_if( from.begin(), from.end(),
-                           std::inserter( to, to.end() ),
-                           FilterUnwantedReq() );
-    }
-  }
-
-  namespace
-  {
-    struct FilterExtraDependency
-    {
-      Dependencies & deps;
-       CapSet & languages;
-
-      FilterExtraDependency( Dependencies & d , CapSet  & l)
-         : deps( d ),
-           languages( l )
-      { }
-
-      bool operator()( const Capability & cap_r ) const
-      {
-       if ( isKind<capability::ModaliasCap>(cap_r) )
-          {
-            // in case cap provides a packagename, inject a SUPPLEMENTS.
-           // if modalias does not provide a packagename, default to "kernel" (#184840)
-
-            capability::ModaliasCap::constPtr cap( capability::asKind<capability::ModaliasCap>(cap_r) );
-            if ( cap ) {
-             std::string pkgname( cap->pkgname() );
-             if ( pkgname.empty() ) {
-               pkgname = "kernel";             // every kernel provides "kernel", so this triggers always
-             }
-              deps[Dep::SUPPLEMENTS].insert( CapFactory().parse( ResTraits<Package>::kind, pkgname ) );
-              deps[Dep::FRESHENS].insert(cap_r);
-           }
-            return true;       // strip from original deps, we just splitted it to supplements/freshens
-          }
-
-       if ( isKind<capability::HalCap>(cap_r) )
-          {
-           deps[Dep::SUPPLEMENTS].insert( cap_r );
-            return true;       // strip from provides
-          }
-
-       std::string capString = cap_r.index();
-
-       if (capString.substr( 0, 11 ) == "packageand(") {
-           // inject a supplement/freshen in order to simulate an AND dependency
-           // Required kmp packges FOR EACH installed/to_be_installed kernel will be installed.
-           // Bug 255011
-           if (capString[capString.size()-1] == ')') {                 // trailing ")" given ?
-               CapFactory f;
-               std::string andDep( capString, 11 );                    // strip "packageand("
-               std::string::size_type pos = andDep.find( ":" );        // colon given ?
-               if (pos != std::string::npos) {
-                   deps[Dep::SUPPLEMENTS].insert( f.parse( ResTraits<Package>::kind, std::string( andDep, 0, pos ) ) );
-                   pos++; // skip ":"
-                   std::string depString( andDep, pos, andDep.size()-pos-1 );
-                   deps[Dep::FRESHENS].insert( f.parse( ResTraits<Package>::kind, depString ) );
-               } else {
-                   ERR << "wrong dependency (missing \":\") : " << capString <<endl;
-               }
-           } else {
-               ERR << "wrong dependency (missing \")\"): " << capString <<endl;
-           }
-           return true;
-       }
-
-       if (capString.substr( 0, 7 ) != "locale(")
-           return false;
-
-       CapFactory f;
-
-       std::string locales( capString, 7 );                    // strip "locale("
-       std::string::size_type pos = locales.find( ":" );               // colon given ?
-       if (pos != std::string::npos) {
-           deps[Dep::SUPPLEMENTS].insert( f.parse( ResTraits<Package>::kind, std::string( locales, 0, pos ) ) );
-           locales.erase( 0, pos+1 );
-       }
-       pos = 0;
-       std::string::size_type next = pos;
-       while (pos < locales.size()) {
-           next = locales.find( ";", pos );                    // look for ; separator
-           if (next == std::string::npos)
-               next = locales.size()-1;                        // none left, set next to end-1 (strip trailing ')' )
-
-           std::string loc( locales, pos, next-pos );
-           getZYpp()->availableLocale( Locale( loc ) );
-           deps[Dep::FRESHENS].insert( f.parse( ResTraits<Language>::kind, loc ) );
-           languages.insert( f.parse( ResTraits<Language>::kind, loc ) );
-           pos = next + 1;
-       }
-       return true;
-      }
-    };
-
-    void filterExtraProvides( const Dependencies & from, Dependencies & to )
-    {
-      //return;
-      CapSet provides;
-      CapSet languages;
-
-      FilterExtraDependency flp( to, languages );
-
-      std::remove_copy_if( from[Dep::PROVIDES].begin(), from[Dep::PROVIDES].end(),
-                           std::inserter( provides, provides.end() ),
-                           flp );
-      to[Dep::PROVIDES] = provides;
-
-      // There are language dependencies without a triggering package (e.G. locale(de) ).
-      // So if there is no supplement, the language will be inserted in the supplements too.
-      // (Not only in the freshens). Bug 178721 and 240617
-      if (languages.size() > 0
-         && to[Dep::SUPPLEMENTS].size() == 0) {
-         to[Dep::SUPPLEMENTS] = languages;
-      }
-    }
-
-    void filterExtraSupplements( const Dependencies & from, Dependencies & to )
-    {
-      //return;
-      CapSet supplements;
-      CapSet dummy;
-      to[Dep::SUPPLEMENTS].clear();
-
-      FilterExtraDependency flp( to, dummy );
-
-      std::remove_copy_if( from[Dep::SUPPLEMENTS].begin(), from[Dep::SUPPLEMENTS].end(),
-                           std::inserter( supplements, supplements.end() ),
-                           flp );
-      to[Dep::SUPPLEMENTS].insert(supplements.begin(), supplements.end());
-    }
-
-    // rewrite dependencies from
-    //   kernel(xxx) = yyy
-    // to
-    //   kernel($FLAVOR:xxx) = yyy
-    // $flavor is determined by searching through
-    //   PROVIDES (for kernel-$flavor, by kernel package)
-    // or
-    //   REQUIRES (for kernel-$flavor, by kmp package)
-    // see bugzilla #190163
-    //
-
-    std::string findKernelFlavor( const CapSet & cset, const Dep & dep )
-    {
-      for ( CapSet::iterator it = cset.begin(); it != cset.end(); ++it )
-      {
-       // check for "kernel-" in deps
-       // if its a requires, take it as is
-       // if its a provides, check for non-empty edition since
-       //   kernels provide "kernel-flavor-nongpl" (empty edition)
-       //     and "kernel-flavor = x.y" (non-empty edition)
-       capability::NamedCap::constPtr cap = capability::asKind<capability::NamedCap>(*it);
-       if ( cap
-            && cap->name().substr( 0, 7 ) == "kernel-"
-            && ( dep == Dep::REQUIRES || cap->edition() != Edition::noedition ) )
-       {
-         std::string s( cap->name() );
-         return s.erase(0,7); // erase "kernel-"
-       }
-      }
-      return "";
-    }
-
-    void rewriteKernelDeps( Dependencies & deps )
-    {
-      // check the smaller set (requires) first
-      Dep dep = Dep::REQUIRES;
-      CapSet cset = deps[dep];
-      std::string flavor( findKernelFlavor( cset, dep ) );
-      if (flavor.empty()) {
-       dep = Dep::PROVIDES;
-       cset = deps[dep];
-       flavor = findKernelFlavor( cset, dep );
-      }
-
-      if (flavor.empty())              // not a kernel / kmp package
-       return;
-
-      // flavor == kernel flavor
-      // cset == CapSet to be rewritten (provides for kernel, requires for kmp)
-      // dep == deps to be set in 'to'
-
-      flavor.append( ":" );
-      CapFactory factory;
-      deps[dep].clear();
-      for (CapSet::const_iterator it = cset.begin(); it != cset.end(); ++it) {
-       std::string idx( it->index() );
-       if ( idx.substr( 0, 7 ) == "kernel("            // capability is "kernel(..."
-            && idx.find( ":" ) == std::string::npos )  //  without a colon
-       {
-           capability::VersionedCap::constPtr vercap = capability::asKind<capability::VersionedCap>(*it);
-          if ( vercap )
-             deps[dep].insert( factory.parse( vercap->refers(), idx.insert( 7, flavor ), vercap->op(), vercap->edition() ) );
-       }
-       else {
-         deps[dep].insert( *it );
-       }
-      }
-      return;
-    }
-
-  }
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   METHOD NAME : Resolvable::Impl::Impl
-  //   METHOD TYPE : Ctor
-  //
-  Resolvable::Impl::Impl( const Kind & kind_r,
-                          const NVRAD & nvrad_r )
-  : _kind( kind_r )
-  , _name( nvrad_r.name )
-  , _edition( nvrad_r.edition )
-  , _arch( nvrad_r.arch )
-  , _deps( nvrad_r )
-  {
-    // check if we provide/supplements any extra ('locale(...)', 'modalias(...)', ...) tags
-    //  and split them up to freshens/supplements (except for SystemResObject)
-    if ( _kind != ResTraits<SystemResObject>::kind )
-      {
-        filterExtraSupplements( nvrad_r, _deps );
-        filterExtraProvides( nvrad_r, _deps );
-      }
-
-    // remove malicious self provides
-    CapSet::iterator it = _deps[Dep::PROVIDES].find( CapFactory().parse( _kind, _name ) );
-      if ( it != _deps[Dep::PROVIDES].end() )
-        {
-          dumpOn( WAR << "Strip self provides without edition in " ) << endl;
-          _deps[Dep::PROVIDES].erase( it );
-        }
-
-    // assert self provides
-    _deps[Dep::PROVIDES].insert( CapFactory()
-                                 .parse( _kind, _name, Rel::EQ, _edition ) );
-
-    // Filter 'rpmlib(...)' requirements (refill from nvrad_r)
-    filterUnwantedReq( nvrad_r[Dep::PREREQUIRES], _deps[Dep::PREREQUIRES] );
-    filterUnwantedReq( nvrad_r[Dep::REQUIRES], _deps[Dep::REQUIRES] );
-
-    // check for kernel(xxx) and rewrite them to kernel(flavor:xxx)
-    if ( _kind == ResTraits<Package>::kind )
-      {
-       rewriteKernelDeps( _deps );
-      }
-
-    // assert all prerequires are in requires too
-    _deps[Dep::REQUIRES].insert( _deps[Dep::PREREQUIRES].begin(),
-                                 _deps[Dep::PREREQUIRES].end() );
-
-    if ( _arch.empty() )
-      dumpOn( WAR << "Has empty Arch: " ) << std::endl;
-  }
-
-  std::ostream & Resolvable::Impl::dumpOn( std::ostream & str ) const
-  {
-    return str << '[' << kind() << ']'
-               << name() << '-' << edition() << '.' << arch();
-  }
-
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/ResolvableImpl.h b/zypp/detail/ResolvableImpl.h
deleted file mode 100644 (file)
index 51b7b48..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/detail/ResolvableImpl.h
- *
-*/
-#ifndef ZYPP_DETAIL_RESOLVABLEIMPL_H
-#define ZYPP_DETAIL_RESOLVABLEIMPL_H
-
-#include "zypp/Resolvable.h"
-#include "zypp/CapFactory.h"
-#include "zypp/NVRAD.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //   CLASS NAME : Resolvable::Impl
-  //
-  /** Implementation of Resovable
-   * \invariant \c provides <tt>name = edition</tt>
-   * \invariant \c prerequires is a subset of \c requires
-  */
-  struct Resolvable::Impl
-  {
-    /** Ctor */
-    Impl( const Kind & kind_r, const NVRAD & nvrad_r );
-
-  public:
-    /**  */
-    const Kind & kind() const
-    { return _kind; }
-    /**  */
-    const std::string & name() const
-    { return _name; }
-    /**  */
-    const Edition & edition() const
-    { return _edition; }
-    /**  */
-    const Arch & arch() const
-    { return _arch; }
-    /**  */
-    const Dependencies & deps() const
-    { return _deps; }
-
-    /** \name Deprecated. */
-    //@{
-    void injectProvides( const Capability & cap_r )
-    { _deps[Dep::PROVIDES].insert( cap_r ); }
-    void injectRequires( const Capability & cap_r )
-    { _deps[Dep::REQUIRES].insert( cap_r ); }
-    //@}
-
-    /** Helper for stream output */
-    std::ostream & dumpOn( std::ostream & str ) const;
-
-  private:
-    /**  */
-    Kind _kind;
-    /**  */
-    std::string _name;
-    /**  */
-    Edition _edition;
-    /**  */
-    Arch _arch;
-    /**  */
-    Dependencies _deps;
-
-  };
-  ///////////////////////////////////////////////////////////////////
-
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_RESOLVABLEIMPL_H
diff --git a/zypp/detail/ScriptImpl.cc b/zypp/detail/ScriptImpl.cc
deleted file mode 100644 (file)
index c81ba66..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/detail/ScriptImpl.cc
- *
-*/
-
-#include "zypp/detail/ScriptImpl.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : ScriptImpl
-    //
-    ///////////////////////////////////////////////////////////////////
-
-    /** Default ctor */
-    ScriptImpl::ScriptImpl()
-    {}
-    /** Dtor */
-    ScriptImpl::~ScriptImpl()
-    {}
-
-    std::string ScriptImpl::doScriptInlined() const
-    { return _doScript; }
-
-    std::string ScriptImpl::undoScriptInlined() const
-    { return _undoScript; }
-
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/ScriptImpl.h b/zypp/detail/ScriptImpl.h
deleted file mode 100644 (file)
index f87e294..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/detail/ScriptImpl.h
- *
-*/
-#ifndef ZYPP_DETAIL_SCRIPTIMPL_H
-#define ZYPP_DETAIL_SCRIPTIMPL_H
-
-#include "zypp/detail/ScriptImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : ScriptImpl
-    //
-    /** Class representing an update script */
-    class ScriptImpl : public ScriptImplIf
-    {
-    public:
-      /** Default ctor */
-      ScriptImpl();
-      /** Dtor */
-      ~ScriptImpl();
-
-    public:
-      /** Return an inlined script if available.
-       * Otherwise it is available at \ref doScriptLocation.
-       */
-      virtual std::string doScriptInlined() const;
-
-      /** Return an inlined undo script if available.
-       * Otherwise it is available at \ref undoScriptLocation.
-       */
-      virtual std::string undoScriptInlined() const;
-
-    protected:
-      /** The script to perform the change */
-      std::string _doScript;
-      /** The script to undo the change */
-      std::string _undoScript;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_SCRIPTIMPL_H
diff --git a/zypp/detail/ScriptImplIf.cc b/zypp/detail/ScriptImplIf.cc
deleted file mode 100644 (file)
index 548d2e2..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/ScriptImplIf.cc
- *
-*/
-#include "zypp/detail/ScriptImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-    // Default implementation of ScriptImplIf attributes,
-    // as far as resonable.
-    /////////////////////////////////////////////////////////////////
-
-    bool ScriptImplIf::doAvailable() const
-    { return ! ( doScriptInlined().empty()
-                 && doScriptLocation().filename().empty() ); }
-
-    unsigned ScriptImplIf::mediaNr() const
-    { return( doScriptInlined().empty() ? doScriptLocation().medianr() : 0 ); }
-
-    std::string ScriptImplIf::doScriptInlined() const
-    { return std::string(); }
-
-    OnMediaLocation ScriptImplIf::doScriptLocation() const
-    { return OnMediaLocation(); }
-
-    bool ScriptImplIf::undoAvailable() const
-    { return ! ( undoScriptInlined().empty()
-                 && undoScriptLocation().filename().empty() ); }
-
-    std::string ScriptImplIf::undoScriptInlined() const
-    { return std::string(); }
-
-    OnMediaLocation ScriptImplIf::undoScriptLocation() const
-    { return OnMediaLocation(); }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/ScriptImplIf.h b/zypp/detail/ScriptImplIf.h
deleted file mode 100644 (file)
index eccf18a..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/detail/ScriptImplIf.h
- *
-*/
-#ifndef ZYPP_DETAIL_SCRIPTIMPLIF_H
-#define ZYPP_DETAIL_SCRIPTIMPLIF_H
-
-#include "zypp/detail/ResObjectImplIf.h"
-#include "zypp/Pathname.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  class Script;
-
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : ScriptImplIf
-    //
-    /** Abstract Script implementation interface.
-    */
-    class ScriptImplIf : public ResObjectImplIf
-    {
-    public:
-      typedef Script ResType;
-
-    public:
-      /** Overloaded ResObjectImpl attribute.
-       * \return The \ref doScriptLocation media number
-       * or \c 0 if do-script is inlined.
-       */
-      virtual unsigned mediaNr() const;
-
-    public:
-       /** Check whether a script is available. */
-      virtual bool doAvailable() const;
-
-     /** Return an inlined script if available.
-       * Otherwise it is available at \ref doScriptLocation.
-       */
-      virtual std::string doScriptInlined() const;
-
-      /** Location of the script, unless it is available inlined.
-       * \see \ref doScriptInlined
-       */
-      virtual OnMediaLocation doScriptLocation() const;
-
-      /** Check whether a script to undo the change is available. */
-      virtual bool undoAvailable() const;
-
-      /** Return an inlined undo script if available.
-       * Otherwise it is available at \ref undoScriptLocation.
-       */
-      virtual std::string undoScriptInlined() const;
-
-      /** Location of the undo script, unless it is available inlined.
-       * \see \ref undoScriptInlined
-       */
-      virtual OnMediaLocation undoScriptLocation() const;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_SCRIPTIMPLIF_H
diff --git a/zypp/detail/SelectionImpl.cc b/zypp/detail/SelectionImpl.cc
deleted file mode 100644 (file)
index 8bc812a..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/SelectionImpl.cc
- *
-*/
-#include "zypp/detail/SelectionImpl.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // METHOD NAME : SelectionImpl::SelectionImpl
-    // METHOD TYPE : Ctor
-    //
-    SelectionImpl::SelectionImpl()
-    {}
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // METHOD NAME : SelectionImpl::~SelectionImpl
-    // METHOD TYPE : Dtor
-    //
-    SelectionImpl::~SelectionImpl()
-    {}
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/SelectionImpl.h b/zypp/detail/SelectionImpl.h
deleted file mode 100644 (file)
index a9f3af0..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/SelectionImpl.h
- *
-*/
-#ifndef ZYPP_DETAIL_SELECTIONIMPL_H
-#define ZYPP_DETAIL_SELECTIONIMPL_H
-
-#include "zypp/detail/SelectionImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : SelectionImpl
-    //
-    /**
-    */
-    class SelectionImpl : public SelectionImplIf
-    {
-    public:
-      SelectionImpl();
-      virtual ~SelectionImpl();
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_SELECTIONIMPL_H
diff --git a/zypp/detail/SelectionImplIf.cc b/zypp/detail/SelectionImplIf.cc
deleted file mode 100644 (file)
index 089976c..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/SelectionImplIf.cc
- *
-*/
-#include <iostream>
-
-#include "zypp/detail/SelectionImplIf.h"
-#include "zypp/ResTraits.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-    // Default implementation of SelectionImplIf attributes,
-    // as far as resonable.
-    /////////////////////////////////////////////////////////////////
-
-    Label SelectionImplIf::category() const
-    { return Label(); }
-
-    bool SelectionImplIf::visible() const
-    { return false; }
-
-    Label SelectionImplIf::order() const
-    { return Label(); }
-
-    static void copycaps( std::set<std::string> & out, const CapSet & in)
-    {
-       for (CapSet::const_iterator it = in.begin(); it != in.end(); ++it) {
-           if (isKind<capability::NamedCap>( *it )
-               && it->refers() == ResTraits<zypp::Package>::kind )
-           {
-               out.insert( it->index() );
-           }
-       }
-    }
-
-    const std::set<std::string> SelectionImplIf::install_packages( const Locale & lang) const
-    {
-        std::set<std::string> result;
-        copycaps( result, self()->dep( Dep::REQUIRES ) );
-        copycaps( result, self()->dep( Dep::RECOMMENDS) );
-
-        return result;
-    }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/SelectionImplIf.h b/zypp/detail/SelectionImplIf.h
deleted file mode 100644 (file)
index ffe5515..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/SelectionImplIf.h
- *
-*/
-#ifndef ZYPP_DETAIL_SELECTIONIMPLIF_H
-#define ZYPP_DETAIL_SELECTIONIMPLIF_H
-
-#include "zypp/detail/ResObjectImplIf.h"
-#include "zypp/TranslatedText.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  class Selection;
-
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : SelectionImplIf
-    //
-    /** Abstract Selection implementation interface.
-    */
-    class SelectionImplIf : public ResObjectImplIf
-    {
-    public:
-      typedef Selection ResType;
-
-    public:
-
-        /** */
-       virtual Label category() const PURE_VIRTUAL;
-
-        /** */
-       virtual bool visible() const PURE_VIRTUAL;
-
-        /** */
-       virtual Label order() const PURE_VIRTUAL;
-
-        /** */
-        virtual const std::set<std::string> install_packages( const Locale & lang = Locale("") ) const;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_SELECTIONIMPLIF_H
diff --git a/zypp/detail/SrcPackageImpl.cc b/zypp/detail/SrcPackageImpl.cc
deleted file mode 100644 (file)
index cc971a9..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/SrcPackageImpl.cc
- *
-*/
-#include "zypp/detail/SrcPackageImpl.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // METHOD NAME : SrcPackageImpl::SrcPackageImpl
-    // METHOD TYPE : Ctor
-    //
-    SrcPackageImpl::SrcPackageImpl()
-    {}
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // METHOD NAME : SrcPackageImpl::~SrcPackageImpl
-    // METHOD TYPE : Dtor
-    //
-    SrcPackageImpl::~SrcPackageImpl()
-    {}
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/SrcPackageImpl.h b/zypp/detail/SrcPackageImpl.h
deleted file mode 100644 (file)
index 9191dd7..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/SrcPackageImpl.h
- *
-*/
-#ifndef ZYPP_DETAIL_SRCPACKAGEIMPL_H
-#define ZYPP_DETAIL_SRCPACKAGEIMPL_H
-
-#include "zypp/detail/SrcPackageImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : SrcPackageImpl
-    //
-    /**
-    */
-    class SrcPackageImpl : public SrcPackageImplIf
-    {
-    public:
-      SrcPackageImpl();
-      virtual ~SrcPackageImpl();
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_SRCPACKAGEIMPL_H
diff --git a/zypp/detail/SrcPackageImplIf.cc b/zypp/detail/SrcPackageImplIf.cc
deleted file mode 100644 (file)
index 4b94bf3..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/SrcPackageImplIf.cc
- *
-*/
-#include "zypp/detail/SrcPackageImplIf.h"
-#include <iostream>
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ByteCount SrcPackageImplIf::downloadSize() const
-    { return location().downloadSize(); }
-
-    unsigned SrcPackageImplIf::mediaNr() const
-    { return location().medianr(); }
-
-    /////////////////////////////////////////////////////////////////
-    // Default implementation of SrcPackageImplIf attributes,
-    // as far as resonable.
-    /////////////////////////////////////////////////////////////////
-
-    OnMediaLocation SrcPackageImplIf::location() const
-    { return OnMediaLocation(); }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/detail/SrcPackageImplIf.h b/zypp/detail/SrcPackageImplIf.h
deleted file mode 100644 (file)
index f7bcb72..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/detail/SrcPackageImplIf.h
- *
-*/
-#ifndef ZYPP_DETAIL_SRCPACKAGEIMPLIF_H
-#define ZYPP_DETAIL_SRCPACKAGEIMPLIF_H
-
-#include <set>
-
-#include "zypp/detail/ResObjectImplIf.h"
-#include "zypp/Pathname.h"
-#include "zypp/DiskUsage.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  class SrcPackage;
-
-  ///////////////////////////////////////////////////////////////////
-  namespace detail
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : SrcPackageImplIf
-    //
-    /** Abstract SrcPackage implementation interface.
-    */
-    class SrcPackageImplIf : public ResObjectImplIf
-    {
-    public:
-      typedef SrcPackage ResType;
-
-    public:
-      /** Overloaded ResObjectImpl attribute.
-       * \return The \ref location media number.
-       */
-      virtual unsigned mediaNr() const;
-
-      /** Overloaded ResObjectImpl attribute.
-       * \return The \ref location downloadSize.
-       */
-      virtual ByteCount downloadSize() const;
-
-    public:
-      /** */
-      virtual OnMediaLocation location() const PURE_VIRTUAL;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_SRCPACKAGEIMPLIF_H
index 40f5ca3..210f975 100644 (file)
@@ -8,6 +8,7 @@
 \---------------------------------------------------------------------*/
 
 #include <iostream>
+#include "zypp/base/Easy.h"
 #include "zypp/base/Logger.h"
 #include "zypp/base/Iterator.h"
 #include "zypp/base/String.h"
@@ -18,7 +19,6 @@
 
 #include "zypp/parser/plaindir/RepoParser.h"
 #include "zypp/parser/ParseException.h"
-#include "zypp/capability/CapabilityImpl.h"
 #include "zypp/PathInfo.h"
 #include "zypp/ResStore.h"
 #include "zypp/ZConfig.h"
@@ -84,36 +84,19 @@ data::Package_Ptr makePackageDataFromHeader( const RpmHeader::constPtr header,
 
   data::Package_Ptr pkg = new data::Package;
 
-  pkg->name = header->tag_name();
+  pkg->name    = header->tag_name();
+  pkg->edition = header->tag_edition();
+  pkg->arch    = header->tag_arch();
 
-  try  {
-    pkg->edition = header->tag_epoch() + ":" + header->tag_version() + "-" +                  header->tag_release();
-  }
-  catch (Exception & excpt_r) {
-    ZYPP_CAUGHT( excpt_r );
-    WAR << "Package " << pkg->name << " has bad edition '"
-    << (header->tag_epoch()==0?"":(header->tag_epoch()+":"))
-    << header->tag_version()
-    << (header->tag_release().empty()?"":(string("-") + header->tag_release())) << "'";
-    return 0;
-  }
+  header->tag_requires( filerequires ).swap( pkg->deps[Dep::REQUIRES] );
+  header->tag_prerequires( filerequires ).swap( pkg->deps[Dep::PREREQUIRES] );
+  header->tag_conflicts( filerequires ).swap( pkg->deps[Dep::CONFLICTS] );
+  header->tag_obsoletes( filerequires ).swap( pkg->deps[Dep::OBSOLETES] );
+  header->tag_enhances( filerequires ).swap( pkg->deps[Dep::ENHANCES] );
+  header->tag_suggests( filerequires ).swap( pkg->deps[Dep::SUGGESTS] );
+  header->tag_freshens( filerequires ).swap( pkg->deps[Dep::FRESHENS] );
+  header->tag_supplements( filerequires ).swap( pkg->deps[Dep::SUPPLEMENTS] );
 
-  Arch arch;
-  try {
-    pkg->arch = header->tag_arch();
-  }
-  catch (Exception & excpt_r) {
-    ZYPP_CAUGHT( excpt_r );
-    WAR << "Package " << pkg->name << " has bad architecture '" << header->tag_arch() << "'";
-    return 0;
-  }
-
-  pkg->deps[Dep::REQUIRES]    = header->tag_requires( filerequires );
-  pkg->deps[Dep::PREREQUIRES] = header->tag_prerequires( filerequires );
-  pkg->deps[Dep::CONFLICTS]   = header->tag_conflicts( filerequires );
-  pkg->deps[Dep::OBSOLETES]   = header->tag_obsoletes( filerequires );
-  pkg->deps[Dep::ENHANCES]    = header->tag_enhances( filerequires );
-  pkg->deps[Dep::SUPPLEMENTS] = header->tag_supplements( filerequires );
   pkg->vendor                 = header->tag_vendor();
   pkg->installedSize          = header->tag_size();
   pkg->buildTime              = header->tag_buildtime();
@@ -131,16 +114,9 @@ data::Package_Ptr makePackageDataFromHeader( const RpmHeader::constPtr header,
        filename != filenames.end();
        ++filename)
   {
-    if ( capability::isInterestingFileSpec( *filename ) )
+    if ( Capability::isInterestingFileSpec( *filename ) )
     {
-      try {
-        pkg->deps[Dep::PROVIDES].insert(capability::buildFile( ResTraits<Package>::kind, *filename ));
-      }
-      catch (Exception & excpt_r)
-      {
-        ZYPP_CAUGHT( excpt_r );
-        WAR << "Ignoring invalid capability: " << *filename << endl;
-      }
+      pkg->deps[Dep::PROVIDES].insert( Capability( *filename, Capability::PARSED ) );
     }
   }
 
index 396b061..c17108b 100644 (file)
@@ -21,7 +21,6 @@
 #include "zypp/parser/susetags/ContentFileReader.h"
 #include "zypp/parser/susetags/RepoIndex.h"
 #include "zypp/data/ResolvableData.h"
-#include "zypp/CapFactory.h"
 
 #include "zypp/ZConfig.h"
 
@@ -131,48 +130,25 @@ namespace zypp
            for ( std::list<std::string>::const_iterator it = words.begin();
                  it != words.end(); ++it )
            {
-             Resolvable::Kind kind( ResTraits<Package>::kind );
-
-             std::string name = *it;
-             std::string::size_type colon = name.find( ":" );
-             if ( colon != std::string::npos )
-             {
-               std::string skind( name, 0, colon );
-               name.erase( 0, colon+1 );
-
-               if ( skind == ResTraits<Pattern>::kind )
-                 kind = ResTraits<Pattern>::kind;
-               else if ( skind == ResTraits<Patch>::kind )
-                 kind = ResTraits<Patch>::kind;
-               else if ( skind == ResTraits<Product>::kind )
-                 kind = ResTraits<Product>::kind;
-               else if ( skind == ResTraits<Selection>::kind )
-                 kind = ResTraits<Selection>::kind;
-               else if ( skind != ResTraits<Package>::kind )
-               {
-                 // colon but no kind ==> colon in a name
-                 name = skind + ":" + name;
-               }
-             }
-
-             // check for Rel:
-             std::list<std::string>::const_iterator next = it;
-             if ( ++next != words.end()
-                  && (*next).find_first_of( "<>=" ) != std::string::npos )
-             {
-               std::string op = *next;
-               if ( ++next != words.end() )
-               {
-                 name += " ";
-                 name += op;
-                 name += " ";
-                 name += *next;
-                 it = next;
-               }
-             }
-
-             // Add the dependency
-             deplist_r.insert( capability::parse( kind, name ) );
+              std::string name( *it );
+
+              // check for '[op edition]':
+              std::list<std::string>::const_iterator next = it;
+              if ( ++next != words.end()
+                   && (*next).find_first_of( "<>=" ) != std::string::npos )
+              {
+                std::string op = *next;
+                if ( ++next != words.end() )
+                {
+                  // Add the 'name op edition' dependency
+                  deplist_r.insert( Capability( name, op, *next ) );
+                  it = next;
+                  continue;
+                }
+              }
+
+             // Add the 'name' dependency
+             deplist_r.insert( Capability( name, Capability::PARSED ) );
            }
          }
 
@@ -338,7 +314,7 @@ namespace zypp
          }
          else if ( key == "VERSION" )
          {
-           _pimpl->product().edition = value;
+           _pimpl->product().edition = Edition( value );
          }
          else if ( key == "ARCH" )
          {
@@ -349,7 +325,7 @@ namespace zypp
            if ( Arch::compare( Arch(_pimpl->product().arch), carch ) < 0
                 &&  carch.compatibleWith( sysarch ) )
            {
-             _pimpl->product().arch = modifier;
+             _pimpl->product().arch = Arch( modifier );
            }
          }
          else if ( key == "DISTPRODUCT" )
@@ -524,10 +500,10 @@ namespace zypp
          if ( ! _pimpl->product().distributionName.empty() )
          {
            _pimpl->product().deps[Dep::PROVIDES].insert(
-               capability::parse( ResTraits<Product>::kind,
-                                  _pimpl->product().distributionName,
-                                  Rel::EQ,
-                                  _pimpl->product().distributionEdition ) );
+               Capability( _pimpl->product().distributionName,
+                            Rel::EQ,
+                            _pimpl->product().distributionEdition,
+                            ResKind::product ) );
          }
        }
        if ( ! ticks.toMax() )
index fa9ad86..1182771 100644 (file)
@@ -36,16 +36,16 @@ namespace zypp
 
       inline std::string makeSharedIdent( ResKind kind_r,
                                          const std::string & name_r,
-                                         const std::string & edition_r,
-                                         const std::string & arch_r )
+                                         Edition edition_r,
+                                         Arch arch_r )
       {
        std::string ret( kind_r.asString() );
        ret += ":";
        ret += name_r;
        ret += "-";
-       ret += edition_r;
+       ret += edition_r.asString();
        ret += ".";
-       ret += arch_r;
+       ret += arch_r.asString();
        return ret;
       }
 
@@ -64,34 +64,6 @@ namespace zypp
          {}
 
        public:
-         /** Parsing Capabilities from string is quite expensive. So we
-          * maintain a little chache to check whether we already parsed some
-          * raw string. If so, we can reuse the result.
-          */
-         struct CapImplCache
-         {
-           template<class _Res>
-           capability::CapabilityImpl::Ptr get( const std::string & line_r )
-           {
-             return get( line_r, ResTraits<_Res>::kind );
-           }
-
-           capability::CapabilityImpl::Ptr get( const std::string & line_r,
-                                                ResKind refers_r )
-           {
-             capability::CapabilityImpl::Ptr & ret( _cache[refers_r][line_r] );
-             if ( ! ret )
-             {
-               ret = capability::parse( refers_r, line_r );
-             }
-             return ret;
-           }
-
-           private:
-             std::map<ResKind, std::map<std::string, capability::CapabilityImpl::Ptr> > _cache;
-         };
-
-       public:
 
          template<class _Res>
          void depAddLine( const std::string & line_r,
@@ -104,7 +76,7 @@ namespace zypp
                           ResKind refers_r,
                           data::DependencyList & deps_r )
          {
-           deps_r.insert( _depcache.get( line_r, refers_r ) );
+           deps_r.insert( Capability( line_r, refers_r ) );
          }
 
 
@@ -135,7 +107,6 @@ namespace zypp
 
        private:
          const FileReaderBase & _parent;
-         CapImplCache           _depcache;
       };
       ///////////////////////////////////////////////////////////////////
 
index 183b31b..425a5e5 100644 (file)
@@ -109,10 +109,10 @@ namespace zypp
              ++_c_pkg;
              _data = _pkgData = new data::Package;
              _srcpkgData = 0;
-             _data->arch = words[3];
+             _data->arch = Arch( words[3] );
            }
            _data->name    = words[0];
-           _data->edition = words[1] + "-" + words[2];
+           _data->edition = Edition( words[1], words[2] );
          }
 
 
index 2cf1915..e048a6c 100644 (file)
@@ -102,10 +102,10 @@ namespace zypp
              ++_c_pkg;
              _data = _pkgData = new data::Package;
              _srcpkgData = 0;
-             _data->arch = words[3];
+             _data->arch = Arch( words[3] );
            }
            _data->name    = words[0];
-           _data->edition = words[1] + "-" + words[2];
+           _data->edition = Edition( words[1], words[2] );
          }
 
          /** Consume =Cks:. */
@@ -167,7 +167,7 @@ namespace zypp
            switch ( str::split( tag_r->value, std::back_inserter(words) ) )
            {
              case 2: // [medianr filename]
-               _data->repositoryLocation.setLocation( Pathname(_data->arch) / words[1],
+               _data->repositoryLocation.setLocation( Pathname(_data->arch.string()) / words[1],
                                                        str::strtonum<unsigned>(words[0]) );
                break;
 
@@ -210,15 +210,15 @@ namespace zypp
            {
              _data->sharedDataTag = makeSharedIdent( ResTraits<SrcPackage>::kind,
                                                      words[0],
-                                                     words[1] + "-" + words[2],
-                                                     "" );
+                                                     Edition( words[1], words[2] ),
+                                                     Arch_noarch );
            }
            else
            {
              _data->sharedDataTag = makeSharedIdent( ResTraits<Package>::kind,
                                                      words[0],
-                                                     words[1] + "-" + words[2],
-                                                     words[3] );
+                                                     Edition( words[1], words[2] ),
+                                                     Arch( words[3] ) );
            }
          }
 
index 7bfc3ea..2bf4df7 100644 (file)
@@ -96,10 +96,10 @@ namespace zypp
              ++_c_pkg;
              _data = _pkgData = new data::Package;
              _srcpkgData = 0;
-             _data->arch = words[3];
+             _data->arch = Arch( words[3] );
            }
            _data->name    = words[0];
-           _data->edition = words[1] + "-" + words[2];
+           _data->edition = Edition( words[1], words[2] );
          }
 
          /** Consume =Sum:. */
index 8080635..535fe5c 100644 (file)
@@ -70,8 +70,8 @@ namespace zypp
 
            _data = new data::Pattern;
            _data->name    = words[0];
-           _data->edition = words[1] + "-" + words[2];
-           _data->arch    = words[3];
+           _data->edition = Edition( words[1], words[2] );
+           _data->arch    = Arch( words[3] );
          }
 
          /** Consume =Sum:. */
index 4a87fec..35737ff 100644 (file)
@@ -81,17 +81,16 @@ namespace zypp
           // package_ptr will point to a SrcPackage from now on
           package_ptr.swap(srcpkg);
         }
-        package_ptr->arch.swap(arch);
+        package_ptr->arch = Arch( arch );
         return true;
       }
 
       // xpath: //package/version
       if (reader_r->name() == "version")
       {
-        if (reader_r->getAttribute("epoch").asString().empty());
-          package_ptr->edition += (reader_r->getAttribute("epoch").asString()+":");
-        
-        package_ptr->edition += ( reader_r->getAttribute("ver").asString() + "-" + reader_r->getAttribute("rel").asString() );
+        package_ptr->edition = Edition( reader_r->getAttribute("ver").asString(),
+                                        reader_r->getAttribute("rel").asString(),
+                                        reader_r->getAttribute("epoch").asString() );
         return true;
       }
 
@@ -189,18 +188,6 @@ namespace zypp
     return true;
   }
 
-  bool FileReaderBase::BaseImpl::editionStringFromAttrs( xml::Reader & reader_r, string &edition )
-  {
-    string result;
-    if ( ! reader_r->getAttribute("epoch").asString().empty() )
-      result += (reader_r->getAttribute("epoch").asString() + ":");
-
-    result += reader_r->getAttribute("ver").asString();
-    result += ( "-" + reader_r->getAttribute("ver").asString());
-    result.swap(edition);
-    return true;
-  }
-
   // --------------( consume <format> tag )------------------------------------
 
   bool FileReaderBase::BaseImpl::consumeFormatNode(
@@ -264,10 +251,7 @@ namespace zypp
       if (reader_r->name() == "file")
       {
         // insert file dependency into the list
-        package_ptr->deps[Dep::PROVIDES].insert(
-          zypp::capability::parse(
-            ResTraits<Package>::kind,
-            reader_r.nodeText().asString()));
+        package_ptr->deps[Dep::PROVIDES].insert( Capability( reader_r.nodeText().asString(), Capability::PARSED ) );
         return true;
       }
 
@@ -333,12 +317,9 @@ namespace zypp
           ZYPP_THROW(ParseException("rpm:entry found when not expected"));
 
         // read kind of resolvable this entry refers, default to Package
-        string kind_str = reader_r->getAttribute("kind").asString();
-        Resolvable::Kind kind;
-        if (kind_str.empty())
-           kind = ResTraits<Package>::kind;
-        else
-          kind = Resolvable::Kind(kind_str);
+        ResKind kind( reader_r->getAttribute("kind").asString() );
+        if ( ! kind )
+          kind = ResKind::package;
 
         // Check whether this is actually a prerequires dependency.
         // If so, it will be stored in deps_r as Dep::PREREQUIRES
@@ -351,11 +332,6 @@ namespace zypp
             ZYPP_THROW(ParseException("pre=\"1\" found for non-requires dependency"));
           pre = true;
         }
-/*
-        DBG << "got rpm:entry for " << _dtype << ": "
-            << reader_r->getAttribute("name").asString()
-            << " " << edition << " (" << kind << ")" << endl;
-*/
 
         string version = reader_r->getAttribute("ver").asString();
 
@@ -363,9 +339,7 @@ namespace zypp
         {
           // insert unversion dependency into the list
           deps_r[pre ? Dep::PREREQUIRES : _dtype].insert(
-            zypp::capability::parse(
-              kind, reader_r->getAttribute("name").asString()
-            )
+            Capability( reader_r->getAttribute("name").asString(), kind, Capability::PARSED )
           );
         }
         else
@@ -378,12 +352,10 @@ namespace zypp
 
           // insert versioned dependency into the list
           deps_r[pre ? Dep::PREREQUIRES : _dtype].insert(
-            zypp::capability::parse(
-              kind,
-              reader_r->getAttribute("name").asString(),
-              Rel(reader_r->getAttribute("flags").asString()),
-              edition
-            )
+            Capability( reader_r->getAttribute("name").asString(),
+                        Rel( reader_r->getAttribute("flags").asString() ),
+                        edition,
+                        kind )
           );
         }
 
index 024c511..a273c70 100644 (file)
@@ -50,24 +50,24 @@ namespace zypp
 
     /**
      * Lightweight object for remembering currently processed tag.
-     * 
+     *
      * Usage:
-     * 
+     *
      * - call \ref append() on opening tag
      * - use \ref contains() to check if the given tag is being processed
      * - call \ref remove() on closing tag
-     * 
+     *
      * \note the above works only if the path elements are unique. To support
      *   also non-unique elements, an equals() method will need to be implemented
      *   and used instead of \ref contains().
-     * 
+     *
      * \note tags you want to use with TagPath must be enumerated in \ref Tag
      * enum.
      */
     struct TagPath
     {
       typedef std::list<Tag> TagList;
-      
+
       void append(const Tag tag) { path.push_back(tag); }
       void remove() { if (!path.empty()) path.pop_back(); }
       unsigned depth() const { return path.size(); }
@@ -105,7 +105,7 @@ namespace zypp
 
     /**
      * Function for processing all <code>format</code> tag subtree nodes.
-     * 
+     *
      * \return true if the package node or current subnode has been consumed
      *         (no further processing is required), false otherwise.
      */
@@ -113,14 +113,16 @@ namespace zypp
 
     /**
      * Processes RPM dependency tags (rpm:entry, rpm:requires, ...).
-     * 
+     *
      * \return true if a dependency tag has been encountered, false otherwise.
      * \throws ParseException if a serious error is encountered while parsing
      */
     bool consumeDependency(xml::Reader & reader_r, data::Dependencies & deps_r);
 
-
-    bool editionStringFromAttrs( xml::Reader & reader_r, std::string &edition );
+    void editionStringFromAttrs( xml::Reader & reader_r, Edition & edition ) const
+    { edition = Edition( reader_r->getAttribute("ver").asString(),
+                         reader_r->getAttribute("rel").asString(),
+                         reader_r->getAttribute("epoch").asString() ); }
 
   public:
     /** Appends \a tag to \ref _tagpath. */
@@ -137,7 +139,7 @@ namespace zypp
 
 
   private:
-    /** Used to remember the tag beeing currently processed. */ 
+    /** Used to remember the tag beeing currently processed. */
     TagPath _tagpath;
 
     /**
index aaa0c87..39fcaf6 100644 (file)
@@ -131,7 +131,7 @@ namespace zypp
         _filenames.clear();
 
         _resolvable->name = reader_r->getAttribute("name").asString();
-        _resolvable->arch = reader_r->getAttribute("arch").asString();
+        _resolvable->arch = Arch( reader_r->getAttribute("arch").asString() );
 
         return true;
       }
@@ -139,7 +139,7 @@ namespace zypp
       // xpath: /filelists/package/version
       if (reader_r->name() == "version")
       {
-        editionStringFromAttrs( reader_r,  _resolvable->edition );
+        editionStringFromAttrs( reader_r, _resolvable->edition );
         return true;
       }
 
index 9efc2e5..779d3a7 100644 (file)
@@ -132,7 +132,7 @@ namespace zypp
         _changelog.clear();
 
         _resolvable->name = reader_r->getAttribute("name").asString();
-        _resolvable->arch = reader_r->getAttribute("arch").asString();
+        _resolvable->arch = Arch( reader_r->getAttribute("arch").asString() );
 
         return true;
       }
index ee3a890..251847c 100644 (file)
@@ -50,7 +50,7 @@ namespace zypp
         return; // ---> nothing to do
 
       // build obsoletes from instlist_r
-      CapSet obsoletes;
+      std::set<Capability> obsoletes;
       for ( GetResolvablesToInsDel::PoolItemList::const_iterator it = instlist_r.begin();
             it != instlist_r.end(); ++it )
         {
@@ -69,11 +69,11 @@ namespace zypp
           PoolItem_Ref ipkg( *it );
           bool delayPkg = false;
           // ...check whether an obsoletes....
-          for ( CapSet::iterator obs = obsoletes.begin();
+          for ( std::set<Capability>::iterator obs = obsoletes.begin();
                 ! delayPkg && obs != obsoletes.end(); ++obs )
             {
               // ...matches anything provided by the package?
-              for ( CapSet::const_iterator prov = ipkg->dep(Dep::PROVIDES).begin();
+              for ( Capabilities::const_iterator prov = ipkg->dep(Dep::PROVIDES).begin();
                     prov != ipkg->dep(Dep::PROVIDES).end(); ++prov )
                 {
                   if ( obs->matches( *prov ) == CapMatch::yes )
index ab6a37b..2566477 100644 (file)
 */
 #include <iostream>
 #include "zypp/base/LogTools.h"
-#include "zypp/capability/FilesystemCap.h"
-#include "zypp/base/Measure.h"
 
 #include "zypp/pool/PoolImpl.h"
 #include "zypp/pool/PoolStats.h"
-#include "zypp/CapSet.h"
 #include "zypp/Package.h"
 #include "zypp/VendorAttr.h"
 
@@ -114,8 +111,8 @@ namespace zypp
     static void
     storeInsert( CapHash::ContainerT & store_r, const PoolItem & item_r, Dep cap_r )
     {
-      CapSet caps = item_r->dep( cap_r );
-      for (CapSet::iterator ic = caps.begin(); ic != caps.end(); ++ic) {
+      Capabilities caps = item_r->dep( cap_r );
+      for (Capabilities::const_iterator ic = caps.begin(); ic != caps.end(); ++ic) {
        store_r[cap_r][ic->index()].push_back( CapAndItem( *ic, item_r ) );
       }
     }
@@ -136,9 +133,9 @@ namespace zypp
     static void
     storeDelete( PoolTraits::DepCapItemContainerT & store_r, const PoolItem & item_r, Dep cap_r )
     {
-      CapSet caps = item_r->dep( cap_r );
+      Capabilities caps = item_r->dep( cap_r );
 //XXX << "storeDelete(" << item_r << ")" << endl;
-      for ( CapSet::iterator ic = caps.begin(); ic != caps.end(); ++ic )
+      for ( Capabilities::const_iterator ic = caps.begin(); ic != caps.end(); ++ic )
         {
           PoolTraits::CapItemContainerT & capitems = store_r[cap_r][ic->index()];
           for ( PoolTraits::CapItemContainerT::iterator pos = capitems.begin(); pos != capitems.end(); /**/ )
@@ -201,7 +198,6 @@ namespace zypp
     // METHOD TYPE : Ctor
     //
     PoolImpl::PoolImpl()
-      : _watchFilesystemSysconfigStorage( capability::FilesystemCap::sysconfigStorageSerial() )
     {}
 
     ///////////////////////////////////////////////////////////////////
@@ -214,76 +210,6 @@ namespace zypp
 
     ///////////////////////////////////////////////////////////////////
     //
-    // METHOD NAME : PoolImpl::serial
-    // METHOD TYPE : SerialNumber
-    //
-    const SerialNumber & PoolImpl::serial() const
-    {
-      if ( _watchFilesystemSysconfigStorage.remember( capability::FilesystemCap::sysconfigStorageSerial() ) )
-      {
-        const_cast<PoolImpl*>(this)->_serial.setDirty(); // propagate changed /etc/sysconfig/storage
-      }
-      return _serial;
-    }
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // METHOD NAME : PoolImpl::satSync
-    // METHOD TYPE : void
-    //
-    void PoolImpl::satSync() const
-    {
-      if ( satSynced() )
-      {
-        MIL << "Pool: " << _serial << ": In sync with sat-pool " << _satSyncRequired << endl;
-        return;
-      }
-
-      debug::Measure mnf( "Sync changes to sat-pool..." );
-      MIL << "Pool: " << _serial << ": Sync changes to sat-pool... " << _satSyncRequired << endl;
-
-      // collect unsynced PoolItems per repository.
-      std::map<std::string, std::list<PoolItem> > todo;
-      const std::string & systemRepoName( sat::Pool::instance().systemRepoName() );
-      for_( it, begin(), end() )
-      {
-        if ( ! (*it).satSolvable() )
-        {
-          if ( (*it).status().isInstalled() )
-            todo[systemRepoName].push_back( *it );
-          else
-            todo[(*it)->repository().info().alias()].push_back( *it );
-        }
-      }
-
-      // add the missing PoolItems.
-      DBG << "Update missing repos... " << todo.size() << endl;
-      void res2sat( const ResObject::constPtr & res_r, sat::Solvable & slv_r );
-
-      for_( it, todo.begin(), todo.end() )
-      {
-        DBG << "Update repo " << it->first << ": " << it->second.size() << endl;
-        sat::Repo repo( sat::Pool::instance().reposInsert( it->first.empty() ? "@Builtin" : it->first ) );
-        sat::Solvable first( repo.addSolvables( it->second.size() ) );
-        DBG << " starting at " << first << endl;
-
-        sat::Solvable cur( first );
-        for_( pit, it->second.begin(), it->second.end() )
-        {
-          res2sat( *pit, cur );
-          (*pit).rememberSatSolvable( cur );
-          cur = cur.nextInRepo();
-        }
-      }
-
-      _satSyncRequired.remember( _serial );
-      sat::Pool::instance().prepare();
-      MIL << "Pool: " << _serial << ": In sync with sat-pool " << _satSyncRequired << endl;
-      MIL << "sat::Pool: " << sat::Pool::instance() << endl;
-    }
-
-    ///////////////////////////////////////////////////////////////////
-    //
     // METHOD NAME : PoolImpl::find
     // METHOD TYPE : PoolItem
     //
index c4ab803..d7915bc 100644 (file)
@@ -17,6 +17,8 @@
 
 #include "zypp/base/Easy.h"
 #include "zypp/base/SerialNumber.h"
+#include "zypp/base/Deprecated.h"
+
 #include "zypp/pool/PoolTraits.h"
 #include "zypp/ResPoolProxy.h"
 #include "zypp/ZYppFactory.h"
@@ -33,11 +35,11 @@ namespace zypp
     // CLASS NAME : NameHash
     //
     /** */
-    class NameHash
+    class ZYPP_DEPRECATED NameHash
     {
     public:
       /** Default ctor */
-      NameHash();
+      NameHash() ZYPP_DEPRECATED;
       /** Dtor */
       ~NameHash();
 
@@ -105,7 +107,7 @@ namespace zypp
     {
     public:
       /** Default ctor */
-      CapHash();
+      CapHash() ZYPP_DEPRECATED;
       /** Dtor */
       ~CapHash();
 
@@ -192,7 +194,7 @@ namespace zypp
     typedef PoolTraits::size_type              size_type;
     typedef PoolTraits::Inserter               Inserter;
     typedef PoolTraits::Deleter                        Deleter;
-    typedef PoolTraits::AdditionalCapSet       AdditionalCapSet;
+    typedef PoolTraits::AdditionalCapabilities         AdditionalCapabilities;
     typedef PoolTraits::RepoContainerT          KnownRepositories;
 
     public:
@@ -244,9 +246,9 @@ namespace zypp
        *
        *  setAdditionalRequire( capset );
        */
-       void setAdditionalRequire( const AdditionalCapSet & capset ) const
+       void setAdditionalRequire( const AdditionalCapabilities & capset ) const
            { _additionalRequire = capset; }
-       AdditionalCapSet & additionalRequire() const
+       AdditionalCapabilities & additionalRequire() const
            { return _additionalRequire; }
 
        /**
@@ -257,9 +259,9 @@ namespace zypp
        *
        *  setAdditionalConflict( capset );
        */
-       void setAdditionalConflict( const AdditionalCapSet & capset ) const
+       void setAdditionalConflict( const AdditionalCapabilities & capset ) const
            { _additionaConflict = capset; }
-       AdditionalCapSet & additionaConflict() const
+       AdditionalCapabilities & additionaConflict() const
            { return _additionaConflict; }
 
        /**
@@ -271,9 +273,9 @@ namespace zypp
         *
         *  setAdditionalProvide( cap );
         */
-       void setAdditionalProvide( const AdditionalCapSet & capset ) const
+       void setAdditionalProvide( const AdditionalCapabilities & capset ) const
            { _additionaProvide = capset; }
-       AdditionalCapSet & additionaProvide() const
+       AdditionalCapabilities & additionaProvide() const
            { return _additionaProvide; }
 
       /** */
@@ -325,14 +327,8 @@ namespace zypp
     public:
       /** Serial number changing whenever the content
        * (Resolvables or Dependencies) changes. */
-      const SerialNumber & serial() const;
-
-      /** Wheter in sync with sat-pool. */
-      bool satSynced() const
-      { return _satSyncRequired.isClean( _serial ); }
-
-      /** Sync with sat-pool. */
-      void satSync() const;
+      const SerialNumber & serial() const
+      { return _serial; }
 
       /** Return the corresponding \ref PoolItem.
        * Pool and sat pool should be in sync. Returns an empty
@@ -343,19 +339,15 @@ namespace zypp
 
     private:
       /** Serial number. */
-      SerialNumber        _serial;
-      /** Watch for changes in /etc/sysconfig/storage. */
-      SerialNumberWatcher _watchFilesystemSysconfigStorage;
-      /** Watch for changes \c _serial. */
-      SerialNumberWatcher _satSyncRequired;
+      SerialNumber _serial;
 
     public:
       ContainerT   _store;
       NameHash     _namehash;
       CapHash      _caphash;
-      mutable AdditionalCapSet _additionalRequire;
-      mutable AdditionalCapSet _additionaConflict;
-      mutable AdditionalCapSet _additionaProvide;
+      mutable AdditionalCapabilities _additionalRequire;
+      mutable AdditionalCapabilities _additionaConflict;
+      mutable AdditionalCapabilities _additionaProvide;
 
     public:
       ResPoolProxy proxy( ResPool self ) const
index 0bf61b7..c4f0be9 100644 (file)
@@ -100,8 +100,8 @@ namespace zypp
       typedef PoolImplInserter           Inserter;
       typedef PoolImplDeleter            Deleter;
 
-      /** Map of CapSet and "who" has set it*/
-      typedef std::map<ResStatus::TransactByValue,CapSet>              AdditionalCapSet;
+      /** Map of Capabilities and "who" has set it*/
+      typedef std::map<ResStatus::TransactByValue,Capabilities>                AdditionalCapabilities;
 
     };
     ///////////////////////////////////////////////////////////////////
diff --git a/zypp/pool/Res2Sat.cc b/zypp/pool/Res2Sat.cc
deleted file mode 100644 (file)
index 5a656cc..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/pool/Res2Sat.cc
- *
-*/
-#include <iostream>
-#include <boost/mpl/int.hpp>
-
-#include "zypp/base/Easy.h"
-#include "zypp/base/LogTools.h"
-#include "zypp/base/Gettext.h"
-#include "zypp/base/Exception.h"
-#include "zypp/base/String.h"
-
-#include "zypp/ResObject.h"
-#include "zypp/Capability.h"
-#include "zypp/capability/VersionedCap.h"
-
-#include "zypp/sat/detail/PoolImpl.h"
-#include "zypp/sat/Solvable.h"
-#include "zypp/sat/Repo.h"
-
-using std::endl;
-
-
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace pool
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    namespace
-    { /////////////////////////////////////////////////////////////////
-
-      inline void store( ::Id & where_r, const::std::string & str_r )
-      {
-        where_r = IdString( str_r ).id();
-      }
-
-      inline void store( ::Offset & where_r, ::_Solvable * slv_r, const Dependencies & dep_r, Dep which_r )
-      {
-        enum SatIsRreq {
-          ISRREQ_NORMAL      = 0,
-          ISRREQ_REQUIRES    = -sat::detail::solvablePrereqMarker,
-          ISRREQ_PREREQUIRES = sat::detail::solvablePrereqMarker
-        };
-        const CapSet & caps( dep_r[which_r] );
-        if ( caps.empty() )
-          return;
-        const CapSet & prereq( dep_r[Dep::PREREQUIRES] );
-
-        for_( it, caps.begin(), caps.end() )
-        {
-          SatIsRreq isreq = ISRREQ_NORMAL;
-          if ( which_r == Dep::REQUIRES )
-          {
-            isreq = ( prereq.find( *it ) != prereq.end() ) ? ISRREQ_PREREQUIRES : ISRREQ_REQUIRES;
-          }
-
-          std::string name;
-          Rel         op;
-          Edition     ed;
-          using capability::VersionedCap;
-          VersionedCap::constPtr vercap = capability::asKind<VersionedCap>(*it);
-          if ( vercap )
-          {
-            name = vercap->name();
-            op = vercap->op();
-            ed = vercap->edition();
-          }
-          else
-          {
-            name = (*it).asString();
-          }
-
-          where_r = ::repo_addid_dep( slv_r->repo, where_r,
-                                      sat::Capability( name, op, ed, (*it).refers() ).id(),
-                                      isreq );
-        }
-      }
-
-      /////////////////////////////////////////////////////////////////
-    } // namespace
-    ///////////////////////////////////////////////////////////////////
-
-
-    void res2sat( const ResObject::constPtr & res_r, sat::Solvable & slv_r )
-    {
-      ::_Solvable * slv( slv_r.get() );
-      if ( ! ( res_r && slv ) )
-      {
-        INT << res_r << " -> " << slv_r << endl;
-        ZYPP_THROW( Exception( _("Can't store data in NULL object") ) );
-      }
-
-      if ( isKind<Package>( res_r ) )
-      {
-        store( slv->name, res_r->name() );
-      }
-      else
-      {
-        // non-packages prefixed by kind
-        store( slv->name, str::form( "%s:%s",
-                                     res_r->kind().asString().c_str(),
-                                     res_r->name().c_str() ) );
-      }
-      store( slv->arch,   res_r->arch().asString() );
-      store( slv->evr,    res_r->edition().asString() );
-      store( slv->vendor, res_r->vendor() );
-
-      store( slv->provides,    slv, res_r->deps(), Dep::PROVIDES );
-      store( slv->obsoletes,   slv, res_r->deps(), Dep::OBSOLETES );
-      store( slv->conflicts,   slv, res_r->deps(), Dep::CONFLICTS );
-      store( slv->requires,    slv, res_r->deps(), Dep::REQUIRES ); // incl. PREREQIRES
-      store( slv->recommends,  slv, res_r->deps(), Dep::RECOMMENDS );
-      store( slv->suggests,    slv, res_r->deps(), Dep::SUGGESTS );
-      store( slv->supplements, slv, res_r->deps(), Dep::SUPPLEMENTS );
-      store( slv->enhances,    slv, res_r->deps(), Dep::ENHANCES );
-      store( slv->freshens,    slv, res_r->deps(), Dep::FRESHENS );
-    }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace pool
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
index 032f04e..3a2dd4d 100644 (file)
@@ -20,7 +20,6 @@
 #include "zypp/repo/RepoProvideFile.h"
 #include "zypp/repo/Applydeltarpm.h"
 #include "zypp/repo/PackageDelta.h"
-#include "zypp/detail/ImplConnect.h"
 
 #include "zypp/ZConfig.h"
 #include "zypp/RepoInfo.h"
@@ -78,7 +77,6 @@ namespace zypp
                                       const PackageProviderPolicy & policy_r )
     : _policy( policy_r )
     , _package( package )
-    , _implPtr( detail::ImplConnect::resimpl( _package ) )
     , _deltas(deltas)
     , _access(access)
     {}
index 28b5e07..01c68d7 100644 (file)
@@ -67,7 +67,6 @@ namespace zypp
       typedef shared_ptr<void>                                       ScopedGuard;
       typedef callback::SendReport<repo::DownloadResolvableReport> Report;
 
-      typedef detail::ResImplTraits<Package::Impl>::constPtr PackageImpl_constPtr;
       typedef packagedelta::DeltaRpm                         DeltaRpm;
       typedef packagedelta::PatchRpm                         PatchRpm;
 
@@ -104,11 +103,10 @@ namespace zypp
     private:
       PackageProviderPolicy      _policy;
       Package::constPtr          _package;
-      PackageImpl_constPtr       _implPtr;
       mutable bool               _retry;
       mutable shared_ptr<Report> _report;
-      DeltaCandidates _deltas;
-      RepoMediaAccess &_access;
+      DeltaCandidates            _deltas;
+      RepoMediaAccess &          _access;
     };
     ///////////////////////////////////////////////////////////////////
 
diff --git a/zypp/repo/cached/AtomImpl.cc b/zypp/repo/cached/AtomImpl.cc
deleted file mode 100644 (file)
index 289c0e8..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#include "zypp/TranslatedText.h"
-#include "zypp/base/String.h"
-#include "zypp/base/Logger.h"
-#include "zypp/repo/RepositoryImpl.h"
-#include "AtomImpl.h"
-#include "zypp/cache/CacheAttributes.h"
-
-using namespace std;
-using namespace zypp::detail;
-//using namespace::zypp::repo;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp { namespace repo { namespace cached {
-
-///////////////////////////////////////////////////////////////////
-//
-//        CLASS NAME : AtomImpl
-//
-///////////////////////////////////////////////////////////////////
-
-/** Default ctor
-*/
-AtomImpl::AtomImpl (const data::RecordId &id, cached::RepoImpl::Ptr repository_r)
-    : _repository (repository_r),
-      _id(id)
-{}
-
-Repository
-AtomImpl::repository() const
-{
-  return _repository->selfRepository();
-}
-
-///////////////////////////////////////////////////
-// ResObject Attributes
-///////////////////////////////////////////////////
-
-TranslatedText AtomImpl::summary() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectSummary() );
-}
-
-TranslatedText AtomImpl::description() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDescription() );
-}
-
-TranslatedText AtomImpl::insnotify() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectInsnotify() );
-}
-
-TranslatedText AtomImpl::delnotify() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDelnotify() );
-}
-
-TranslatedText AtomImpl::licenseToConfirm() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectLicenseToConfirm() );
-}
-
-Vendor AtomImpl::vendor() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrResObjectVendor() );
-}
-
-ByteCount AtomImpl::size() const
-{
-  return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectInstalledSize() );
-}
-
-bool AtomImpl::installOnly() const
-{
-  return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrResObjectInstallOnly() );
-}
-
-Date AtomImpl::buildtime() const
-{
-  return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectBuildTime() );
-}
-
-Date AtomImpl::installtime() const
-{
-  return Date();
-}
-
-/////////////////////////////////////////////////////////////////
-} } } // namespace zypp::repo::cached
-///////////////////////////////////////////////////////////////////
-
diff --git a/zypp/repo/cached/AtomImpl.h b/zypp/repo/cached/AtomImpl.h
deleted file mode 100644 (file)
index 91281b5..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#ifndef zypp_repo_cached_AtomImpl_H
-#define zypp_repo_cached_AtomImpl_H
-
-#include "zypp/detail/AtomImpl.h"
-#include "zypp/repo/cached/RepoImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-namespace repo
-{ /////////////////////////////////////////////////////////////////
-namespace cached
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //        CLASS NAME : AtomImpl
-  //
-  class AtomImpl : public detail::AtomImplIf
-  {
-  public:
-
-    AtomImpl( const data::RecordId &id, repo::cached::RepoImpl::Ptr repository_r );
-
-    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 Repository repository() const;
-
-  private:
-    repo::cached::RepoImpl::Ptr _repository;
-    data::RecordId _id;
-  };
-  /////////////////////////////////////////////////////////////////
-} // namespace cached
-} // namespace repository
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZMD_BACKEND_DBSOURCE_DBPACKAGEIMPL_H
-
diff --git a/zypp/repo/cached/MessageImpl.cc b/zypp/repo/cached/MessageImpl.cc
deleted file mode 100644 (file)
index f6c08de..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#include "zypp/TranslatedText.h"
-#include "zypp/base/String.h"
-#include "zypp/base/Logger.h"
-#include "zypp/repo/RepositoryImpl.h"
-#include "MessageImpl.h"
-#include "zypp/cache/CacheAttributes.h"
-
-
-using namespace std;
-using namespace zypp::detail;
-using namespace::zypp::repo;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp { namespace repo { namespace cached {
-
-///////////////////////////////////////////////////////////////////
-//
-//        CLASS NAME : MessageImpl
-//
-///////////////////////////////////////////////////////////////////
-
-/** Default ctor
-*/
-MessageImpl::MessageImpl (const data::RecordId &id, cached::RepoImpl::Ptr repository_r)
-    : _repository (repository_r),
-      _id(id)
-{}
-
-Repository
-MessageImpl::repository() const
-{
-  return _repository->selfRepository();
-}
-
-///////////////////////////////////////////////////
-// ResObject Attributes
-///////////////////////////////////////////////////
-
-TranslatedText MessageImpl::summary() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectSummary() );
-}
-
-TranslatedText MessageImpl::description() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDescription() );
-}
-
-TranslatedText MessageImpl::insnotify() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectInsnotify() );
-}
-
-TranslatedText MessageImpl::delnotify() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDelnotify() );
-}
-
-TranslatedText MessageImpl::licenseToConfirm() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectLicenseToConfirm() );
-}
-
-Vendor MessageImpl::vendor() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrResObjectVendor() );
-}
-
-
-ByteCount MessageImpl::size() const
-{
-  return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectInstalledSize() );
-}
-
-bool MessageImpl::installOnly() const
-{
-  return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrResObjectInstallOnly() );
-}
-
-Date MessageImpl::buildtime() const
-{
-  return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectBuildTime() );
-}
-
-Date MessageImpl::installtime() const
-{
-  return Date();
-}
-
-//////////////////////////////////////////
-// MESSAGE
-/////////////////////////////////////////
-
-TranslatedText MessageImpl::text() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrMessageText() );
-}
-
-Patch::constPtr MessageImpl::patch() const
-{
-  return 0;
-}
-
-/////////////////////////////////////////////////////////////////
-} } } // namespace zypp::repo::cached
-///////////////////////////////////////////////////////////////////
-
diff --git a/zypp/repo/cached/MessageImpl.h b/zypp/repo/cached/MessageImpl.h
deleted file mode 100644 (file)
index b11af0d..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#ifndef zypp_repo_cached_MessageImpl_H
-#define zypp_repo_cached_MessageImpl_H
-
-#include "zypp/detail/MessageImpl.h"
-#include "zypp/repo/cached/RepoImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-namespace repo
-{ /////////////////////////////////////////////////////////////////
-namespace cached
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //        CLASS NAME : MessageImpl
-  //
-  class MessageImpl : public detail::MessageImplIf
-  {
-  public:
-
-    MessageImpl( const data::RecordId &id, repo::cached::RepoImpl::Ptr repository_r );
-
-    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;
-
-    // MESSAGE
-    virtual TranslatedText text() const;
-    virtual Patch::constPtr patch() const;
-
-    virtual Repository repository() const;
-
-  private:
-    repo::cached::RepoImpl::Ptr _repository;
-    data::RecordId _id;
-  };
-  /////////////////////////////////////////////////////////////////
-} // namespace cached
-} // namespace repository
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZMD_BACKEND_DBSOURCE_DBPACKAGEIMPL_H
-
diff --git a/zypp/repo/cached/PackageImpl.cc b/zypp/repo/cached/PackageImpl.cc
deleted file mode 100644 (file)
index 7bb5a9a..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zmd/backend/dbrepository/PackageImpl.h
- *
-*/
-
-#include "zypp/TranslatedText.h"
-#include "zypp/base/String.h"
-#include "zypp/base/Logger.h"
-#include "zypp/repo/RepositoryImpl.h"
-#include "PackageImpl.h"
-#include "zypp/cache/CacheAttributes.h"
-
-using namespace std;
-using namespace zypp::detail;
-using namespace::zypp::repo;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp { namespace repo { namespace cached {
-
-///////////////////////////////////////////////////////////////////
-//
-//        CLASS NAME : PackageImpl
-//
-///////////////////////////////////////////////////////////////////
-
-/** Default ctor
-*/
-PackageImpl::PackageImpl (const data::RecordId &id, cached::RepoImpl::Ptr repository_r)
-    : _repository (repository_r),
-      _id(id)
-{}
-
-Repository
-PackageImpl::repository() const
-{
-  return _repository->selfRepository();
-}
-
-///////////////////////////////////////////////////
-// ResObject Attributes
-///////////////////////////////////////////////////
-
-TranslatedText PackageImpl::summary() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectSummary() );
-}
-
-TranslatedText PackageImpl::description() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDescription() );
-}
-
-TranslatedText PackageImpl::insnotify() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectInsnotify() );
-}
-
-TranslatedText PackageImpl::delnotify() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDelnotify() );
-}
-
-TranslatedText PackageImpl::licenseToConfirm() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectLicenseToConfirm() );
-}
-
-Vendor PackageImpl::vendor() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrResObjectVendor() );
-}
-
-ByteCount PackageImpl::size() const
-{
-  return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectInstalledSize() );
-}
-
-bool PackageImpl::installOnly() const
-{
-  return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrResObjectInstallOnly() );
-}
-
-Date PackageImpl::buildtime() const
-{
-  return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectBuildTime() );
-}
-
-Date PackageImpl::installtime() const
-{
-  return Date();
-}
-
-std::string PackageImpl::buildhost() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageBuildhost() );
-}
-
-std::string PackageImpl::distribution() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageDistribution() );
-}
-
-Label PackageImpl::license() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageLicense() );
-}
-
-std::string PackageImpl::packager() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackagePackager() );
-}
-
-PackageGroup PackageImpl::group() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageGroup() );
-}
-
-PackageImpl::Keywords PackageImpl::keywords() const
-{
-  PackageImpl::Keywords keywords;
-  _repository->resolvableQuery().queryStringContainerAttribute( _id, cache::attrPackageKeywords(), std::inserter(keywords, keywords.begin()) );
-  return keywords;
-}
-
-Changelog PackageImpl::changelog() const
-{
-  return Changelog();
-}
-
-unsigned PackageImpl::mediaNr() const
-{
-  if ( _mnr == (unsigned)-1 )
-  {
-    _mnr = _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrPackageLocationMediaNr() );
-  }
-  return _mnr;
-}
-
-ByteCount PackageImpl::downloadSize() const
-{
-  return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrPackageLocationDownloadSize() );
-}
-
-OnMediaLocation PackageImpl::location() const
-{
-  OnMediaLocation loc;
-  queryOnMediaLocation( _repository->resolvableQuery(), _id, cache::attrPackageLocation, loc );
-  return loc;
-}
-
-std::string PackageImpl::url() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageUrl() );
-}
-
-std::string PackageImpl::os() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageOperatingSystem() );
-}
-
-Text PackageImpl::prein() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackagePrein() );
-}
-
-Text PackageImpl::postin() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackagePostin() );
-}
-
-Text PackageImpl::preun() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackagePreun() );
-}
-
-Text PackageImpl::postun() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackagePostun() );
-}
-
-ByteCount PackageImpl::sourcesize() const
-{
-  return ByteCount();
-}
-
-const DiskUsage & PackageImpl::diskusage() const
-{
-  if ( ! _diskusage )
-  {
-    // lazy init
-    _diskusage.reset( new DiskUsage );
-    _repository->resolvableQuery().queryDiskUsage( _id, *_diskusage );
-    if ( _diskusage->empty() )
-    {
-      // No info: Creating a faked entry distributing the
-      // total package size in assumed 200 files to "/ZYPP_NO_DU_INFO"
-      // The reported size are 1K blocks.
-      //
-      // Note: Less likely that some system has a mountpoint named
-      // ZYPP_NO_DU_INFO, so the size will be accounted to '/'.
-      // but adding a faked mountpoint entry an application is able
-      // to spot and handle these faked data in a different manner.
-      unsigned dusize = size().blocks( ByteCount::K );
-      _diskusage->add( "/",                 dusize, 200 );
-      _diskusage->add( "/ZYPP_NO_DU_INFO/", dusize, 200 );
-    }
-  }
-  return *_diskusage;
-}
-
-list<string> PackageImpl::authors() const
-{
-  list<string> authors;
-  _repository->resolvableQuery().queryStringContainerAttribute( _id, cache::attrPackageAuthors(), back_inserter(authors) );
-  return authors;
-}
-
-std::list<std::string> PackageImpl::filenames() const
-{
-  return std::list<std::string>();
-}
-
-std::string PackageImpl::sourcePkgName() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageSourcePkgName() );
-}
-
-Edition PackageImpl::sourcePkgEdition() const
-{
-  return Edition( _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPackageSourcePkgEdition() ) );
-}
-
-/////////////////////////////////////////////////////////////////
-} } } // namespace zypp::repo::cached
-///////////////////////////////////////////////////////////////////
-
diff --git a/zypp/repo/cached/PackageImpl.h b/zypp/repo/cached/PackageImpl.h
deleted file mode 100644 (file)
index f83e49c..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#ifndef zypp_repo_cached_PackageImpl_H
-#define zypp_repo_cached_PackageImpl_H
-
-#include "zypp/detail/PackageImpl.h"
-#include "zypp/repo/cached/RepoImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-namespace repo
-{ /////////////////////////////////////////////////////////////////
-namespace cached
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //        CLASS NAME : PackageImpl
-  //
-  class PackageImpl : public detail::PackageImplIf
-  {
-  public:
-
-    PackageImpl( const data::RecordId &id, repo::cached::RepoImpl::Ptr repository_r );
-
-  public:
-      /** Overloaded ResObjectImpl attribute.
-       * \return The \ref location media number.
-       */
-      virtual unsigned mediaNr() const;
-
-      /** Overloaded ResObjectImpl attribute.
-       * \return The \ref location downloadSize.
-       */
-      virtual ByteCount downloadSize() const;
-
-  public:
-    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;
-
-    // PACKAGE
-    virtual std::string buildhost() const;
-    virtual std::string distribution() const;
-    virtual Label license() const;
-    virtual std::string packager() const;
-    virtual PackageGroup group() const;
-    virtual Keywords keywords() const;
-    virtual Changelog changelog() const;
-    virtual std::string url() const;
-    virtual std::string os() const;
-    virtual Text prein() const;
-    virtual Text postin() const;
-    virtual Text preun() const;
-    virtual Text postun() const;
-    virtual ByteCount sourcesize() const;
-    virtual const DiskUsage & diskusage() const;
-    virtual std::list<std::string> authors() const;
-    virtual std::list<std::string> filenames() const;
-    virtual OnMediaLocation location() const;
-    virtual std::string sourcePkgName() const;
-    virtual Edition sourcePkgEdition() const;
-
-    virtual Repository repository() const;
-
-
-  private:
-    repo::cached::RepoImpl::Ptr _repository;
-    data::RecordId _id;
-
-    mutable DefaultIntegral<unsigned,(unsigned)-1> _mnr;
-    mutable scoped_ptr<DiskUsage> _diskusage;
-  };
-  /////////////////////////////////////////////////////////////////
-} // namespace cached
-} // namespace repository
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZMD_BACKEND_DBSOURCE_DBPACKAGEIMPL_H
-
diff --git a/zypp/repo/cached/PatchImpl.cc b/zypp/repo/cached/PatchImpl.cc
deleted file mode 100644 (file)
index 7e4890f..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zmd/backend/dbrepository/PatchImpl.h
- *
-*/
-
-#include "zypp/TranslatedText.h"
-#include "zypp/base/String.h"
-#include "zypp/base/Logger.h"
-#include "zypp/repo/RepositoryImpl.h"
-#include "PatchImpl.h"
-#include "zypp/cache/CacheAttributes.h"
-
-
-using namespace std;
-using namespace zypp::detail;
-using namespace::zypp::repo;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp { namespace repo { namespace cached {
-
-///////////////////////////////////////////////////////////////////
-//
-//        CLASS NAME : PatchImpl
-//
-///////////////////////////////////////////////////////////////////
-
-/** Default ctor
-*/
-PatchImpl::PatchImpl (const data::RecordId &id, cached::RepoImpl::Ptr repository_r)
-    : _repository (repository_r),
-      _id(id)
-{}
-
-Repository
-PatchImpl::repository() const
-{
-  return _repository->selfRepository();
-}
-
-///////////////////////////////////////////////////
-// ResObject Attributes
-///////////////////////////////////////////////////
-
-TranslatedText PatchImpl::summary() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectSummary() );
-}
-
-TranslatedText PatchImpl::description() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDescription() );
-}
-
-TranslatedText PatchImpl::insnotify() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectInsnotify() );
-}
-
-TranslatedText PatchImpl::delnotify() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDelnotify() );
-}
-
-TranslatedText PatchImpl::licenseToConfirm() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectLicenseToConfirm() );
-}
-
-Vendor PatchImpl::vendor() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrResObjectVendor() );
-}
-
-
-ByteCount PatchImpl::size() const
-{
-  return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectInstalledSize() );
-}
-
-bool PatchImpl::installOnly() const
-{
-  return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrResObjectInstallOnly() );
-}
-
-Date PatchImpl::buildtime() const
-{
-  return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectBuildTime() );
-}
-
-Date PatchImpl::installtime() const
-{
-  return Date();
-}
-
-//////////////////////////////////////////
-// PATCH
-/////////////////////////////////////////
-
-std::string PatchImpl::id() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPatchId() );
-}
-
-Date PatchImpl::timestamp() const
-{
-  return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrPatchTimestamp() );
-}
-
-std::string PatchImpl::category() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPatchCategory() );
-}
-
-bool PatchImpl::reboot_needed() const
-{
-  return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrPatchRebootNeeded() );
-}
-
-bool PatchImpl::affects_pkg_manager() const
-{
-  return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrPatchAffectsPkgManager() );
-}
-
-/////////////////////////////////////////////////////////////////
-} } } // namespace zypp::repo::cached
-///////////////////////////////////////////////////////////////////
-
diff --git a/zypp/repo/cached/PatchImpl.h b/zypp/repo/cached/PatchImpl.h
deleted file mode 100644 (file)
index c0ed431..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#ifndef zypp_repo_cached_PatchImpl_H
-#define zypp_repo_cached_PatchImpl_H
-
-#include "zypp/detail/PatchImpl.h"
-#include "zypp/repo/cached/RepoImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-namespace repo
-{ /////////////////////////////////////////////////////////////////
-namespace cached
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //        CLASS NAME : PatchImpl
-  //
-  class PatchImpl : public detail::PatchImplIf
-  {
-  public:
-
-    PatchImpl( const data::RecordId &id, repo::cached::RepoImpl::Ptr repository_r );
-
-    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;
-
-    // PATCH
-    virtual std::string id() const;
-    virtual Date timestamp() const;
-    virtual std::string category() const;
-    virtual bool reboot_needed() const;
-    virtual bool affects_pkg_manager() const;
-
-    virtual Repository repository() const;
-
-  private:
-    repo::cached::RepoImpl::Ptr _repository;
-    data::RecordId _id;
-  };
-  /////////////////////////////////////////////////////////////////
-} // namespace cached
-} // namespace repository
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZMD_BACKEND_DBSOURCE_DBPACKAGEIMPL_H
-
diff --git a/zypp/repo/cached/PatternImpl.cc b/zypp/repo/cached/PatternImpl.cc
deleted file mode 100644 (file)
index 34c49ee..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/repo/cached/PatternImpl.cc
- *
-*/
-#include <iostream>
-
-#include "zypp/base/Easy.h"
-#include "zypp/base/Logger.h"
-#include "zypp/base/LogTools.h"
-#include "zypp/base/String.h"
-
-#include "zypp/CapFactory.h"
-#include "zypp/TranslatedText.h"
-#include "zypp/repo/RepositoryImpl.h"
-#include "zypp/repo/cached/PatternImpl.h"
-#include "zypp/cache/CacheAttributes.h"
-
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp { namespace repo { namespace cached {
-
-///////////////////////////////////////////////////////////////////
-//
-//        CLASS NAME : PatternImpl
-//
-///////////////////////////////////////////////////////////////////
-
-/** Default ctor
-*/
-PatternImpl::PatternImpl (const data::RecordId &id, cached::RepoImpl::Ptr repository_r)
-    : _repository (repository_r),
-      _id(id)
-{}
-
-Repository
-PatternImpl::repository() const
-{
-  return _repository->selfRepository();
-}
-
-///////////////////////////////////////////////////
-// ResObject Attributes
-///////////////////////////////////////////////////
-
-TranslatedText PatternImpl::summary() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectSummary() );
-}
-
-TranslatedText PatternImpl::description() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDescription() );
-}
-
-TranslatedText PatternImpl::insnotify() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectInsnotify() );
-}
-
-TranslatedText PatternImpl::delnotify() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDelnotify() );
-}
-
-TranslatedText PatternImpl::licenseToConfirm() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectLicenseToConfirm() );
-}
-
-Vendor PatternImpl::vendor() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrResObjectVendor() );
-}
-
-
-ByteCount PatternImpl::size() const
-{
-  return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectInstalledSize() );
-}
-
-bool PatternImpl::installOnly() const
-{
-  return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrResObjectInstallOnly() );
-}
-
-Date PatternImpl::buildtime() const
-{
-  return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectBuildTime() );
-}
-
-Date PatternImpl::installtime() const
-{
-  return Date();
-}
-
-//////////////////////////////////////////
-// PATTERN
-/////////////////////////////////////////
-
-bool PatternImpl::isDefault() const
-{
-  return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrPatternIsDefault() );
-}
-
-bool PatternImpl::userVisible() const
-{
-  return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrPatternUserVisible() );
-}
-
-TranslatedText PatternImpl::category() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrPatternCategory() );
-}
-
-Pathname PatternImpl::icon() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPatternIcon() );
-}
-
-Pathname PatternImpl::script() const
-{
-#warning DUBIOUS ATTRIBUTE
-  return "";
-  //return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPatternScript() );
-}
-
-Label PatternImpl::order() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPatternOrder() );
-}
-
-
-void PatternImpl::initUiCapSetFromAttr( CapSet & caps_r, const cache::Attribute & attr_r ) const
-{
-  std::list<std::string> capstr;
-  _repository->resolvableQuery().queryStringContainerAttribute( _id, attr_r, std::back_inserter(capstr) );
-  for_( it, capstr.begin(), capstr.end() )
-  {
-    caps_r.insert( CapFactory().parse<ResType>( *it ) );
-  }
-}
-
-const CapSet & PatternImpl::includes() const
-{
-  if ( ! _includes )
-  {
-    // lazy init
-    _includes.reset( new CapSet );
-    initUiCapSetFromAttr( *_includes, cache::attrPatternUiIncludes() );
-  }
-  return *_includes;
-}
-
-const CapSet & PatternImpl::extends() const
-{
-  if ( ! _extends )
-  {
-    // lazy init
-    _extends.reset( new CapSet );
-    initUiCapSetFromAttr( *_extends, cache::attrPatternUiExtends() );
-  }
-  return *_extends;
-}
-
-/////////////////////////////////////////////////////////////////
-} } } // namespace zypp::repo::cached
-///////////////////////////////////////////////////////////////////
-
diff --git a/zypp/repo/cached/PatternImpl.h b/zypp/repo/cached/PatternImpl.h
deleted file mode 100644 (file)
index 171756d..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/repo/cached/PatternImpl.h
- *
-*/
-
-#ifndef zypp_repo_cached_PatternImpl_H
-#define zypp_repo_cached_PatternImpl_H
-
-#include "zypp/detail/PatternImpl.h"
-#include "zypp/repo/cached/RepoImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace cache
-  { /////////////////////////////////////////////////////////////////
-    class Attribute;
-    /////////////////////////////////////////////////////////////////
-  } // namespace cache
-  ///////////////////////////////////////////////////////////////////
-namespace repo
-{ /////////////////////////////////////////////////////////////////
-namespace cached
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //        CLASS NAME : PatternImpl
-  //
-  class PatternImpl : public detail::PatternImplIf
-  {
-  public:
-
-    PatternImpl( const data::RecordId &id, repo::cached::RepoImpl::Ptr repository_r );
-
-    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;
-
-    // PATTERN
-    virtual bool isDefault() const;
-    virtual bool userVisible() const;
-    virtual TranslatedText category() const;
-    virtual Pathname icon() const;
-    virtual Pathname script() const;
-    virtual Label order() const;
-    virtual const CapSet & includes() const;
-    virtual const CapSet & extends() const;
-
-    virtual Repository repository() const;
-
-  private:
-    /** Lazy init _includes and _extends which are stored as plain stringlist. */
-    void initUiCapSetFromAttr( CapSet & caps_r, const cache::Attribute & attr_r ) const;
-
-  private:
-    repo::cached::RepoImpl::Ptr _repository;
-    data::RecordId              _id;
-    mutable scoped_ptr<CapSet>  _includes;
-    mutable scoped_ptr<CapSet>  _extends;
-  };
-  /////////////////////////////////////////////////////////////////
-} // namespace cached
-} // namespace repository
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZMD_BACKEND_DBSOURCE_DBPACKAGEIMPL_H
-
diff --git a/zypp/repo/cached/ProductImpl.cc b/zypp/repo/cached/ProductImpl.cc
deleted file mode 100644 (file)
index 4d15f90..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#include "zypp/TranslatedText.h"
-#include "zypp/base/String.h"
-#include "zypp/base/Logger.h"
-#include "zypp/repo/RepositoryImpl.h"
-#include "ProductImpl.h"
-#include "zypp/cache/CacheAttributes.h"
-
-
-using namespace std;
-using namespace zypp::detail;
-using namespace::zypp::repo;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp { namespace repo { namespace cached {
-
-///////////////////////////////////////////////////////////////////
-//
-//        CLASS NAME : ProductImpl
-//
-///////////////////////////////////////////////////////////////////
-
-/** Default ctor
-*/
-ProductImpl::ProductImpl (const data::RecordId &id, cached::RepoImpl::Ptr repository_r)
-    : _repository (repository_r),
-      _id(id)
-{}
-
-Repository
-ProductImpl::repository() const
-{
-  return _repository->selfRepository();
-}
-
-///////////////////////////////////////////////////
-// ResObject Attributes
-///////////////////////////////////////////////////
-
-TranslatedText ProductImpl::summary() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectSummary() );
-}
-
-TranslatedText ProductImpl::description() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDescription() );
-}
-
-TranslatedText ProductImpl::insnotify() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectInsnotify() );
-}
-
-TranslatedText ProductImpl::delnotify() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDelnotify() );
-}
-
-TranslatedText ProductImpl::licenseToConfirm() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectLicenseToConfirm() );
-}
-
-Vendor ProductImpl::vendor() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrResObjectVendor() );
-}
-
-
-ByteCount ProductImpl::size() const
-{
-  return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectInstalledSize() );
-}
-
-bool ProductImpl::installOnly() const
-{
-  return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrResObjectInstallOnly() );
-}
-
-Date ProductImpl::buildtime() const
-{
-  return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectBuildTime() );
-}
-
-Date ProductImpl::installtime() const
-{
-  return Date();
-}
-
-//////////////////////////////////////////
-// PRODUCT
-/////////////////////////////////////////
-
-std::string ProductImpl::type() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrProductType() );
-}
-
-Url ProductImpl::releaseNotesUrl() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrProductReleasenotesUrl() );
-}
-
-std::list<Url> ProductImpl::updateUrls() const
-{
-  std::list<Url> urls;
-  _repository->resolvableQuery().queryStringContainerAttribute( _id, cache::attrProductUpdateUrls(), back_inserter(urls) );
-  return urls;
-}
-
-std::list<Url> ProductImpl::extraUrls() const
-{
-  std::list<Url> urls;
-  _repository->resolvableQuery().queryStringContainerAttribute( _id, cache::attrProductExtraUrls(), back_inserter(urls) );
-  return urls;
-}
-
-std::list<Url> ProductImpl::optionalUrls() const
-{
-  std::list<Url> urls;
-  _repository->resolvableQuery().queryStringContainerAttribute( _id, cache::attrProductOptionalUrls(), back_inserter(urls) );
-  return urls;
-}
-
-list<string> ProductImpl::flags() const
-{
-  list<string> flags;
-  _repository->resolvableQuery().queryStringContainerAttribute( _id, cache::attrProductFlags(), back_inserter(flags) );
-  return flags;
-}
-
-TranslatedText ProductImpl::shortName() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrProductShortName() );
-}
-
-std::string ProductImpl::distributionName() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrProductDistributionName() );
-}
-
-Edition ProductImpl::distributionEdition() const
-{
-  return Edition( _repository->resolvableQuery().queryStringAttribute( _id, cache::attrProductDistributionEdition() ) );
-}
-
-/////////////////////////////////////////////////////////////////
-} } } // namespace zypp::repo::cached
-///////////////////////////////////////////////////////////////////
-
diff --git a/zypp/repo/cached/ProductImpl.h b/zypp/repo/cached/ProductImpl.h
deleted file mode 100644 (file)
index aa248cf..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#ifndef zypp_repo_cached_ProductImpl_H
-#define zypp_repo_cached_ProductImpl_H
-
-#include "zypp/detail/ProductImpl.h"
-#include "zypp/repo/cached/RepoImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-namespace repo
-{ /////////////////////////////////////////////////////////////////
-namespace cached
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //        CLASS NAME : ProductImpl
-  //
-  class ProductImpl : public detail::ProductImplIf
-  {
-  public:
-
-    ProductImpl( const data::RecordId &id, repo::cached::RepoImpl::Ptr repository_r );
-
-    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;
-
-    // PRODUCT
-    virtual std::string type() const;
-    virtual Url releaseNotesUrl() const;
-    virtual std::list<Url> updateUrls() const;
-    virtual std::list<Url> extraUrls() const ;
-    virtual std::list<Url> optionalUrls() const ;
-    virtual std::list<std::string> flags() const;
-    virtual TranslatedText shortName() const;
-    virtual std::string distributionName() const;
-    virtual Edition distributionEdition() const;
-    virtual Repository repository() const;
-
-  private:
-    repo::cached::RepoImpl::Ptr _repository;
-    data::RecordId _id;
-  };
-  /////////////////////////////////////////////////////////////////
-} // namespace cached
-} // namespace repository
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZMD_BACKEND_DBSOURCE_DBPACKAGEIMPL_H
-
index 95029a4..fda8487 100644 (file)
 #include "zypp/base/Gettext.h"
 #include "zypp/base/Logger.h"
 #include "zypp/base/Measure.h"
-#include "zypp/capability/Capabilities.h"
-#include "zypp/cache/ResolvableQuery.h"
-#include "zypp/detail/ResImplTraits.h"
-#include "zypp/CapFactory.h"
-
-#include "zypp/Package.h"
-#include "zypp/SrcPackage.h"
-#include "zypp/Product.h"
-#include "zypp/Pattern.h"
-#include "zypp/Patch.h"
-#include "zypp/Message.h"
-#include "zypp/Script.h"
-#include "zypp/Atom.h"
-
 #include "zypp/repo/cached/RepoImpl.h"
-#include "zypp/repo/cached/PackageImpl.h"
-#include "zypp/repo/cached/SrcPackageImpl.h"
-#include "zypp/repo/cached/ProductImpl.h"
-#include "zypp/repo/cached/PatternImpl.h"
-#include "zypp/repo/cached/PatchImpl.h"
-#include "zypp/repo/cached/MessageImpl.h"
-#include "zypp/repo/cached/ScriptImpl.h"
-#include "zypp/repo/cached/AtomImpl.h"
+#include "zypp/cache/ResolvableQuery.h"
 #include "zypp/cache/CacheAttributes.h"
+#include "zypp/cache/sqlite3x/sqlite3x.hpp"
 
-using namespace zypp::detail;
 using namespace zypp::cache;
 using namespace std;
 using namespace sqlite3x;
@@ -68,6 +47,8 @@ RepoImpl::~RepoImpl()
 
 void RepoImpl::createResolvables()
 {
+#warning IMPLEMENT REPOIMPL::CREATERESOLVABLES
+#if 0
   ProgressData ticks;
   ticks.sendTo(_options.readingResolvablesProgress);
   ticks.name(str::form(_( "Reading '%s' repository cache"), info().alias().c_str()));
@@ -172,6 +153,7 @@ void RepoImpl::createResolvables()
       cerr << "Exception Occured: " << ex.what() << endl;
    }
   //extract_packages_from_directory( _store, thePath, selfRepositoryRef(), true );
+#endif
 }
 
 void RepoImpl::createPatchAndDeltas()
@@ -311,233 +293,12 @@ ResolvableQuery RepoImpl::resolvableQuery()
   return _rquery;
 }
 
-void RepoImpl::read_capabilities( sqlite3_connection &con,
-                                  data::RecordId repo_id,
-                                  map<data::RecordId, pair<Resolvable::Kind, NVRAD> > &nvras,
-                                  ProgressData &ticks )
-{
-  CapFactory capfactory;
-
-
-  // precompile statements
-
-
-
-//   map<data::RecordId, capability::CapabilityImpl::Ptr> named_caps;
-//   sqlite3_command select_named_cmd( con, "select v.id, c.refers_kind, n.name, v.version, v.release, v.epoch, v.relation named_capabilities v, capabilities c, names n where v.name_id=n.id and c.id=ncc.capability_id and ncc.named_capability_id=v.id;");
-//   {
-//     debug::Measure mnc("read named capabilities");
-//     sqlite3_reader reader = select_named_cmd.executereader();
-//     while  ( reader.read() )
-//     {
-//
-//     }
-//   }
-  sqlite3_command select_named_cmd( con, "select v.refers_kind, v.name_id, v.version, v.release, v.epoch, v.relation, v.dependency_type, v.resolvable_id from named_capabilities v, resolvables res where res.repository_id=:repo_id and v.resolvable_id=res.id;");
-
-  sqlite3_command select_file_cmd( con, "select fc.refers_kind, dn.name, fn.name, fc.dependency_type, fc.resolvable_id from file_capabilities fc, files f, dir_names dn, file_names fn, resolvables res where f.id=fc.file_id and f.dir_name_id=dn.id and f.file_name_id=fn.id and fc.resolvable_id=res.id and res.repository_id=:repo_id;");
-
-  sqlite3_command select_hal_cmd( con, "select hc.refers_kind, hc.name, hc.value, hc.relation, hc.dependency_type, hc.resolvable_id from hal_capabilities hc, resolvables res where hc.resolvable_id=res.id and res.repository_id=:repo_id;");
-
-  sqlite3_command select_modalias_cmd( con, "select mc.refers_kind, mc.name, mc.pkgname, mc.value, mc.relation, mc.dependency_type, mc.resolvable_id from modalias_capabilities mc, resolvables res where mc.resolvable_id=res.id and res.repository_id=:repo_id;");
-
-  sqlite3_command select_filesystem_cmd( con, "select v.refers_kind, n.name, v.dependency_type, v.resolvable_id from filesystem_capabilities v, names n, resolvables res where v.name_id=n.id and v.resolvable_id=res.id and res.repository_id=:repo_id;");
-
-  sqlite3_command select_split_cmd( con, "select v.refers_kind, n.name, dn.name, fn.name, v.dependency_type, v.resolvable_id from split_capabilities v, names n, resolvables res, files f, dir_names dn, file_names fn where v.name_id=n.id and v.resolvable_id=res.id and f.id=v.file_id and f.dir_name_id=dn.id and f.file_name_id=fn.id and res.repository_id=:repo_id;");
-
-  sqlite3_command select_other_cmd( con, "select oc.refers_kind, oc.value, oc.dependency_type, oc.resolvable_id from other_capabilities oc, resolvables res where oc.resolvable_id=res.id and res.repository_id=:repo_id;");
-
-
-  std::map<int,std::string> namemap;
-  sqlite3_command get_names_cmd( con, "select id,name from names;" );
-  {
-    sqlite3_reader reader = get_names_cmd.executereader();
-    while  ( reader.read() )
-    {
-      namemap[reader.getint(0)] = reader.getstring(1);
-    }
-  }
-
-  {
-    debug::Measure mnc("read named capabilities");
-    select_named_cmd.bind(":repo_id", repo_id);
-    sqlite3_reader reader = select_named_cmd.executereader();
-
-    // FIXME Move this logic to tick()?
-    Date start(Date::now());
-    Capability oldcap;
-    Resolvable::Kind oldrefer;
-    Rel oldrel;
-    //std::string oldname;
-    int oldname = -1;
-    std::string oldver, oldrelease;
-    int oldepoch = 0;
-
-
-    while  ( reader.read() )
-    {
-      ticks.tick();
-
-      Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-      int name = reader.getint(1);
-      Rel rel = _type_cache.relationFor(reader.getint(5));
-
-      if ( rel == zypp::Rel::NONE )
-      {
-        if (oldname != name || rel != oldrel || refer!=oldrefer)
-       {
-         oldrel = rel;
-         oldrefer = refer;
-         oldname = name;
-          capability::NamedCap *ncap = new capability::NamedCap( refer, namemap[name] );
-         oldcap = capfactory.fromImpl ( capability::CapabilityImpl::Ptr(ncap) );
-       }
-      }
-      else
-      {
-       std::string ver = reader.getstring(2);
-       std::string release = reader.getstring(3);
-       int epoch = reader.getint(4);
-        if (oldname != name || rel != oldrel || refer!=oldrefer
-           || oldver != ver
-           || oldrelease != release
-           || oldepoch != epoch)
-       {
-         oldrel = rel;
-         oldrefer = refer;
-         oldname = name;
-         oldver = ver;
-         oldrelease = release;
-         oldepoch = epoch;
-
-          capability::VersionedCap *vcap = new capability::VersionedCap( refer, namemap[name], /* rel */ rel, Edition( ver, release, epoch ) );
-         oldcap = capfactory.fromImpl( capability::CapabilityImpl::Ptr(vcap) );
-       }
-      }
-
-      zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(6));
-      data::RecordId rid = reader.getint64(7);
-      nvras[rid].second[deptype].insert(oldcap);
-    }
-  }
-
-  {
-    debug::Measure mnf("read file capabilities");
-    select_file_cmd.bind(":repo_id", repo_id);
-    sqlite3_reader reader = select_file_cmd.executereader();
-    while  ( reader.read() )
-    {
-      ticks.tick();
-      Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-      capability::FileCap *fcap = new capability::FileCap( refer, reader.getstring(1) + "/" + reader.getstring(2) );
-      zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(3));
-      data::RecordId rid = reader.getint64(4);
-      nvras[rid].second[deptype].insert( capfactory.fromImpl( capability::CapabilityImpl::Ptr(fcap) ) );
-    }
-  }
-
-  {
-    debug::Measure mnf("read hal capabilities");
-    select_hal_cmd.bind(":repo_id", repo_id);
-    sqlite3_reader reader = select_hal_cmd.executereader();
-    while  ( reader.read() )
-    {
-      ticks.tick();
-      //select hc.refers_kind, hc.name, hc.value, hc.relation, hc.dependency_type, hc.resolvable_id from hal_capabilities hc
-
-      Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-
-      Rel rel = _type_cache.relationFor(reader.getint(3));
-      capability::HalCap *hcap = new capability::HalCap( refer, reader.getstring(1), rel, reader.getstring(2) );
-      zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(4));
-      data::RecordId rid = reader.getint64(5);
-      nvras[rid].second[deptype].insert( capfactory.fromImpl( capability::CapabilityImpl::Ptr(hcap) ) );
-    }
-  }
-
-  {
-    debug::Measure mnf("read modalias capabilities");
-    select_modalias_cmd.bind(":repo_id", repo_id);
-    sqlite3_reader reader = select_modalias_cmd.executereader();
-    while  ( reader.read() )
-    {
-      ticks.tick();
-      Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-
-      Rel rel = _type_cache.relationFor(reader.getint(4));
-      capability::ModaliasCap *mcap = new capability::ModaliasCap( refer, reader.getstring(1), rel, reader.getstring(3) );
-      mcap->setPkgname(reader.getstring(2));
-      zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(5));
-      data::RecordId rid = reader.getint64(6);
-      nvras[rid].second[deptype].insert( capfactory.fromImpl( capability::CapabilityImpl::Ptr(mcap) ) );
-    }
-  }
-
-  {
-    debug::Measure mnf("read filesystem capabilities");
-    select_filesystem_cmd.bind(":repo_id", repo_id);
-    sqlite3_reader reader = select_filesystem_cmd.executereader();
-    while  ( reader.read() )
-    {
-      ticks.tick();
-      Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-
-      capability::FilesystemCap *fscap = new capability::FilesystemCap( refer, reader.getstring(1) );
-      zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(2));
-      data::RecordId rid = reader.getint64(3);
-      nvras[rid].second[deptype].insert( capfactory.fromImpl( capability::CapabilityImpl::Ptr(fscap) ) );
-    }
-  }
-
-  {
-    debug::Measure mnf("read split capabilities");
-    select_split_cmd.bind(":repo_id", repo_id);
-    sqlite3_reader reader = select_split_cmd.executereader();
-    while  ( reader.read() )
-    {
-      ticks.tick();
-      Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-
-      capability::SplitCap *scap = new capability::SplitCap( refer, reader.getstring(1),
-                                                             reader.getstring(2) + "/" + reader.getstring(3) );
-      zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(4));
-      data::RecordId rid = reader.getint64(5);
-      nvras[rid].second[deptype].insert( capfactory.fromImpl( capability::CapabilityImpl::Ptr(scap) ) );
-    }
-  }
-
-  {
-    debug::Measure mnf("read other capabilities");
-    select_other_cmd.bind(":repo_id", repo_id);
-    sqlite3_reader reader = select_other_cmd.executereader();
-    while  ( reader.read() )
-    {
-      ticks.tick();
-      //select oc.refers_kind, oc.value, oc.dependency_type, oc.resolvable_id from other_capabilities oc;
-
-      Resolvable::Kind refer = _type_cache.kindFor(reader.getint(0));
-      capability::CapabilityImpl::Ptr cap = capability::parse( refer, reader.getstring(1));
-
-      if ( !cap )
-      {
-        ERR << "Invalid capability " <<  reader.getstring(1) << endl;
-      }
-
-      zypp::Dep deptype = _type_cache.deptypeFor(reader.getint(2));
-      data::RecordId rid = reader.getint64(3);
-      nvras[rid].second[deptype].insert( capfactory.fromImpl(cap) );
-    }
-  }
-
-  MIL << nvras.size() << " capabilities" << endl;
-}
-
 
 /////////////////////////////////////////////////////////////////
-} // namespace plaindir
+} // namespace cached
 ///////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////
-} // namespace repository
+} // namespace repo
 ///////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////
 } // namespace zypp
index 709141d..c5b6899 100644 (file)
 #include "zypp/data/RecordId.h"
 #include "zypp/repo/RepositoryImpl.h"
 #include "zypp/ResStore.h"
-#include "zypp/cache/sqlite3x/sqlite3x.hpp"
+#include "zypp/RepoInfo.h"
 #include "zypp/cache/CacheTypes.h"
 #include "zypp/cache/ResolvableQuery.h"
-#include "zypp/RepoInfo.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -77,14 +76,9 @@ namespace zypp
 
         cache::ResolvableQuery resolvableQuery();
       private:
-        void read_capabilities( sqlite3x::sqlite3_connection &con,
-                                data::RecordId repo_id,
-                                std::map<data::RecordId, std::pair<Resolvable::Kind, NVRAD> > &nvras,
-                                ProgressData &ticks );
         cache::CacheTypes _type_cache;
         cache::ResolvableQuery _rquery;
         RepoOptions _options;
-      public:
       };
       ///////////////////////////////////////////////////////////////////
 
diff --git a/zypp/repo/cached/ScriptImpl.cc b/zypp/repo/cached/ScriptImpl.cc
deleted file mode 100644 (file)
index 3f5a797..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#include "zypp/TranslatedText.h"
-#include "zypp/base/String.h"
-#include "zypp/base/Logger.h"
-#include "zypp/repo/RepositoryImpl.h"
-#include "ScriptImpl.h"
-#include "zypp/cache/CacheAttributes.h"
-
-
-using namespace std;
-using namespace zypp::detail;
-using namespace::zypp::repo;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp { namespace repo { namespace cached {
-
-///////////////////////////////////////////////////////////////////
-//
-//        CLASS NAME : ScriptImpl
-//
-///////////////////////////////////////////////////////////////////
-
-/** Default ctor
-*/
-ScriptImpl::ScriptImpl (const data::RecordId &id, cached::RepoImpl::Ptr repository_r)
-    : _repository (repository_r),
-      _id(id)
-{}
-
-Repository
-ScriptImpl::repository() const
-{
-  return _repository->selfRepository();
-}
-
-///////////////////////////////////////////////////
-// ResObject Attributes
-///////////////////////////////////////////////////
-
-TranslatedText ScriptImpl::summary() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectSummary() );
-}
-
-TranslatedText ScriptImpl::description() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDescription() );
-}
-
-TranslatedText ScriptImpl::insnotify() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectInsnotify() );
-}
-
-TranslatedText ScriptImpl::delnotify() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDelnotify() );
-}
-
-TranslatedText ScriptImpl::licenseToConfirm() const
-{
-  return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectLicenseToConfirm() );
-}
-
-Vendor ScriptImpl::vendor() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrResObjectVendor() );
-}
-
-
-ByteCount ScriptImpl::size() const
-{
-  return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectInstalledSize() );
-}
-
-bool ScriptImpl::installOnly() const
-{
-  return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrResObjectInstallOnly() );
-}
-
-Date ScriptImpl::buildtime() const
-{
-  return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectBuildTime() );
-}
-
-Date ScriptImpl::installtime() const
-{
-  return Date();
-}
-
-//////////////////////////////////////////
-// SCRIPT
-/////////////////////////////////////////
-
-std::string ScriptImpl::doScriptInlined() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrScriptDoScript() );
-}
-
-OnMediaLocation ScriptImpl::doScriptLocation() const
-{
-  OnMediaLocation loc;
-  queryOnMediaLocation( _repository->resolvableQuery(), _id, cache::attrScriptDoScriptLocation, loc );
-  return loc;
-}
-
-std::string ScriptImpl::undoScriptInlined() const
-{
-  return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrScriptUndoScript() );
-}
-
-OnMediaLocation ScriptImpl::undoScriptLocation() const
-{
-  OnMediaLocation loc;
-  queryOnMediaLocation( _repository->resolvableQuery(), _id, cache::attrScriptUndoScriptLocation, loc );
-  return loc;
-}
-
-/////////////////////////////////////////////////////////////////
-} } } // namespace zypp::repo::cached
-///////////////////////////////////////////////////////////////////
-
diff --git a/zypp/repo/cached/ScriptImpl.h b/zypp/repo/cached/ScriptImpl.h
deleted file mode 100644 (file)
index b3e9b1b..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#ifndef zypp_repo_cached_ScriptImpl_H
-#define zypp_repo_cached_ScriptImpl_H
-
-#include "zypp/detail/ScriptImpl.h"
-#include "zypp/repo/cached/RepoImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-namespace repo
-{ /////////////////////////////////////////////////////////////////
-namespace cached
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //        CLASS NAME : ScriptImpl
-  //
-  class ScriptImpl : public detail::ScriptImplIf
-  {
-  public:
-
-    ScriptImpl( const data::RecordId &id, repo::cached::RepoImpl::Ptr repository_r );
-
-    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;
-
-    // SCRIPT
-    virtual std::string doScriptInlined() const;
-    virtual OnMediaLocation doScriptLocation() const;
-    virtual std::string undoScriptInlined() const;
-    virtual OnMediaLocation undoScriptLocation() const;
-
-    virtual Repository repository() const;
-
-  private:
-    repo::cached::RepoImpl::Ptr _repository;
-    data::RecordId _id;
-  };
-  /////////////////////////////////////////////////////////////////
-} // namespace cached
-} // namespace repository
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZMD_BACKEND_DBSOURCE_DBPACKAGEIMPL_H
-
diff --git a/zypp/repo/cached/SrcPackageImpl.cc b/zypp/repo/cached/SrcPackageImpl.cc
deleted file mode 100644 (file)
index 4b74ab7..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/repo/cached/SrcPackageImpl.cc
-*/
-
-#include "SrcPackageImpl.h"
-#include "zypp/TranslatedText.h"
-#include "zypp/base/String.h"
-#include "zypp/base/Logger.h"
-#include "zypp/cache/CacheAttributes.h"
-
-using namespace std;
-using namespace zypp::detail;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp { namespace repo { namespace cached {
-
-///////////////////////////////////////////////////////////////////
-//
-//        CLASS NAME : SrcPackageImpl
-//
-///////////////////////////////////////////////////////////////////
-
-/** Default ctor
-*/
-SrcPackageImpl::SrcPackageImpl ( const data::RecordId & id, repo::cached::RepoImpl::Ptr repository_r )
-  : _repository( repository_r )
-  , _id( id )
-{}
-
-Repository SrcPackageImpl::repository() const
-{
-  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
-////////////////////////////////////////////////////////
-
-unsigned SrcPackageImpl::mediaNr() const
-{
-  if ( _mnr == (unsigned)-1 )
-  {
-    _mnr = _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrSrcPackageLocationMediaNr() );
-  }
-  return _mnr;
-}
-
-ByteCount SrcPackageImpl::downloadSize() const
-{
-  return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrSrcPackageLocationDownloadSize() );
-}
-
-const DiskUsage & SrcPackageImpl::diskusage() const
-{
-  if ( ! _diskusage )
-  {
-    // lazy init
-    _diskusage.reset( new DiskUsage );
-    _repository->resolvableQuery().queryDiskUsage( _id, *_diskusage );
-    if ( _diskusage->empty() )
-    {
-      // No info: Creating a faked entry distributing the
-      // total source package size in assumed 20 files to "/usr/src/packages"
-      // The reported size are 1K blocks.
-      unsigned dusize = size().blocks( ByteCount::K );
-      _diskusage->add( "/",                  dusize, 20 );
-      _diskusage->add( "/usr/",              dusize, 20 );
-      _diskusage->add( "/usr/src/",          dusize, 20 );
-      _diskusage->add( "/usr/src/packages/", dusize, 20 );
-    }
-  }
-  return *_diskusage;
-}
-
-OnMediaLocation SrcPackageImpl::location() const
-{
-  OnMediaLocation loc;
-  queryOnMediaLocation( _repository->resolvableQuery(), _id, cache::attrSrcPackageLocation, loc );
-  return loc;
-}
-
-/////////////////////////////////////////////////////////////////
-} } } // namespace zypp.repo.cached
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/repo/cached/SrcPackageImpl.h b/zypp/repo/cached/SrcPackageImpl.h
deleted file mode 100644 (file)
index 1d5fb3e..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#ifndef CachedRepoSrcPackageImpl_H
-#define CachedRepoSrcPackageImpl_H
-
-#include "zypp/detail/SrcPackageImpl.h"
-#include "zypp/repo/cached/RepoImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-namespace repo
-{ /////////////////////////////////////////////////////////////////
-namespace cached
-{
-  ///////////////////////////////////////////////////////////////////
-  //
-  //        CLASS NAME : SourcePackageImpl
-  //
-  class SrcPackageImpl : public detail::SrcPackageImplIf
-  {
-  public:
-
-    SrcPackageImpl( const data::RecordId &id, repo::cached::RepoImpl::Ptr repository_r );
-
-   public:
-     /** Overloaded ResObjectImpl attribute.
-      * \return The \ref location media number.
-      */
-     virtual unsigned mediaNr() const;
-
-     /** Overloaded ResObjectImpl attribute.
-      * \return The \ref location downloadSize.
-      */
-     virtual ByteCount downloadSize() const;
-
-   public:
-    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 const DiskUsage & diskusage() 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;
-
-    mutable DefaultIntegral<unsigned,(unsigned)-1> _mnr;
-    mutable scoped_ptr<DiskUsage> _diskusage;
-  };
-  /////////////////////////////////////////////////////////////////
-} // ns cached
-} // ns repo
-} // namespace zypp
-
-///////////////////////////////////////////////////////////////////
-#endif // ZMD_BACKEND_DBSOURCE_DBPACKAGEIMPL_H
diff --git a/zypp/repo/memory/AtomImpl.cc b/zypp/repo/memory/AtomImpl.cc
deleted file mode 100644 (file)
index 1e3f45d..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#include "zypp/TranslatedText.h"
-#include "zypp/base/String.h"
-#include "zypp/base/Logger.h"
-#include "zypp/repo/RepositoryImpl.h"
-#include "AtomImpl.h"
-
-
-using namespace std;
-using namespace zypp::detail;
-using namespace::zypp::repo;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp { namespace repo { namespace memory {
-
-///////////////////////////////////////////////////////////////////
-//
-//        CLASS NAME : AtomImpl
-//
-///////////////////////////////////////////////////////////////////
-
-/** Default ctor
-*/
-AtomImpl::AtomImpl ( memory::RepoImpl::Ptr repo, data::Atom_Ptr ptr)
-    : _repository (repo)
-{}
-
-Repository
-AtomImpl::repository() const
-{
-  return _repository->selfRepository();
-}
-
-///////////////////////////////////////////////////
-// ResObject Attributes
-///////////////////////////////////////////////////
-
-TranslatedText AtomImpl::summary() const
-{
-  return _summary;
-}
-
-TranslatedText AtomImpl::description() const
-{
-  return _description;
-}
-
-TranslatedText AtomImpl::insnotify() const
-{
-  return _insnotify;
-}
-
-TranslatedText AtomImpl::delnotify() const
-{
-  return _delnotify;
-}
-
-TranslatedText AtomImpl::licenseToConfirm() const
-{
-  return _license_to_confirm;
-}
-
-Vendor AtomImpl::vendor() const
-{
-  return _vendor;
-}
-
-ByteCount AtomImpl::size() const
-{
-  return _size;
-}
-
-bool AtomImpl::installOnly() const
-{
-  return _install_only;
-}
-
-Date AtomImpl::buildtime() const
-{
-  return _buildtime;
-}
-
-Date AtomImpl::installtime() const
-{
-  return _installtime;
-}
-
-/////////////////////////////////////////////////////////////////
-} } } // namespace zypp::repo::memory
-///////////////////////////////////////////////////////////////////
-
diff --git a/zypp/repo/memory/AtomImpl.h b/zypp/repo/memory/AtomImpl.h
deleted file mode 100644 (file)
index 67d6d69..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#ifndef zypp_repo_memory_AtomImpl_H
-#define zypp_repo_memory_AtomImpl_H
-
-#include "zypp/detail/AtomImpl.h"
-#include "zypp/repo/memory/RepoImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-namespace repo
-{ /////////////////////////////////////////////////////////////////
-namespace memory
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //        CLASS NAME : AtomImpl
-  //
-  class AtomImpl : public detail::AtomImplIf
-  {
-  public:
-
-    AtomImpl( memory::RepoImpl::Ptr repo, data::Atom_Ptr ptr);
-    
-    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 Repository repository() const;
-    
-  protected:
-    repo::memory::RepoImpl::Ptr _repository;
-    
-    //ResObject
-    TranslatedText _summary;
-    TranslatedText _description;
-    TranslatedText _insnotify;
-    TranslatedText _delnotify;
-    TranslatedText _license_to_confirm;
-    Vendor _vendor;
-    ByteCount _size;
-    bool _install_only;
-    Date _buildtime;
-    Date _installtime;
-    unsigned _media_nr;
-  };
-  /////////////////////////////////////////////////////////////////
-} // namespace memory
-} // namespace repository
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZMD_BACKEND_DBSOURCE_DBPACKAGEIMPL_H
-
diff --git a/zypp/repo/memory/MessageImpl.cc b/zypp/repo/memory/MessageImpl.cc
deleted file mode 100644 (file)
index 288a71c..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#include "zypp/TranslatedText.h"
-#include "zypp/base/String.h"
-#include "zypp/base/Logger.h"
-#include "zypp/repo/RepositoryImpl.h"
-#include "MessageImpl.h"
-
-
-using namespace std;
-using namespace zypp::detail;
-using namespace::zypp::repo;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp { namespace repo { namespace memory {
-
-///////////////////////////////////////////////////////////////////
-//
-//        CLASS NAME : MessageImpl
-//
-///////////////////////////////////////////////////////////////////
-
-/** Default ctor
-*/
-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
-MessageImpl::repository() const
-{
-  return _repository->selfRepository();
-}
-
-///////////////////////////////////////////////////
-// ResObject Attributes
-///////////////////////////////////////////////////
-
-TranslatedText MessageImpl::summary() const
-{
-  return _summary;
-}
-
-TranslatedText MessageImpl::description() const
-{
-  return _description;
-}
-
-TranslatedText MessageImpl::insnotify() const
-{
-  return _insnotify;
-}
-
-TranslatedText MessageImpl::delnotify() const
-{
-  return _delnotify;
-}
-
-TranslatedText MessageImpl::licenseToConfirm() const
-{
-  return _license_to_confirm;
-}
-
-Vendor MessageImpl::vendor() const
-{
-  return _vendor;
-}
-
-ByteCount MessageImpl::size() const
-{
-  return _size;
-}
-
-bool MessageImpl::installOnly() const
-{
-  return _install_only;
-}
-
-Date MessageImpl::buildtime() const
-{
-  return _buildtime;
-}
-
-Date MessageImpl::installtime() const
-{
-  return _installtime;
-}
-
-//////////////////////////////////////////
-// MESSAGE
-/////////////////////////////////////////
-
-TranslatedText MessageImpl::text() const
-{
-  return _text;
-}
-
-Patch::constPtr MessageImpl::patch() const
-{
-  return 0;
-}
-    
-/////////////////////////////////////////////////////////////////
-} } } // namespace zypp::repo::memory
-///////////////////////////////////////////////////////////////////
-
diff --git a/zypp/repo/memory/MessageImpl.h b/zypp/repo/memory/MessageImpl.h
deleted file mode 100644 (file)
index 31be60b..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#ifndef zypp_repo_memory_MessageImpl_H
-#define zypp_repo_memory_MessageImpl_H
-
-#include "zypp/detail/MessageImpl.h"
-#include "zypp/repo/memory/RepoImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-namespace repo
-{ /////////////////////////////////////////////////////////////////
-namespace memory
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //        CLASS NAME : MessageImpl
-  //
-  class MessageImpl : public detail::MessageImplIf
-  {
-  public:
-
-    MessageImpl( memory::RepoImpl::Ptr repo, data::Message_Ptr ptr);
-
-    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;
-
-    // MESSAGE
-    virtual TranslatedText text() const;
-    virtual Patch::constPtr patch() const;
-
-    virtual Repository repository() const;
-
-  protected:
-    repo::memory::RepoImpl::Ptr _repository;
-
-    //ResObject
-    TranslatedText _summary;
-    TranslatedText _description;
-    TranslatedText _insnotify;
-    TranslatedText _delnotify;
-    TranslatedText _license_to_confirm;
-    Vendor _vendor;
-    ByteCount _size;
-    bool _install_only;
-    Date _buildtime;
-    Date _installtime;
-
-    TranslatedText _text;
-  };
-  /////////////////////////////////////////////////////////////////
-} // namespace memory
-} // namespace repository
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZMD_BACKEND_DBSOURCE_DBPACKAGEIMPL_H
-
diff --git a/zypp/repo/memory/PackageImpl.cc b/zypp/repo/memory/PackageImpl.cc
deleted file mode 100644 (file)
index 8247213..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/repo/memory/PackageImpl.cc
- *
-*/
-
-#include "zypp/repo/memory/PackageImpl.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////
-namespace repo
-{ /////////////////////////////////////////////////////////////////
-namespace memory
-{ /////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-//
-//     METHOD NAME : PackageImpl::PackageImpl
-//     METHOD TYPE : Ctor
-//
-PackageImpl::PackageImpl( repo::memory::RepoImpl::Ptr repo, data::Package_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),
-
-    _group(ptr->group),
-    _keywords(),
-    _authors(ptr->authors),
-    _license(ptr->license),
-    _diskusage(),
-    _location(ptr->repositoryLocation)
-{
-}
-
-///////////////////////////////////////////////////////////////////
-//
-//     METHOD NAME : PackageImpl::~PackageImpl
-//     METHOD TYPE : Dtor
-//
-PackageImpl::~PackageImpl()
-{}
-
-Repository
-PackageImpl::repository() const
-{
-  return _repository->selfRepository();
-}
-
-///////////////////////////////////////////////////
-// ResObject Attributes
-///////////////////////////////////////////////////
-
-TranslatedText PackageImpl::summary() const
-{
-  return _summary;
-}
-
-TranslatedText PackageImpl::description() const
-{
-  return _description;
-}
-
-TranslatedText PackageImpl::insnotify() const
-{
-  return _insnotify;
-}
-
-TranslatedText PackageImpl::delnotify() const
-{
-  return _delnotify;
-}
-
-TranslatedText PackageImpl::licenseToConfirm() const
-{
-  return _license_to_confirm;
-}
-
-Vendor PackageImpl::vendor() const
-{
-  return _vendor;
-}
-
-ByteCount PackageImpl::size() const
-{
-  return _size;
-}
-
-bool PackageImpl::installOnly() const
-{
-  return _install_only;
-}
-
-Date PackageImpl::buildtime() const
-{
-  return _buildtime;
-}
-
-Date PackageImpl::installtime() const
-{
-  return _installtime;
-}
-
-OnMediaLocation PackageImpl::location() const
-{
-  return _location;
-}
-
-////////////////////////////////////////////////////
-
-
-string PackageImpl::buildhost() const
-{
-  return string();
-}
-
-string PackageImpl::distribution() const
-{
-  return string();
-}
-
-Label PackageImpl::license() const
-{
-  return _license;
-}
-
-string PackageImpl::packager() const
-{
-  return string();
-}
-
-PackageGroup PackageImpl::group() const
-{
-  return _group;
-}
-
-PackageImpl::Keywords PackageImpl::keywords() const
-{
-  return _keywords;
-}
-
-Changelog PackageImpl::changelog() const
-{
-  return Changelog();
-}
-
-string PackageImpl::url() const
-{
-  return string();
-}
-
-string PackageImpl::os() const
-{
-  return string();
-}
-
-Text PackageImpl::prein() const
-{
-  return Text();
-}
-
-Text PackageImpl::postin() const
-{
-  return Text();
-}
-
-Text PackageImpl::preun() const
-{
-  return Text();
-}
-
-Text PackageImpl::postun() const
-{
-  return Text();
-}
-
-ByteCount PackageImpl::sourcesize() const
-// FIXME
-{
-  return 0;
-}
-
-const DiskUsage & PackageImpl::diskusage() const
-{
-  return _diskusage;
-}
-
-list<string> PackageImpl::authors() const
-{
-  return list<string>();
-}
-
-list<string> PackageImpl::filenames() const
-{
-  return list<string>();
-}
-
-/////////////////////////////////////////////////////////////////
-} // namespace memory
-///////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////
-} // namespace
-///////////////////////////////////////////////////////////////////
-
-/////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-
diff --git a/zypp/repo/memory/PackageImpl.h b/zypp/repo/memory/PackageImpl.h
deleted file mode 100644 (file)
index 0f7af3f..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/repo/memory/PackageImpl.h
- *
-*/
-#ifndef ZYPP_SOURCE_MEMORYPACKAGEIMPL_H
-#define ZYPP_SOURCE_MEMORYPACKAGEIMPL_H
-
-#include "zypp/detail/PackageImplIf.h"
-#include "zypp/data/ResolvableData.h"
-#include "zypp/DiskUsage.h"
-#include "zypp/CheckSum.h"
-#include "zypp/Repository.h"
-#include "zypp/repo/memory/RepoImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace repo
-  { /////////////////////////////////////////////////////////////////
-    namespace memory
-    { /////////////////////////////////////////////////////////////////
-
-      DEFINE_PTR_TYPE(DImpl);
-
-      struct PackageImpl : public zypp::detail::PackageImplIf
-      {
-        PackageImpl(  repo::memory::RepoImpl::Ptr repo, data::Package_Ptr ptr );
-        virtual ~PackageImpl();
-
-        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 std::string buildhost() const;
-        virtual std::string distribution() const;
-        virtual Label license() const;
-        virtual std::string packager() const;
-        virtual PackageGroup group() const;
-        virtual Keywords keywords() const;
-        virtual Changelog changelog() const;
-        virtual OnMediaLocation location() const;
-        virtual std::string url() const;
-        virtual std::string os() const;
-        virtual Text prein() const;
-        virtual Text postin() const;
-        virtual Text preun() const;
-        virtual Text postun() const;
-        virtual ByteCount sourcesize() const;
-        virtual const DiskUsage & diskusage() const;
-        virtual std::list<std::string> authors() const;
-        virtual std::list<std::string> filenames() const;
-
-        repo::memory::RepoImpl::Ptr _repository;
-
-        //ResObject
-        TranslatedText _summary;
-        TranslatedText _description;
-        TranslatedText _insnotify;
-        TranslatedText _delnotify;
-        TranslatedText _license_to_confirm;
-        Vendor _vendor;
-        ByteCount _size;
-        bool _install_only;
-        Date _buildtime;
-        Date _installtime;
-
-
-        PackageGroup _group;
-        Keywords _keywords;
-        std::list<std::string> _authors;
-        Label _license;
-        DiskUsage _diskusage;
-        OnMediaLocation _location;
-        private:
-      };
-      ///////////////////////////////////////////////////////////////////
-      /////////////////////////////////////////////////////////////////
-    } // namespace memory
-    /////////////////////////////////////////////////////////////////
-  } // namespace repository
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_PACKAGEIMPL_H
diff --git a/zypp/repo/memory/PatchImpl.cc b/zypp/repo/memory/PatchImpl.cc
deleted file mode 100644 (file)
index 447e536..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#include "zypp/TranslatedText.h"
-#include "zypp/base/String.h"
-#include "zypp/base/Logger.h"
-#include "zypp/repo/RepositoryImpl.h"
-#include "PatchImpl.h"
-
-using namespace std;
-using namespace zypp::detail;
-using namespace::zypp::repo;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp { namespace repo { namespace memory {
-
-PatchImpl::PatchImpl ( repo::memory::RepoImpl::Ptr repo, data::Patch_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),
-
-  _patch_id(ptr->id),
-  _timestamp(ptr->timestamp),
-  _category(ptr->category),
-  _reboot_needed(ptr->rebootNeeded),
-  _affects_pkg_manager(ptr->affectsPkgManager)
-{}
-
-Repository
-PatchImpl::repository() const
-{
-  return _repository->selfRepository();
-}
-
-///////////////////////////////////////////////////
-// ResObject Attributes
-///////////////////////////////////////////////////
-
-TranslatedText PatchImpl::summary() const
-{
-  return _summary;
-}
-
-TranslatedText PatchImpl::description() const
-{
-  return _description;
-}
-
-TranslatedText PatchImpl::insnotify() const
-{
-  return _insnotify;
-}
-
-TranslatedText PatchImpl::delnotify() const
-{
-  return _delnotify;
-}
-
-TranslatedText PatchImpl::licenseToConfirm() const
-{
-  return _license_to_confirm;
-}
-
-Vendor PatchImpl::vendor() const
-{
-  return _vendor;
-}
-
-ByteCount PatchImpl::size() const
-{
-  return _size;
-}
-
-bool PatchImpl::installOnly() const
-{
-  return _install_only;
-}
-
-Date PatchImpl::buildtime() const
-{
-  return _buildtime;
-}
-
-Date PatchImpl::installtime() const
-{
-  return _installtime;
-}
-
-//////////////////////////////////////////
-// PATCH
-/////////////////////////////////////////
-
-std::string PatchImpl::id() const
-{
-  return _patch_id;
-}
-
-Date PatchImpl::timestamp() const
-{
-  return _timestamp;
-}
-
-std::string PatchImpl::category() const
-{
-  return _category;
-}
-
-bool PatchImpl::reboot_needed() const
-{
-  return _reboot_needed;
-}
-
-bool PatchImpl::affects_pkg_manager() const
-{
-  return _affects_pkg_manager;
-}
-
-/////////////////////////////////////////////////////////////////
-} } } // namespace zypp::repo::memory
-///////////////////////////////////////////////////////////////////
-
diff --git a/zypp/repo/memory/PatchImpl.h b/zypp/repo/memory/PatchImpl.h
deleted file mode 100644 (file)
index 332f446..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#ifndef zypp_repo_memory_PatchImpl_H
-#define zypp_repo_memory_PatchImpl_H
-
-#include "zypp/detail/PatchImpl.h"
-#include "zypp/data/ResolvableData.h"
-#include "zypp/repo/memory/RepoImpl.h"
-#include "zypp/Repository.h"
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-namespace repo
-{ /////////////////////////////////////////////////////////////////
-namespace memory
-{ /////////////////////////////////////////////////////////////////
-
-  class PatchImpl : public detail::PatchImplIf
-  {
-  public:
-
-    PatchImpl( repo::memory::RepoImpl::Ptr repo, data::Patch_Ptr ptr);
-
-    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;
-
-    // PATCH
-    virtual std::string id() const;
-    virtual Date timestamp() const;
-    virtual std::string category() const;
-    virtual bool reboot_needed() const;
-    virtual bool affects_pkg_manager() const;
-
-    virtual Repository repository() const;
-
-  protected:
-    repo::memory::RepoImpl::Ptr _repository;
-
-    //ResObject
-    TranslatedText _summary;
-    TranslatedText _description;
-    TranslatedText _insnotify;
-    TranslatedText _delnotify;
-    TranslatedText _license_to_confirm;
-    Vendor _vendor;
-    ByteCount _size;
-    bool _install_only;
-    Date _buildtime;
-    Date _installtime;
-
-    // patch
-    std::string _patch_id;
-    Date _timestamp;
-    std::string _category;
-    bool _reboot_needed;
-    bool _affects_pkg_manager;
-  };
-  /////////////////////////////////////////////////////////////////
-} // namespace memory
-} // namespace repository
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZMD_BACKEND_DBSOURCE_DBPACKAGEIMPL_H
-
diff --git a/zypp/repo/memory/PatternImpl.cc b/zypp/repo/memory/PatternImpl.cc
deleted file mode 100644 (file)
index 0c448d7..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#include "zypp/repo/memory/PatternImpl.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////
-namespace repo
-{ /////////////////////////////////////////////////////////////////
-namespace memory
-{
-
-PatternImpl::PatternImpl( repo::memory::RepoImpl::Ptr repo, data::Pattern_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)
-  //TODO pattern attrs
-{
-
-}
-
-PatternImpl::~PatternImpl()
-{}
-
-Repository
-PatternImpl::repository() const
-{
-  return _repository->selfRepository();
-}
-
-
-///////////////////////////////////////////////////
-// ResObject Attributes
-///////////////////////////////////////////////////
-
-TranslatedText PatternImpl::summary() const
-{
-  return _summary;
-}
-
-TranslatedText PatternImpl::description() const
-{
-  return _description;
-}
-
-TranslatedText PatternImpl::insnotify() const
-{
-  return _insnotify;
-}
-
-TranslatedText PatternImpl::delnotify() const
-{
-  return _delnotify;
-}
-
-TranslatedText PatternImpl::licenseToConfirm() const
-{
-  return _license_to_confirm;
-}
-
-Vendor PatternImpl::vendor() const
-{
-  return _vendor;
-}
-
-ByteCount PatternImpl::size() const
-{
-  return _size;
-}
-
-bool PatternImpl::installOnly() const
-{
-  return _install_only;
-}
-
-Date PatternImpl::buildtime() const
-{
-  return _buildtime;
-}
-
-Date PatternImpl::installtime() const
-{
-  return _installtime;
-}
-
-///////////////////////////////////////
-
-TranslatedText PatternImpl::category() const
-{
-  return _category;
-}
-
-bool PatternImpl::userVisible() const
-{
-  return _visible;
-}
-
-Label PatternImpl::order() const
-{
-  return _order;
-}
-
-Pathname PatternImpl::icon() const
-{
-  return _icon;
-}
-
-/////////////////////////////////////////////////////////////////
-} // namespace detail
-///////////////////////////////////////////////////////////////////
-}
-/////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/repo/memory/PatternImpl.h b/zypp/repo/memory/PatternImpl.h
deleted file mode 100644 (file)
index 9e4dcc2..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/repository/memory/PatternImpl.h
- *
-*/
-#ifndef ZYPP_DETAIL_MEMORY_PATTERNIMPL_H
-#define ZYPP_DETAIL_MEMORY_PATTERNIMPL_H
-
-#include "zypp/detail/PatternImplIf.h"
-#include "zypp/data/ResolvableData.h"
-#include "zypp/Repository.h"
-#include "zypp/repo/memory/RepoImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace repo
-  { /////////////////////////////////////////////////////////////////
-    namespace memory
-    {
-
-      struct PatternImpl : public zypp::detail::PatternImplIf
-      {
-      public:
-        PatternImpl( memory::RepoImpl::Ptr repo, data::Pattern_Ptr ptr);
-        virtual ~PatternImpl();
-
-        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 TranslatedText category() const;
-        virtual bool userVisible() const;
-        virtual Label order() const;
-        virtual Pathname icon() const;
-      private:
-        
-        repo::memory::RepoImpl::Ptr _repository;
-
-        //ResObject
-        TranslatedText _summary;
-        TranslatedText _description;
-        TranslatedText _insnotify;
-        TranslatedText _delnotify;
-        TranslatedText _license_to_confirm;
-        Vendor _vendor;
-        ByteCount _size;
-        bool _install_only;
-        Date _buildtime;
-        Date _installtime;
-        
-        // Pattern
-        TranslatedText _category;
-        bool           _visible;
-        std::string    _order;
-        Pathname       _icon;
-      };
-      ///////////////////////////////////////////////////////////////////
-
-      /////////////////////////////////////////////////////////////////
-    } // namespace memory
-    ///////////////////////////////////////////////////////////////////
-  } // namespace repository
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_PATTERNIMPL_H
diff --git a/zypp/repo/memory/ProductImpl.cc b/zypp/repo/memory/ProductImpl.cc
deleted file mode 100644 (file)
index 844d6e8..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#include "zypp/repo/memory/ProductImpl.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////
-namespace repo
-{ /////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////
-namespace memory
-{ /////////////////////////////////////////////////////////////////
-
-ProductImpl::ProductImpl( memory::RepoImpl::Ptr repo, data::Product_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)
-  // TODO products attrs
-{}
-
-ProductImpl::~ProductImpl()
-{}
-
-Repository
-ProductImpl::repository() const
-{
-  return _repository->selfRepository();
-}
-
-///////////////////////////////////////////////////
-// ResObject Attributes
-///////////////////////////////////////////////////
-
-TranslatedText ProductImpl::summary() const
-{
-  return _summary;
-}
-
-TranslatedText ProductImpl::description() const
-{
-  return _description;
-}
-
-TranslatedText ProductImpl::insnotify() const
-{
-  return _insnotify;
-}
-
-TranslatedText ProductImpl::delnotify() const
-{
-  return _delnotify;
-}
-
-TranslatedText ProductImpl::licenseToConfirm() const
-{
-  return _license_to_confirm;
-}
-
-Vendor ProductImpl::vendor() const
-{
-  return _vendor;
-}
-
-ByteCount ProductImpl::size() const
-{
-  return _size;
-}
-
-bool ProductImpl::installOnly() const
-{
-  return _install_only;
-}
-
-Date ProductImpl::buildtime() const
-{
-  return _buildtime;
-}
-
-Date ProductImpl::installtime() const
-{
-  return _installtime;
-}
-
-///////////////////////////////////////////
-
-std::string ProductImpl::type() const
-{
-  return _type;
-}
-
-Url ProductImpl::releaseNotesUrl() const
-{
-  return _release_notes_url;
-}
-
-std::list<Url> ProductImpl::updateUrls() const
-{
-  return _update_urls;
-}
-
-std::list<Url> ProductImpl::extraUrls() const
-{
-  return _extra_urls;
-}
-
-std::list<Url> ProductImpl::optionalUrls() const
-{
-  return _optional_urls;
-}
-
-std::list<std::string> ProductImpl::flags() const
-{
-  return _flags;
-}
-
-TranslatedText ProductImpl::shortName() const
-{
-  return TranslatedText(_shortlabel);
-}
-
-std::string ProductImpl::distributionName() const
-{
-  return _dist_name;
-}
-
-Edition ProductImpl::distributionEdition() const
-{
-  return _dist_version;
-}
-
-/////////////////////////////////////////////////////////////////
-} // namespace memory
-///////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////
-} // namespace repository
-///////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/repo/memory/ProductImpl.h b/zypp/repo/memory/ProductImpl.h
deleted file mode 100644 (file)
index 398523c..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/repo/memory/ProductImpl.h
- *
-*/
-#ifndef ZYPP_DETAIL_MEMORY_PRODUCTIMPL_H
-#define ZYPP_DETAIL_MEMORY_PRODUCTIMPL_H
-
-#include <map>
-
-#include "zypp/CheckSum.h"
-#include "zypp/CapSet.h"
-#include "zypp/detail/ProductImplIf.h"
-#include "zypp/data/ResolvableData.h"
-#include "zypp/TranslatedText.h"
-
-#include "zypp/repo/memory/RepoImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace repo
-  { /////////////////////////////////////////////////////////////////
-    ///////////////////////////////////////////////////////////////////
-    namespace memory
-    { /////////////////////////////////////////////////////////////////
-
-      struct ProductImpl : public zypp::detail::ProductImplIf
-      {
-      public:
-        ProductImpl( memory::RepoImpl::Ptr repo, data::Product_Ptr ptr);
-        virtual ~ProductImpl();
-
-        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 std::string type() const;
-        virtual Url releaseNotesUrl() const;
-        virtual std::list<Url> updateUrls() const;
-        virtual std::list<Url> extraUrls() const;
-        virtual std::list<Url> optionalUrls() const;
-        virtual std::list<std::string> flags() const;
-        virtual TranslatedText shortName() const;
-        virtual std::string distributionName() const;
-        virtual Edition distributionEdition() const;
-
-        repo::memory::RepoImpl::Ptr _repository;
-
-        //ResObject
-        TranslatedText _summary;
-        TranslatedText _description;
-        TranslatedText _insnotify;
-        TranslatedText _delnotify;
-        TranslatedText _license_to_confirm;
-        Vendor _vendor;
-        ByteCount _size;
-        bool _install_only;
-        Date _buildtime;
-        Date _installtime;
-
-        std::string _type;
-        std::string _dist_name;
-        Edition     _dist_version;
-        std::string _base_product;
-        std::string _base_version;
-        std::string _you_type;
-        std::string _shortlabel;
-        Url _release_notes_url;
-
-        std::list<Url> _update_urls;
-        std::list<Url> _extra_urls;
-        std::list<Url> _optional_urls;
-
-        std::string _default_base;
-        std::list<std::string> _flags;
-      };
-      ///////////////////////////////////////////////////////////////////
-
-      /////////////////////////////////////////////////////////////////
-    } // namespace memory
-    ///////////////////////////////////////////////////////////////////
-  } // namespace repository
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_PRODUCTIMPL_H
diff --git a/zypp/repo/memory/RepoImpl.cc b/zypp/repo/memory/RepoImpl.cc
deleted file mode 100644 (file)
index 9041e0f..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#include <iostream>
-#include <map>
-
-#include "zypp/base/Logger.h"
-#include "zypp/base/Measure.h"
-#include "zypp/capability/Capabilities.h"
-#include "zypp/cache/ResolvableQuery.h"
-#include "zypp/detail/ResImplTraits.h"
-#include "zypp/CapFactory.h"
-
-#include "zypp/Package.h"
-#include "zypp/Pattern.h"
-#include "zypp/Patch.h"
-#include "zypp/Message.h"
-#include "zypp/Script.h"
-#include "zypp/Atom.h"
-
-#include "zypp/repo/memory/RepoImpl.h"
-
-#include "zypp/repo/memory/PackageImpl.h"
-#include "zypp/repo/memory/PatternImpl.h"
-#include "zypp/repo/memory/PatchImpl.h"
-#include "zypp/repo/memory/MessageImpl.h"
-#include "zypp/repo/memory/ScriptImpl.h"
-#include "zypp/repo/memory/AtomImpl.h"
-
-using namespace zypp::detail;
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////
-namespace repo
-{ /////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////
-namespace memory
-{ /////////////////////////////////////////////////////////////////
-
-RepoImpl::RepoImpl( const RepoInfo &repoinfo )
-  : RepositoryImpl(repoinfo)
-{
-}
-
-RepoImpl::~RepoImpl()
-{
-}
-
-void RepoImpl::createResolvables()
-{
-}
-
-void RepoImpl::createPatchAndDeltas()
-{
-}
-
-/////////////////////////////////////////////////////////////////
-} // namespace memory
-///////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////
-} // namespace repository
-///////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-
diff --git a/zypp/repo/memory/RepoImpl.h b/zypp/repo/memory/RepoImpl.h
deleted file mode 100644 (file)
index 8b4c170..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#ifndef ZYPP_RepoImpl_H
-#define ZYPP_RepoImpl_H
-
-#include <iosfwd>
-#include <map>
-#include <utility>
-#include "zypp/Arch.h"
-#include "zypp/Rel.h"
-#include "zypp/Pathname.h"
-#include "zypp/data/RecordId.h"
-#include "zypp/repo/RepositoryImpl.h"
-#include "zypp/ResStore.h"
-#include "zypp/cache/sqlite3x/sqlite3x.hpp"
-#include "zypp/cache/CacheTypes.h"
-#include "zypp/cache/ResolvableQuery.h"
-#include "zypp/RepoInfo.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace repo
-  { /////////////////////////////////////////////////////////////////
-    ///////////////////////////////////////////////////////////////////
-    namespace memory
-    { /////////////////////////////////////////////////////////////////
-
-      class RepoImpl : public repo::RepositoryImpl
-      {
-      public:
-        typedef intrusive_ptr<RepoImpl>       Ptr;
-        typedef intrusive_ptr<const RepoImpl> constPtr;
-
-      public:
-        /** Default ctor */
-        RepoImpl( const RepoInfo &repoinfo);
-        /** Dtor */
-        ~RepoImpl();
-
-      public:
-
-        void createResolvables();
-        void createPatchAndDeltas();
-      protected:
-      };
-      ///////////////////////////////////////////////////////////////////
-
-      /////////////////////////////////////////////////////////////////
-    } // namespace memory
-    ///////////////////////////////////////////////////////////////////
-
-    using memory::RepoImpl;
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace source
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif
-
diff --git a/zypp/repo/memory/ScriptImpl.cc b/zypp/repo/memory/ScriptImpl.cc
deleted file mode 100644 (file)
index 6f8866f..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#include "zypp/TranslatedText.h"
-#include "zypp/base/String.h"
-#include "zypp/base/Logger.h"
-#include "zypp/repo/RepositoryImpl.h"
-#include "ScriptImpl.h"
-
-
-using namespace std;
-using namespace zypp::detail;
-using namespace::zypp::repo;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp { namespace repo { namespace memory {
-
-///////////////////////////////////////////////////////////////////
-//
-//        CLASS NAME : ScriptImpl
-//
-///////////////////////////////////////////////////////////////////
-
-/** Default ctor
-*/
-ScriptImpl::ScriptImpl ( memory::RepoImpl::Ptr repo, data::Script_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)
-    //TODO script attrs
-{}
-
-Repository
-ScriptImpl::repository() const
-{
-  return _repository->selfRepository();
-}
-
-///////////////////////////////////////////////////
-// ResObject Attributes
-///////////////////////////////////////////////////
-
-TranslatedText ScriptImpl::summary() const
-{
-  return _summary;
-}
-
-TranslatedText ScriptImpl::description() const
-{
-  return _description;
-}
-
-TranslatedText ScriptImpl::insnotify() const
-{
-  return _insnotify;
-}
-
-TranslatedText ScriptImpl::delnotify() const
-{
-  return _delnotify;
-}
-
-TranslatedText ScriptImpl::licenseToConfirm() const
-{
-  return _license_to_confirm;
-}
-
-Vendor ScriptImpl::vendor() const
-{
-  return _vendor;
-}
-
-ByteCount ScriptImpl::size() const
-{
-  return _size;
-}
-
-bool ScriptImpl::installOnly() const
-{
-  return _install_only;
-}
-
-Date ScriptImpl::buildtime() const
-{
-  return _buildtime;
-}
-
-Date ScriptImpl::installtime() const
-{
-  return _installtime;
-}
-
-//////////////////////////////////////////
-// SCRIPT
-/////////////////////////////////////////
-
-
-
-/////////////////////////////////////////////////////////////////
-} } } // namespace zypp::repo::memory
-///////////////////////////////////////////////////////////////////
-
diff --git a/zypp/repo/memory/ScriptImpl.h b/zypp/repo/memory/ScriptImpl.h
deleted file mode 100644 (file)
index e75eb94..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-
-#ifndef zypp_repo_memory_ScriptImpl_H
-#define zypp_repo_memory_ScriptImpl_H
-
-#include "zypp/detail/ScriptImpl.h"
-#include "zypp/repo/memory/RepoImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-namespace repo
-{ /////////////////////////////////////////////////////////////////
-namespace memory
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  //
-  //        CLASS NAME : ScriptImpl
-  //
-  class ScriptImpl : public detail::ScriptImplIf
-  {
-  public:
-
-    ScriptImpl( memory::RepoImpl::Ptr repo, data::Script_Ptr ptr);
-
-    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;
-
-    // SCRIPT: TODO script attr
-
-    virtual Repository repository() const;
-
-  protected:
-    repo::memory::RepoImpl::Ptr _repository;
-
-    //ResObject
-    TranslatedText _summary;
-    TranslatedText _description;
-    TranslatedText _insnotify;
-    TranslatedText _delnotify;
-    TranslatedText _license_to_confirm;
-    Vendor _vendor;
-    ByteCount _size;
-    bool _install_only;
-    Date _buildtime;
-    Date _installtime;
-  };
-  /////////////////////////////////////////////////////////////////
-} // namespace memory
-} // namespace repository
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZMD_BACKEND_DBSOURCE_DBPACKAGEIMPL_H
-
diff --git a/zypp/repo/memory/SrcPackageImpl.cc b/zypp/repo/memory/SrcPackageImpl.cc
deleted file mode 100644 (file)
index ef2ba47..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/repo/memory/SrcPackageImpl.cc
- *
-*/
-#include "zypp/repo/memory/SrcPackageImpl.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////
-namespace repo
-{ /////////////////////////////////////////////////////////////////
-namespace memory
-{ /////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-//
-//     METHOD NAME : SrcPackageImpl::SrcPackageImpl
-//     METHOD TYPE : Ctor
-//
-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)
-{}
-
-///////////////////////////////////////////////////////////////////
-//
-//     METHOD NAME : SrcPackageImpl::~SrcPackageImpl
-//     METHOD TYPE : Dtor
-//
-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;
-}
-
-
-const DiskUsage & SrcPackageImpl::diskusage() const
-{
-  return _diskusage;
-}
-
-OnMediaLocation SrcPackageImpl::location() const
-{
-  return _location;
-}
-
-/////////////////////////////////////////////////////////////////
-} // namespace memory
-///////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////
-} // namespace
-///////////////////////////////////////////////////////////////////
-
-/////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/repo/memory/SrcPackageImpl.h b/zypp/repo/memory/SrcPackageImpl.h
deleted file mode 100644 (file)
index 07c3949..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/repository/memory/SrcPackageImpl.h
- *
-*/
-#ifndef ZYPP_SOURCE_MEMORYSRCPackageIMPL_H
-#define ZYPP_SOURCE_MEMORYSRCPackageIMPL_H
-
-#include "zypp/detail/SrcPackageImplIf.h"
-#include "zypp/DiskUsage.h"
-#include "zypp/data/ResolvableData.h"
-#include "zypp/repo/memory/RepoImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace repo
-  { /////////////////////////////////////////////////////////////////
-    namespace memory
-    { /////////////////////////////////////////////////////////////////
-
-      ///////////////////////////////////////////////////////////////////
-      //
-      //       CLASS NAME : SrcPackageImpl
-      //
-      /**
-      */
-      struct SrcPackageImpl : public zypp::detail::SrcPackageImplIf
-      {
-        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 const 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;
-        bool _install_only;
-        Date _buildtime;
-        Date _installtime;
-
-        OnMediaLocation _location;
-        DiskUsage _diskusage;
-      };
-      ///////////////////////////////////////////////////////////////////
-      /////////////////////////////////////////////////////////////////
-    } // namespace memory
-    /////////////////////////////////////////////////////////////////
-  } // namespace repository
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_SOURCE_MEMORY_SRCPACKAGEIMPL_H
index 31ad594..dc53979 100644 (file)
 #include <iostream>
 #include "zypp/base/LogTools.h"
 
-#include "zypp/sat/Capabilities.h"
+#include "zypp/Capabilities.h"
 
 using std::endl;
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace sat
-  { /////////////////////////////////////////////////////////////////
-  
-    Capabilities:: Capabilities( const detail::IdType * base_r, detail::IdType skip_r )
-    : _begin( base_r )
-    {
-      if ( ! _begin )
-        return;
 
-      if ( skip_r )
+  Capabilities:: Capabilities( const sat::detail::IdType * base_r, sat::detail::IdType skip_r )
+  : _begin( base_r )
+  {
+    if ( ! _begin )
+      return;
+
+    if ( skip_r )
+    {
+      for ( const sat::detail::IdType * end = _begin; *end; ++end )
       {
-        for ( const detail::IdType * end = _begin; *end; ++end )
-       {
-          if ( *end == skip_r )
-          {
-           _begin = end+1;
-           return;
-         }
+        if ( *end == skip_r )
+        {
+          _begin = end+1;
+          return;
         }
       }
-      // skipp all ==> empty
-      _begin = 0;
     }
+    // skipp all ==> empty
+    _begin = 0;
+  }
 
 
-    Capabilities::size_type Capabilities::size() const
-    {
-      if ( ! _begin )
-        return 0;
+  Capabilities::size_type Capabilities::size() const
+  {
+    if ( ! _begin )
+      return 0;
 
-      // jump over satsolvers internal ids.
-      Capabilities::size_type ret = 0;
-      for ( const detail::IdType * end = _begin; *end; ++end )
-      {
-        if ( ! detail::isDepMarkerId( *end ) )
-          ++ret;
-      }
-      return ret;
-    }
-
-    /******************************************************************
-    **
-    ** FUNCTION NAME : operator<<
-    ** FUNCTION TYPE : std::ostream &
-    */
-    std::ostream & operator<<( std::ostream & str, const Capabilities & obj )
+    // jump over satsolvers internal ids.
+    Capabilities::size_type ret = 0;
+    for ( const sat::detail::IdType * end = _begin; *end; ++end )
     {
-      return dumpRange( str << "(" << obj.size() << ")", obj.begin(), obj.end() );
+      if ( ! sat::detail::isDepMarkerId( *end ) )
+        ++ret;
     }
+    return ret;
+  }
+
+  /******************************************************************
+  **
+  **   FUNCTION NAME : operator<<
+  **   FUNCTION TYPE : std::ostream &
+  */
+  std::ostream & operator<<( std::ostream & str, const Capabilities & obj )
+  {
+    return dumpRange( str << "(" << obj.size() << ")", obj.begin(), obj.end() );
+  }
 
-    /////////////////////////////////////////////////////////////////
-  } // namespace sat
-  ///////////////////////////////////////////////////////////////////
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
index bf34ce4..805d8b6 100644 (file)
 #include <iosfwd>
 
 #include "zypp/sat/detail/PoolMember.h"
-#include "zypp/sat/Capability.h"
+#include "zypp/Capability.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
+
+  ///////////////////////////////////////////////////////////////////
+  //
+  //   CLASS NAME : Capabilities
+  //
+  /** Container of \ref Capability (currently read only).
+   *
+   * \note satsolver dependency lists may include internal ids
+   * which must be skipped on iteration or size calculation
+   * (\see \ref detail::isDepMarkerId).
+   */
+  class Capabilities
+  {
+    public:
+      typedef Capability value_type;
+      typedef unsigned   size_type;
+
+      enum Mode { SKIP_TO_INTERNAL };
+
+    public:
+      /** Default ctor */
+      Capabilities()
+      : _begin( 0 )
+      {}
+
+      /** Ctor from Id pointer (friend \ref Solvable). */
+      explicit
+      Capabilities( const sat::detail::IdType * base_r )
+      : _begin( base_r )
+      {}
+
+      /** Ctor from Id pointer (friend \ref Solvable).
+       * Jump behind skip_r (e.g. behind prereqMarker).
+       */
+      Capabilities( const sat::detail::IdType * base_r, sat::detail::IdType skip_r );
+
+    public:
+      /** Whether the container is empty. */
+      bool empty() const
+      { return ! ( _begin && *_begin ); }
+
+      /** Number of capabilities inside. */
+      size_type size() const;
+
+    public:
+      class const_iterator;
+
+      /** Iterator pointing to the first \ref Capability. */
+      const_iterator begin() const;
+
+      /** Iterator pointing bhind the last \ref Capability. */
+      const_iterator end() const;
+
+    private:
+      const sat::detail::IdType * _begin;
+  };
+  ///////////////////////////////////////////////////////////////////
+
+  /** \relates Capabilities Stream output */
+  std::ostream & operator<<( std::ostream & str, const Capabilities & obj );
+
   ///////////////////////////////////////////////////////////////////
-  namespace sat
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : Capabilities
-    //
-    /** Container of \ref Capability (currently read only).
-     *
-     * \note satsolver dependency lists may include internal ids
-     * which must be skipped on iteration or size calculation
-     * (\see \ref detail::isDepMarkerId).
-     */
-    class Capabilities
-    {
-      public:
-        typedef Capability value_type;
-        typedef unsigned   size_type;
-
-        enum Mode { SKIP_TO_INTERNAL };
-
-      public:
-        /** Default ctor */
-        Capabilities()
-        : _begin( 0 )
-        {}
-
-        /** Ctor from Id pointer (friend \ref Solvable). */
-        explicit
-        Capabilities( const detail::IdType * base_r )
-        : _begin( base_r )
-        {}
-
-         /** Ctor from Id pointer (friend \ref Solvable).
-          * Jump behind skip_r (e.g. behind prereqMarker).
-         */
-        Capabilities( const detail::IdType * base_r, detail::IdType skip_r );
-
-     public:
-        /** Whether the container is empty. */
-        bool empty() const
-        { return ! ( _begin && *_begin ); }
-
-        /** Number of capabilities inside. */
-        size_type size() const;
-
-      public:
-        class const_iterator;
-
-        /** Iterator pointing to the first \ref Capability. */
-        const_iterator begin() const;
-
-        /** Iterator pointing bhind the last \ref Capability. */
-        const_iterator end() const;
-
-      private:
-        const detail::IdType * _begin;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /** \relates Capabilities Stream output */
-    std::ostream & operator<<( std::ostream & str, const Capabilities & obj );
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : Capabilities::const_iterator
-    //
-    /** \ref Capabilities iterator.
-     */
-    class Capabilities::const_iterator : public boost::iterator_adaptor<
-          const_iterator                     // Derived
-          , const detail::IdType *           // Base
-          , const Capability                 // Value
-          , boost::forward_traversal_tag     // CategoryOrTraversal
-          , const Capability &               // Reference
-          >
-    {
-      public:
-        const_iterator()
-        : const_iterator::iterator_adaptor_( 0 )
-        {}
-
-        explicit const_iterator( const detail::IdType * _idx )
-        : const_iterator::iterator_adaptor_( _idx )
-        { assignVal(); }
-
-      private:
-        friend class boost::iterator_core_access;
-
-        reference dereference() const
-        { return _val; }
-
-        template <class OtherDerived, class OtherIterator, class V, class C, class R, class D>
-        bool equal( const boost::iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> & rhs ) const
-        { // NULL pointer is eqal pointer to Id 0
-          return ( base() == rhs.base() // includes both NULL...
-                   || ( !rhs.base() && !*base()     )
-                   || ( !base()     && !*rhs.base() ) );
-        }
-
-        void increment()
-        { // jump over satsolvers internal ids.
-          if ( detail::isDepMarkerId( *(++base_reference()) ) ) ++base_reference();
-          assignVal();
-        }
-
-      private:
-        void assignVal()
-        { _val = ( base() ) ? Capability( *base() ) : Capability::Null; }
-
-        mutable Capability _val;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    inline Capabilities::const_iterator Capabilities::begin() const
-    { return const_iterator( _begin ); }
-
-    inline Capabilities::const_iterator Capabilities::end() const
-    { return const_iterator( 0 ); }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace sat
+  //
+  //   CLASS NAME : Capabilities::const_iterator
+  //
+  /** \ref Capabilities iterator.
+   */
+  class Capabilities::const_iterator : public boost::iterator_adaptor<
+        const_iterator                   // Derived
+      , const sat::detail::IdType *      // Base
+      , const Capability                 // Value
+      , boost::forward_traversal_tag     // CategoryOrTraversal
+      , const Capability &               // Reference
+      >
+  {
+    public:
+      const_iterator()
+      : const_iterator::iterator_adaptor_( 0 )
+      {}
+
+      explicit const_iterator( const sat::detail::IdType * _idx )
+      : const_iterator::iterator_adaptor_( _idx )
+      { assignVal(); }
+
+    private:
+      friend class boost::iterator_core_access;
+
+      reference dereference() const
+      { return _val; }
+
+      template <class OtherDerived, class OtherIterator, class V, class C, class R, class D>
+          bool equal( const boost::iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> & rhs ) const
+          { // NULL pointer is eqal pointer to Id 0
+            return ( base() == rhs.base() // includes both NULL...
+                || ( !rhs.base() && !*base()     )
+                || ( !base()     && !*rhs.base() ) );
+          }
+
+          void increment()
+          { // jump over satsolvers internal ids.
+            if ( sat::detail::isDepMarkerId( *(++base_reference()) ) ) ++base_reference();
+            assignVal();
+          }
+
+    private:
+      void assignVal()
+      { _val = ( base() ) ? Capability( *base() ) : Capability::Null; }
+
+      mutable Capability _val;
+  };
   ///////////////////////////////////////////////////////////////////
+
+  inline Capabilities::const_iterator Capabilities::begin() const
+  { return const_iterator( _begin ); }
+
+  inline Capabilities::const_iterator Capabilities::end() const
+  { return const_iterator( 0 ); }
+
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
index 7b6a4a7..5cbbdb0 100644 (file)
 #include "zypp/base/Regex.h"
 #include "zypp/base/Gettext.h"
 #include "zypp/base/Exception.h"
+
 #include "zypp/Rel.h"
 #include "zypp/Edition.h"
+#include "zypp/Capability.h"
 
 #include "zypp/sat/detail/PoolImpl.h"
-#include "zypp/sat/Capability.h"
 #include "zypp/sat/Pool.h"
 
 using std::endl;
@@ -29,108 +30,182 @@ using std::endl;
 namespace zypp
 { /////////////////////////////////////////////////////////////////
   ///////////////////////////////////////////////////////////////////
-  namespace sat
+  namespace
   { /////////////////////////////////////////////////////////////////
-    ///////////////////////////////////////////////////////////////////
-    namespace
-    { /////////////////////////////////////////////////////////////////
-      detail::IdType relFromStr( ::_Pool * pool_r, const std::string & name_r, Rel op_r, const Edition & ed_r, const ResKind & kind_r )
+
+    sat::detail::IdType relFromStr( ::_Pool * pool_r,
+                                    const std::string & name_r, Rel op_r, const Edition & ed_r, const ResKind & kind_r )
+    {
+      sat::detail::IdType nid( sat::detail::noId );
+      if ( ! kind_r || kind_r == ResKind::package )
       {
-        detail::IdType nid( detail::noId );
-        if ( ! kind_r || kind_r == ResKind::package )
-        {
-          nid = IdString( name_r ).id();
-        }
-        else
+        nid = IdString( name_r ).id();
+      }
+      else
+      {
+        // non-packages prefixed by kind
+        nid = IdString( str::form( "%s:%s",
+                        kind_r.c_str(),
+                                     name_r.c_str() ) ).id();
+      }
+
+      if ( op_r != Rel::ANY && ed_r != Edition::noedition )
+      {
+        nid = ::rel2id( pool_r, nid, ed_r.idStr().id(), op_r.bits(), /*create*/true );
+      }
+
+      return nid;
+    }
+
+    sat::detail::IdType relFromStr( ::_Pool * pool_r,
+                                      const std::string & str_r, const ResKind & kind_r, Capability::CtorFlag flag_r )
+    {
+      // strval_r has at least two words which could make 'op edition'?
+      // improve regex!
+      static const str::regex  rx( "(.*[^ \t])([ \t]+)([^ \t]+)([ \t]+)([^ \t]+)" );
+      static str::smatch what;
+
+      std::string name( str_r );
+      Rel         op;
+      Edition     ed;
+      if ( flag_r == Capability::UNPARSED
+           && str_r.find(' ') != std::string::npos
+           && str::regex_match( str_r, what, rx ) )
+      {
+        try
         {
-          // non-packages prefixed by kind
-          nid = IdString( str::form( "%s:%s",
-                                  kind_r.c_str(),
-                                  name_r.c_str() ) ).id();
+          Rel     cop( what[3] );
+          Edition ced( what[5] );
+          name = what[1];
+          op = cop;
+          ed = ced;
         }
-
-        if ( op_r != Rel::ANY && ed_r != Edition::noedition )
+        catch ( Exception & excpt )
         {
-#warning glue edition
-          nid = ::rel2id( pool_r, nid, IdString( ed_r.asString() ).id(), op_r.bits(), /*create*/true );
+          // So they don't make valid 'op edition'
+          ZYPP_CAUGHT( excpt );
+          DBG << "Trying named relation for: " << str_r << endl;
         }
-
-        return nid;
       }
+      //else
+      // not a versioned relation
 
-      detail::IdType relFromStr( ::_Pool * pool_r, const std::string & str_r, const ResKind & kind_r )
+      return relFromStr( pool_r, name, op, ed, kind_r );
+    }
+
+    // By now restrict matching to plain 'name [op edition]'
+    struct CapHelp : protected sat::detail::PoolMember
+    {
+      CapHelp( sat::detail::IdType id_r )
+      : _name( id_r )
       {
-        // strval_r has at least two words which could make 'op edition'?
-        // improve regex!
-        static const str::regex  rx( "(.*[^ \t])([ \t]+)([^ \t]+)([ \t]+)([^ \t]+)" );
-        static str::smatch what;
-
-        std::string name( str_r );
-        Rel         op;
-        Edition     ed;
-        if( str_r.find(' ') != std::string::npos
-            && str::regex_match( str_r, what, rx ) )
+        if ( ISRELDEP(id_r) )
         {
-          try
-          {
-            Rel     cop( what[3] );
-            Edition ced( what[5] );
-            name = what[1];
-            op = cop;
-            ed = ced;
-          }
-          catch ( Exception & excpt )
+          ::Reldep * rd = GETRELDEP( myPool().getPool(), id_r );
+          if ( ! Rel::isRel( rd->flags ) || ISRELDEP(rd->name) || ISRELDEP(rd->evr) )
+            _op = Rel::NONE;
+          else
           {
-            // So they don't make valid 'op edition'
-            ZYPP_CAUGHT( excpt );
-            DBG << "Trying named relation for: " << str_r << endl;
+            _name = IdString( rd->name );
+            _op   = Rel( rd->flags );
+            _ed   = Edition( rd->evr );
           }
         }
-        //else
-        // not a versioned relation
-
-        return relFromStr( pool_r, name, op, ed, kind_r );
       }
 
-      /////////////////////////////////////////////////////////////////
-    } // namespace
-    ///////////////////////////////////////////////////////////////////
-
-    const Capability Capability::Null( STRID_NULL );
+      IdString _name;
+      Rel      _op;
+      Edition  _ed;
+    };
 
     /////////////////////////////////////////////////////////////////
+  } // namespace
+  ///////////////////////////////////////////////////////////////////
 
-    Capability::Capability( const char * str_r, const ResKind & kind_r  )
-      : _id( relFromStr( myPool().getPool(), str_r, kind_r ) )
-    {}
+  const Capability Capability::Null( STRID_NULL );
 
-    Capability::Capability( const std::string & str_r, const ResKind & kind_r  )
-      : _id( relFromStr( myPool().getPool(), str_r.c_str(), kind_r ) )
-    {}
+  /////////////////////////////////////////////////////////////////
 
-    Capability::Capability( const std::string & name_r, Rel op_r, const Edition & ed_r, const ResKind & kind_r )
-      : _id( relFromStr( myPool().getPool(), name_r, op_r, ed_r, kind_r ) )
-    {}
+  Capability::Capability( const char * str_r, const ResKind & prefix_r, CtorFlag flag_r )
+  : _id( relFromStr( myPool().getPool(), str_r, prefix_r, flag_r ) )
+  {}
 
-    const char * Capability::c_str() const
-    { return ::dep2str( myPool().getPool(), _id ); }
+  Capability::Capability( const std::string & str_r, const ResKind & prefix_r, CtorFlag flag_r )
+  : _id( relFromStr( myPool().getPool(), str_r.c_str(), prefix_r, flag_r ) )
+  {}
 
-    std::string Capability::string() const
-    { return ::dep2str( myPool().getPool(), _id ); }
+  Capability::Capability( const char * str_r, CtorFlag flag_r, const ResKind & prefix_r )
+  : _id( relFromStr( myPool().getPool(), str_r, prefix_r, flag_r ) )
+  {}
 
-    /******************************************************************
-    **
-    ** FUNCTION NAME : operator<<
-    ** FUNCTION TYPE : std::ostream &
-    */
-    std::ostream & operator<<( std::ostream & str, const Capability & obj )
-    {
-      return str << obj.c_str();
-    }
+  Capability::Capability( const std::string & str_r, CtorFlag flag_r, const ResKind & prefix_r )
+  : _id( relFromStr( myPool().getPool(), str_r, prefix_r, flag_r ) )
+  {}
+
+
+  Capability::Capability( const std::string & name_r, const std::string & op_r, const std::string & ed_r, const ResKind & prefix_r )
+  : _id( relFromStr( myPool().getPool(), name_r, Rel(op_r), Edition(ed_r), prefix_r ) )
+  {}
+
+  Capability::Capability( const std::string & name_r, Rel op_r, const std::string & ed_r, const ResKind & prefix_r )
+  : _id( relFromStr( myPool().getPool(), name_r, op_r, Edition(ed_r), prefix_r ) )
+  {}
+
+  Capability::Capability( const std::string & name_r, Rel op_r, const Edition & ed_r, const ResKind & prefix_r )
+  : _id( relFromStr( myPool().getPool(), name_r, op_r, ed_r, prefix_r ) )
+  {}
+
+  const char * Capability::c_str() const
+  { return ::dep2str( myPool().getPool(), _id ); }
+
+  std::string Capability::string() const
+  { return ::dep2str( myPool().getPool(), _id ); }
+
+  bool Capability::_doMatch( sat::detail::IdType lhs,  sat::detail::IdType rhs )
+  {
+#warning MIGRATE TO SAT
+#warning TESTCASE
+    if ( lhs == rhs )
+      return true;
+
+    CapHelp l( lhs );
+    if ( l._op == Rel::NONE )
+      return false;
+
+    CapHelp r( rhs );
+    if ( r._op == Rel::NONE )
+      return false;
+
+    if ( l._name != r._name )
+      return false;
+
+    if ( l._op == Rel::ANY || r._op == Rel::ANY )
+      return true;
+
+    return overlaps( Edition::MatchRange( l._op, l._ed ),
+                     Edition::MatchRange( r._op, r._ed ) );
+  }
+
+  bool Capability::isInterestingFileSpec( const char * name_r )
+  {
+    static       str::smatch what;
+    static const str::regex  filenameRegex(
+                 "/(s?bin|lib(64)?|etc)/|^/usr/(games/|share/(dict/words|magic\\.mime)$)|^/opt/gnome/games/",
+                 str::regex::optimize|str::regex::nosubs );
+
+    return str::regex_match( name_r, what, filenameRegex );
+  }
+
+  /******************************************************************
+  **
+  **   FUNCTION NAME : operator<<
+  **   FUNCTION TYPE : std::ostream &
+  */
+  std::ostream & operator<<( std::ostream & str, const Capability & obj )
+  {
+    return str << obj.c_str();
+  }
 
-    /////////////////////////////////////////////////////////////////
-  } // namespace sat
-  ///////////////////////////////////////////////////////////////////
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
index 606da43..429d594 100644 (file)
 /** \file      zypp/sat/Capability.h
  *
 */
-#ifndef ZYPP_SAT_IDREL_H
-#define ZYPP_SAT_IDREL_H
+#ifndef ZYPP_SAT_CAPABILITY_H
+#define ZYPP_SAT_CAPABILITY_H
 
 #include <iosfwd>
-#include <string>
+#include <set>
 
 #include "zypp/base/SafeBool.h"
+#include "zypp/base/Deprecated.h"
 
 #include "zypp/sat/detail/PoolMember.h"
 
 #include "zypp/IdString.h"
 #include "zypp/ResTraits.h"
 
+#include "zypp/CapMatch.h"
+
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
 
   class Rel;
   class Edition;
+  class Capability;
+
+  typedef std::set<Capability> CapabilitySet;
 
   ///////////////////////////////////////////////////////////////////
-  namespace sat
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : Capability
-    //
-    /** A sat capability.
-     *
-     * If a certain \ref ResKind is specified upon construction, the
-     * capabilities name part is prefixed accordingly:
-     * \code
-     * Capability( "foo" )                   ==> 'foo'
-     * Capability( "foo", ResKind::package ) ==> 'foo'
-     * Capability( "foo", ResKind::pattern ) ==> 'pattern:foo'
-     * Capability( "pattern:foo" )           ==> 'pattern:foo'
+  //
+  //   CLASS NAME : Capability
+  //
+  /** A sat capability.
+   *
+   * If a certain \ref ResKind is specified upon construction, the
+   * capabilities name part is prefixed accordingly:
+   * \code
+   * Capability( "foo" )                   ==> 'foo'
+   * Capability( "foo", ResKind::package ) ==> 'foo'
+   * Capability( "foo", ResKind::pattern ) ==> 'pattern:foo'
+   * Capability( "pattern:foo" )           ==> 'pattern:foo'
      * // avoid this:
-     * Capability( "pattern:foo", ResKind::pattern ) ==> 'pattern:pattern:foo'
-     * \endcode
-     *
-    */
-    class Capability: protected detail::PoolMember,
-                      private base::SafeBool<Capability>
-    {
-      public:
-        /** Default ctor, no capability. */
-        Capability() : _id( Null.id() ) {}
-
-        /** Ctor from id. */
-        explicit Capability( detail::IdType id_r ) : _id( id_r ) {}
-
-        /** Ctor from string. */
-        explicit Capability( const char * str_r, const ResKind & prefix_r = ResKind() );
-
-        /** Ctor from string. */
-        explicit Capability( const std::string & str_r, const ResKind & prefix_r = ResKind() );
-
-        /** Ctor from <tt>name op edition</tt>. */
-        Capability( const std::string & name_r, Rel op_r, const Edition & ed_r, const ResKind & prefix_r = ResKind() );
-
-        /** Evaluate in a boolean context (\c != \c Null). */
-        using base::SafeBool<Capability>::operator bool_type;
-
-      public:
-        /** No or Null \ref Capability. */
-        static const Capability Null;
-
-      public:
-        /** Conversion to <tt>const char *</tt> */
-        const char * c_str() const;
-
-        /** Conversion to <tt>std::string</tt> */
-        std::string string() const;
-
-        /** \overload */
-        std::string asString() const
-        { return string(); }
-
-      public:
-        /** Expert backdoor. */
-        detail::IdType id() const
-        { return _id; }
-      private:
-        friend base::SafeBool<Capability>::operator bool_type() const;
-        bool boolTest() const { return _id; }
-      private:
-        detail::IdType _id;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /** \relates Capability Stream output */
-    std::ostream & operator<<( std::ostream & str, const Capability & obj );
-
-    /** \relates Capability */
-    inline bool operator==( const Capability & lhs, const Capability & rhs )
-    { return lhs.id() == rhs.id(); }
-
-    /** \relates Capability */
-    inline bool operator!=( const Capability & lhs, const Capability & rhs )
-    { return lhs.id() != rhs.id(); }
-
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace sat
+   * Capability( "pattern:foo", ResKind::pattern ) ==> 'pattern:pattern:foo'
+   * \endcode
+   *
+   */
+  class Capability: protected sat::detail::PoolMember,
+  private base::SafeBool<Capability>
+  {
+    public:
+      // legacy
+      ZYPP_DEPRECATED std::string index() const { return std::string(); }
+
+    public:
+      enum CtorFlag { PARSED, UNPARSED };
+
+    public:
+      /** Default ctor, \ref Empty capability. */
+      Capability() : _id( sat::detail::emptyId ) {}
+
+      /** Ctor from id. */
+      explicit Capability( sat::detail::IdType id_r ) : _id( id_r ) {}
+
+      /** Ctor from string.
+       * \a str_r is parsed to check whether it contains an <tt>[op edition]</tt> part,
+       * unless the \ref PARSED flag is passed to the ctor.
+      */
+      explicit Capability( const char * str_r, const ResKind & prefix_r = ResKind(), CtorFlag flag_r = UNPARSED );
+      /** \overload */
+      explicit Capability( const std::string & str_r, const ResKind & prefix_r = ResKind(), CtorFlag flag_r = UNPARSED );
+      /** \overload Convenience for parsed (name only) packages. */
+      Capability( const char * str_r, CtorFlag flag_r, const ResKind & prefix_r = ResKind() );
+      /** \overload */
+      Capability( const std::string & str_r, CtorFlag flag_r, const ResKind & prefix_r = ResKind() );
+
+      /** Ctor from <tt>name op edition</tt>. */
+      Capability( const std::string & name_r, const std::string & op_r, const std::string & ed_r, const ResKind & prefix_r = ResKind() );
+      /** \overload */
+      Capability( const std::string & name_r, Rel op_r, const std::string & ed_r, const ResKind & prefix_r = ResKind() );
+      /** \overload */
+      Capability( const std::string & name_r, Rel op_r, const Edition & ed_r, const ResKind & prefix_r = ResKind() );
+
+    public:
+      /** No or Null \ref Capability ( Id \c 0 ). */
+      static const Capability Null;
+
+      /** Empty Capability. */
+      static const Capability Empty;
+
+    public:
+      /** Evaluate in a boolean context <tt>( ! empty() )</tt>. */
+      using base::SafeBool<Capability>::operator bool_type;
+
+      /** Whether the \ref Capability is empty.
+       * This is true for \ref Null and \ref Empty.
+       */
+      bool empty() const
+      { return( _id == sat::detail::emptyId || _id == sat::detail::noId ); }
+
+    public:
+      /** Conversion to <tt>const char *</tt> */
+      const char * c_str() const;
+
+      /** Conversion to <tt>std::string</tt> */
+      std::string string() const;
+
+      /** \overload */
+      std::string asString() const
+      { return string(); }
+
+    public:
+      /** \name Match two Capabilities
+       * \todo check whether we must promote string to Capability in order to match.
+      */
+      //@{
+      static bool matches( const Capability & lhs,  const Capability & rhs )     { return _doMatch( lhs.id(), rhs.id() ); }
+      static bool matches( const Capability & lhs,  const IdString & rhs )       { return _doMatch( lhs.id(), rhs.id() ); }
+      static bool matches( const Capability & lhs,  const std::string & rhs )    { return _doMatch( lhs.id(), Capability(rhs).id() ); }
+      static bool matches( const Capability & lhs,  const char * rhs )           { return _doMatch( lhs.id(), Capability(rhs).id() );}
+
+      static bool matches( const IdString & lhs,    const Capability & rhs )     { return _doMatch( lhs.id(), rhs.id() ); }
+      static bool matches( const IdString & lhs,    const IdString & rhs )       { return _doMatch( lhs.id(), rhs.id() ); }
+      static bool matches( const IdString & lhs,    const std::string & rhs )    { return _doMatch( lhs.id(), Capability(rhs).id() ); }
+      static bool matches( const IdString & lhs,    const char * rhs )           { return _doMatch( lhs.id(), Capability(rhs).id() ); }
+
+      static bool matches( const std::string & lhs, const Capability & rhs )     { return _doMatch( Capability(lhs).id(), rhs.id() );}
+      static bool matches( const std::string & lhs, const IdString & rhs )       { return _doMatch( Capability(lhs).id(), rhs.id() ); }
+      static bool matches( const std::string & lhs, const std::string & rhs )    { return _doMatch( Capability(lhs).id(), Capability(rhs).id() ); }
+      static bool matches( const std::string & lhs, const char * rhs )           { return _doMatch( Capability(lhs).id(), Capability(rhs).id() ); }
+
+      static bool matches( const char * lhs,        const Capability & rhs )     { return _doMatch( Capability(lhs).id(), rhs.id() );}
+      static bool matches( const char * lhs,        const IdString & rhs )       { return _doMatch( Capability(lhs).id(), rhs.id() ); }
+      static bool matches( const char * lhs,        const std::string & rhs )    { return _doMatch( Capability(lhs).id(), Capability(rhs).id() ); }
+      static bool matches( const char * lhs,        const char * rhs )           { return _doMatch( Capability(lhs).id(), Capability(rhs).id() ); }
+
+      bool matches( const Capability & rhs )  const { return _doMatch( id(), rhs.id() ); }
+      bool matches( const IdString & rhs )    const { return _doMatch( id(), rhs.id() ); }
+      bool matches( const std::string & rhs ) const { return _doMatch( id(), Capability(rhs).id() ); }
+      bool matches( const char * rhs )        const { return _doMatch( id(), Capability(rhs).id() ); }
+      //@}
+
+      /** \ref matches functor.
+       */
+      struct Matches: public std::binary_function<Capability,Capability,bool>
+      {
+        bool operator()( const Capability & lhs, const Capability & rhs ) const
+        { return Capability::matches( lhs, rhs ); }
+      };
+
+    public:
+      /** Test for a filename that is likely being REQUIRED.
+       * Files below \c /bin , \c /sbin ,  \c /lib etc. Scanning a
+       * packages filelist, an \e interesting filename might be worth
+       * being remembered in PROVIDES.
+       */
+      static bool isInterestingFileSpec( const IdString & name_r )    { return isInterestingFileSpec( name_r.c_str() ); }
+      static bool isInterestingFileSpec( const std::string & name_r ) { return isInterestingFileSpec( name_r.c_str() ); }
+      static bool isInterestingFileSpec( const char * name_r );
+
+    public:
+      /** Expert backdoor. */
+      sat::detail::IdType id() const
+      { return _id; }
+    private:
+      /** Match two Capabilities */
+      static bool _doMatch( sat::detail::IdType lhs,  sat::detail::IdType rhs );
+    private:
+      friend base::SafeBool<Capability>::operator bool_type() const;
+      bool boolTest() const { return ! empty(); }
+    private:
+      sat::detail::IdType _id;
+  };
   ///////////////////////////////////////////////////////////////////
+
+  /** \relates Capability Stream output */
+  std::ostream & operator<<( std::ostream & str, const Capability & obj );
+
+  /** \relates Capability */
+  inline bool operator==( const Capability & lhs, const Capability & rhs )
+  { return lhs.id() == rhs.id(); }
+
+  /** \relates Capability */
+  inline bool operator!=( const Capability & lhs, const Capability & rhs )
+  { return lhs.id() != rhs.id(); }
+
+  /** \relates Capability Arbitrary order. */
+  inline bool operator<( const Capability & lhs, const Capability & rhs )
+  { return lhs.id() < rhs.id(); }
+
   /////////////////////////////////////////////////////////////////
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
-#endif // ZYPP_SAT_IDREL_H
+#endif // ZYPP_SAT_CAPABILITY_H
index 2ddf9de..4791f68 100644 (file)
@@ -23,13 +23,8 @@ using std::endl;
 namespace zypp
 { /////////////////////////////////////////////////////////////////
 
-  // MPL checks for satlib constants we explicity use in
-  // the header file.
-  BOOST_MPL_ASSERT_RELATION( 0, ==, STRID_NULL );
-  BOOST_MPL_ASSERT_RELATION( 1, ==, STRID_EMPTY );
-
-  const IdString IdString::Null ( STRID_NULL );
-  const IdString IdString::Empty( STRID_EMPTY );
+  const IdString IdString::Null ( sat::detail::noId );
+  const IdString IdString::Empty( sat::detail::emptyId );
 
   /////////////////////////////////////////////////////////////////
 
index fd30aaa..c010c43 100644 (file)
@@ -40,7 +40,7 @@ namespace zypp
   {
     public:
       /** Default ctor, empty string. */
-      IdString() : _id( 1 ) {}
+      IdString() : _id( sat::detail::emptyId ) {}
 
       /** Ctor from id. */
       explicit IdString( sat::detail::IdType id_r ) : _id( id_r ) {}
@@ -66,7 +66,7 @@ namespace zypp
        * This is true for \ref Null and \ref Empty.
        */
       bool empty() const
-      { return( _id == 1 || _id == 0 ); }
+      { return( _id == sat::detail::emptyId || _id == sat::detail::noId ); }
 
       /** The strings size. */
       unsigned size() const;
@@ -76,10 +76,6 @@ namespace zypp
       const char * c_str() const;
 
       /** Conversion to <tt>std::string</tt> */
-      std::string string() const
-      { return c_str(); }
-
-      /** \overload */
       std::string asString() const
       { return c_str(); }
 
index 72c70d6..51eb92a 100644 (file)
@@ -100,7 +100,6 @@ namespace zypp
       bool          empty()       const { return idStr().empty(); }
       unsigned      size()        const { return idStr().size(); }
       const char *  c_str()       const { return idStr().c_str(); }
-      std::string   string()      const { return idStr().string(); }
       std::string   asString()    const { return idStr().asString(); }
 
     public:
index 88ea24e..593ec5c 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "zypp/solver/detail/Helper.h"
 #include "zypp/base/String.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 #include "zypp/ResStatus.h"
 #include "zypp/base/Logger.h"
 #include "zypp/base/String.h"
index a8b2457..8a4a029 100644 (file)
@@ -106,8 +106,7 @@ namespace zypp
           case 'm': OUTS( atom, 4 );        break;
           case 'p': OUTS( srcpackage, 10 ); break;
           case 's': OUTS( message, 7 );     break;
-          case 't': OUTS( pattern, 7 );
-                    OUTS( system, 6 );      break;
+          case 't': OUTS( pattern, 7 );     break;
 #undef OUTS
         }
       }
@@ -188,7 +187,7 @@ namespace zypp
     {
       if ( ! obj )
         return str << "sat::solvable()";
-
+#warning SWITCH TO IDENT INSTEAD OF KIND:NAME after tests
       return str << "sat::solvable(" << obj.id() << "|"
           << obj.kind() << ':' << obj.name() << '-' << obj.edition() << '.' << obj.arch() << "){"
           << obj.repo().name() << "}";
index 173b6af..9cfc7a2 100644 (file)
 #include "zypp/base/SafeBool.h"
 
 #include "zypp/sat/detail/PoolMember.h"
-#include "zypp/sat/Capabilities.h"
-#include "zypp/sat/Capability.h"
 
 #include "zypp/ResTraits.h"
 #include "zypp/IdString.h"
 #include "zypp/Edition.h"
 #include "zypp/Arch.h"
 #include "zypp/Dep.h"
+#include "zypp/Capabilities.h"
+#include "zypp/Capability.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -77,6 +77,10 @@ namespace zypp
         Repo repo() const;
 
       public:
+        /** The identifier.
+         * This is the solvables \ref name, \b except for packages and
+         * source packes, prefixed by it's \ref kind.
+         */
         IdString     ident()    const;
 
         ResKind      kind()     const;
index 387d689..8548084 100644 (file)
@@ -33,6 +33,9 @@ namespace zypp
     { /////////////////////////////////////////////////////////////////
 
       // MPL checks for satlib constants we redefine:
+      BOOST_MPL_ASSERT_RELATION( noId,                 ==, STRID_NULL );
+      BOOST_MPL_ASSERT_RELATION( emptyId,              ==, STRID_EMPTY );
+
       BOOST_MPL_ASSERT_RELATION( solvablePrereqMarker, ==, SOLVABLE_PREREQMARKER );
       BOOST_MPL_ASSERT_RELATION( solvableFileMarker,   ==, SOLVABLE_FILEMARKER );
 
index cc50b00..aacb305 100644 (file)
@@ -26,13 +26,13 @@ namespace zypp
 { /////////////////////////////////////////////////////////////////
 
   class IdString;
+  class Capability;
+  class Capabilities;
 
   ///////////////////////////////////////////////////////////////////
   namespace sat
   { /////////////////////////////////////////////////////////////////
 
-    class Capability;
-    class Capabilities;
     class Solvable;
     class Repo;
     class Pool;
@@ -70,6 +70,7 @@ namespace zypp
       /** Generic Id type. */
       typedef int IdType;
       static const IdType noId( 0 );
+      static const IdType emptyId( 1 );
 
       /** Internal ids satlib includes in dependencies. */
       static const IdType solvablePrereqMarker( 16 ); // MPL check in PoolImpl.cc
index e2506f4..34c8bfd 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "zypp/solver/detail/Helper.h"
 
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 #include "zypp/base/Logger.h"
 #include "zypp/base/String.h"
 #include "zypp/base/Gettext.h"
index 7ef90b2..9f1cdeb 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "zypp/ResPool.h"
 #include "zypp/PoolItem.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 
 #include "zypp/solver/detail/Types.h"
 
index 78095e1..c1f74c1 100644 (file)
@@ -156,8 +156,8 @@ InstallOrder::setInstalled( const PoolItemList & rl )
 bool
 InstallOrder::doesProvide( const Capability requirement, PoolItem_Ref item ) const
 {
-    CapSet::const_iterator pend = item->dep( Dep::PROVIDES ).end();
-    for( CapSet::const_iterator pit = item->dep( Dep::PROVIDES ).begin(); pit != pend; ++pit) {
+    Capabilities::const_iterator pend = item->dep( Dep::PROVIDES ).end();
+    for( Capabilities::const_iterator pit = item->dep( Dep::PROVIDES ).begin(); pit != pend; ++pit) {
        if( pit->matches( requirement ) == CapMatch::yes ) {
            return item;
        }
@@ -227,7 +227,7 @@ InstallOrder::rdfsvisit (const PoolItem_Ref item)
     _rdfstime++;
 
     // items prereq
-    CapSet prq( item->dep(Dep::PREREQUIRES) );
+    Capabilities prq( item->dep(Dep::PREREQUIRES) );
     // an installed items prereq (in case they are reqired for uninstall scripts)
     NameKindProxy nkp( _pool, item->name(), item->kind() );
     if ( ! nkp.installedEmpty() )
@@ -237,7 +237,7 @@ InstallOrder::rdfsvisit (const PoolItem_Ref item)
     }
     // put prerequires first and requires last on list to ensure
     // that prerequires are processed first
-    for (CapSet::const_iterator it = prq.begin(); it != prq.end(); ++it)
+    for (Capabilities::const_iterator it = prq.begin(); it != prq.end(); ++it)
     {
        requires.push_back(*it);
     }
@@ -246,7 +246,7 @@ InstallOrder::rdfsvisit (const PoolItem_Ref item)
     // as early as possible. Some stuff depends on it (e.g. registration).
     if ( ! isKind<Product>( item.resolvable() ) )
       {
-        for (CapSet::const_iterator it = item->dep (Dep::REQUIRES).begin(); it != item->dep (Dep::REQUIRES).end(); ++it)
+        for (Capabilities::const_iterator it = item->dep (Dep::REQUIRES).begin(); it != item->dep (Dep::REQUIRES).end(); ++it)
           {
             requires.push_back(*it);
           }
index 5c9d8ac..b1f52bc 100644 (file)
@@ -37,7 +37,7 @@
 
 #include "zypp/PoolItem.h"
 #include "zypp/ResPool.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 
 #include "zypp/solver/detail/Types.h"
 
index 306ccc9..3536d91 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #include "zypp/CapFactory.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 #include "zypp/CapMatch.h"
 #include "zypp/base/Logger.h"
 #include "zypp/base/String.h"
index b52a20f..ad0a75d 100644 (file)
@@ -33,7 +33,7 @@
 #include "zypp/solver/detail/ResolverInfoNeededBy.h"
 #include "zypp/solver/detail/ResolverInfoMisc.h"
 
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 #include "zypp/base/Logger.h"
 #include "zypp/base/String.h"
 #include "zypp/base/Gettext.h"
@@ -115,7 +115,7 @@ QueueItemEstablish::process (const QueueItemList & mainQueue, ResolverContext_Pt
 
     _item.status().setUndetermined();          // reset any previous establish state
 
-    CapSet freshens = _item->dep(Dep::FRESHENS);
+    Capabilities freshens = _item->dep(Dep::FRESHENS);
 
     _XDEBUG("simple establish of " << _item << " with " << freshens.size() << " freshens");
 
@@ -125,7 +125,7 @@ QueueItemEstablish::process (const QueueItemList & mainQueue, ResolverContext_Pt
 
     /* Loop through all freshen dependencies. If one is satisfied, queue the _item for installation.  */
 
-    CapSet::const_iterator iter;
+    Capabilities::const_iterator iter;
     for (iter = freshens.begin(); iter != freshens.end(); iter++) {
        const Capability cap = *iter;
         bool dummy1, dummy2;
@@ -150,9 +150,9 @@ QueueItemEstablish::process (const QueueItemList & mainQueue, ResolverContext_Pt
     }
     else {                                                     // installed or no freshens or triggered freshens
 
-       CapSet supplements = _item->dep(Dep::SUPPLEMENTS);
+       Capabilities supplements = _item->dep(Dep::SUPPLEMENTS);
        if (supplements.size() != 0) {                                  // if we have supplements, they must _also_ trigger
-           CapSet::const_iterator iter;
+           Capabilities::const_iterator iter;
            for (iter = supplements.begin(); iter != supplements.end(); iter++) {
                const Capability cap = *iter;
                 bool dummy1, dummy2;                
@@ -196,7 +196,7 @@ QueueItemEstablish::process (const QueueItemList & mainQueue, ResolverContext_Pt
        //  'state modifier' accordingly.
 
 
-       CapSet requires = _item->dep(Dep::REQUIRES);                    // check requirements
+       Capabilities requires = _item->dep(Dep::REQUIRES);                      // check requirements
        Capability missing;
        bool all_unneeded = true;                                       // check if all are met because of unneeded
        for (iter = requires.begin(); iter != requires.end(); iter++) {
index 8a99955..7c85494 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "zypp/solver/detail/Types.h"
 #include "zypp/solver/detail/QueueItem.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 
 /////////////////////////////////////////////////////////////////////////
 namespace zypp
index 5e73dc2..ecec987 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #include "zypp/CapFactory.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 #include "zypp/Package.h"
 #include "zypp/base/Logger.h"
 #include "zypp/base/String.h"
@@ -429,11 +429,11 @@ QueueItemInstall::process (const QueueItemList & mainQueue, ResolverContext_Ptr
 
        /* Construct require items for each of the item's requires that is still unsatisfied. */
 
-       CapSet caps;
+       Capabilities caps;
 
        caps = _item->dep (Dep::REQUIRES);
 
-       for (CapSet::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
+       for (Capabilities::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
 
            const Capability cap = *iter;
            _XDEBUG("this requires " << cap);
@@ -451,7 +451,7 @@ QueueItemInstall::process (const QueueItemList & mainQueue, ResolverContext_Ptr
 
        caps = _item->dep (Dep::RECOMMENDS);
 
-       for (CapSet::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
+       for (Capabilities::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
 
            const Capability cap = *iter;
            _XDEBUG("this recommends " << cap);
@@ -468,7 +468,7 @@ QueueItemInstall::process (const QueueItemList & mainQueue, ResolverContext_Ptr
        /* Construct conflict items for each of the item's conflicts. */
 
        caps = _item->dep (Dep::CONFLICTS);
-       for (CapSet::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
+       for (Capabilities::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
            const Capability cap = *iter;
            _XDEBUG("this conflicts with '" << cap << "'");
            QueueItemConflict_Ptr conflict_item = new QueueItemConflict (pool(), cap, _item );
@@ -482,7 +482,7 @@ QueueItemInstall::process (const QueueItemList & mainQueue, ResolverContext_Ptr
        caps = _item->dep (Dep::OBSOLETES);
        IgnoreMap ignoreMap = context->getIgnoreObsoletes();
        
-       for (CapSet::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
+       for (Capabilities::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
            const Capability cap = *iter;
            bool found = false;
            for (IgnoreMap::iterator it = ignoreMap.begin();
@@ -515,7 +515,7 @@ QueueItemInstall::process (const QueueItemList & mainQueue, ResolverContext_Ptr
        caps = _item->dep (Dep::PROVIDES);
        bool ignored = false;
 
-       for (CapSet::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
+       for (Capabilities::const_iterator iter = caps.begin(); iter != caps.end(); iter++) {
            const Capability cap = *iter;
 
            /* Construct establish items for each of those which
@@ -556,11 +556,11 @@ QueueItemInstall::process (const QueueItemList & mainQueue, ResolverContext_Ptr
 
        for (EstablishMap::iterator firstIt = establish.establishmap.begin(); firstIt != establish.establishmap.end(); ++firstIt) {
            bool conflictFound = false;
-           CapSet provides = firstIt->second.resolvable()->deps()[Dep::PROVIDES];
+           Capabilities provides = firstIt->second.resolvable()->deps()[Dep::PROVIDES];
            // It is useless to establish items which are conflicting with eachother. So they will
            // be filtered out. bug 243595
            for (EstablishMap::iterator secondIt = firstIt; secondIt != establish.establishmap.end() && !conflictFound; ++secondIt) {
-               CapSet conflicts = secondIt->second.resolvable()->deps()[Dep::CONFLICTS];
+               Capabilities conflicts = secondIt->second.resolvable()->deps()[Dep::CONFLICTS];
                if (hasMatches (provides,conflicts)) {
                    conflictFound = true;
                    _XDEBUG("Do not establish " << firstIt->second << " cause it is conflicting with " << secondIt->second );
index d0eb120..a36077b 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "zypp/solver/detail/Types.h"
 #include "zypp/solver/detail/QueueItem.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 
 /////////////////////////////////////////////////////////////////////////
 namespace zypp
index fcba298..a5aef0c 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "zypp/CapFactory.h"
 #include "zypp/CapMatch.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 #include "zypp/base/Logger.h"
 #include "zypp/base/String.h"
 #include "zypp/base/Gettext.h"
@@ -475,11 +475,11 @@ codependent_items (const PoolItem_Ref item1, const PoolItem_Ref item2)
 // check if we have a match for a (supplements/enhances) hint
 
 static bool
-hint_match( const CapSet & cset, ResPool pool )
+hint_match( const Capabilities & cset, ResPool pool )
 {
     HintItem info;
     
-    for (CapSet::const_iterator cit = cset.begin(); cit != cset.end(); ++cit) {
+    for (Capabilities::const_iterator cit = cset.begin(); cit != cset.end(); ++cit) {
        Dep dep( Dep::PROVIDES );
        invokeOnEach( pool.byCapabilityIndexBegin( cit->index(), dep ),
                      pool.byCapabilityIndexEnd( cit->index(), dep ),
@@ -604,11 +604,11 @@ QueueItemRequire::process (const QueueItemList & mainQueue,
                if (item.status().staysUninstalled()) {
                    uninstalled++;
                }
-               CapSet freshens( item->dep( Dep::FRESHENS ) );
+               Capabilities freshens( item->dep( Dep::FRESHENS ) );
 
                // try to find a match of the locale freshens with one of the requested locales
 
-               for (CapSet::const_iterator cit = freshens.begin(); cit != freshens.end(); ++cit) {
+               for (Capabilities::const_iterator cit = freshens.begin(); cit != freshens.end(); ++cit) {
                    if (cit->refers() == ResTraits<Language>::kind) {
                        string loc = cit->index();
                        MIL << "Look for language fallback " << loc << ":" << item << endl;
@@ -861,8 +861,8 @@ provider_done:;
                        //   FIXME: should we also look at conflicts here?
 
                        if (explore_uninstall_branch) {
-                           CapSet requires = upgrade_item->dep (Dep::REQUIRES);
-                           CapSet::const_iterator iter = requires.begin();
+                           Capabilities requires = upgrade_item->dep (Dep::REQUIRES);
+                           Capabilities::const_iterator iter = requires.begin();
                            for (; iter != requires.end(); iter++) {
                                const Capability req = *iter;
                                if (! context->requirementIsMet (req, upgrade_item, Dep::REQUIRES)) {
index 1a4f333..67b2dd7 100644 (file)
@@ -19,7 +19,7 @@
  * 02111-1307, USA.
  */
 
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 #include "zypp/base/Logger.h"
 #include "zypp/base/String.h"
 #include "zypp/base/Gettext.h"
@@ -353,8 +353,8 @@ QueueItemUninstall::process (const QueueItemList & mainQueue, ResolverContext_Pt
            // look at the provides of the to-be-uninstalled resolvable and
            //   check if anyone (installed) needs it
 
-           CapSet provides = _item->dep(Dep::PROVIDES);
-           for (CapSet::const_iterator iter = provides.begin(); iter != provides.end() && ! info.cancel_unlink; iter++) {
+           Capabilities provides = _item->dep(Dep::PROVIDES);
+           for (Capabilities::const_iterator iter = provides.begin(); iter != provides.end() && ! info.cancel_unlink; iter++) {
 
                //world()->foreachRequiringPoolItem (*iter, unlink_check_cb, &info);
 
@@ -414,9 +414,9 @@ QueueItemUninstall::process (const QueueItemList & mainQueue, ResolverContext_Pt
        // we're uninstalling an installed item
        //   loop over all its provides and check if any installed item requires
        //   one of these provides
-       CapSet provides = _item->dep(Dep::PROVIDES);
+       Capabilities provides = _item->dep(Dep::PROVIDES);
 
-       for (CapSet::const_iterator iter = provides.begin(); iter != provides.end(); iter++) {
+       for (Capabilities::const_iterator iter = provides.begin(); iter != provides.end(); iter++) {
            UninstallProcess info ( pool(), context, _item, _upgraded_to, qil, _remove_only, _soft);
 
            //world()->foreachRequiringPoolItem (*iter, uninstall_process_cb, &info);
@@ -474,8 +474,8 @@ QueueItemUninstall::process (const QueueItemList & mainQueue, ResolverContext_Pt
            goto finished;
        }
 
-       CapSet recomments = _item->dep (Dep::RECOMMENDS);
-       for (CapSet::const_iterator iter = recomments.begin(); iter != recomments.end(); iter++) {
+       Capabilities recomments = _item->dep (Dep::RECOMMENDS);
+       for (Capabilities::const_iterator iter = recomments.begin(); iter != recomments.end(); iter++) {
            const Capability cap = *iter;
            _XDEBUG("this recommends " << cap);
            ProvidesItem provides( pool(), qil, true ); // soft     
index 2977990..5cfdaa7 100644 (file)
@@ -23,7 +23,7 @@
 #include "zypp/solver/detail/Resolver.h"
 #include "zypp/solver/detail/Helper.h"
 
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 #include "zypp/base/Logger.h"
 #include "zypp/base/String.h"
 #include "zypp/base/Gettext.h"
@@ -774,14 +774,14 @@ struct FreshenState
 
     bool operator()( PoolItem_Ref item)
     {
-       CapSet freshens( item->dep( Dep::FRESHENS ) );
+       Capabilities freshens( item->dep( Dep::FRESHENS ) );
        if (!freshens.empty()) {
            addToFreshen( item, itemmap );
        }
        else {                                  // if no freshens, look at supplements
            // Also regarding supplements e.g. in order to recognize
            // modalias dependencies. Bug #163140
-           CapSet supplements( item->dep( Dep::SUPPLEMENTS ) );
+           Capabilities supplements( item->dep( Dep::SUPPLEMENTS ) );
            if (!supplements.empty()) {
                addToFreshen( item, itemmap );
            }
@@ -944,11 +944,11 @@ Resolver::resolveDependencies (const ResolverContext_Ptr context)
 
     // adding "external" provides, the the requirements will be ignored
     IgnoreMap ignoreRequires = _ignoreRequires;
-    ResPool::AdditionalCapSet additionalCapSet = pool().additionaProvide();
-    for (ResPool::AdditionalCapSet::const_iterator it = additionalCapSet.begin();
-        it != additionalCapSet.end(); it++) {
-       CapSet cset = it->second;
-       for (CapSet::const_iterator cit = cset.begin(); cit != cset.end(); ++cit) {
+    ResPool::AdditionalCapabilities additionalCapabilities = pool().additionaProvide();
+    for (ResPool::AdditionalCapabilities::const_iterator it = additionalCapabilities.begin();
+        it != additionalCapabilities.end(); it++) {
+       Capabilities cset = it->second;
+       for (Capabilities::const_iterator cit = cset.begin(); cit != cset.end(); ++cit) {
            ignoreRequires.insert(make_pair(PoolItem_Ref(), *cit));
        }
     }
@@ -1012,30 +1012,30 @@ Resolver::resolveDependencies (const ResolverContext_Ptr context)
        initial_queue->addPoolItemToEstablish (*iter);
     }
 
-    for (CapSet::const_iterator iter = _extra_caps.begin(); iter != _extra_caps.end(); iter++) {
+    for (Capabilities::const_iterator iter = _extra_caps.begin(); iter != _extra_caps.end(); iter++) {
        initial_queue->addExtraCapability (*iter);
     }
 
     // adding "external" requires
-    additionalCapSet = pool().additionalRequire();
-    for (ResPool::AdditionalCapSet::const_iterator it = additionalCapSet.begin();
-        it != additionalCapSet.end(); it++) {
-       CapSet cset = it->second;
-       for (CapSet::const_iterator cit = cset.begin(); cit != cset.end(); ++cit) {
+    additionalCapabilities = pool().additionalRequire();
+    for (ResPool::AdditionalCapabilities::const_iterator it = additionalCapabilities.begin();
+        it != additionalCapabilities.end(); it++) {
+       Capabilities cset = it->second;
+       for (Capabilities::const_iterator cit = cset.begin(); cit != cset.end(); ++cit) {
            initial_queue->addExtraCapability (*cit);
        }
     }
 
-    for (CapSet::const_iterator iter = _extra_conflicts.begin(); iter != _extra_conflicts.end(); iter++) {
+    for (Capabilities::const_iterator iter = _extra_conflicts.begin(); iter != _extra_conflicts.end(); iter++) {
        initial_queue->addExtraConflict (*iter);
     }
 
     // adding "external" conflicts
-    additionalCapSet = pool().additionaConflict();
-    for (ResPool::AdditionalCapSet::const_iterator it = additionalCapSet.begin();
-        it != additionalCapSet.end(); it++) {
-       CapSet cset = it->second;
-       for (CapSet::const_iterator cit = cset.begin(); cit != cset.end(); ++cit) {
+    additionalCapabilities = pool().additionaConflict();
+    for (ResPool::AdditionalCapabilities::const_iterator it = additionalCapabilities.begin();
+        it != additionalCapabilities.end(); it++) {
+       Capabilities cset = it->second;
+       for (Capabilities::const_iterator cit = cset.begin(); cit != cset.end(); ++cit) {
            initial_queue->addExtraConflict (*cit);
        }
     }
index f19fdbf..3381792 100644 (file)
@@ -42,7 +42,7 @@
 #include "zypp/ResolverProblem.h"
 #include "zypp/ProblemSolution.h"
 #include "zypp/UpgradeStatistics.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 
 
 /////////////////////////////////////////////////////////////////////////
@@ -126,8 +126,8 @@ class Resolver : public base::ReferenceCounted, private base::NonCopyable {
     ItemCapKindMap _isInstalledBy;
     ItemCapKindMap _installs;
 
-    CapSet _extra_caps;
-    CapSet _extra_conflicts;
+    Capabilities _extra_caps;
+    Capabilities _extra_conflicts;
 
     //typedef std::multimap<PoolItem_Ref,Capability> IgnoreMap;
 
@@ -236,8 +236,8 @@ class Resolver : public base::ReferenceCounted, private base::NonCopyable {
     void addExtraConflict (const Capability & capability);
     void removeExtraConflict (const Capability & capability);    
 
-    const CapSet extraCapability () { return _extra_caps; }
-    const CapSet extraConflicts () { return _extra_conflicts; }
+    const Capabilities extraCapability () { return _extra_caps; }
+    const Capabilities extraConflicts () { return _extra_conflicts; }
 
     void addIgnoreConflict (const PoolItem_Ref item,
                            const Capability & capability);
index 5b398cc..8e6b483 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <values.h>
 
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 #include "zypp/base/Logger.h"
 #include "zypp/base/String.h"
 #include "zypp/base/Gettext.h"
@@ -1685,8 +1685,8 @@ ResolverContext::requirementIsPossible (const Capability & capability)
 bool
 ResolverContext::itemIsPossible( PoolItem_Ref item, Capability & failed )
 {
-    CapSet requires = item->dep (Dep::REQUIRES);
-    for (CapSet::iterator iter = requires.begin(); iter !=  requires.end(); iter++) {
+    Capabilities requires = item->dep (Dep::REQUIRES);
+    for (Capabilities::iterator iter = requires.begin(); iter !=  requires.end(); iter++) {
        if (! requirementIsPossible (*iter)) {
            failed = *iter;
            return false;
index 1aa48c6..c56d4b1 100644 (file)
@@ -31,7 +31,7 @@
 #include "zypp/solver/detail/QueueItemRequire.h"
 #include "zypp/solver/detail/QueueItemUninstall.h"
 #include "zypp/solver/detail/ResolverContext.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 #include "zypp/base/Logger.h"
 
 /////////////////////////////////////////////////////////////////////////
@@ -135,15 +135,15 @@ ResolverQueue::addPoolItemToVerify (PoolItem_Ref poolItem)
     if (poolItem.status().staysInstalled()
        || poolItem.status().isToBeInstalled()) {
        // regarding only items which will on the system after commit
-       CapSet requires = poolItem->dep (Dep::REQUIRES);
-       for (CapSet::const_iterator iter = requires.begin(); iter != requires.end(); ++iter) {
+       Capabilities requires = poolItem->dep (Dep::REQUIRES);
+       for (Capabilities::const_iterator iter = requires.begin(); iter != requires.end(); ++iter) {
            QueueItemRequire_Ptr qitem = new QueueItemRequire (_context->pool(), *iter);
            qitem->addPoolItem (poolItem);
            addItem (qitem);
        }
 
-       CapSet conflicts = poolItem->dep (Dep::CONFLICTS);
-       for (CapSet::const_iterator iter = conflicts.begin(); iter != conflicts.end(); ++iter) {
+       Capabilities conflicts = poolItem->dep (Dep::CONFLICTS);
+       for (Capabilities::const_iterator iter = conflicts.begin(); iter != conflicts.end(); ++iter) {
            QueueItemConflict_Ptr qitem = new QueueItemConflict (_context->pool(), *iter, poolItem);
            addItem (qitem);
        }
index 15c0429..b6f6c16 100644 (file)
@@ -35,7 +35,7 @@
 
 /-*/
 
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 #include "zypp/capability/SplitCap.h"
 
 #include "zypp/base/Logger.h"
@@ -444,8 +444,8 @@ Resolver::doUpgrade( UpgradeStatistics & opt_stats_r )
     MIL << "installed " << installed << ", candidate " << candidate << endl;
 
     // remember any splitprovides to packages actually installed.
-    CapSet caps = candidate->dep (Dep::PROVIDES);
-    for (CapSet::iterator cit = caps.begin(); cit != caps.end(); ++cit ) {
+    Capabilities caps = candidate->dep (Dep::PROVIDES);
+    for (Capabilities::iterator cit = caps.begin(); cit != caps.end(); ++cit ) {
        if (isKind<capability::SplitCap>( *cit ) ) {
 
            capability::CapabilityImpl::SplitInfo splitinfo = capability::CapabilityImpl::getSplitInfo( *cit );
@@ -824,10 +824,10 @@ Resolver::doUpgrade( UpgradeStatistics & opt_stats_r )
        // Checking if the selected provider depends on language, if yes try to find out the
        // correct language package
        bool requested_locale_match = false;
-       CapSet freshens( guess->dep( Dep::FRESHENS ) );
+       Capabilities freshens( guess->dep( Dep::FRESHENS ) );
 
        // is this a language package ?
-       for (CapSet::const_iterator cit = freshens.begin(); cit != freshens.end(); ++cit) {
+       for (Capabilities::const_iterator cit = freshens.begin(); cit != freshens.end(); ++cit) {
            if (cit->refers() == ResTraits<Language>::kind) {
                requested_locale_match = true;
                break;
@@ -856,7 +856,7 @@ Resolver::doUpgrade( UpgradeStatistics & opt_stats_r )
 
                    // try to find a match of the locale freshens with one of the requested locales
 
-                   for (CapSet::const_iterator cit = freshens.begin(); cit != freshens.end(); ++cit) {
+                   for (Capabilities::const_iterator cit = freshens.begin(); cit != freshens.end(); ++cit) {
                        if (cit->refers() == ResTraits<Language>::kind) {
                            string loc = cit->index();
                            MIL << "Look for language fallback " << loc << ":" << item << endl;
index e21a250..b925d41 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "zypp/solver/detail/Resolver.h"
 #include "zypp/solver/detail/SolutionAction.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 #include "zypp/base/Logger.h"
 #include "zypp/Dependencies.h"
 
@@ -182,7 +182,7 @@ bool
 InjectSolutionAction::execute(Resolver & resolver) const
 {
     Dependencies dependencies;
-    CapSet depList;
+    Capabilities depList;
     if (_item != PoolItem_Ref()) {    
        dependencies = _item.resolvable()->deps();
        depList = dependencies[Dep::CONFLICTS];
@@ -190,7 +190,7 @@ InjectSolutionAction::execute(Resolver & resolver) const
     switch (_kind) {
         case CONFLICTS:
            // removing conflict in both resolvables
-           for (CapSet::const_iterator iter = depList.begin(); iter != depList.end(); iter++) {
+           for (Capabilities::const_iterator iter = depList.begin(); iter != depList.end(); iter++) {
                if (iter->matches (_capability) == CapMatch::yes )
                {
                    resolver.addIgnoreConflict (_item, _capability);
@@ -198,7 +198,7 @@ InjectSolutionAction::execute(Resolver & resolver) const
            }
            // Obsoletes are conflicts too
            depList = dependencies[Dep::OBSOLETES];
-           for (CapSet::const_iterator iter = depList.begin(); iter != depList.end(); iter++) {
+           for (Capabilities::const_iterator iter = depList.begin(); iter != depList.end(); iter++) {
                if (iter->matches (_capability) == CapMatch::yes )
                {
                    resolver.addIgnoreConflict (_otherItem, _capability);
@@ -207,7 +207,7 @@ InjectSolutionAction::execute(Resolver & resolver) const
            
            dependencies = _otherItem.resolvable()->deps();
            depList = dependencies[Dep::CONFLICTS];
-           for (CapSet::const_iterator iter = depList.begin(); iter != depList.end(); iter++) {
+           for (Capabilities::const_iterator iter = depList.begin(); iter != depList.end(); iter++) {
                if (iter->matches (_capability) == CapMatch::yes )
                {
                    resolver.addIgnoreConflict (_otherItem, _capability);
@@ -215,7 +215,7 @@ InjectSolutionAction::execute(Resolver & resolver) const
            }
            // Obsoletes are conflicts too          
            depList = dependencies[Dep::OBSOLETES];
-           for (CapSet::const_iterator iter = depList.begin(); iter != depList.end(); iter++) {
+           for (Capabilities::const_iterator iter = depList.begin(); iter != depList.end(); iter++) {
                if (iter->matches (_capability) == CapMatch::yes )
                {
                    resolver.addIgnoreConflict (_otherItem, _capability);
index ff76d2c..f9d1708 100644 (file)
@@ -120,10 +120,10 @@ std::string helixXML( const Capability &cap )
 }
 
 template<> 
-std::string helixXML( const CapSet &caps )
+std::string helixXML( const Capabilities &caps )
 {
     stringstream str;
-    CapSet::iterator it = caps.begin();
+    Capabilities::iterator it = caps.begin();
     str << endl;
     for ( ; it != caps.end(); ++it)
     {
@@ -432,13 +432,13 @@ void HelixControl::deleteResolvable(const ResObject::constPtr &resObject)
          << " name=\"" << resObject->name() << "\"" << "/>" << endl;    
 }
 
-void HelixControl::addDependencies (const CapSet & capRequire, const CapSet & capConflict)
+void HelixControl::addDependencies (const Capabilities & capRequire, const Capabilities & capConflict)
 {
-    for (CapSet::const_iterator iter = capRequire.begin(); iter != capRequire.end(); iter++) {
+    for (Capabilities::const_iterator iter = capRequire.begin(); iter != capRequire.end(); iter++) {
        *file << "<addRequire " << " kind=\"" << toLower (iter->kind().asString()) << "\""
          << " name=\"" << iter->asString() << "\"" << "/>" << endl;    
     }
-    for (CapSet::const_iterator iter = capConflict.begin(); iter != capConflict.end(); iter++) {
+    for (Capabilities::const_iterator iter = capConflict.begin(); iter != capConflict.end(); iter++) {
        *file << "<addConflict " << " kind=\"" << toLower (iter->kind().asString()) << "\""
          << " name=\"" << iter->asString() << "\"" << "/>" << endl;    
     }    
index 64506de..cf5d462 100644 (file)
@@ -19,7 +19,7 @@
 #include "zypp/base/NonCopyable.h"
 #include "zypp/base/PtrTypes.h"
 #include "zypp/solver/detail/Resolver.h"
-#include "zypp/CapSet.h"
+#include "zypp/Capabilities.h"
 #include "zypp/ResPool.h"
 
 /////////////////////////////////////////////////////////////////////////
@@ -46,7 +46,7 @@ template<>
 std::string helixXML( const Capability &cap );
 
 template<> 
-std::string helixXML( const CapSet &caps );
+std::string helixXML( const Capabilities &caps );
 
 template<> 
 std::string helixXML( const Dependencies &dep );
@@ -105,7 +105,7 @@ class  HelixControl {
     void lockResolvable (const ResObject::constPtr &resObject);
     void keepResolvable (const ResObject::constPtr &resObject);        
     void deleteResolvable (const ResObject::constPtr &resObject);
-    void addDependencies (const CapSet &capRequire, const CapSet &capConflict);
+    void addDependencies (const Capabilities &capRequire, const Capabilities &capConflict);
     std::string filename () { return dumpFile; }
 };
        
index 32b02b8..e44202e 100644 (file)
 
 #include "zypp/target/CommitLog.h"
 #include "zypp/target/rpm/librpmDb.h"
-#include "zypp/target/rpm/RpmPackageImpl.h"
 #include "zypp/target/rpm/RpmException.h"
-#include "zypp/CapSet.h"
-#include "zypp/CapFactory.h"
+#include "zypp/TmpPath.h"
 #include "zypp/KeyRing.h"
 #include "zypp/ZYppFactory.h"
-#include "zypp/TmpPath.h"
 
 #ifndef _
 #define _(X) X
@@ -1139,7 +1136,9 @@ const list<Package::Ptr> & RpmDb::getPackages()
   return empty_list;
 }
 
-inline static void insertCaps( CapSet &capset, capability::CapabilityImplPtrSet ptrset, CapFactory &factory )
+#warning FIX READING RPM DATBASE TO POOL
+#if 0 // obsolete helper
+inline static void insertCaps( Capabilities &capset, capability::CapabilityImplPtrSet ptrset, CapFactory &factory )
 {
   for ( capability::CapabilityImplPtrSet::const_iterator it = ptrset.begin();
         it != ptrset.end();
@@ -1148,6 +1147,7 @@ inline static void insertCaps( CapSet &capset, capability::CapabilityImplPtrSet
     capset.insert( factory.fromImpl(*it) );
   }
 }
+#endif
 
 //
 // make Package::Ptr from RpmHeader
@@ -1167,7 +1167,8 @@ Package::Ptr RpmDb::makePackageFromHeader( const RpmHeader::constPtr header,
   }
 
   Package::Ptr pptr;
-
+#warning FIX READING RPM DATBASE TO POOL
+#if 0
   string name = header->tag_name();
 
   // create dataprovider
@@ -1250,7 +1251,7 @@ Package::Ptr RpmDb::makePackageFromHeader( const RpmHeader::constPtr header,
     ZYPP_CAUGHT( excpt_r );
     ERR << "Can't create Package::Ptr" << endl;
   }
-
+#endif
   return pptr;
 }
 
@@ -1274,7 +1275,6 @@ const list<Package::Ptr> & RpmDb::doGetPackages(callback::SendReport<ScanDBRepor
 
   librpmDb::db_const_iterator iter;
   unsigned current = 0;
-  CapFactory _f;
   Pathname location;
 
   for ( iter.findAll(); *iter; ++iter, ++current, report->progress( (100*current)/expect))
@@ -1301,6 +1301,8 @@ const list<Package::Ptr> & RpmDb::doGetPackages(callback::SendReport<ScanDBRepor
   _packages.buildIndex();
   DBG << "Found installed packages: " << _packages._list.size() << endl;
 
+#warning FILEREQUIRES HACK SHOULD BE DONE WHEN WRITING THE RPMDB SOLV FILE
+#if 0
   ///////////////////////////////////////////////////////////////////
   // Evaluate filerequires collected so far
   ///////////////////////////////////////////////////////////////////
@@ -1317,8 +1319,8 @@ const list<Package::Ptr> & RpmDb::doGetPackages(callback::SendReport<ScanDBRepor
         }
         pptr->injectProvides(_f.parse(ResTraits<Package>::kind, *it));
       }
-
     }
+#endif
 
   ///////////////////////////////////////////////////////////////////
   // Build final packages list
index 980e02d..b94e8bc 100644 (file)
 
 #include "zypp/base/Easy.h"
 #include "zypp/base/Logger.h"
-#include "zypp/PathInfo.h"
+#include "zypp/base/Exception.h"
 
 #include "zypp/target/rpm/RpmHeader.h"
-#include "zypp/CapFactory.h"
-#include "zypp/Rel.h"
 #include "zypp/Package.h"
-#include "zypp/base/Exception.h"
+#include "zypp/PathInfo.h"
 
-using namespace std;
-using namespace zypp::capability;
+using std::endl;
 
 namespace zypp
 {
@@ -78,7 +75,7 @@ RpmHeader::~RpmHeader()
 //        METHOD TYPE : constRpmHeaderPtr
 //
 RpmHeader::constPtr RpmHeader::readPackage( const Pathname & path_r,
-    VERIFICATION verification_r )
+                                            VERIFICATION verification_r )
 {
   PathInfo file( path_r );
   if ( ! file.isFile() )
@@ -128,16 +125,16 @@ RpmHeader::constPtr RpmHeader::readPackage( const Pathname & path_r,
 //
 //
 //        METHOD NAME : RpmHeader::dumpOn
-//        METHOD TYPE : ostream &
+//        METHOD TYPE : std::ostream &
 //
 //        DESCRIPTION :
 //
-ostream & RpmHeader::dumpOn( ostream & str ) const
+std::ostream & RpmHeader::dumpOn( std::ostream & str ) const
 {
   return BinHeader::dumpOn( str ) << '{' << tag_name() << "-"
          << (tag_epoch()==0?"":(tag_epoch()+":"))
          << tag_version()
-         << (tag_release().empty()?"":(string("-")+tag_release()))
+         << (tag_release().empty()?"":(std::string("-")+tag_release()))
          << ( isSrc() ? ".src}" : "}");
 }
 
@@ -157,11 +154,11 @@ bool RpmHeader::isSrc() const
 //
 //
 //        METHOD NAME : RpmHeader::tag_name
-//        METHOD TYPE : string
+//        METHOD TYPE : std::string
 //
 //        DESCRIPTION :
 //
-string RpmHeader::tag_name() const
+std::string RpmHeader::tag_name() const
 {
   return string_val( RPMTAG_NAME );
 }
@@ -170,11 +167,11 @@ string RpmHeader::tag_name() const
 //
 //
 //        METHOD NAME : RpmHeader::tag_epoch
-//        METHOD TYPE : int
+//        METHOD TYPE : Edition::epoch_t
 //
 //        DESCRIPTION :
 //
-int RpmHeader::tag_epoch() const
+Edition::epoch_t RpmHeader::tag_epoch() const
 {
   return int_val ( RPMTAG_EPOCH );
 }
@@ -183,11 +180,11 @@ int RpmHeader::tag_epoch() const
 //
 //
 //        METHOD NAME : RpmHeader::tag_version
-//        METHOD TYPE : string
+//        METHOD TYPE : std::string
 //
 //        DESCRIPTION :
 //
-string RpmHeader::tag_version() const
+std::string RpmHeader::tag_version() const
 {
   return string_val ( RPMTAG_VERSION );
 }
@@ -196,11 +193,11 @@ string RpmHeader::tag_version() const
 //
 //
 //        METHOD NAME : RpmHeader::tag_release
-//        METHOD TYPE : string
+//        METHOD TYPE : std::string
 //
 //        DESCRIPTION :
 //
-string RpmHeader::tag_release() const
+std::string RpmHeader::tag_release() const
 {
   return string_val( RPMTAG_RELEASE );
 }
@@ -215,29 +212,20 @@ string RpmHeader::tag_release() const
 //
 Edition RpmHeader::tag_edition () const
 {
-  try
-  {
-    return Edition( tag_version(), tag_release(), tag_epoch());
-  }
-  catch (Exception & excpt_r)
-  {
-    WAR << "Package " << tag_name() << "has an invalid edition";
-    ZYPP_CAUGHT (excpt_r);
-  }
-  return Edition();
+  return Edition( tag_version(), tag_release(), tag_epoch() );
 }
 
 ///////////////////////////////////////////////////////////////////
 //
 //
 //        METHOD NAME : RpmHeader::tag_arch
-//        METHOD TYPE : string
+//        METHOD TYPE : Arch
 //
 //        DESCRIPTION :
 //
-string RpmHeader::tag_arch() const
+Arch RpmHeader::tag_arch() const
 {
-  return string_val( RPMTAG_ARCH );
+  return Arch( string_val( RPMTAG_ARCH ) );
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -265,18 +253,18 @@ Date RpmHeader::tag_buildtime() const
 {
   return int_val( RPMTAG_BUILDTIME );
 }
-
+#warning CHECK IF FILE REQUIRES HANDLING IS OBSOLETE
 ///////////////////////////////////////////////////////////////////
 //
 //
 //        METHOD NAME : RpmHeader::PkgRelList_val
-//        METHOD TYPE : unsigned
+//        METHOD TYPE : CapabilitySet
 //
 //        DESCRIPTION :
 //
-CapabilityImplPtrSet RpmHeader::PkgRelList_val( tag tag_r, bool pre, set<string> * freq_r ) const
+CapabilitySet RpmHeader::PkgRelList_val( tag tag_r, bool pre, std::set<std::string> * freq_r ) const
   {
-    CapabilityImplPtrSet ret;
+    CapabilitySet ret;
 
     int_32  kindFlags   = 0;
     int_32  kindVersion = 0;
@@ -299,19 +287,14 @@ CapabilityImplPtrSet RpmHeader::PkgRelList_val( tag tag_r, bool pre, set<string>
       kindFlags   = RPMTAG_CONFLICTFLAGS;
       kindVersion = RPMTAG_CONFLICTVERSION;
       break;
-#ifdef HAVE_RPM_ENHANCES
     case RPMTAG_ENHANCESNAME:
       kindFlags   = RPMTAG_ENHANCESFLAGS;
       kindVersion = RPMTAG_ENHANCESVERSION;
       break;
-#endif
-#warning NEEDS RPMTAG_SUPPLEMENTSNAME
-#if 0
-    case RPMTAG_SUPPLEMENTSNAME:
-      kindFlags   = RPMTAG_SUPPLEMENTSFLAGS;
-      kindVersion = RPMTAG_SUPPLEMENTSVERSION;
+    case RPMTAG_SUGGESTSNAME:
+      kindFlags   = RPMTAG_SUGGESTSFLAGS;
+      kindVersion = RPMTAG_SUGGESTSVERSION;
       break;
-#endif
     default:
       INT << "Illegal RPMTAG_dependencyNAME " << tag_r << endl;
       return ret;
@@ -332,11 +315,11 @@ CapabilityImplPtrSet RpmHeader::PkgRelList_val( tag tag_r, bool pre, set<string>
     for ( unsigned i = 0; i < count; ++i )
     {
 
-      string n( names[i] );
+      std::string n( names[i] );
 
       Rel op = Rel::ANY;
       int_32 f  = flags[i];
-      string v  = versions[i];
+      std::string v  = versions[i];
 
       if ( n[0] == '/' )
       {
@@ -374,13 +357,7 @@ CapabilityImplPtrSet RpmHeader::PkgRelList_val( tag tag_r, bool pre, set<string>
       {
         try
         {
-          CapabilityImpl::Ptr cap = capability::buildVersioned(
-                             ResTraits<Package>::kind,
-                             n,
-                             op,
-                             Edition(v)
-                           );
-          ret.insert(cap);
+          ret.insert( Capability( n, op, Edition(v) ) );
         }
         catch (Exception & excpt_r)
         {
@@ -398,11 +375,11 @@ CapabilityImplPtrSet RpmHeader::PkgRelList_val( tag tag_r, bool pre, set<string>
 //
 //
 //        METHOD NAME : RpmHeader::tag_provides
-//        METHOD TYPE : CapabilityImplPtrSet
+//        METHOD TYPE : CapabilitySet
 //
 //        DESCRIPTION :
 //
-CapabilityImplPtrSet RpmHeader::tag_provides( set<string> * freq_r ) const
+CapabilitySet RpmHeader::tag_provides( std::set<std::string> * freq_r ) const
   {
     return PkgRelList_val( RPMTAG_PROVIDENAME, false, freq_r );
   }
@@ -411,11 +388,11 @@ CapabilityImplPtrSet RpmHeader::tag_provides( set<string> * freq_r ) const
 //
 //
 //        METHOD NAME : RpmHeader::tag_requires
-//        METHOD TYPE : CapabilityImplPtrSet
+//        METHOD TYPE : CapabilitySet
 //
 //        DESCRIPTION :
 //
-CapabilityImplPtrSet RpmHeader::tag_requires( set<string> * freq_r ) const
+CapabilitySet RpmHeader::tag_requires( std::set<std::string> * freq_r ) const
   {
     return PkgRelList_val( RPMTAG_REQUIRENAME, false, freq_r );
   }
@@ -424,11 +401,11 @@ CapabilityImplPtrSet RpmHeader::tag_requires( set<string> * freq_r ) const
 //
 //
 //        METHOD NAME : RpmHeader::tag_requires
-//        METHOD TYPE : CapabilityImplPtrSet
+//        METHOD TYPE : CapabilitySet
 //
 //        DESCRIPTION :
 //
-CapabilityImplPtrSet RpmHeader::tag_prerequires( set<string> * freq_r ) const
+CapabilitySet RpmHeader::tag_prerequires( std::set<std::string> * freq_r ) const
   {
     return PkgRelList_val( RPMTAG_REQUIRENAME, true, freq_r );
   }
@@ -437,11 +414,11 @@ CapabilityImplPtrSet RpmHeader::tag_prerequires( set<string> * freq_r ) const
 //
 //
 //        METHOD NAME : RpmHeader::tag_conflicts
-//        METHOD TYPE : CapabilityImplPtrSet
+//        METHOD TYPE : CapabilitySet
 //
 //        DESCRIPTION :
 //
-CapabilityImplPtrSet RpmHeader::tag_conflicts( set<string> * freq_r ) const
+CapabilitySet RpmHeader::tag_conflicts( std::set<std::string> * freq_r ) const
   {
     return PkgRelList_val( RPMTAG_CONFLICTNAME, false, freq_r );
   }
@@ -450,11 +427,11 @@ CapabilityImplPtrSet RpmHeader::tag_conflicts( set<string> * freq_r ) const
 //
 //
 //        METHOD NAME : RpmHeader::tag_obsoletes
-//        METHOD TYPE : CapabilityImplPtrSet
+//        METHOD TYPE : CapabilitySet
 //
 //        DESCRIPTION :
 //
-CapabilityImplPtrSet RpmHeader::tag_obsoletes( set<string> * freq_r ) const
+CapabilitySet RpmHeader::tag_obsoletes( std::set<std::string> * freq_r ) const
   {
     return PkgRelList_val( RPMTAG_OBSOLETENAME, false, freq_r );
   }
@@ -463,34 +440,26 @@ CapabilityImplPtrSet RpmHeader::tag_obsoletes( set<string> * freq_r ) const
 //
 //
 //        METHOD NAME : RpmHeader::tag_enhances
-//        METHOD TYPE : CapabilityImplPtrSet
+//        METHOD TYPE : CapabilitySet
 //
 //        DESCRIPTION :
 //
-CapabilityImplPtrSet RpmHeader::tag_enhances( set<string> * freq_r ) const
+CapabilitySet RpmHeader::tag_enhances( std::set<std::string> * freq_r ) const
   {
-#ifdef HAVE_RPM_ENHANCES
     return PkgRelList_val( RPMTAG_ENHANCESNAME, false, freq_r );
-#else
-    return CapabilityImplPtrSet();
-#endif
   }
 
 ///////////////////////////////////////////////////////////////////
 //
 //
-//        METHOD NAME : RpmHeader::tag_supplements
-//        METHOD TYPE : CapabilityImplPtrSet
+//        METHOD NAME : RpmHeader::tag_suggests
+//        METHOD TYPE : CapabilitySet
 //
 //        DESCRIPTION :
 //
-CapabilityImplPtrSet RpmHeader::tag_supplements( set<string> * freq_r ) const
+CapabilitySet RpmHeader::tag_suggests( std::set<std::string> * freq_r ) const
   {
-    return CapabilityImplPtrSet();
-#warning NEEDS RPMTAG_SUPPLEMENTSNAME
-#if 0
-    return PkgRelList_val( RPMTAG_SUPPLEMENTSNAME, false, freq_r );
-#endif
+    return PkgRelList_val( RPMTAG_SUGGESTSNAME, false, freq_r );
   }
 
 ///////////////////////////////////////////////////////////////////
@@ -884,7 +853,7 @@ DiskUsage & RpmHeader::tag_du( DiskUsage & dudata_r ) const
     // filter out hardliks ( different name but same device and inode ).
     ///////////////////////////////////////////////////////////////////
     filesystem::DevInoCache trace;
-    vector<DiskUsage::Entry> entries;
+    std::vector<DiskUsage::Entry> entries;
     entries.resize( dirnames.size() );
     for ( unsigned i = 0; i < dirnames.size(); ++i )
     {
index 0776add..146de5b 100644 (file)
 
 #include "zypp/Package.h"
 #include "zypp/Changelog.h"
-#include "zypp/CapSetFwd.h"
 #include "zypp/Pathname.h"
 #include "zypp/DiskUsage.h"
-#include "zypp/capability/CapabilityImpl.h"
 
 
 namespace zypp
@@ -32,20 +30,18 @@ namespace target
 namespace rpm
 {
 
-
-typedef struct
+struct FileInfo
 {
-  Pathname filename;
-  ByteCount size;
+  Pathname    filename;
+  ByteCount   size;
   std::string md5sum;
-  uid_t uid;
-  gid_t gid;
-  mode_t mode;
-  time_t mtime;
-  bool ghost;
+  uid_t       uid;
+  gid_t       gid;
+  mode_t      mode;
+  time_t      mtime;
+  bool        ghost;
   Pathname link_target;
-}
-FileInfo;
+};
 
 ///////////////////////////////////////////////////////////////////
 //
@@ -70,7 +66,7 @@ public:
 
 private:
 
-  capability::CapabilityImplPtrSet PkgRelList_val( tag tag_r, bool pre, std::set<std::string> * freq_r = 0 ) const;
+  CapabilitySet PkgRelList_val( tag tag_r, bool pre, std::set<std::string> * freq_r = 0 ) const;
 
 public:
 
@@ -91,17 +87,12 @@ public:
 
 public:
 
-  std::string tag_name()    const;
-  int tag_epoch()           const;
-  std::string tag_version() const;
-  std::string tag_release() const;
-  std::string tag_arch()    const;
-
-  /**
-   * return complete edition (from tag_epoch, tag_version, tag_release)
-   * returns Edition::noedition if an error occurs
-          */
-  Edition tag_edition() const;
+  std::string      tag_name()    const;
+  Edition::epoch_t tag_epoch()   const;
+  std::string      tag_version() const;
+  std::string      tag_release() const;
+  Edition          tag_edition() const;
+  Arch             tag_arch()    const;
 
   Date tag_installtime() const;
   Date tag_buildtime()   const;
@@ -109,31 +100,41 @@ public:
   /**
    * If <code>freq_r</code> is not NULL, file dependencies found are inserted.
    **/
-  capability::CapabilityImplPtrSet tag_provides ( std::set<std::string> * freq_r = 0 ) const;
+  CapabilitySet tag_provides ( std::set<std::string> * freq_r = 0 ) const;
   /**
    * @see #tag_provides
    **/
-  capability::CapabilityImplPtrSet tag_requires ( std::set<std::string> * freq_r = 0 ) const;
+  CapabilitySet tag_requires ( std::set<std::string> * freq_r = 0 ) const;
   /**
    * @see #tag_provides
    **/
-  capability::CapabilityImplPtrSet tag_prerequires ( std::set<std::string> * freq_r = 0 ) const;
+  CapabilitySet tag_prerequires ( std::set<std::string> * freq_r = 0 ) const;
   /**
    * @see #tag_provides
    **/
-  capability::CapabilityImplPtrSet tag_conflicts( std::set<std::string> * freq_r = 0 ) const;
+  CapabilitySet tag_conflicts( std::set<std::string> * freq_r = 0 ) const;
   /**
    * @see #tag_provides
    **/
-  capability::CapabilityImplPtrSet tag_obsoletes( std::set<std::string> * freq_r = 0 ) const;
+  CapabilitySet tag_obsoletes( std::set<std::string> * freq_r = 0 ) const;
   /**
    * @see #tag_provides
    **/
-  capability::CapabilityImplPtrSet tag_enhances( std::set<std::string> * freq_r = 0 ) const;
+  CapabilitySet tag_enhances( std::set<std::string> * freq_r = 0 ) const;
   /**
    * @see #tag_provides
    **/
-  capability::CapabilityImplPtrSet tag_supplements( std::set<std::string> * freq_r = 0 ) const;
+  CapabilitySet tag_suggests( std::set<std::string> * freq_r = 0 ) const;
+  /** Unsupported by rpm.
+   * @see #tag_provides
+   **/
+  CapabilitySet tag_supplements( std::set<std::string> * freq_r = 0 ) const
+  { return CapabilitySet(); }
+  /** Unsupported by rpm.
+   * @see #tag_provides
+   **/
+  CapabilitySet tag_freshens( std::set<std::string> * freq_r = 0 ) const
+  { return CapabilitySet(); }
 
   ByteCount tag_size()        const;
   ByteCount tag_archivesize() const;
diff --git a/zypp/target/rpm/RpmPackageImpl.cc b/zypp/target/rpm/RpmPackageImpl.cc
deleted file mode 100644 (file)
index 23d7f7f..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/target/rpm/RpmPackageImpl.cc
- *
-*/
-
-#include "zypp/target/rpm/RpmPackageImpl.h"
-#include "zypp/base/String.h"
-#include "zypp/base/Logger.h"
-
-#include <list>
-#include <string>
-
-using namespace std;
-using namespace zypp::detail;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////
-namespace target
-{ /////////////////////////////////////////////////////////////////
-namespace rpm
-{
-///////////////////////////////////////////////////////////////////
-//
-//        CLASS NAME : RPMPackageImpl
-//
-///////////////////////////////////////////////////////////////////
-
-
-RPMPackageImpl::RPMPackageImpl(
-  const RpmHeader::constPtr data
-)
-    : _summary(data->tag_summary(), Locale("en")),
-    _description(),
-    _buildtime(data->tag_buildtime()),
-    _installtime(data->tag_installtime()),
-    _buildhost(data->tag_buildhost()),
-    _url(data->tag_url()),
-    _vendor(data->tag_vendor()),
-    _license(data->tag_license()),
-    _packager(data->tag_packager()),
-    _group(data->tag_group()),
-    _changelog(data->tag_changelog()),
-    _type("rpm"), // FIXME in the future
-    _filenames(data->tag_filenames()),
-    _size(data->tag_size())
-{
-  // we know we are reading english.
-  _description.setText(data->tag_description(), Locale("en"));
-  data->tag_du(_disk_usage);
-  _location.setDownloadSize(data->tag_archivesize());
-}
-
-/** Package summary */
-TranslatedText RPMPackageImpl::summary() const
-{
-  return _summary;
-}
-
-/** Package description */
-TranslatedText RPMPackageImpl::description() const
-{
-  return _description;
-}
-
-ByteCount RPMPackageImpl::size() const
-{
-  return _size;
-}
-
-/** */
-Date RPMPackageImpl::buildtime() const
-{
-  return _buildtime;
-}
-
-/** */
-std::string RPMPackageImpl::buildhost() const
-{
-  return _buildhost;
-}
-
-/** */
-Date RPMPackageImpl::installtime() const
-{
-  return _installtime;
-}
-
-/** */
-std::string RPMPackageImpl::distribution() const
-#warning fixme
-{
-  return string();
-}
-
-/** */
-Vendor RPMPackageImpl::vendor() const
-{
-  return _vendor;
-}
-
-/** */
-Label RPMPackageImpl::license() const
-{
-  return _license;
-}
-
-/** */
-std::string RPMPackageImpl::packager() const
-{
-  return _packager;
-}
-
-/** */
-PackageGroup RPMPackageImpl::group() const
-{
-  return _group;
-}
-
-/** */
-Changelog RPMPackageImpl::changelog() const
-{
-  return _changelog;
-}
-
-/** */
-OnMediaLocation RPMPackageImpl::location() const
-{
-  return _location;
-}
-
-/** Don't ship it as class Url, because it might be
- * in fact anything but a legal Url. */
-std::string RPMPackageImpl::url() const
-{
-  return _url;
-}
-
-/** */
-std::string RPMPackageImpl::os() const
-// metadata doesn't priovide this attribute
-{
-  return PackageImplIf::os();
-}
-
-/** */
-Text RPMPackageImpl::prein() const
-// metadata doesn't priovide this attribute
-{
-  return PackageImplIf::prein();
-}
-
-/** */
-Text RPMPackageImpl::postin() const
-// metadata doesn't priovide this attribute
-{
-  return PackageImplIf::postin();
-}
-
-/** */
-Text RPMPackageImpl::preun() const
-// metadata doesn't priovide this attribute
-{
-  return PackageImplIf::preun();
-}
-
-/** */
-Text RPMPackageImpl::postun() const
-// metadata doesn't priovide this attribute
-{
-  return PackageImplIf::postun();
-}
-
-/** */
-ByteCount RPMPackageImpl::sourcesize() const
-#warning fixme
-{
-  return 0;
-}
-
-/** */
-std::list<std::string> RPMPackageImpl::filenames() const
-{
-  return _filenames;
-}
-
-/** */
-std::string RPMPackageImpl::type() const
-{
-  return _type;
-}
-
-/** */
-const DiskUsage & RPMPackageImpl::diskusage() const
-{
-  return _disk_usage;
-}
-
-/** */
-Repository RPMPackageImpl::repository() const
-{
-  return _repository;
-}
-
-} // namespace rpm
-/////////////////////////////////////////////////////////////////
-} // namespace target
-///////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/target/rpm/RpmPackageImpl.h b/zypp/target/rpm/RpmPackageImpl.h
deleted file mode 100644 (file)
index cab485a..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/target/rpm/RpmPackageImpl.h
- *
-*/
-#ifndef ZYPP_TARGET_RPM_RPMPACKAGEIMPL_H
-#define ZYPP_TARGET_RPM_RPMPACKAGEIMPL_H
-
-#include "zypp/detail/PackageImplIf.h"
-#include "zypp/Changelog.h"
-#include "zypp/target/rpm/RpmHeader.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////
-namespace target
-{ /////////////////////////////////////////////////////////////////
-namespace rpm
-{ //////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////////////////////////////
-//
-//        CLASS NAME : RPMPackageImpl
-//
-/** Class representing a package
-*/
-class RPMPackageImpl : public detail::PackageImplIf
-{
-public:
-  /** Default ctor
-  */
-  RPMPackageImpl(
-    const RpmHeader::constPtr data
-  );
-
-  /** Package summary */
-  virtual TranslatedText summary() const;
-  /** Package description */
-  virtual TranslatedText description() const;
-  /** */
-  virtual ByteCount size() const;
-  /** */
-  virtual Date buildtime() const;
-  /** */
-  virtual std::string buildhost() const;
-  /** */
-  virtual Date installtime() const;
-  /** */
-  virtual std::string distribution() const;
-  /** */
-  virtual Vendor vendor() const;
-  /** */
-  virtual Label license() const;
-  /** */
-  virtual std::string packager() const;
-  /** */
-  virtual PackageGroup group() const;
-  /** */
-  virtual Changelog changelog() const;
-
-  /** Don't ship it as class Url, because it might be
-   * in fact anything but a legal Url. */
-  virtual std::string url() const;
-  /** */
-  virtual std::string os() const;
-  /** */
-  virtual Text prein() const;
-  /** */
-  virtual Text postin() const;
-  /** */
-  virtual Text preun() const;
-  /** */
-  virtual Text postun() const;
-  /** */
-  virtual ByteCount sourcesize() const;
-  /** */
-  virtual std::list<std::string> filenames() const;
-  /** */
-  virtual std::string type() const;
-  /** */
-  virtual const DiskUsage & diskusage() const;
-  /** */
-  virtual Repository repository() const;
-
-  /** for 'local' RPMs  */
-  void setLocation (const OnMediaLocation &loc)
-  {
-    _location = loc;
-  }
-
-  OnMediaLocation location() const;
-
-  void setRepository (Repository repo)
-  {
-    _repository = repo;
-  }
-
-protected:
-  TranslatedText _summary;
-  TranslatedText _description;
-  Date _buildtime;
-  Date _installtime;
-  std::string _buildhost;
-  std::string _url;
-  Vendor _vendor;
-  Label _license;
-  std::string _packager;
-  PackageGroup _group;
-  Changelog _changelog;
-  std::string _type;
-  std::list<std::string> _filenames;
-  DiskUsage _disk_usage;
-  ByteCount _size;
-  Repository _repository;
-  OnMediaLocation _location;
-};
-///////////////////////////////////////////////////////////////////
-} // namespace rpm
-/////////////////////////////////////////////////////////////////
-} // namespace target
-/////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_TARGET_RPM_RPMPACKAGEIMPL_H
index c8e6d45..89009b6 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "PersistentStorage.h"
 #include "Backend.h"
-#include "XMLFilesBackend.h"
+//#include "XMLFilesBackend.h"
 
 using std::endl;
 
@@ -53,7 +53,7 @@ PersistentStorage::PersistentStorage()
 
 void PersistentStorage::init(const Pathname &root)
 {
-  d->backend.reset( new XMLFilesBackend(root) );
+  //d->backend.reset( new XMLFilesBackend(root) );
 }
 
 bool PersistentStorage::isInitialized() const
@@ -69,38 +69,40 @@ bool PersistentStorage::isInitialized() const
 PersistentStorage::~PersistentStorage()
 {}
 
-    ///////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////
 //
 //     METHOD NAME : PersistentStorage::~PersistentStorage
 //     METHOD TYPE : Dtor
 //
 void PersistentStorage::doTest()
 {
-  d->backend->doTest();
+//   d->backend->doTest();
 }
 
 Date
 PersistentStorage::timestamp() const
 {
-  return d->backend->timestamp();
+//   return d->backend->timestamp();
+  return Date();
 }
 
 void
 PersistentStorage::storeObject( ResObject::constPtr resolvable )
 {
-  d->backend->storeObject(resolvable);
+//   d->backend->storeObject(resolvable);
 }
 
 void
 PersistentStorage::deleteObject( ResObject::constPtr resolvable )
 {
-  d->backend->deleteObject(resolvable);
+//   d->backend->deleteObject(resolvable);
 }
 
 std::list<ResObject::Ptr>
 PersistentStorage::storedObjects() const
 {
-  return d->backend->storedObjects();
+//   return d->backend->storedObjects();
+  return std::list<ResObject::Ptr>();
 }
 
 std::list<ResObject::Ptr>
@@ -108,13 +110,15 @@ PersistentStorage::storedObjects(const Resolvable::Kind kind) const
 {
   //list<ResObject::Ptr>::iterator it;
   //it = find(nums.begin(), nums.end(), 3); // Search the list.
-  return d->backend->storedObjects(kind);
+//   return d->backend->storedObjects(kind);
+  return std::list<ResObject::Ptr>();
 }
 
 std::list<ResObject::Ptr>
 PersistentStorage::storedObjects(const Resolvable::Kind kind, const std::string & name, bool partial_match) const
 {
-  return d->backend->storedObjects(kind, name, partial_match);
+//   return d->backend->storedObjects(kind, name, partial_match);
+  return std::list<ResObject::Ptr>();
 }
 
 /////////////////////////////////////////////////////////
@@ -123,19 +127,29 @@ PersistentStorage::storedObjects(const Resolvable::Kind kind, const std::string
 
 void
 PersistentStorage::setObjectFlag( ResObject::constPtr resolvable, const std::string &flag )
-{ d->backend->setObjectFlag(resolvable, flag); }
+{
+//   d->backend->setObjectFlag(resolvable, flag);
+}
 
 void
 PersistentStorage::removeObjectFlag( ResObject::constPtr resolvable, const std::string &flag )
-{ d->backend->removeObjectFlag(resolvable, flag); }
+{
+//   d->backend->removeObjectFlag(resolvable, flag);
+}
 
 std::set<std::string>
 PersistentStorage::objectFlags( ResObject::constPtr resolvable ) const
-{ return d->backend->objectFlags(resolvable); }
+{
+//   return d->backend->objectFlags(resolvable);
+  return std::set<std::string>();
+}
 
 bool
 PersistentStorage::doesObjectHasFlag( ResObject::constPtr resolvable, const std::string &flag ) const
-{ return d->backend->doesObjectHasFlag(resolvable, flag); }
+{
+//   return d->backend->doesObjectHasFlag(resolvable, flag);
+  return false;
+}
 
 /////////////////////////////////////////////////////////
 // Named Flags API
@@ -144,25 +158,27 @@ PersistentStorage::doesObjectHasFlag( ResObject::constPtr resolvable, const std:
 void
 PersistentStorage::setFlag( const std::string &key, const std::string &flag )
 {
-  d->backend->setFlag(key, flag);
+//   d->backend->setFlag(key, flag);
 }
 
 void
 PersistentStorage::removeFlag( const std::string &key, const std::string &flag )
 {
-  d->backend->removeFlag(key, flag);
+//   d->backend->removeFlag(key, flag);
 }
 
 std::set<std::string>
 PersistentStorage::flags( const std::string &key ) const
 {
-  return d->backend->flags(key);
+//   return d->backend->flags(key);
+  return std::set<std::string>();
 }
 
 bool
 PersistentStorage::hasFlag( const std::string &key, const std::string &flag ) const
 {
-  return d->backend->hasFlag(key, flag);
+//   return d->backend->hasFlag(key, flag);
+  return false;
 }
 
 /******************************************************************
index f37a2e0..33998b7 100644 (file)
@@ -9,6 +9,8 @@
 /** \file      zypp/target/store/XMLFilesBackend.cc
 *
 */
+#warning NEED XMLFilesBackend TO SolvFile fix
+#if 0
 #include <iostream>
 #include <ctime>
 #include <cstdlib>
 #include "zypp/Digest.h"
 #include "zypp/ExternalProgram.h"
 
-#include "zypp/target/store/xml/XMLPatchImpl.h"
-#include "zypp/target/store/xml/XMLMessageImpl.h"
-#include "zypp/target/store/xml/XMLScriptImpl.h"
-#include "zypp/target/store/xml/XMLSelectionImpl.h"
-#include "zypp/target/store/xml/XMLProductImpl.h"
-#include "zypp/target/store/xml/XMLPatternImpl.h"
-#include "zypp/target/store/xml/XMLAtomImpl.h"
-
 #include "zypp/parser/xmlstore/XMLProductParser.h"
 #include "zypp/parser/xmlstore/XMLPatternParser.h"
 #include "zypp/parser/xmlstore/XMLPatchParser.h"
@@ -1350,3 +1344,4 @@ std::ostream & operator<<( std::ostream & str, const XMLFilesBackend & obj )
 /////////////////////////////////////////////////////////////////
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
+#endif
index ca691c2..f43ce10 100644 (file)
 */
 #ifndef DEVEL_DEVEL_DMACVICAR_XMLFILESBACKEND_H
 #define DEVEL_DEVEL_DMACVICAR_XMLFILESBACKEND_H
-
+#if 0
 #include <iosfwd>
 
+#include "zypp/NVR.h"
 #include "zypp/Atom.h"
 #include "zypp/Message.h"
 #include "zypp/Patch.h"
@@ -65,9 +66,9 @@ public:
     * initialize the storage backend
     */
   virtual void initBackend();
-  
+
   virtual Date timestamp() const;
-  
+
   /**
     * Stores a Resolvable in the active backend.
     */
@@ -111,20 +112,20 @@ public:
   protected:
   void writeObjectFlags( ResObject::constPtr resolvable, const std::set<std::string> &pflags );
   void writeFlags( const std::string &key, const std::set<std::string> &pflags );
-  
+
   void writeFlagsInFile( const std::string &filename, const std::set<std::string> &pflags );
   std::set<std::string> flagsFromFile( const std::string &filename ) const;
-  
+
   void updateTimestamp() const;
 
   protected:
-  
+
   /**
    * delete a path in the database, only used by deleteObject
    * and workarounds
    */
   void deleteFileObject( const Pathname &filename ) const;
-  
+
   /**
     * Directory where the xml file is stored (for the given resolvable)
     */
@@ -133,19 +134,19 @@ public:
     * Directory where the flags are stored (for the given resolvable)
     */
   std::string dirForResolvableFlags( ResObject::constPtr resolvable ) const;
-  
+
   /**
     * Encoded filename for a resolvable NVR. Does not take kind into account.
     */
   std::string fileNameForNVR( const zypp::NVR &nvr ) const;
-  
+
   /**
     * Encoded filename for a resolvable. Does not take kind into account.
     */
   std::string fileNameForResolvable( ResObject::constPtr resolvable ) const;
   /**
     * Encoded filename for resolvable flags. Does not take kind into account.
-    */  
+    */
   std::string fullPathForResolvableFlags( ResObject::constPtr resolvable ) const;
   /**
     * dir for named flags
@@ -184,11 +185,11 @@ public:
   Pattern::Ptr createPattern( const zypp::parser::xmlstore::XMLPatternData & parsed ) const;
   Atom::Ptr createAtom( const zypp::parser::xmlstore::XMLPatchAtomData & parsed ) const;
   Language::Ptr createLanguage( const zypp::parser::xmlstore::XMLLanguageData & parsed ) const;
-  
+
   Dependencies createDependencies( const zypp::parser::xmlstore::XMLResObjectData & parsed, const Resolvable::Kind my_kind ) const;
-  
+
   Capability createCapability(const XMLDependency & dep, const Resolvable::Kind & my_kind) const;
-  
+
   private:
   class Private;
   Private *d;
@@ -203,4 +204,5 @@ std::ostream & operator<<( std::ostream & str, const XMLFilesBackend & obj );
 /////////////////////////////////////////////////////////////////
 } // namespace devel
 ///////////////////////////////////////////////////////////////////
+#endif
 #endif // DEVEL_DEVEL_DMACVICAR_SQLITEBACKEND_H
index d58df1b..817aacf 100644 (file)
 #include <boost/logic/tribool.hpp>
 
 #include "zypp/base/Logger.h"
-#include "zypp/CapFactory.h"
 #include "zypp/Url.h"
 
 #include "zypp/ResObject.h"
-#include "zypp/detail/ImplConnect.h"
-#include "zypp/detail/ResObjectImplIf.h"
-#include "zypp/detail/SelectionImplIf.h"
 #include "zypp/repo/ScriptProvider.h"
 
 #include "serialize.h"
@@ -125,18 +121,20 @@ string toXML( const Arch &arch )
 template<>
 string toXML( const Capability &cap )
 {
+#warning FIX WRITING AND READING CAPABILITY (incl old format)
   stringstream out;
-  CapFactory factory;
+  //CapFactory factory;
+  //out << "<capability kind=\"" << cap.refers() << "\" >" <<  xml_escape(factory.encode(cap)) << "</capability>" << endl;
+  out << "<capability>" <<  cap << "</capability>" << endl; // wrong !
 
-  out << "<capability kind=\"" << cap.refers() << "\" >" <<  xml_escape(factory.encode(cap)) << "</capability>" << endl;
   return out.str();
 }
 
 template<>
-string toXML( const CapSet &caps )
+string toXML( const Capabilities &caps )
 {
   stringstream out;
-  CapSet::iterator it = caps.begin();
+  Capabilities::const_iterator it = caps.begin();
   for ( ; it != caps.end(); ++it)
   {
     out << toXML((*it));
@@ -190,16 +188,15 @@ template<>
 string toXML( const ResObject::constPtr &obj )
 {
   stringstream out;
-
+#warning FIX WRITING AND READING TRANSLATED TEXTS
   // access implementation
-  detail::ResImplTraits<ResObject::Impl>::constPtr pipp( detail::ImplConnect::resimpl( obj ) );
-  out << translatedTextToXML(pipp->summary(), "summary");
-  out << translatedTextToXML(pipp->description(), "description");
-
-  out << translatedTextToXML(pipp->insnotify(), "install-notify");
-  out << translatedTextToXML(pipp->delnotify(), "delete-notify");
-  //out << "  <license-to-confirm>" << xml_escape(obj->licenseToConfirm()) << "</license-to-confirm>" << endl;
-  out << translatedTextToXML(pipp->licenseToConfirm(), "license-to-confirm");
+  //detail::ResImplTraits<ResObject::Impl>::constPtr pipp( detail::ImplConnect::resimpl( obj ) );
+  //out << translatedTextToXML(pipp->summary(), "summary");
+  //out << translatedTextToXML(pipp->description(), "description");
+
+  //out << translatedTextToXML(pipp->insnotify(), "install-notify");
+  //out << translatedTextToXML(pipp->delnotify(), "delete-notify");
+  //out << translatedTextToXML(pipp->licenseToConfirm(), "license-to-confirm");
   out << "  <vendor>" << xml_escape(obj->vendor()) << "</vendor>" << endl;
   out << "  <size>" << static_cast<ByteCount::SizeType>(obj->size()) << "</size>" << endl;
   out << "  <archive-size>" << static_cast<ByteCount::SizeType>(obj->downloadSize()) << "</archive-size>" << endl;
@@ -335,13 +332,14 @@ string toXML( const Product::constPtr &obj )
   out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
   out << "<product version=\"" << SERIALIZER_VERSION << "\" xmlns=\"http://www.novell.com/metadata/zypp/xml-store\" type=\"" << xml_escape(obj->type()) << "\">" << endl;
   out << toXML(static_cast<Resolvable::constPtr>(obj)) << endl;
-  #warning "FIXME description and displayname of products"
+#warning "FIXME description and displayname of products"
 
   out << toXML(static_cast<ResObject::constPtr>(obj));
 
+#warning FIX WRITING AND READING TRANSLATED TEXTS
   // access implementation
-  detail::ResImplTraits<Product::Impl>::constPtr pipp( detail::ImplConnect::resimpl( obj ) );
-  out << translatedTextToXML(pipp->shortName(), "shortname");
+//   detail::ResImplTraits<Product::Impl>::constPtr pipp( detail::ImplConnect::resimpl( obj ) );
+//   out << translatedTextToXML(pipp->shortName(), "shortname");
 
   out << "  <distribution-name>" << xml_escape(obj->distributionName()) << "</distribution-name>" << endl;
   out << "  <distribution-edition>" << xml_escape(obj->distributionEdition().asString()) << "</distribution-edition>" << endl;
index d91a40b..98ed50f 100644 (file)
@@ -29,9 +29,6 @@
 #include <zypp/Selection.h>
 #include <zypp/Product.h>
 #include <zypp/Edition.h>
-#include <zypp/CapSet.h>
-
-#include <zypp/Capability.h>
 
 #define SERIALIZER_VERSION "2.0"
 
@@ -45,19 +42,19 @@ namespace storage
 template<class T>
 std::string toXML( const T &obj ); //undefined
 
-template<> 
+template<>
 std::string toXML( const Edition &edition );
 
-template<> 
+template<>
 std::string toXML( const Arch &arch );
 
-template<> 
+template<>
 std::string toXML( const Capability &cap );
 
-template<> 
-std::string toXML( const CapSet &caps );
+template<>
+std::string toXML( const Capabilities &caps );
 
-template<> 
+template<>
 std::string toXML( const Dependencies &dep );
 
 /**
@@ -65,13 +62,13 @@ std::string toXML( const Dependencies &dep );
  * NOTE: This wont serialize child classes properties
  * Use castedToXML for that.
  */
-template<> 
+template<>
 std::string toXML( const Resolvable::constPtr &obj );
 
 /**
  * Serialize ResObject properties
  */
-template<> 
+template<>
 std::string toXML( const ResObject::constPtr &obj );
 
 /**
@@ -89,31 +86,31 @@ std::string resolvableTypeToString( const Resolvable::constPtr &resolvable, bool
  */
 std::string resolvableKindToString( const Resolvable::Kind &kind, bool plural = false );
 
-template<> 
+template<>
 std::string toXML( const Package::constPtr &obj );
 
-template<> 
+template<>
 std::string toXML( const Script::constPtr &obj );
 
-template<> 
+template<>
 std::string toXML( const Message::constPtr &obj );
 
-template<> 
+template<>
 std::string toXML( const Patch::constPtr &obj );
 
-template<> 
+template<>
 std::string toXML( const Atom::constPtr &obj );
 
-template<> 
+template<>
 std::string toXML( const Pattern::constPtr &obj );
 
-template<> 
+template<>
 std::string toXML( const Selection::constPtr &obj );
 
-template<> 
+template<>
 std::string toXML( const Product::constPtr &obj );
 
-template<> 
+template<>
 std::string toXML( const Language::constPtr &obj );
 
 /////////////////////////////////////////////////////////////////
diff --git a/zypp/target/store/xml/XMLAtomImpl.cc b/zypp/target/store/xml/XMLAtomImpl.cc
deleted file mode 100644 (file)
index 168e3ac..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/target/store/xml/XMLAtomImpl.cc
- *
-*/
-
-#include "zypp/target/store/xml/XMLAtomImpl.h"
-
-using namespace std;
-using namespace zypp::detail;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-    namespace storage
-    {
-      
-      /** Default ctor
-      */
-      XMLAtomImpl::XMLAtomImpl()
-      {
-      }
-
-      //Source_Ref YUMAtomImpl::source() const
-      //{ return _source; }
-
-
-    } // namespace storage
-    /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/target/store/xml/XMLAtomImpl.h b/zypp/target/store/xml/XMLAtomImpl.h
deleted file mode 100644 (file)
index 30325b9..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/target/store/xml/XMLAtomImpl.h
- *
-*/
-#ifndef ZYPP_TARGET_XMLSTORE_ATOMIMPL_H
-#define ZYPP_TARGET_XMLSTORE_ATOMIMPL_H
-
-#include "zypp/detail/AtomImpl.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-    namespace storage
-    { //////////////////////////////////////////////////////////////
-
-      
-      /** Class representing a Atom
-      */
-      class XMLAtomImpl : public detail::AtomImplIf
-      {
-      public:
-        /** Default ctor */
-        XMLAtomImpl();
-      private:
-       
-      public:
-       //Source_Ref source() const;
-        
-        virtual TranslatedText summary() const
-        { return _summary; }
-        virtual TranslatedText description() const
-        { return _description; }
-        virtual TranslatedText insnotify() const
-        { return _install_notify; }    
-        virtual TranslatedText delnotify() const
-        { return _delete_notify; }    
-        virtual TranslatedText licenseToConfirm() const
-        { return _license_to_confirm; }    
-        virtual Vendor vendor() const
-        { return _vendor; }    
-        virtual ByteCount size() const
-        { return _size; }    
-        virtual ByteCount downloadSize() const
-        { return _downloadSize; }    
-        virtual unsigned sourceMediaNr() const
-        { return 0; }    
-        virtual bool installOnly() const
-        { return _install_only; }    
-        virtual Date buildtime() const
-        { return _build_time; }    
-        virtual Date installtime() const
-        { return _install_time; }    
-        
-        TranslatedText _summary;
-        TranslatedText _description;
-      
-        TranslatedText _install_notify;
-        TranslatedText _delete_notify;
-        TranslatedText _license_to_confirm;
-        std::string _vendor;
-        ByteCount _size;
-        ByteCount _downloadSize;
-        bool _install_only;
-        Date _build_time;
-        Date _install_time;
-      
-      };
-      ///////////////////////////////////////////////////////////////////
-    } // namespace storage
-    /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_SOURCE_YUM_YUMATOMIMPL_H
diff --git a/zypp/target/store/xml/XMLMessageImpl.cc b/zypp/target/store/xml/XMLMessageImpl.cc
deleted file mode 100644 (file)
index d64e6b3..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/target/store/xml/XMLMessageImpl.cc
- *
-*/
-
-#include "zypp/target/store/xml/XMLMessageImpl.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace storage
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : XMLMessageImpl
-    //
-    ///////////////////////////////////////////////////////////////////
-
-    /** Default ctor */
-    XMLMessageImpl::XMLMessageImpl()
-    {}
-    /** Dtor */
-    XMLMessageImpl::~XMLMessageImpl()
-    {}
-
-    TranslatedText XMLMessageImpl::text() const {
-      return _text;
-    }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/target/store/xml/XMLMessageImpl.h b/zypp/target/store/xml/XMLMessageImpl.h
deleted file mode 100644 (file)
index 3904204..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/target/store/xml/XMLMessageImpl.h
- *
-*/
-#ifndef ZYPP_STORE_XMLMESSAGEIMPL_H
-#define ZYPP_STORE_XMLMESSAGEIMPL_H
-
-#include "zypp/detail/MessageImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace storage
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : XMLMessageImpl
-    //
-    /** Class representing the message to be shown during update */
-    struct XMLMessageImpl : public zypp::detail::MessageImplIf
-    {
-    
-      /** Default ctor */
-      XMLMessageImpl();
-      /** Dtor */
-      virtual ~XMLMessageImpl();
-
-      virtual TranslatedText summary() const
-      { return _summary; }
-      virtual TranslatedText description() const
-      { return _description; }
-      virtual TranslatedText insnotify() const
-      { return _install_notify; }    
-      virtual TranslatedText delnotify() const
-      { return _delete_notify; }    
-      virtual TranslatedText licenseToConfirm() const
-      { return _license_to_confirm; }    
-      virtual Vendor vendor() const
-      { return _vendor; }    
-      virtual ByteCount size() const
-      { return _size; }    
-      virtual ByteCount downloadSize() const
-      { return _downloadSize; }    
-      virtual unsigned sourceMediaNr() const
-      { return 0; }    
-      virtual bool installOnly() const
-      { return _install_only; }    
-      virtual Date buildtime() const
-      { return _build_time; }    
-      virtual Date installtime() const
-      { return _install_time; }    
-      
-      /** Get the text of the message */
-      virtual TranslatedText text() const;
-    
-      /** The text of the message */
-      TranslatedText _text;
-      
-      TranslatedText _summary;
-      TranslatedText _description;
-      
-      TranslatedText _install_notify;
-      TranslatedText _delete_notify;
-      TranslatedText _license_to_confirm;
-      std::string _vendor;
-      ByteCount _size;
-      ByteCount _downloadSize;
-      bool _install_only;
-      Date _build_time;
-      Date _install_time;
-      
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace storage
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_MESSAGEIMPL_H
diff --git a/zypp/target/store/xml/XMLPatchImpl.cc b/zypp/target/store/xml/XMLPatchImpl.cc
deleted file mode 100644 (file)
index 84e6008..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/target/store/xml/XMLPatchImpl.cc
- *
-*/
-#include <iostream>
-
-#include "zypp/base/Logger.h"
-#include "zypp/target/store/xml/XMLPatchImpl.h"
-#include "zypp/Package.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace storage
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : XMLPatchImpl
-    //
-    ///////////////////////////////////////////////////////////////////
-
-    /** Default ctor */
-    XMLPatchImpl::XMLPatchImpl()
-    {}
-
-    /** Dtor */
-    XMLPatchImpl::~XMLPatchImpl()
-    {}
-
-    std::string XMLPatchImpl::id() const
-    {
-      return _patch_id;
-    }
-    Date XMLPatchImpl::timestamp() const
-    {
-      return _timestamp;
-    }
-
-    std::string XMLPatchImpl::category() const
-    {
-      return _category;
-    }
-
-    bool XMLPatchImpl::reboot_needed() const
-    {
-      return _reboot_needed;
-    }
-
-    bool XMLPatchImpl::affects_pkg_manager() const
-    {
-      return _affects_pkg_manager;
-    }
-
-    XMLPatchImpl::AtomList XMLPatchImpl::all_atoms() const {
-      return _atoms;
-    }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/target/store/xml/XMLPatchImpl.h b/zypp/target/store/xml/XMLPatchImpl.h
deleted file mode 100644 (file)
index ad350ef..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/target/store/xml/XMLPatchImpl.h
- *
-*/
-#ifndef ZYPP_STORE_XMLPATCHIMPL_H
-#define ZYPP_STORE_XMLPATCHIMPL_H
-
-#include "zypp/detail/PatchImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace storage
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : XMLPatchImpl
-    //
-    struct XMLPatchImpl : public zypp::detail::PatchImplIf
-    {
-      XMLPatchImpl();
-      ~XMLPatchImpl();
-
-      virtual TranslatedText summary() const
-      { return _summary; }
-      virtual TranslatedText description() const
-      { return _description; }
-      virtual TranslatedText insnotify() const
-      { return _install_notify; }
-      virtual TranslatedText delnotify() const
-      { return _delete_notify; }
-      virtual TranslatedText licenseToConfirm() const
-      { return _license_to_confirm; }
-      virtual Vendor vendor() const
-      { return _vendor; }
-      virtual ByteCount size() const
-      { return _size; }
-      virtual ByteCount downloadSize() const
-      { return _downloadSize; }
-      virtual unsigned sourceMediaNr() const
-      { return 0; }
-      virtual bool installOnly() const
-      { return _install_only; }
-      virtual Date buildtime() const
-      { return _build_time; }
-      virtual Date installtime() const
-      { return _install_time; }
-
-      /** Patch ID */
-      virtual std::string id() const;
-      /** Patch time stamp */
-      virtual Date timestamp() const;
-      /** Patch category (recommended, security,...) */
-      virtual std::string category() const;
-      /** Does the system need to reboot to finish the update process? */
-      virtual bool reboot_needed() const;
-      /** Does the patch affect the package manager itself? */
-      virtual bool affects_pkg_manager() const;
-
-      /** The list of all atoms building the patch */
-      virtual AtomList all_atoms() const;
-
-
-      /** Patch ID */
-      std::string _patch_id;
-      /** Patch time stamp */
-      Date _timestamp;
-
-      TranslatedText _summary;
-      TranslatedText _description;
-
-      TranslatedText _install_notify;
-      TranslatedText _delete_notify;
-      TranslatedText _license_to_confirm;
-      std::string _vendor;
-      ByteCount _size;
-      ByteCount _downloadSize;
-      bool _install_only;
-      Date _build_time;
-      Date _install_time;
-
-
-      /** Patch category (recommended, security,...) */
-      std::string _category;
-      /** Does the system need to reboot to finish the update process? */
-      bool _reboot_needed;
-      /** Does the patch affect the package manager itself? */
-      bool _affects_pkg_manager;
-      /** The list of all atoms building the patch */
-      AtomList _atoms;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace storage
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_PATCHIMPL_H
diff --git a/zypp/target/store/xml/XMLPatternImpl.cc b/zypp/target/store/xml/XMLPatternImpl.cc
deleted file mode 100644 (file)
index 5e3579b..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/target/store/xml/XMLPatternImpl.cc
- *
-*/
-#include "zypp/target/store/xml/XMLPatternImpl.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace storage
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // METHOD NAME : XMLPatternImpl::XMLPatternImpl
-    // METHOD TYPE : Ctor
-    //
-    XMLPatternImpl::XMLPatternImpl()
-    {}
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // METHOD NAME : XMLPatternImpl::~XMLPatternImpl
-    // METHOD TYPE : Dtor
-    //
-    XMLPatternImpl::~XMLPatternImpl()
-    {}
-
-      bool XMLPatternImpl::userVisible() const {
-        return _user_visible;
-      }
-
-      /** */
-      bool XMLPatternImpl::isDefault() const
-      { return _default; }
-      /** */
-      TranslatedText XMLPatternImpl::category() const
-      { return _category; }
-      /** */
-      Pathname XMLPatternImpl::icon() const
-      { return _icon; }
-      /** */
-      Pathname XMLPatternImpl::script() const
-      { return _script; }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace storage
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/target/store/xml/XMLPatternImpl.h b/zypp/target/store/xml/XMLPatternImpl.h
deleted file mode 100644 (file)
index 912b60a..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/target/store/xml/XMLPatternImpl.h
- *
-*/
-#ifndef ZYPP_STORAGE_XMLPATTERNIMPL_H
-#define ZYPP_STORAGE_XMLPATTERNIMPL_H
-
-#include "zypp/detail/PatternImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  namespace storage
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : XMLPatternImpl
-    //
-    /**
-    */
-    struct XMLPatternImpl : public zypp::detail::PatternImplIf
-    {
-      XMLPatternImpl();
-      virtual ~XMLPatternImpl();
-
-      virtual TranslatedText summary() const
-      { return _summary; }
-      virtual TranslatedText description() const
-      { return _description; }
-      virtual TranslatedText insnotify() const
-      { return _install_notify; }    
-      virtual TranslatedText delnotify() const
-      { return _delete_notify; }    
-      virtual TranslatedText licenseToConfirm() const
-      { return _license_to_confirm; }    
-      virtual Vendor vendor() const
-      { return _vendor; }    
-      virtual ByteCount size() const
-      { return _size; }    
-      virtual ByteCount downloadSize() const
-      { return _downloadSize; }    
-      virtual unsigned sourceMediaNr() const
-      { return 0; }    
-      virtual bool installOnly() const
-      { return _install_only; }    
-      virtual Date buildtime() const
-      { return _build_time; }    
-      virtual Date installtime() const
-      { return _install_time; }    
-      
-      virtual bool userVisible() const;
-      virtual bool isDefault() const;
-      virtual TranslatedText category() const;
-      virtual Pathname icon() const;
-      virtual Pathname script() const;
-
-      bool _user_visible;
-      
-      TranslatedText _summary;
-      TranslatedText _description;
-      
-      TranslatedText _install_notify;
-      TranslatedText _delete_notify;
-      TranslatedText _license_to_confirm;
-      std::string _vendor;
-      ByteCount _size;
-      ByteCount _downloadSize;
-      bool _install_only;
-      Date _build_time;
-      Date _install_time;
-      
-      
-      bool _default;
-      TranslatedText _category;
-      Pathname _icon;
-      Pathname _script;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace storage
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_PATTERNIMPL_H
diff --git a/zypp/target/store/xml/XMLProductImpl.cc b/zypp/target/store/xml/XMLProductImpl.cc
deleted file mode 100644 (file)
index a63136e..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/target/store/xml/XMLProductImpl.cc
- *
-*/
-
-#include "zypp/target/store/xml/XMLProductImpl.h"
-#include "zypp/base/Logger.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace storage
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : XMLProductImpl
-    //
-    ///////////////////////////////////////////////////////////////////
-
-    /** Default ctor */
-    XMLProductImpl::XMLProductImpl()
-    {}
-    /** Dtor */
-    XMLProductImpl::~XMLProductImpl()
-    {}
-
-    std::string XMLProductImpl::type() const
-    { return _type; }
-
-    TranslatedText XMLProductImpl::shortName() const
-    { return _short_name; }
-
-    Url XMLProductImpl::releaseNotesUrl() const
-    { return _release_notes_url; }
-
-    std::list<Url> XMLProductImpl::updateUrls() const
-    { return _update_urls; }
-
-    std::list<Url> XMLProductImpl::extraUrls() const
-    { return _extra_urls; }
-
-    std::list<Url> XMLProductImpl::optionalUrls() const
-    { return _optional_urls; }
-
-    std::list<std::string> XMLProductImpl::flags() const
-    { return _flags; }
-
-    std::string XMLProductImpl::distributionName() const
-    { return _dist_name; }
-
-    Edition XMLProductImpl::distributionEdition() const
-    { return _dist_version; }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/target/store/xml/XMLProductImpl.h b/zypp/target/store/xml/XMLProductImpl.h
deleted file mode 100644 (file)
index 2c469cc..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/target/store/xml/XMLProductImpl.h
- *
-*/
-#ifndef ZYPP_STORAGE_XMLPRODUCTIMPL_H
-#define ZYPP_STORAGE_XMLPRODUCTIMPL_H
-
-#include "zypp/detail/ProductImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  namespace storage
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : ProductImpl
-    //
-    /** */
-    struct XMLProductImpl : public zypp::detail::ProductImplIf
-    {
-      XMLProductImpl();
-      ~XMLProductImpl();
-
-      virtual TranslatedText summary() const
-      { return _summary; }
-      virtual TranslatedText description() const
-      { return _description; }
-      virtual TranslatedText insnotify() const
-      { return _install_notify; }
-      virtual TranslatedText delnotify() const
-      { return _delete_notify; }
-      virtual TranslatedText licenseToConfirm() const
-      { return _license_to_confirm; }
-      virtual Vendor vendor() const
-      { return _vendor; }
-      virtual ByteCount size() const
-      { return _size; }
-      virtual ByteCount downloadSize() const
-      { return _downloadSize; }
-      virtual bool installOnly() const
-      { return _install_only; }
-      virtual Date buildtime() const
-      { return _build_time; }
-      virtual Date installtime() const
-      { return _install_time; }
-
-      virtual std::string type() const;
-      virtual TranslatedText shortName() const;
-      virtual Url releaseNotesUrl() const;
-
-      virtual std::list<Url> updateUrls() const;
-      virtual std::list<Url> extraUrls() const;
-      virtual std::list<Url> optionalUrls() const;
-
-      virtual std::list<std::string> flags() const;
-      virtual std::string distributionName() const;
-      virtual Edition distributionEdition() const;
-
-      std::string _type;
-      Url _release_notes_url;
-
-      std::list<Url> _update_urls;
-      std::list<Url> _extra_urls;
-      std::list<Url> _optional_urls;
-
-      std::list<std::string> _flags;
-
-      TranslatedText _summary;
-      TranslatedText _description;
-
-      TranslatedText _install_notify;
-      TranslatedText _delete_notify;
-      TranslatedText _license_to_confirm;
-      std::string _vendor;
-      ByteCount _size;
-      ByteCount _downloadSize;
-      bool _install_only;
-      Date _build_time;
-      Date _install_time;
-      TranslatedText _short_name;
-      std::string _dist_name;
-      Edition     _dist_version;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace storage
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_PRODUCTIMPL_H
diff --git a/zypp/target/store/xml/XMLScriptImpl.cc b/zypp/target/store/xml/XMLScriptImpl.cc
deleted file mode 100644 (file)
index 1f9493f..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/target/store/xml/XMLScriptImpl.cc
- *
-*/
-
-#include "zypp/target/store/xml/XMLScriptImpl.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace storage
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : XMLScriptImpl
-    //
-    ///////////////////////////////////////////////////////////////////
-
-    /** Default ctor */
-    XMLScriptImpl::XMLScriptImpl()
-    {}
-
-    /** Dtor */
-    XMLScriptImpl::~XMLScriptImpl()
-    {}
-
-    std::string XMLScriptImpl::doScriptInlined() const
-    { return _doScript; }
-
-    std::string XMLScriptImpl::undoScriptInlined() const
-    { return _undoScript; }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/target/store/xml/XMLScriptImpl.h b/zypp/target/store/xml/XMLScriptImpl.h
deleted file mode 100644 (file)
index 29ffc65..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file zypp/target/store/xml/XMLScriptImpl.h
- *
-*/
-#ifndef ZYPP_STORE_XMLSCRIPTIMPL_H
-#define ZYPP_STORE_XMLSCRIPTIMPL_H
-
-#include "zypp/TmpPath.h"
-#include "zypp/detail/ScriptImplIf.h"
-
-using namespace zypp::filesystem;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace storage
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : XMLScriptImpl
-    //
-    /** Class representing an update script */
-    struct XMLScriptImpl : public zypp::detail::ScriptImplIf
-    {
-      /** Default ctor */
-      XMLScriptImpl();
-      /** Dtor */
-      ~XMLScriptImpl();
-
-      virtual TranslatedText summary() const
-      { return _summary; }
-      virtual TranslatedText description() const
-      { return _description; }
-      virtual TranslatedText insnotify() const
-      { return _install_notify; }
-      virtual TranslatedText delnotify() const
-      { return _delete_notify; }
-      virtual TranslatedText licenseToConfirm() const
-      { return _license_to_confirm; }
-      virtual Vendor vendor() const
-      { return _vendor; }
-      virtual ByteCount size() const
-      { return _size; }
-      virtual ByteCount downloadSize() const
-      { return _downloadSize; }
-      virtual bool installOnly() const
-      { return _install_only; }
-      virtual Date buildtime() const
-      { return _build_time; }
-      virtual Date installtime() const
-      { return _install_time; }
-
-      virtual std::string doScriptInlined() const;
-      virtual std::string undoScriptInlined() const;
-
-      TranslatedText _summary;
-      TranslatedText _description;
-
-      TranslatedText _install_notify;
-      TranslatedText _delete_notify;
-      TranslatedText _license_to_confirm;
-      std::string _vendor;
-      ByteCount _size;
-      ByteCount _downloadSize;
-      bool _install_only;
-      Date _build_time;
-      Date _install_time;
-
-      std::string _doScript;
-      std::string _undoScript;
-   };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_SCRIPTIMPL_H
diff --git a/zypp/target/store/xml/XMLSelectionImpl.cc b/zypp/target/store/xml/XMLSelectionImpl.cc
deleted file mode 100644 (file)
index 1ef9c20..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/target/store/xml/XMLSelectionImpl.cc
- *
-*/
-#include "zypp/target/store/xml/XMLSelectionImpl.h"
-
-using namespace std;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace storage
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // METHOD NAME : XMLSelectionImpl::XMLSelectionImpl
-    // METHOD TYPE : Ctor
-    //
-    XMLSelectionImpl::XMLSelectionImpl() : _visible(true)
-    {}
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // METHOD NAME : XMLSelectionImpl::~XMLSelectionImpl
-    // METHOD TYPE : Dtor
-    //
-    XMLSelectionImpl::~XMLSelectionImpl()
-    {}
-
-    Label XMLSelectionImpl::category() const
-    { return _category.text(); }
-
-    bool XMLSelectionImpl::visible() const
-    { return _visible; }
-
-    Label XMLSelectionImpl::order() const
-    { return _order; }
-
-    const std::set<std::string> XMLSelectionImpl::suggests() const
-    { return _suggests; }
-
-    const std::set<std::string> XMLSelectionImpl::recommends() const
-    { return _recommends; }
-
-    const std::set<std::string> XMLSelectionImpl::install_packages( const Locale & lang ) const
-    { return _install_packages; }
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace storage
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
diff --git a/zypp/target/store/xml/XMLSelectionImpl.h b/zypp/target/store/xml/XMLSelectionImpl.h
deleted file mode 100644 (file)
index dc7d4b6..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/target/store/xml/XMLSelectionImpl.h
- *
-*/
-#ifndef ZYPP_TARGET_XMLSELECTIONIMPL_H
-#define ZYPP_TARGET_XMLSELECTIONIMPL_H
-
-#include "zypp/detail/SelectionImplIf.h"
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-
-  ///////////////////////////////////////////////////////////////////
-  namespace storage
-  { /////////////////////////////////////////////////////////////////
-
-    ///////////////////////////////////////////////////////////////////
-    //
-    // CLASS NAME : XMLSelectionImpl
-    //
-    /**
-    */
-    struct XMLSelectionImpl : public zypp::detail::SelectionImplIf
-    {
-      XMLSelectionImpl();
-      virtual ~XMLSelectionImpl();
-
-      virtual TranslatedText summary() const
-      { return _summary; }
-      virtual TranslatedText description() const
-      { return _description; }
-      virtual TranslatedText insnotify() const
-      { return _install_notify; }    
-      virtual TranslatedText delnotify() const
-      { return _delete_notify; }    
-      virtual TranslatedText licenseToConfirm() const
-      { return _license_to_confirm; }    
-      virtual Vendor vendor() const
-      { return _vendor; }    
-      virtual ByteCount size() const
-      { return _size; }    
-      virtual ByteCount downloadSize() const
-      { return _downloadSize; }    
-      virtual unsigned sourceMediaNr() const
-      { return 0; }    
-      virtual bool installOnly() const
-      { return _install_only; }    
-      virtual Date buildtime() const
-      { return _build_time; }    
-      virtual Date installtime() const
-      { return _install_time; }    
-
-      /** selection category */
-      Label category() const;
-
-      /** selection visibility (for hidden selections) */
-      bool visible() const;
-
-      /** selection presentation order */
-      Label order() const;
-      
-      const std::set<std::string> suggests() const;
-      const std::set<std::string> recommends() const;
-      const std::set<std::string> install_packages( const Locale & lang = Locale("") ) const;
-
-      TranslatedText _summary;
-      TranslatedText _description;
-      
-      TranslatedText _install_notify;
-      TranslatedText _delete_notify;
-      TranslatedText _license_to_confirm;
-      std::string _vendor;
-      ByteCount _size;
-      ByteCount _downloadSize;
-      bool _install_only;
-      Date _build_time;
-      Date _install_time;
-      
-      std::string _name;
-      std::string _version;
-      std::string _release;
-      std::string _arch;
-      std::string _order;
-      TranslatedText _category;
-      bool _visible;
-
-      std::set<std::string> _suggests;
-      std::set<std::string> _recommends;
-      std::set<std::string> _install_packages;
-    };
-    ///////////////////////////////////////////////////////////////////
-
-    /////////////////////////////////////////////////////////////////
-  } // namespace detail
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
-#endif // ZYPP_DETAIL_SELECTIONIMPL_H
index 1ec65d8..dc25557 100644 (file)
@@ -82,9 +82,9 @@ namespace zypp
       {
         if ( ! pat_r->includes().empty() )
           {
-            for_each( pat_r->includes().begin(),
-                      pat_r->includes().end(),
-                      bind( &Impl::expandInclude, this, _1 ) );
+            std::for_each( pat_r->includes().begin(),
+                           pat_r->includes().end(),
+                           bind( &Impl::expandInclude, this, _1 ) );
           }
       }
 
@@ -107,9 +107,9 @@ namespace zypp
       /** Store all patterns extending \c pat_r in \c _patternMap. */
       void expandExtending( const Pattern::constPtr & pat_r )
       {
-        for_each( _pool.byKindBegin<Pattern>(),
-                  _pool.byKindEnd<Pattern>(),
-                  bind( &Impl::expandIfExtends, this, pat_r, _1 ) );
+        std::for_each( _pool.byKindBegin<Pattern>(),
+                       _pool.byKindEnd<Pattern>(),
+                       bind( &Impl::expandIfExtends, this, pat_r, _1 ) );
       }
 
       /** Store \c extending_r if it extends \c pat_r. */
@@ -119,9 +119,9 @@ namespace zypp
 
         if ( ! extending->extends().empty() )
           {
-            if ( find_if( extending->extends().begin(),
-                          extending->extends().end(),
-                          bind( &Impl::providedBy, this, pat_r, _1 ) )
+            if ( std::find_if( extending->extends().begin(),
+                               extending->extends().end(),
+                               bind( &Impl::providedBy, this, pat_r, _1 ) )
                  != extending->extends().end() )
               {
                 // an extends matches the Pattern
@@ -135,9 +135,9 @@ namespace zypp
       bool providedBy( const Pattern::constPtr & pat_r, const Capability & extends_r )
       {
         std::string index( extends_r.index() );
-        return( find_if( _pool.byCapabilityIndexBegin( index, Dep::PROVIDES ),
-                         _pool.byCapabilityIndexEnd( index, Dep::PROVIDES ),
-                         bind( &Impl::providedByFilter, this, pat_r, extends_r, _1 ) )
+        return( std::find_if( _pool.byCapabilityIndexBegin( index, Dep::PROVIDES ),
+                              _pool.byCapabilityIndexEnd( index, Dep::PROVIDES ),
+                              bind( &Impl::providedByFilter, this, pat_r, extends_r, _1 ) )
                 != _pool.byCapabilityIndexEnd( index, Dep::PROVIDES ) );
       }
 
index 60c658c..fc92749 100644 (file)
@@ -178,9 +178,9 @@ namespace zypp
 
                if ( obj )
                {
-                   CapSet freshens = obj->dep( Dep::FRESHENS );
+                   Capabilities freshens = obj->dep( Dep::FRESHENS );
 
-                   for ( CapSet::const_iterator cap_it = freshens.begin();
+                   for ( Capabilities::const_iterator cap_it = freshens.begin();
                          cap_it != freshens.end();
                          ++cap_it )
                    {
index 9684890..1623a12 100644 (file)
@@ -19,7 +19,6 @@
 #include "zypp/base/String.h"
 
 #include "zypp/zypp_detail/ZYppImpl.h"
-#include "zypp/detail/ResImplTraits.h"
 #include "zypp/solver/detail/Helper.h"
 #include "zypp/target/TargetImpl.h"
 #include "zypp/ZYpp.h"