annotate OrthancServer/ServerJobs/StorageCommitmentScpJob.cpp @ 3638:ae866fc06df5 storage-commitment

serialization of StorageCommitmentScpJob
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 31 Jan 2020 16:53:23 +0100
parents bce6ee64f2a4
children 0c9a8f6d2349
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3636
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU General Public License as
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * published by the Free Software Foundation, either version 3 of the
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * License, or (at your option) any later version.
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * In addition, as a special exception, the copyright holders of this
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * program give permission to link the code of its release with the
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * OpenSSL project's "OpenSSL" library (or with modified versions of it
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * that use the same license as the "OpenSSL" library), and distribute
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * the linked executables. You must obey the GNU General Public License
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * in all respects for all of the code used other than "OpenSSL". If you
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * modify file(s) with this exception, you may extend this exception to
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * your version of the file(s), but you are not obligated to do so. If
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * you do not wish to do so, delete this exception statement from your
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 * version. If you delete this exception statement from all source files
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 * in the program, then also delete it here.
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 *
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 * This program is distributed in the hope that it will be useful, but
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 * WITHOUT ANY WARRANTY; without even the implied warranty of
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 * General Public License for more details.
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 *
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 * You should have received a copy of the GNU General Public License
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 * along with this program. If not, see <http://www.gnu.org/licenses/>.
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 **/
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 #include "../PrecompiledHeadersServer.h"
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 #include "StorageCommitmentScpJob.h"
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 #include "../../Core/DicomNetworking/DicomUserConnection.h"
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 #include "../../Core/Logging.h"
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 #include "../../Core/OrthancException.h"
3638
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
40 #include "../../Core/SerializationToolbox.h"
3636
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 #include "../OrthancConfiguration.h"
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 #include "../ServerContext.h"
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44
3638
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
45 static const char* ANSWER = "Answer";
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
46 static const char* CALLED_AET = "CalledAet";
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
47 static const char* FAILED_SOP_CLASS_UIDS = "FailedSopClassUids";
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
48 static const char* FAILED_SOP_INSTANCE_UIDS = "FailedSopInstanceUids";
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
49 static const char* LOOKUP = "Lookup";
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
50 static const char* REMOTE_MODALITY = "RemoteModality";
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
51 static const char* SOP_CLASS_UID = "SopClassUid";
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
52 static const char* SOP_INSTANCE_UID = "SopInstanceUid";
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
53 static const char* SUCCESS_SOP_CLASS_UIDS = "SuccessSopClassUids";
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
54 static const char* SUCCESS_SOP_INSTANCE_UIDS = "SuccessSopInstanceUids";
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
55 static const char* TRANSACTION_UID = "TransactionUid";
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
56 static const char* TYPE = "Type";
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
57
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
58
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
59
3636
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 namespace Orthanc
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 class StorageCommitmentScpJob::LookupCommand : public SetOfCommandsJob::ICommand
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 private:
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 StorageCommitmentScpJob& that_;
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 std::string sopClassUid_;
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 std::string sopInstanceUid_;
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 public:
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 LookupCommand(StorageCommitmentScpJob& that,
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 const std::string& sopClassUid,
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 const std::string& sopInstanceUid) :
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 that_(that),
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 sopClassUid_(sopClassUid),
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 sopInstanceUid_(sopInstanceUid)
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 virtual bool Execute()
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 that_.LookupInstance(sopClassUid_, sopInstanceUid_);
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 return true;
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 virtual void Serialize(Json::Value& target) const
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 target = Json::objectValue;
3638
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
88 target[TYPE] = LOOKUP;
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
89 target[SOP_CLASS_UID] = sopClassUid_;
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
90 target[SOP_INSTANCE_UID] = sopInstanceUid_;
3636
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 };
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 class StorageCommitmentScpJob::AnswerCommand : public SetOfCommandsJob::ICommand
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 private:
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 StorageCommitmentScpJob& that_;
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 public:
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 AnswerCommand(StorageCommitmentScpJob& that) :
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 that_(that)
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 virtual bool Execute()
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 that_.Answer();
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 return true;
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 virtual void Serialize(Json::Value& target) const
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 target = Json::objectValue;
3638
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
115 target[TYPE] = ANSWER;
3636
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 };
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 class StorageCommitmentScpJob::Unserializer : public SetOfCommandsJob::ICommandUnserializer
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 private:
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 StorageCommitmentScpJob& that_;
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 public:
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 Unserializer(StorageCommitmentScpJob& that) :
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 that_(that)
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 virtual ICommand* Unserialize(const Json::Value& source) const
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 {
3638
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
133 const std::string type = SerializationToolbox::ReadString(source, TYPE);
3636
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134
3638
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
135 if (type == LOOKUP)
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
136 {
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
137 return new LookupCommand(that_,
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
138 SerializationToolbox::ReadString(source, SOP_CLASS_UID),
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
139 SerializationToolbox::ReadString(source, SOP_INSTANCE_UID));
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
140 }
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
141 else if (type == ANSWER)
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
142 {
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
143 return new AnswerCommand(that_);
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
144 }
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
145 else
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
146 {
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
147 throw OrthancException(ErrorCode_BadFileFormat);
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
148 }
3636
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 };
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 void StorageCommitmentScpJob::LookupInstance(const std::string& sopClassUid,
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 const std::string& sopInstanceUid)
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 bool success = false;
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 try
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 std::vector<std::string> orthancId;
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 context_.GetIndex().LookupIdentifierExact(orthancId, ResourceType_Instance, DICOM_TAG_SOP_INSTANCE_UID, sopInstanceUid);
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 if (orthancId.size() == 1)
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 std::string a, b;
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 // Make sure that the DICOM file can be re-read by DCMTK
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 // from the file storage, and that the actual SOP
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 // class/instance UIDs do match
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 ServerContext::DicomCacheLocker locker(context_, orthancId[0]);
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 if (locker.GetDicom().GetTagValue(a, DICOM_TAG_SOP_CLASS_UID) &&
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 locker.GetDicom().GetTagValue(b, DICOM_TAG_SOP_INSTANCE_UID) &&
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 a == sopClassUid &&
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174 b == sopInstanceUid)
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 success = true;
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 catch (OrthancException&)
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 LOG(INFO) << " Storage commitment SCP job: " << (success ? "Success" : "Failure")
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185 << " while looking for " << sopClassUid << " / " << sopInstanceUid;
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 if (success)
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189 successSopClassUids_.push_back(sopClassUid);
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 successSopInstanceUids_.push_back(sopInstanceUid);
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192 else
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 failedSopClassUids_.push_back(sopClassUid);
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195 failedSopInstanceUids_.push_back(sopInstanceUid);
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 void StorageCommitmentScpJob::Answer()
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 LOG(INFO) << " Storage commitment SCP job: Sending answer";
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 DicomUserConnection scu(calledAet_, remoteModality_);
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205 scu.ReportStorageCommitment(transactionUid_, successSopClassUids_, successSopInstanceUids_,
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206 failedSopClassUids_, failedSopInstanceUids_);
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210 StorageCommitmentScpJob::StorageCommitmentScpJob(ServerContext& context,
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211 const std::string& transactionUid,
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212 const std::string& remoteAet,
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
213 const std::string& calledAet) :
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
214 context_(context),
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 ready_(false),
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216 transactionUid_(transactionUid),
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
217 calledAet_(calledAet)
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
218 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
219 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
220 OrthancConfiguration::ReaderLock lock;
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
221 if (!lock.GetConfiguration().LookupDicomModalityUsingAETitle(remoteModality_, remoteAet))
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
222 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
223 throw OrthancException(ErrorCode_InexistentItem,
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
224 "Unknown remote modality for storage commitment SCP: " + remoteAet);
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
225 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
226 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
227 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
228
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
229
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
230 void StorageCommitmentScpJob::AddInstance(const std::string& sopClassUid,
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
231 const std::string& sopInstanceUid)
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
232 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
233 if (ready_)
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
234 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
235 throw OrthancException(ErrorCode_BadSequenceOfCalls);
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
236 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
237 else
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
238 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
239 AddCommand(new LookupCommand(*this, sopClassUid, sopInstanceUid));
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
240 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
241 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
242
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
243
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
244 void StorageCommitmentScpJob::MarkAsReady()
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
245 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
246 if (ready_)
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
247 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
248 throw OrthancException(ErrorCode_BadSequenceOfCalls);
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
249 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
250 else
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
251 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
252 AddCommand(new AnswerCommand(*this));
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
253 ready_ = true;
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
254 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
255 }
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
256
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
257
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
258 void StorageCommitmentScpJob::GetPublicContent(Json::Value& value)
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
259 {
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
260 SetOfCommandsJob::GetPublicContent(value);
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
261
3638
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
262 value["CalledAet"] = calledAet_;
3636
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
263 value["RemoteAet"] = remoteModality_.GetApplicationEntityTitle();
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
264 value["TransactionUid"] = transactionUid_;
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
265 }
3638
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
266
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
267
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
268
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
269 StorageCommitmentScpJob::StorageCommitmentScpJob(ServerContext& context,
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
270 const Json::Value& serialized) :
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
271 SetOfCommandsJob(new Unserializer(*this), serialized),
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
272 context_(context),
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
273 ready_(false)
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
274 {
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
275 transactionUid_ = SerializationToolbox::ReadString(serialized, TRANSACTION_UID);
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
276 remoteModality_ = RemoteModalityParameters(serialized[REMOTE_MODALITY]);
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
277 calledAet_ = SerializationToolbox::ReadString(serialized, CALLED_AET);
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
278 SerializationToolbox::ReadListOfStrings(successSopClassUids_, serialized, SUCCESS_SOP_CLASS_UIDS);
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
279 SerializationToolbox::ReadListOfStrings(successSopInstanceUids_, serialized, SUCCESS_SOP_INSTANCE_UIDS);
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
280 SerializationToolbox::ReadListOfStrings(failedSopClassUids_, serialized, FAILED_SOP_CLASS_UIDS);
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
281 SerializationToolbox::ReadListOfStrings(failedSopInstanceUids_, serialized, FAILED_SOP_INSTANCE_UIDS);
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
282
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
283 MarkAsReady();
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
284 }
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
285
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
286
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
287 bool StorageCommitmentScpJob::Serialize(Json::Value& target)
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
288 {
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
289 if (!SetOfCommandsJob::Serialize(target))
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
290 {
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
291 return false;
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
292 }
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
293 else
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
294 {
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
295 target[TRANSACTION_UID] = transactionUid_;
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
296 remoteModality_.Serialize(target[REMOTE_MODALITY], true /* force advanced format */);
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
297 target[CALLED_AET] = calledAet_;
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
298 SerializationToolbox::WriteListOfStrings(target, successSopClassUids_, SUCCESS_SOP_CLASS_UIDS);
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
299 SerializationToolbox::WriteListOfStrings(target, successSopInstanceUids_, SUCCESS_SOP_INSTANCE_UIDS);
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
300 SerializationToolbox::WriteListOfStrings(target, failedSopClassUids_, FAILED_SOP_CLASS_UIDS);
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
301 SerializationToolbox::WriteListOfStrings(target, failedSopInstanceUids_, FAILED_SOP_INSTANCE_UIDS);
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
302 return true;
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
303 }
ae866fc06df5 serialization of StorageCommitmentScpJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3636
diff changeset
304 }
3636
bce6ee64f2a4 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
305 }