diff OrthancServer/Sources/ServerEnumerations.h @ 5829:963945d780d6 find-refactoring tip

tools/find ResponseContent
author Alain Mazy <am@orthanc.team>
date Mon, 07 Oct 2024 18:10:08 +0200
parents 8a8756b2dd0b
children
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerEnumerations.h	Mon Oct 07 15:19:26 2024 +0200
+++ b/OrthancServer/Sources/ServerEnumerations.h	Mon Oct 07 18:10:08 2024 +0200
@@ -121,6 +121,31 @@
     ConstraintType_List
   };
 
+  enum ResponseContentFlags
+  {
+    ResponseContentFlags_ID                   = (1 << 0),
+    ResponseContentFlags_MainDicomTags        = (1 << 1),
+    ResponseContentFlags_MetadataLegacy       = (1 << 2),    // when "Expand": true -> all metadata are included at root level
+    ResponseContentFlags_AttachmentsLegacy    = (1 << 3),    // when "Expand": true -> include attachments info at instance level
+    ResponseContentFlags_Metadata             = (1 << 4),    // all metadata are listed in a "Metadata" field
+    ResponseContentFlags_Attachments          = (1 << 5),    // all attachments are listed in a "Attachments" field
+    ResponseContentFlags_Status               = (1 << 6),
+    ResponseContentFlags_Parent               = (1 << 7),
+    ResponseContentFlags_Children             = (1 << 8),
+    ResponseContentFlags_Labels               = (1 << 9),
+    ResponseContentFlags_IsStable             = (1 << 10),
+
+    // Some predefined combinations
+    ResponseContentFlags_Default  = (ResponseContentFlags_ID |
+                                     ResponseContentFlags_MainDicomTags |
+                                     ResponseContentFlags_MetadataLegacy |
+                                     ResponseContentFlags_AttachmentsLegacy | 
+                                     ResponseContentFlags_Status | 
+                                     ResponseContentFlags_Parent | 
+                                     ResponseContentFlags_Children | 
+                                     ResponseContentFlags_Labels |
+                                     ResponseContentFlags_IsStable)  // equivalent to "Expand": true
+  };
 
   /**
    * WARNING: Do not change the explicit values in the enumerations
@@ -250,6 +275,8 @@
 
   Verbosity StringToVerbosity(const std::string& str);
 
+  ResponseContentFlags StringToResponseContent(const std::string& str);
+
   std::string EnumerationToString(FileContentType type);
 
   std::string GetFileContentMime(FileContentType type);