comparison OrthancServer/Plugins/Samples/DelayedDeletion/PendingDeletionsDatabase.h @ 5024:c2ebc47f4f18 delayed-deletion

wip: adding DelayedDeletion plugin
author Alain Mazy <am@osimis.io>
date Mon, 20 Jun 2022 16:53:21 +0200
parents
children 99751c5a7cfe
comparison
equal deleted inserted replaced
5021:559b35d18ef7 5024:c2ebc47f4f18
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 };