#include "zypp/base/PtrTypes.h"
#include "zypp/base/Iterator.h"
+#include "zypp/base/Flags.h"
#include "zypp/Pathname.h"
#include "zypp/ZConfig.h"
* 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 status
+ RefreshService_forceRefresh = (1<<1), ///< Force refresh even if TTL is not reached
};
+ 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
/** Pointer to implementation */
RWCOW_pointer<Impl> _pimpl;
};
+ ZYPP_DECLARE_OPERATORS_FOR_FLAGS(RepoManager::RefreshServiceFlags);
///////////////////////////////////////////////////////////////////
/** \relates RepoManager Stream output */