annotate OrthancServer/Sources/IServerListener.h @ 5857:39996519afce find-refactoring

fix limit/since restrictions
author Alain Mazy <am@orthanc.team>
date Mon, 04 Nov 2024 22:06:45 +0100
parents f7adfb22e20e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1433
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
1900
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1574
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
1433
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
5640
f7adfb22e20e updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5485
diff changeset
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium
f7adfb22e20e updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5485
diff changeset
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
5485
48b8dae6dc77 upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5410
diff changeset
7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
1433
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 *
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * This program is free software: you can redistribute it and/or
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * modify it under the terms of the GNU General Public License as
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * published by the Free Software Foundation, either version 3 of the
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * License, or (at your option) any later version.
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 *
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful, but
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * General Public License for more details.
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 *
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 **/
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #pragma once
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 #include "DicomInstanceToStore.h"
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 #include "ServerIndexChange.h"
5410
16cbfefa15e9 Solved a deadlock related to the Job Engine events and plugins
Alain Mazy <am@osimis.io>
parents: 5185
diff changeset
28 #include "JobEvent.h"
1433
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 #include <json/value.h>
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 namespace Orthanc
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 {
2617
912a767911b0 back to a single Lua context
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2447
diff changeset
34 class IServerListener : public boost::noncopyable
1433
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 {
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 public:
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 virtual ~IServerListener()
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 {
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 }
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 virtual void SignalStoredInstance(const std::string& publicId,
3916
0e3849268a55 new plugin SDK primitives related to OrthancPluginDicomInstance
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3640
diff changeset
42 const DicomInstanceToStore& instance,
2738
3a55b77339ff fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2617
diff changeset
43 const Json::Value& simplifiedTags) = 0;
3a55b77339ff fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2617
diff changeset
44
1433
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 virtual void SignalChange(const ServerIndexChange& change) = 0;
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46
5410
16cbfefa15e9 Solved a deadlock related to the Job Engine events and plugins
Alain Mazy <am@osimis.io>
parents: 5185
diff changeset
47 virtual void SignalJobEvent(const JobEvent& event) = 0;
16cbfefa15e9 Solved a deadlock related to the Job Engine events and plugins
Alain Mazy <am@osimis.io>
parents: 5185
diff changeset
48
1574
0c29ebe80ac9 give access to full request origin in ReceivedInstanceFilter (Lua)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1433
diff changeset
49 virtual bool FilterIncomingInstance(const DicomInstanceToStore& instance,
0c29ebe80ac9 give access to full request origin in ReceivedInstanceFilter (Lua)
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1433
diff changeset
50 const Json::Value& simplified) = 0;
4796
94616af363ec added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents: 4437
diff changeset
51
4921
309fb4f02704 fix signature of OrthancPluginIncomingCStoreInstanceFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4892
diff changeset
52 /**
309fb4f02704 fix signature of OrthancPluginIncomingCStoreInstanceFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4892
diff changeset
53 * Returns "true" iff some DICOM instance received by the DICOM
309fb4f02704 fix signature of OrthancPluginIncomingCStoreInstanceFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4892
diff changeset
54 * SCP is to be accepted. If the instance is discarded,
309fb4f02704 fix signature of OrthancPluginIncomingCStoreInstanceFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4892
diff changeset
55 * "dimseStatus" must contain the DIMSE status that is sent back
309fb4f02704 fix signature of OrthancPluginIncomingCStoreInstanceFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4892
diff changeset
56 * to the DICOM SCU.
309fb4f02704 fix signature of OrthancPluginIncomingCStoreInstanceFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4892
diff changeset
57 **/
309fb4f02704 fix signature of OrthancPluginIncomingCStoreInstanceFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4892
diff changeset
58 virtual bool FilterIncomingCStoreInstance(uint16_t& dimseStatus,
309fb4f02704 fix signature of OrthancPluginIncomingCStoreInstanceFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4892
diff changeset
59 const DicomInstanceToStore& instance,
309fb4f02704 fix signature of OrthancPluginIncomingCStoreInstanceFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4892
diff changeset
60 const Json::Value& simplified) = 0;
1433
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 };
461e7554bff7 refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 }