1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
17 #include "zypp/base/ReferenceCounted.h"
18 #include "zypp/base/NonCopyable.h"
19 #include "zypp/base/PtrTypes.h"
20 #include "zypp/Target.h"
21 #include "zypp/Resolver.h"
23 ///////////////////////////////////////////////////////////////////
25 { /////////////////////////////////////////////////////////////////
39 ///////////////////////////////////////////////////////////////////
44 class ZYpp : public base::ReferenceCounted, private base::NonCopyable
48 typedef intrusive_ptr<ZYpp> Ptr;
49 typedef intrusive_ptr<const ZYpp> constPtr;
53 /** Pool of ResStatus for individual ResObjetcs. */
56 /** Pool of ui::Selectable.
57 * Based on the ResPool, ui::Selectable groups ResObjetcs of
60 ResPoolProxy poolProxy() const;
63 //SourceFeed_Ref sourceFeed() const;
65 void addResolvables (const ResStore& store, bool installed = false);
67 void removeResolvables (const ResStore& store);
72 Target_Ptr target() const;
76 * if commit_only == true, just init, don't populate store or pool
78 void initTarget(const Pathname & root, bool commit_only = false);
86 Resolver_Ptr resolver() const;
89 /** Set the preferd locale for translated labels, descriptions,
90 * etc. passed to the UI.
92 void setTextLocale( const Locale & textLocale_r );
94 Locale getTextLocale() const;
97 typedef std::set<Locale> LocaleSet;
98 /** Set the requested locales.
99 * Languages to be supported by the system, e.g. language specific
100 * packages to be installed.
102 void setRequestedLocales( const LocaleSet & locales_r );
104 LocaleSet getRequestedLocales() const;
110 virtual std::ostream & dumpOn( std::ostream & str ) const;
113 friend class ZYppFactory;
115 typedef zypp_detail::ZYppImpl Impl;
116 typedef shared_ptr<Impl> Impl_Ptr;
119 ZYpp( const Impl_Ptr & impl_r );
121 /** Pointer to implementation */
122 RW_pointer<Impl> _pimpl;
124 ///////////////////////////////////////////////////////////////////
126 /////////////////////////////////////////////////////////////////
128 ///////////////////////////////////////////////////////////////////
129 #endif // ZYPP_ZYPP_H