Mercurial > hg > orthanc
annotate OrthancServer/DicomProtocol/DicomServer.h @ 2259:8233c92b8226
added hgignore
author | amazy |
---|---|
date | Thu, 02 Feb 2017 21:12:16 +0100 |
parents | a3a65de1840f |
children | 96b3ec054b69 |
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 | |
36 #include "IFindRequestHandlerFactory.h" | |
37 #include "IMoveRequestHandlerFactory.h" | |
38 #include "IStoreRequestHandlerFactory.h" | |
1786
164d78911382
primitives to handle dicom worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1682
diff
changeset
|
39 #include "IWorklistRequestHandlerFactory.h" |
0 | 40 #include "IApplicationEntityFilter.h" |
41 | |
42 #include <boost/shared_ptr.hpp> | |
43 #include <boost/noncopyable.hpp> | |
44 | |
1682
6414043df7d8
integration mainline->db-changes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1681
diff
changeset
|
45 |
62 | 46 namespace Orthanc |
0 | 47 { |
48 class DicomServer : public boost::noncopyable | |
49 { | |
50 private: | |
51 struct PImpl; | |
52 boost::shared_ptr<PImpl> pimpl_; | |
53 | |
54 bool checkCalledAet_; | |
55 std::string aet_; | |
56 uint16_t port_; | |
57 bool continue_; | |
2068
879f3be759ef
renames to make code clearer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
58 uint32_t associationTimeout_; |
0 | 59 IFindRequestHandlerFactory* findRequestHandlerFactory_; |
60 IMoveRequestHandlerFactory* moveRequestHandlerFactory_; | |
61 IStoreRequestHandlerFactory* storeRequestHandlerFactory_; | |
1786
164d78911382
primitives to handle dicom worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1682
diff
changeset
|
62 IWorklistRequestHandlerFactory* worklistRequestHandlerFactory_; |
0 | 63 IApplicationEntityFilter* applicationEntityFilter_; |
64 | |
1681
ee4367497d0d
got rid of buggy BagOfRunnablesBySteps
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1675
diff
changeset
|
65 static void ServerThread(DicomServer* server); |
0 | 66 |
67 public: | |
68 DicomServer(); | |
69 | |
70 ~DicomServer(); | |
71 | |
128 | 72 void SetPortNumber(uint16_t port); |
73 uint16_t GetPortNumber() const; | |
0 | 74 |
2069
fabf7820d1f1
New configuration options: "DicomScuTimeout" and "DicomScpTimeout" + validation of non-negative options
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2068
diff
changeset
|
75 void SetAssociationTimeout(uint32_t seconds); |
2068
879f3be759ef
renames to make code clearer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
76 uint32_t GetAssociationTimeout() const; |
0 | 77 |
78 void SetCalledApplicationEntityTitleCheck(bool check); | |
79 bool HasCalledApplicationEntityTitleCheck() const; | |
80 | |
81 void SetApplicationEntityTitle(const std::string& aet); | |
82 const std::string& GetApplicationEntityTitle() const; | |
83 | |
84 void SetFindRequestHandlerFactory(IFindRequestHandlerFactory& handler); | |
85 bool HasFindRequestHandlerFactory() const; | |
86 IFindRequestHandlerFactory& GetFindRequestHandlerFactory() const; | |
87 | |
88 void SetMoveRequestHandlerFactory(IMoveRequestHandlerFactory& handler); | |
89 bool HasMoveRequestHandlerFactory() const; | |
90 IMoveRequestHandlerFactory& GetMoveRequestHandlerFactory() const; | |
91 | |
92 void SetStoreRequestHandlerFactory(IStoreRequestHandlerFactory& handler); | |
93 bool HasStoreRequestHandlerFactory() const; | |
94 IStoreRequestHandlerFactory& GetStoreRequestHandlerFactory() const; | |
95 | |
1786
164d78911382
primitives to handle dicom worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1682
diff
changeset
|
96 void SetWorklistRequestHandlerFactory(IWorklistRequestHandlerFactory& handler); |
164d78911382
primitives to handle dicom worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1682
diff
changeset
|
97 bool HasWorklistRequestHandlerFactory() const; |
164d78911382
primitives to handle dicom worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1682
diff
changeset
|
98 IWorklistRequestHandlerFactory& GetWorklistRequestHandlerFactory() const; |
164d78911382
primitives to handle dicom worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1682
diff
changeset
|
99 |
0 | 100 void SetApplicationEntityFilter(IApplicationEntityFilter& handler); |
101 bool HasApplicationEntityFilter() const; | |
102 IApplicationEntityFilter& GetApplicationEntityFilter() const; | |
103 | |
104 void Start(); | |
105 | |
106 void Stop(); | |
690
2e67366aab83
case-insensitive matching of Application Entity Titles
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
107 |
2e67366aab83
case-insensitive matching of Application Entity Titles
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
108 bool IsMyAETitle(const std::string& aet) const; |
0 | 109 }; |
110 | |
111 } |