# HG changeset patch # User Alain Mazy # Date 1752748662 -7200 # Node ID 390a09b5b6bf3e42b9df0f366d1ac1832047d441 # Parent a8c0be03dae39508f0f5387f66c4093d5175b516 CPP wrapper: GetGetArguments diff -r a8c0be03dae3 -r 390a09b5b6bf OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp --- a/OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Tue Jul 15 17:00:16 2025 +0200 +++ b/OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Thu Jul 17 12:37:42 2025 +0200 @@ -4122,6 +4122,16 @@ } #endif + void GetGetArguments(GetArguments& result, const OrthancPluginHttpRequest* request) + { + result.clear(); + + for (uint32_t i = 0; i < request->getCount; ++i) + { + result[request->getKeys[i]] = request->getValues[i]; + } + } + void GetHttpHeaders(HttpHeaders& result, const OrthancPluginHttpRequest* request) { result.clear(); diff -r a8c0be03dae3 -r 390a09b5b6bf OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h --- a/OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h Tue Jul 15 17:00:16 2025 +0200 +++ b/OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.h Thu Jul 17 12:37:42 2025 +0200 @@ -180,6 +180,8 @@ { typedef std::map HttpHeaders; + typedef std::map GetArguments; + typedef void (*RestCallback) (OrthancPluginRestOutput* output, const char* url, const OrthancPluginHttpRequest* request); @@ -1431,6 +1433,9 @@ // helper method to re-serialize the get arguments from the SDK into a string void SerializeGetArguments(std::string& output, const OrthancPluginHttpRequest* request); +// helper method to convert Get arguments from the plugin SDK to a std::map +void GetGetArguments(GetArguments& result, const OrthancPluginHttpRequest* request); + #if HAS_ORTHANC_PLUGIN_WEBDAV == 1 class IWebDavCollection : public boost::noncopyable {