All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
LegacyAndroidHttpCacheCleaner.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Helpers.h"
7 #include <iosfwd>
8 #include <string>
9 #include <vector>
10 
11 namespace Eegeo
12 {
13  namespace Android
14  {
15  namespace Cache
16  {
18  {
19  public:
21  Helpers::IFileIO& fileIO
22  );
23 
24  bool TryCleanLegacyCache();
25 
26  private:
27  bool CleanVersion(std::fstream& stream, size_t& size, int cacheVersionNumber);
28  bool CleanOriginalLegacyVersion(std::fstream& stream, size_t& size);
29  bool RemoveFiles(std::vector<std::string>& filesToRemove);
30 
31  Helpers::IFileIO& m_fileIO;
32  };
33  }
34  }
35 }