diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-29 14:44:36 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-29 14:44:36 (GMT) |
| commit | 680a36549adaed0c3ce7e8906fadbdf190b0b3b0 (patch) | |
| tree | 21ca16411c1687bb212369a59c5f3de2a0cf023b /src/preview/PreviewModel.h | |
| parent | 7c53ca7799832920066c23cfad2f1d7fa82233c7 (diff) | |
| download | powder-680a36549adaed0c3ce7e8906fadbdf190b0b3b0.zip powder-680a36549adaed0c3ce7e8906fadbdf190b0b3b0.tar.gz | |
Background retrieval of save info and save list.
Diffstat (limited to 'src/preview/PreviewModel.h')
| -rw-r--r-- | src/preview/PreviewModel.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/preview/PreviewModel.h b/src/preview/PreviewModel.h index 23ac2d7..e0e5966 100644 --- a/src/preview/PreviewModel.h +++ b/src/preview/PreviewModel.h @@ -9,6 +9,7 @@ #define PREVIEWMODEL_H_ #include <vector> +#include <pthread.h> #include "PreviewView.h" #include "search/Save.h" #include "search/Thumbnail.h" @@ -23,6 +24,22 @@ class PreviewModel { Thumbnail * savePreview; void notifyPreviewChanged(); void notifySaveChanged(); + + //Background retrieval + int tSaveID; + int tSaveDate; + + bool updateSavePreviewWorking; + volatile bool updateSavePreviewFinished; + pthread_t updateSavePreviewThread; + static void * updateSavePreviewTHelper(void * obj); + void * updateSavePreviewT(); + + bool updateSaveInfoWorking; + volatile bool updateSaveInfoFinished; + pthread_t updateSaveInfoThread; + static void * updateSaveInfoTHelper(void * obj); + void * updateSaveInfoT(); public: PreviewModel(); Thumbnail * GetPreview(); @@ -31,6 +48,7 @@ public: void UpdateSave(int saveID, int saveDate); bool GetDoOpen(); void SetDoOpen(bool doOpen); + void Update(); virtual ~PreviewModel(); }; |
