diff CodeAnalysis/CustomFunctions.json @ 203:28531e615104

documented orthanc.RegisterIncomingHttpRequestFilter() and orthanc.RegisterOnStoredInstanceCallback()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 03 Jul 2024 12:03:09 +0200
parents d7a6e75558ee
children 234681297600
line wrap: on
line diff
--- a/CodeAnalysis/CustomFunctions.json	Wed Jul 03 09:48:42 2024 +0200
+++ b/CodeAnalysis/CustomFunctions.json	Wed Jul 03 12:03:09 2024 +0200
@@ -17,7 +17,9 @@
       {
         "sdk_name" : "callback",
         "sdk_type" : "Callable",
-        "callable_type" : "typing.Callable[[RestOutput, str], None]"
+        "callable_type" : "RestCallback",
+        "callable_protocol_args" : "output: RestOutput, url: str, method: HttpMethod, groups: dict, get: dict, headers: dict, body: bytes=None",
+        "callable_protocol_return" : "None"
       }
     ],
     "return_sdk_type" : "void"
@@ -36,7 +38,52 @@
       {
         "sdk_name" : "callback",
         "sdk_type" : "Callable",
-        "callable_type" : "typing.Callable[[ChangeType, ResourceType, str], None]"
+        "callable_type" : "OnChangeCallback",
+        "callable_protocol_args" : "change_type: ChangeType, resource_type: ResourceType, resource_id: str",
+        "callable_protocol_return" : "None"
+      }
+    ],
+    "return_sdk_type" : "void"
+  },
+
+  {
+    "short_name" : "RegisterOnStoredInstanceCallback",
+    "implementation" : "RegisterOnStoredInstanceCallback",
+    "documentation" : {
+      "description" : [ "Register a callback for received DICOM instances." ],
+      "args" : {
+        "callback" : "The callback function."
+      }
+    },
+    "args" : [
+      {
+        "sdk_name" : "callback",
+        "sdk_type" : "Callable",
+        "callable_type" : "OnStoredInstanceCallback",
+        "callable_protocol_args" : "instance: DicomInstance, instance_id: str",
+        "callable_protocol_return" : "None"
+      }
+    ],
+    "return_sdk_type" : "void"
+  },
+
+  {
+    "comment" : "New in release 3.0",
+    "short_name" : "RegisterIncomingHttpRequestFilter",
+    "implementation" : "RegisterIncomingHttpRequestFilter",
+    "documentation" : {
+      "description" : [ "Callback to filter incoming HTTP requests received by Orthanc." ],
+      "args" : {
+        "callback" : "The callback function."
+      }
+    },
+    "args" : [
+      {
+        "sdk_name" : "callback",
+        "sdk_type" : "Callable",
+        "callable_type" : "IncomingHttpRequestFilter",
+        "callable_protocol_args" : "uri: str, method: HttpMethod, ip: str, headers: dict, get: dict",
+        "callable_protocol_return" : "bool"
       }
     ],
     "return_sdk_type" : "void"