1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/SourceCache.h
12 #ifndef ZYPP_SOURCECACHE_H
13 #define ZYPP_SOURCECACHE_H
19 #include "zypp/base/PtrTypes.h"
21 #include "zypp/Source.h"
23 #include "zypp/Pathname.h"
25 ///////////////////////////////////////////////////////////////////
27 { /////////////////////////////////////////////////////////////////
29 ///////////////////////////////////////////////////////////////////
31 // CLASS NAME : SourceCache
37 friend std::ostream & operator<<( std::ostream & str, const SourceCache & obj );
45 void setCacheDir(const Pathname& dir_r);
48 void storeSource(Source_Ref src);
50 void restoreSources();
52 void removeSource(unsigned id);
54 void removeSource(const Url & url_r, const Pathname & path_r = "/");
57 /** directory to store cached data */
58 static Pathname _cache_dir;
59 /** counter of caches */
60 static unsigned _next_cache_id;
63 ///////////////////////////////////////////////////////////////////
66 /** \relates SourceCache Stream output */
67 extern std::ostream & operator<<( std::ostream & str, const SourceCache & obj );
69 /////////////////////////////////////////////////////////////////
71 ///////////////////////////////////////////////////////////////////
72 #endif // ZYPP_SOURCECACHE_H