Adam Lesinski | 282e181 | 2014-01-23 18:17:42 -0800 | [diff] [blame] | 1 | // |
| 2 | // Copyright 2011 The Android Open Source Project |
| 3 | // |
| 4 | #ifndef MOCKCACHEUPDATER_H |
| 5 | #define MOCKCACHEUPDATER_H |
| 6 | |
| 7 | #include <utils/String8.h> |
| 8 | #include "CacheUpdater.h" |
| 9 | |
| 10 | using namespace android; |
| 11 | |
| 12 | class MockCacheUpdater : public CacheUpdater { |
| 13 | public: |
| 14 | |
| 15 | MockCacheUpdater() |
| 16 | : deleteCount(0), processCount(0) { }; |
| 17 | |
| 18 | // Make sure all the directories along this path exist |
| 19 | virtual void ensureDirectoriesExist(String8 path) |
| 20 | { |
| 21 | // Nothing to do |
| 22 | }; |
| 23 | |
| 24 | // Delete a file |
| 25 | virtual void deleteFile(String8 path) { |
| 26 | deleteCount++; |
| 27 | }; |
| 28 | |
| 29 | // Process an image from source out to dest |
| 30 | virtual void processImage(String8 source, String8 dest) { |
| 31 | processCount++; |
| 32 | }; |
| 33 | |
| 34 | // DATA MEMBERS |
| 35 | int deleteCount; |
| 36 | int processCount; |
| 37 | private: |
| 38 | }; |
| 39 | |
| 40 | #endif // MOCKCACHEUPDATER_H |