view OrthancServer/Plugins/Samples/DelayedDeletion/PendingDeletionsDatabase.h @ 5151:a72e00a23191

allow OtherPatientIDs as a valid tag name as an input since this name is still used in outputs
author Alain Mazy <am@osimis.io>
date Tue, 31 Jan 2023 16:21:44 +0100
parents c2ebc47f4f18
children 99751c5a7cfe
line wrap: on
line source

#pragma once


#include "../../../../OrthancFramework/Sources/SQLite/Connection.h"
#include <boost/thread/mutex.hpp>
#include <boost/noncopyable.hpp>

class PendingDeletionsDatabase : public boost::noncopyable
{
private:
  boost::mutex                 mutex_;
  Orthanc::SQLite::Connection  db_;

  void Setup();
  
public:
  PendingDeletionsDatabase(const std::string& path);

  void Enqueue(const std::string& uuid,
               Orthanc::FileContentType type);
  
  bool Dequeue(std::string& uuid,
               Orthanc::FileContentType& type);

  unsigned int GetSize();
};