Imported Upstream version 14.45.0
[platform/upstream/libzypp.git] / zypp / ZYpp.h
index 2e68fc1..f193f97 100644 (file)
 #include "zypp/base/ReferenceCounted.h"
 #include "zypp/base/NonCopyable.h"
 #include "zypp/base/PtrTypes.h"
+#include "zypp/APIConfig.h"
+
+#include "zypp/ZConfig.h"
+#include "zypp/ManagedFile.h"
 
-#include "zypp/base/Deprecated.h"
 #include "zypp/ZYppCommit.h"
 #include "zypp/ResTraits.h"
 
@@ -39,8 +42,6 @@ namespace zypp
   class ZYppFactory;
   class ResPool;
   class ResPoolProxy;
-  class ResStore;
-  class Locale;
   class KeyRing;
 
   ///////////////////////////////////////////////////////////////////
@@ -61,8 +62,8 @@ namespace zypp
   public:
 
     /**
-     * Access to the main resolvable pool
-     * \ref zypp::ResPool
+     * Access to the global resolvable pool.
+     * Same as \ref zypp::ResPool::instance
      */
     ResPool pool() const;
 
@@ -72,10 +73,6 @@ namespace zypp
     */
     ResPoolProxy poolProxy() const;
 
-    void addResolvables (const ResStore& store, bool installed = false);
-
-    void removeResolvables (const ResStore& store);
-
     DiskUsageCounter::MountPointSet diskUsage();
 
     void setPartitions(const DiskUsageCounter::MountPointSet &mp);
@@ -88,17 +85,18 @@ namespace zypp
      */
     Target_Ptr target() const;
 
-    /**
-     * \throws Exception
-     * just init the target, dont populate store or pool
+    /** Same as \ref target but returns NULL if target is not
+     *  initialized, instead of throwing.
      */
-    void initializeTarget(const Pathname & root);
+    Target_Ptr getTarget() const;
 
     /**
      * \throws Exception
-     * if commit_only == true, just init the target, dont populate store or pool
+     * Just init the target, dont populate store or pool.
+     * If \c doRebuild_r is \c true, an already existing
+     * database is rebuilt (rpm --rebuilddb ).
      */
-    ZYPP_DEPRECATED void initTarget(const Pathname & root, bool commit_only = false);
+    void initializeTarget(const Pathname & root, bool doRebuild_r = false);
 
     /**
      * \throws Exception
@@ -119,43 +117,17 @@ namespace zypp
     /** Install a source package on the Target.
      * \throws Exception
      */
-    void installSrcPackage( const ResTraits<SrcPackage>::constPtrType & srcPackage_r );
+    void installSrcPackage( const SrcPackage_constPtr & srcPackage_r );
 
-  public:
-    /** */
-    Resolver_Ptr resolver() const;
-    KeyRing_Ptr keyRing() const;
-  public:
-    /** Set the preferred locale for translated labels, descriptions,
-     *  etc. passed to the UI.
+    /** Provides a source package on the Target.
+     * \throws Exception
      */
-    void setTextLocale( const Locale & textLocale_r );
-    /** */
-    Locale getTextLocale() const;
+    ManagedFile provideSrcPackage( const SrcPackage_constPtr & srcPackage_r );
 
   public:
-    typedef std::set<Locale> LocaleSet;
-    /** Set the requested locales.
-     * Languages to be supported by the system, e.g. language specific
-     * packages to be installed. This function operates on the pool,
-     * so only the locales that are available as resolvables
-     * are marked as requested. The rest is ignored.
-    */
-    void setRequestedLocales( const LocaleSet & locales_r );
     /** */
-    LocaleSet getRequestedLocales() const;
-
-    /**
-     * Get the set of available locales.
-     * This is computed from the package data so it actually
-     * represents all locales packages claim to support.
-     */
-    LocaleSet getAvailableLocales() const;
-
-    /**
-     * internal use only
-     **/
-    void availableLocale( const Locale & locale_r );
+    Resolver_Ptr resolver() const;
+    KeyRing_Ptr keyRing() const;
 
   public:
     /** Get the path where zypp related plugins store persistent data and caches   */
@@ -167,13 +139,6 @@ namespace zypp
     /** set the home, if you need to change it */
     void setHomePath( const Pathname & path );
 
-    /** Get the system architecture.   */
-    Arch architecture() const;
-    /** Set the system architecture.
-       This should be used for testing/debugging only since the Target backend
-       won't be able to install incompatible packages ;-)   */
-    void setArchitecture( const Arch & arch );
-
   protected:
     /** Dtor */
     virtual ~ZYpp();