1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/Target.cc
16 #include "zypp/Target.h"
17 #include "zypp/target/TargetImpl.h"
21 ///////////////////////////////////////////////////////////////////
23 { /////////////////////////////////////////////////////////////////
25 IMPL_PTR_TYPE(Target);
27 ///////////////////////////////////////////////////////////////////
29 // METHOD NAME : Target::Target
32 Target::Target( const Pathname & root )
33 : _pimpl( new Impl(root) )
37 ///////////////////////////////////////////////////////////////////
39 // METHOD NAME : Target::Target
42 Target::Target( const Impl_Ptr & impl_r )
48 Target_Ptr Target::_nullimpl;
50 /** Null implementation */
51 Target_Ptr Target::nullimpl()
55 _nullimpl = new Target(target::TargetImpl::nullimpl());
61 ///////////////////////////////////////////////////////////////////
63 // Forward to TargetImpl:
65 ///////////////////////////////////////////////////////////////////
67 const ResStore & Target::resolvables()
68 { return _pimpl->resolvables(); }
70 target::rpm::RpmDb & Target::rpmDb()
71 { return _pimpl->rpm(); }
73 #ifndef STORAGE_DISABLED
74 /** enables the storage target */
75 bool Target::isStorageEnabled() const
76 { return _pimpl->isStorageEnabled(); }
78 void Target::enableStorage(const Pathname &root_r)
79 { _pimpl->enableStorage(root_r); }
82 Pathname Target::root() const
83 { return _pimpl->root(); }
85 bool Target::providesFile (const std::string & name_str, const std::string & path_str) const
86 { return _pimpl->providesFile (name_str, path_str); }
88 ResObject::constPtr Target::whoOwnsFile (const std::string & path_str) const
89 { return _pimpl->whoOwnsFile (path_str); }
91 std::ostream & Target::dumpOn( std::ostream & str ) const
92 { return _pimpl->dumpOn( str ); }
94 void Target::getResolvablesToInsDel ( const ResPool pool_r,
95 PoolItemList & dellist_r,
96 PoolItemList & instlist_r,
97 PoolItemList & srclist_r ) const
98 { _pimpl->getResolvablesToInsDel( pool_r, dellist_r, instlist_r, srclist_r ); }
100 bool Target::setInstallationLogfile(const Pathname & path_r)
101 { return _pimpl->setInstallationLogfile(path_r); }
103 /////////////////////////////////////////////////////////////////
105 ///////////////////////////////////////////////////////////////////