diff OrthancServer/Sources/ServerIndex.h @ 4558:2f4d7ec9b993 db-changes

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 04 Mar 2021 16:58:35 +0100
parents 456ed3fcff81
children 19b1921aee06
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerIndex.h	Thu Mar 04 15:22:55 2021 +0100
+++ b/OrthancServer/Sources/ServerIndex.h	Thu Mar 04 16:58:35 2021 +0100
@@ -155,32 +155,13 @@
                       bool hasPixelDataOffset,
                       uint64_t pixelDataOffset);
 
-    void GetGlobalStatistics(/* out */ uint64_t& diskSize,
-                             /* out */ uint64_t& uncompressedSize,
-                             /* out */ uint64_t& countPatients, 
-                             /* out */ uint64_t& countStudies, 
-                             /* out */ uint64_t& countSeries, 
-                             /* out */ uint64_t& countInstances);
-
     bool DeleteResource(Json::Value& target /* out */,
                         const std::string& uuid,
                         ResourceType expectedType);
 
-    void GetChanges(Json::Value& target,
-                    int64_t since,
-                    unsigned int maxResults);
-
-    void GetLastChange(Json::Value& target);
-
     void LogExportedResource(const std::string& publicId,
                              const std::string& remoteModality);
 
-    void GetExportedResources(Json::Value& target,
-                              int64_t since,
-                              unsigned int maxResults);
-
-    void GetLastExportedResource(Json::Value& target);
-
     bool IsProtectedPatient(const std::string& publicId);
 
     void SetProtectedPatient(const std::string& publicId,
@@ -335,17 +316,63 @@
         return db_.GetAllPublicIds(target, resourceType, since, limit);
       }  
 
+      void GetChanges(std::list<ServerIndexChange>& target /*out*/,
+                      bool& done /*out*/,
+                      int64_t since,
+                      uint32_t maxResults)
+      {
+        db_.GetChanges(target, done, since, maxResults);
+      }
+
       void GetChildrenPublicId(std::list<std::string>& target,
                                int64_t id)
       {
         db_.GetChildrenPublicId(target, id);
       }
 
+      void GetExportedResources(std::list<ExportedResource>& target /*out*/,
+                                bool& done /*out*/,
+                                int64_t since,
+                                uint32_t maxResults)
+      {
+        return db_.GetExportedResources(target, done, since, maxResults);
+      }
+
+      void GetLastChange(std::list<ServerIndexChange>& target /*out*/)
+      {
+        db_.GetLastChange(target);
+      }
+
+      void GetLastExportedResource(std::list<ExportedResource>& target /*out*/)
+      {
+        return db_.GetLastExportedResource(target);
+      }
+
+      int64_t GetLastChangeIndex()
+      {
+        return db_.GetLastChangeIndex();
+      }
+
       void GetMainDicomTags(DicomMap& map,
                             int64_t id)
       {
         db_.GetMainDicomTags(map, id);
       }
+
+      uint64_t GetResourceCount(ResourceType resourceType)
+      {
+        return db_.GetResourceCount(resourceType);
+      }
+      
+      uint64_t GetTotalCompressedSize()
+      {
+        return db_.GetTotalCompressedSize();
+      }
+    
+      uint64_t GetTotalUncompressedSize()
+      {
+        return db_.GetTotalUncompressedSize();
+      }
       
       bool LookupAttachment(FileInfo& attachment,
                             int64_t id,
@@ -442,8 +469,28 @@
                      size_t since,
                      size_t limit);
 
+    void GetGlobalStatistics(/* out */ uint64_t& diskSize,
+                             /* out */ uint64_t& uncompressedSize,
+                             /* out */ uint64_t& countPatients, 
+                             /* out */ uint64_t& countStudies, 
+                             /* out */ uint64_t& countSeries, 
+                             /* out */ uint64_t& countInstances);
+
     bool LookupAttachment(FileInfo& attachment,
                           const std::string& instancePublicId,
                           FileContentType contentType);
+
+    void GetChanges(Json::Value& target,
+                    int64_t since,
+                    unsigned int maxResults);
+
+    void GetLastChange(Json::Value& target);
+
+    void GetExportedResources(Json::Value& target,
+                              int64_t since,
+                              unsigned int maxResults);
+
+    void GetLastExportedResource(Json::Value& target);
+
   };
 }