Mercurial > hg > orthanc
annotate OrthancServer/DicomProtocol/DicomServer.h @ 2380:96b3ec054b69
reorganization in macros
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 29 Aug 2017 16:49:44 +0200 |
parents | a3a65de1840f |
children | b8969010b534 |
rev | line source |
---|---|
0 | 1 /** |
62 | 2 * Orthanc - A Lightweight, RESTful DICOM Store |
1900 | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
1288
6e7e5ed91c2d
upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
690
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
2244
a3a65de1840f
shared copyright with osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2069
diff
changeset
|
5 * Copyright (C) 2017 Osimis, Belgium |
0 | 6 * |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU General Public License as | |
9 * published by the Free Software Foundation, either version 3 of the | |
10 * License, or (at your option) any later version. | |
136 | 11 * |
12 * In addition, as a special exception, the copyright holders of this | |
13 * program give permission to link the code of its release with the | |
14 * OpenSSL project's "OpenSSL" library (or with modified versions of it | |
15 * that use the same license as the "OpenSSL" library), and distribute | |
16 * the linked executables. You must obey the GNU General Public License | |
17 * in all respects for all of the code used other than "OpenSSL". If you | |
18 * modify file(s) with this exception, you may extend this exception to | |
19 * your version of the file(s), but you are not obligated to do so. If | |
20 * you do not wish to do so, delete this exception statement from your | |
21 * version. If you delete this exception statement from all source files | |
22 * in the program, then also delete it here. | |
0 | 23 * |
24 * This program is distributed in the hope that it will be useful, but | |
25 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
27 * General Public License for more details. | |
28 * | |
29 * You should have received a copy of the GNU General Public License | |
30 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
31 **/ | |
32 | |
33 | |
34 #pragma once | |
35 | |
2380
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
36 #if ORTHANC_ENABLE_DCMTK_NETWORKING != 1 |
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
37 # error The macro ORTHANC_ENABLE_DCMTK_NETWORKING must be set to 1 |
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
38 #endif |
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
39 |
0 | 40 #include "IFindRequestHandlerFactory.h" |
41 #include "IMoveRequestHandlerFactory.h" | |
42 #include "IStoreRequestHandlerFactory.h" | |
1786
164d78911382
primitives to handle dicom worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1682
diff
changeset
|
43 #include "IWorklistRequestHandlerFactory.h" |
0 | 44 #include "IApplicationEntityFilter.h" |
45 | |
46 #include <boost/shared_ptr.hpp> | |
47 #include <boost/noncopyable.hpp> | |
48 | |
1682
6414043df7d8
integration mainline->db-changes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1681
diff
changeset
|
49 |
62 | 50 namespace Orthanc |
0 | 51 { |
52 class DicomServer : public boost::noncopyable | |
53 { | |
54 private: | |
55 struct PImpl; | |
56 boost::shared_ptr<PImpl> pimpl_; | |
57 | |
58 bool checkCalledAet_; | |
59 std::string aet_; | |
60 uint16_t port_; | |
61 bool continue_; | |
2068
879f3be759ef
renames to make code clearer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
62 uint32_t associationTimeout_; |
0 | 63 IFindRequestHandlerFactory* findRequestHandlerFactory_; |
64 IMoveRequestHandlerFactory* moveRequestHandlerFactory_; | |
65 IStoreRequestHandlerFactory* storeRequestHandlerFactory_; | |
1786
164d78911382
primitives to handle dicom worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1682
diff
changeset
|
66 IWorklistRequestHandlerFactory* worklistRequestHandlerFactory_; |
0 | 67 IApplicationEntityFilter* applicationEntityFilter_; |
68 | |
1681
ee4367497d0d
got rid of buggy BagOfRunnablesBySteps
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1675
diff
changeset
|
69 static void ServerThread(DicomServer* server); |
0 | 70 |
71 public: | |
72 DicomServer(); | |
73 | |
74 ~DicomServer(); | |
75 | |
128 | 76 void SetPortNumber(uint16_t port); |
77 uint16_t GetPortNumber() const; | |
0 | 78 |
2069
fabf7820d1f1
New configuration options: "DicomScuTimeout" and "DicomScpTimeout" + validation of non-negative options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2068
diff
changeset
|
79 void SetAssociationTimeout(uint32_t seconds); |
2068
879f3be759ef
renames to make code clearer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
80 uint32_t GetAssociationTimeout() const; |
0 | 81 |
82 void SetCalledApplicationEntityTitleCheck(bool check); | |
83 bool HasCalledApplicationEntityTitleCheck() const; | |
84 | |
85 void SetApplicationEntityTitle(const std::string& aet); | |
86 const std::string& GetApplicationEntityTitle() const; | |
87 | |
88 void SetFindRequestHandlerFactory(IFindRequestHandlerFactory& handler); | |
89 bool HasFindRequestHandlerFactory() const; | |
90 IFindRequestHandlerFactory& GetFindRequestHandlerFactory() const; | |
91 | |
92 void SetMoveRequestHandlerFactory(IMoveRequestHandlerFactory& handler); | |
93 bool HasMoveRequestHandlerFactory() const; | |
94 IMoveRequestHandlerFactory& GetMoveRequestHandlerFactory() const; | |
95 | |
96 void SetStoreRequestHandlerFactory(IStoreRequestHandlerFactory& handler); | |
97 bool HasStoreRequestHandlerFactory() const; | |
98 IStoreRequestHandlerFactory& GetStoreRequestHandlerFactory() const; | |
99 | |
1786
164d78911382
primitives to handle dicom worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1682
diff
changeset
|
100 void SetWorklistRequestHandlerFactory(IWorklistRequestHandlerFactory& handler); |
164d78911382
primitives to handle dicom worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1682
diff
changeset
|
101 bool HasWorklistRequestHandlerFactory() const; |
164d78911382
primitives to handle dicom worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1682
diff
changeset
|
102 IWorklistRequestHandlerFactory& GetWorklistRequestHandlerFactory() const; |
164d78911382
primitives to handle dicom worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1682
diff
changeset
|
103 |
0 | 104 void SetApplicationEntityFilter(IApplicationEntityFilter& handler); |
105 bool HasApplicationEntityFilter() const; | |
106 IApplicationEntityFilter& GetApplicationEntityFilter() const; | |
107 | |
108 void Start(); | |
109 | |
110 void Stop(); | |
690
2e67366aab83
case-insensitive matching of Application Entity Titles
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
111 |
2e67366aab83
case-insensitive matching of Application Entity Titles
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
112 bool IsMyAETitle(const std::string& aet) const; |
0 | 113 }; |
114 | |
115 } |