comparison Plugins/Samples/Common/OrthancPluginCppWrapper.h @ 3664:85acfcc15829 storage-commitment

sample storage commitment plugin, C++ wrapper
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 12 Feb 2020 16:06:58 +0100
parents 94f4a18a79cc
children adb6d8b49283
comparison
equal deleted inserted replaced
3662:d8371b4302ff 3664:85acfcc15829
101 # define HAS_ORTHANC_PLUGIN_CHUNKED_HTTP_SERVER 1 101 # define HAS_ORTHANC_PLUGIN_CHUNKED_HTTP_SERVER 1
102 #else 102 #else
103 # define HAS_ORTHANC_PLUGIN_CHUNKED_HTTP_SERVER 0 103 # define HAS_ORTHANC_PLUGIN_CHUNKED_HTTP_SERVER 0
104 #endif 104 #endif
105 105
106 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 6, 0)
107 # define HAS_ORTHANC_PLUGIN_STORAGE_COMMITMENT_SCP 1
108 #else
109 # define HAS_ORTHANC_PLUGIN_STORAGE_COMMITMENT_SCP 0
110 #endif
111
106 112
107 113
108 namespace OrthancPlugins 114 namespace OrthancPlugins
109 { 115 {
110 typedef void (*RestCallback) (OrthancPluginRestOutput* output, 116 typedef void (*RestCallback) (OrthancPluginRestOutput* output,
1091 GetGlobalContext(), uri.c_str(), 1097 GetGlobalContext(), uri.c_str(),
1092 Internals::ChunkedRestCompatibility<GetHandler, PostHandler, DeleteHandler, PutHandler>); 1098 Internals::ChunkedRestCompatibility<GetHandler, PostHandler, DeleteHandler, PutHandler>);
1093 #endif 1099 #endif
1094 } 1100 }
1095 }; 1101 };
1102
1103
1104
1105 #if HAS_ORTHANC_PLUGIN_STORAGE_COMMITMENT_SCP == 1
1106 class IStorageCommitmentScpHandler : public boost::noncopyable
1107 {
1108 public:
1109 virtual ~IStorageCommitmentScpHandler()
1110 {
1111 }
1112
1113 virtual OrthancPluginStorageCommitmentFailureReason Lookup(const std::string& sopClassUid,
1114 const std::string& sopInstanceUid) = 0;
1115
1116 static OrthancPluginErrorCode Lookup(OrthancPluginStorageCommitmentFailureReason* target,
1117 void* rawHandler,
1118 const char* sopClassUid,
1119 const char* sopInstanceUid);
1120
1121 static void Destructor(void* rawHandler);
1122 };
1123 #endif
1096 } 1124 }