#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"
class ZYppFactory;
class ResPool;
class ResPoolProxy;
- class ResStore;
- class Locale;
class KeyRing;
///////////////////////////////////////////////////////////////////
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;
*/
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);
*/
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
/** 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 */
/** 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();