libzypp  12.16.5
ZYpp.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_ZYPP_H
13 #define ZYPP_ZYPP_H
14 
15 #include <iosfwd>
16 
18 #include "zypp/base/NonCopyable.h"
19 #include "zypp/base/PtrTypes.h"
20 #include "zypp/APIConfig.h"
21 
22 #include "zypp/ZConfig.h"
23 #include "zypp/ManagedFile.h"
24 
25 #include "zypp/ZYppCommit.h"
26 #include "zypp/ResTraits.h"
27 
28 #include "zypp/Target.h"
29 #include "zypp/Resolver.h"
30 #include "zypp/KeyRing.h"
31 #include "zypp/DiskUsageCounter.h"
32 
34 namespace zypp
35 {
36 
37  namespace zypp_detail
38  {
39  class ZYppImpl;
40  }
41 
42  class ZYppFactory;
43  class ResPool;
44  class ResPoolProxy;
45  class KeyRing;
46 
48  //
49  // CLASS NAME : ZYpp
50  //
56  {
57  public:
58 
59  typedef intrusive_ptr<ZYpp> Ptr;
60  typedef intrusive_ptr<const ZYpp> constPtr;
61 
62  public:
63 
68  ResPool pool() const;
69 
74  ResPoolProxy poolProxy() const;
75 
77 
79 
81 
82  public:
86  Target_Ptr target() const;
87 
91  Target_Ptr getTarget() const;
92 
99  void initializeTarget(const Pathname & root, bool doRebuild_r = false);
100 
104  void finishTarget();
105 
106 
107  public:
109 
115  ZYppCommitResult commit( const ZYppCommitPolicy & policy_r );
116 
120  void installSrcPackage( const SrcPackage_constPtr & srcPackage_r );
121 
125  ManagedFile provideSrcPackage( const SrcPackage_constPtr & srcPackage_r );
126 
127  public:
129  Resolver_Ptr resolver() const;
130  KeyRing_Ptr keyRing() const;
131  public:
136  ZYPP_DEPRECATED void setTextLocale( const Locale & textLocale_r )
137  { ZConfig::instance().setTextLocale( textLocale_r ); }
140  { return ZConfig::instance().textLocale(); }
141 
142  public:
154  void setRequestedLocales( const LocaleSet & locales_r ) ZYPP_DEPRECATED;
155 
158 
167 
168  public:
170  Pathname homePath() const;
171 
173  Pathname tmpPath() const;
174 
176  void setHomePath( const Pathname & path );
177 
181  ZYPP_DEPRECATED Arch architecture() const
182  { return ZConfig::instance().systemArchitecture(); }
188  ZYPP_DEPRECATED void setArchitecture( const Arch & arch )
190 
191  public:
192 
198  { return 0; }
199 
200  protected:
202  virtual ~ZYpp();
204  virtual std::ostream & dumpOn( std::ostream & str ) const;
205  private:
207  friend class ZYppFactory;
208 
211  typedef shared_ptr<Impl> Impl_Ptr;
213  explicit
214  ZYpp( const Impl_Ptr & impl_r );
215  private:
218  };
220 
222 } // namespace zypp
224 #endif // ZYPP_ZYPP_H