5024
|
1 #pragma once
|
|
2
|
|
3
|
|
4 #include "../../../../OrthancFramework/Sources/SQLite/Connection.h"
|
|
5 #include <boost/thread/mutex.hpp>
|
|
6 #include <boost/noncopyable.hpp>
|
|
7
|
|
8 class PendingDeletionsDatabase : public boost::noncopyable
|
|
9 {
|
|
10 private:
|
|
11 boost::mutex mutex_;
|
|
12 Orthanc::SQLite::Connection db_;
|
|
13
|
|
14 void Setup();
|
|
15
|
|
16 public:
|
|
17 PendingDeletionsDatabase(const std::string& path);
|
|
18
|
|
19 void Enqueue(const std::string& uuid,
|
|
20 Orthanc::FileContentType type);
|
|
21
|
|
22 bool Dequeue(std::string& uuid,
|
|
23 Orthanc::FileContentType& type);
|
|
24
|
|
25 unsigned int GetSize();
|
|
26 };
|