Mercurial > hg > orthanc
annotate OrthancServer/Plugins/Samples/DelayedDeletion/PendingDeletionsDatabase.h @ 5573:823aae1ea72a
removed dependency of HouseKeeper upon Orthanc::Logging
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 26 Apr 2024 16:01:26 +0200 |
parents | 48b8dae6dc77 |
children | f7adfb22e20e |
rev | line source |
---|---|
5264
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
1 /** |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
2 * Orthanc - A Lightweight, RESTful DICOM Store |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
5485
48b8dae6dc77
upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5264
diff
changeset
|
5 * Copyright (C) 2017-2024 Osimis S.A., Belgium |
48b8dae6dc77
upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5264
diff
changeset
|
6 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
5264
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
7 * |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
8 * This program is free software: you can redistribute it and/or |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
9 * modify it under the terms of the GNU General Public License as |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
10 * published by the Free Software Foundation, either version 3 of the |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
11 * License, or (at your option) any later version. |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
12 * |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, but |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
14 * WITHOUT ANY WARRANTY; without even the implied warranty of |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
16 * General Public License for more details. |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
17 * |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
18 * You should have received a copy of the GNU General Public License |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
20 **/ |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
21 |
99751c5a7cfe
added missing copyrights
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5024
diff
changeset
|
22 |
5024 | 23 #pragma once |
24 | |
25 | |
26 #include "../../../../OrthancFramework/Sources/SQLite/Connection.h" | |
27 #include <boost/thread/mutex.hpp> | |
28 #include <boost/noncopyable.hpp> | |
29 | |
30 class PendingDeletionsDatabase : public boost::noncopyable | |
31 { | |
32 private: | |
33 boost::mutex mutex_; | |
34 Orthanc::SQLite::Connection db_; | |
35 | |
36 void Setup(); | |
37 | |
38 public: | |
39 PendingDeletionsDatabase(const std::string& path); | |
40 | |
41 void Enqueue(const std::string& uuid, | |
42 Orthanc::FileContentType type); | |
43 | |
44 bool Dequeue(std::string& uuid, | |
45 Orthanc::FileContentType& type); | |
46 | |
47 unsigned int GetSize(); | |
48 }; |