#include "zypp/base/PtrTypes.h"
#include "zypp/base/Iterator.h"
+#include "zypp/base/Flags.h"
#include "zypp/Pathname.h"
#include "zypp/ZConfig.h"
Pathname repoPackagesCachePath;
Pathname knownReposPath;
Pathname knownServicesPath;
- Pathname servicePluginsPath;
+ Pathname pluginsPath;
bool probe;
/**
* Target distro ID to be used when refreshing repo index services.
* Repositories not maching this ID will be skipped/removed.
*
- * The value is initialized upon construction to
- * \ref Target::targetDistribution() if the Target is already initialized,
- * otherwise the value is initially empty.
- *
- * If empty, no repositories contained in the index will be skipped.
+ * If empty, \ref Target::targetDistribution() will be used instead.
*/
std::string servicesTargetDistro;
BuildForced
};
- enum RepoRemovePolicy
+ /** Flags for tuning RefreshService */
+ enum RefreshServiceBit
{
-
+ RefreshService_restoreStatus = (1<<0) ///< Force restoring repo enabled/disabled staus
};
+ ZYPP_DECLARE_FLAGS(RefreshServiceFlags,RefreshServiceBit);
+
+ /** Options tuning RefreshService */
+ typedef RefreshServiceFlags RefreshServiceOptions;
+
/** \name Known repositories.
*
*
* \see refreshService(ServiceInfo)
*/
- void refreshServices();
+ void refreshServices( const RefreshServiceOptions & options_r = RefreshServiceOptions() );
/**
* Refresh specific service.
* \throws RepoException if service is not found.
* \throws MediaException If there's a problem downloading the repo index file.
*/
- void refreshService( const std::string & alias );
+ void refreshService( const std::string & alias, const RefreshServiceOptions & options_r = RefreshServiceOptions() );
/** \overload Take alias from ServiceInfo */
- void refreshService( const ServiceInfo & service );
+ void refreshService( const ServiceInfo & service, const RefreshServiceOptions & options_r = RefreshServiceOptions() );
/**
* Modifies service file (rewrites it with new values) and underlying
out);
}
- protected:
- RepoStatus rawMetadataStatus( const RepoInfo &info );
- void setCacheStatus( const RepoInfo &info, const RepoStatus &status );
-
- /**
- * Update timestamp of repository index file for the specified repository \a info.
- * Used in \ref checkIfToRefreshMetadata() for repo.refresh.delay feature.
- */
- void touchIndexFile(const RepoInfo & info);
-
- public:
-
private:
/** Pointer to implementation */
RWCOW_pointer<Impl> _pimpl;
};
+ ZYPP_DECLARE_OPERATORS_FOR_FLAGS(RepoManager::RefreshServiceFlags);
///////////////////////////////////////////////////////////////////
/** \relates RepoManager Stream output */