comparison OrthancServer/Plugins/Samples/MultitenantDicom/StoreRequestHandler.h @ 5273:7cb1b851f5c8

Added a sample plugin bringing multitenant DICOM support through labels
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 14 Apr 2023 11:49:24 +0200
parents
children a8385880902f
comparison
equal deleted inserted replaced
5272:a45e8b6115f6 5273:7cb1b851f5c8
1 /**
2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
4 * Department, University Hospital of Liege, Belgium
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium
6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
7 *
8 * This program is free software: you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation, either version 3 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this program. If not, see
20 * <http://www.gnu.org/licenses/>.
21 **/
22
23
24 #pragma once
25
26 #include "../../../../OrthancFramework/Sources/DicomNetworking/IStoreRequestHandler.h"
27
28
29 class StoreRequestHandler : public Orthanc::IStoreRequestHandler
30 {
31 private:
32 // Everything is constant, so no need for a mutex
33 const std::set<std::string> labels_;
34 const std::set<Orthanc::ResourceType> levels_;
35
36 public:
37 StoreRequestHandler(const std::set<std::string>& labels,
38 const std::set<Orthanc::ResourceType>& levels) :
39 labels_(labels),
40 levels_(levels)
41 {
42 }
43
44 virtual uint16_t Handle(DcmDataset& dicom,
45 const std::string& remoteIp,
46 const std::string& remoteAet,
47 const std::string& calledAet) ORTHANC_OVERRIDE;
48 };