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 int Target::commit(ResPool pool_r, int medianr, PoolItemList & errors_r
83 , PoolItemList & remaining_r, PoolItemList & srcremaining_r)
84 { return _pimpl->commit(pool_r, medianr, errors_r, remaining_r, srcremaining_r); }
86 bool Target::providesFile (const std::string & name_str, const std::string & path_str) const
87 { return _pimpl->providesFile (name_str, path_str); }
89 ResObject::constPtr Target::whoOwnsFile (const std::string & path_str) const
90 { return _pimpl->whoOwnsFile (path_str); }
92 std::ostream & Target::dumpOn( std::ostream & str ) const
93 { return _pimpl->dumpOn( str ); }
95 void Target::getResolvablesToInsDel ( const ResPool pool_r,
96 PoolItemList & dellist_r,
97 PoolItemList & instlist_r,
98 PoolItemList & srclist_r ) const
99 { _pimpl->getResolvablesToInsDel( pool_r, dellist_r, instlist_r, srclist_r ); }
101 bool Target::setInstallationLogfile(const Pathname & path_r)
102 { return _pimpl->setInstallationLogfile(path_r); }
104 /////////////////////////////////////////////////////////////////
106 ///////////////////////////////////////////////////////////////////