#include "zypp/source/Builtin.h"
#include "zypp/media/MediaAccess.h"
#include "zypp/SourceManager.h"
+#include "zypp/Pathname.h"
using std::endl;
using namespace zypp::source;
// CLASS NAME : SourceCache
//
///////////////////////////////////////////////////////////////////
- const Pathname SourceCache::_cache_dir = "/var/adm/ZYPP/SourceCache";
+ Pathname SourceCache::_cache_dir = "/var/adm/ZYPP/SourceCache";
unsigned SourceCache::_next_cache_id = 0;
///////////////////////////////////////////////////////////////////
//
SourceCache::~SourceCache()
{}
+
+ void SourceCache::setCacheDir( const Pathname & dir_r )
+ {
+ _cache_dir = dir_r;
+ }
void SourceCache::storeSource(Source_Ref src)
{
//
// CLASS NAME : SourceCache
//
+ // singleton
+ //
class SourceCache
{
friend std::ostream & operator<<( std::ostream & str, const SourceCache & obj );
SourceCache();
/** Dtor */
~SourceCache();
+
+ void setCacheDir(const Pathname& dir_r);
public:
void storeSource(Source_Ref src);
private:
/** directory to store cached data */
- static const Pathname _cache_dir;
+ static Pathname _cache_dir;
/** counter of caches */
static unsigned _next_cache_id;