diff OrthancServer/ServerIndex.h @ 269:f6fdf5abe751

recycling up and running
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 07 Dec 2012 14:46:44 +0100
parents 4bc02e2254ec
children 337c506461d2
line wrap: on
line diff
--- a/OrthancServer/ServerIndex.h	Fri Dec 07 13:43:35 2012 +0100
+++ b/OrthancServer/ServerIndex.h	Fri Dec 07 14:46:44 2012 +0100
@@ -62,6 +62,9 @@
     std::auto_ptr<Internals::ServerIndexListener> listener_;
     std::auto_ptr<DatabaseWrapper> db_;
 
+    uint64_t maximumStorageSize_;
+    unsigned int maximumPatients_;
+
     void MainDicomTagsToJson(Json::Value& result,
                              int64_t resourceId);
 
@@ -72,6 +75,8 @@
     void Recycle(uint64_t instanceSize,
                  const std::string& newPatientId);
 
+    void StandaloneRecycling();
+
   public:
     typedef std::list<FileInfo> Attachments;
 
@@ -80,6 +85,22 @@
 
     ~ServerIndex();
 
+    uint64_t GetMaximumStorageSize() const
+    {
+      return maximumStorageSize_;
+    }
+
+    uint64_t GetMaximumPatientCount() const
+    {
+      return maximumPatients_;
+    }
+
+    // "size == 0" means no limit on the storage size
+    void SetMaximumStorageSize(uint64_t size);
+
+    // "count == 0" means no limit on the number of patients
+    void SetMaximumPatientCount(unsigned int count);
+
     StoreStatus Store(const DicomMap& dicomSummary,
                       const Attachments& attachments,
                       const std::string& remoteAet);