annotate Platforms/Generic/WebServiceGetCommand.h @ 182:2cbfb08f3a95 wasm

ImageGeometry.cpp
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 15 Mar 2018 12:12:01 +0100
parents e2fe9352f240
children e9c7a78a3e77
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
80
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Stone of Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
135
e2fe9352f240 upgrade to year 2018
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 113
diff changeset
5 * Copyright (C) 2017-2018 Osimis S.A., Belgium
80
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * the License, or (at your option) any later version.
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Affero General Public License for more details.
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #pragma once
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #include "IOracleCommand.h"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 #include "../../Framework/Toolbox/IWebService.h"
113
2eca030792aa using the Orthanc Framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 80
diff changeset
27
2eca030792aa using the Orthanc Framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 80
diff changeset
28 #include <Core/WebServiceParameters.h>
80
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 #include <memory>
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 namespace OrthancStone
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 {
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 class WebServiceGetCommand : public IOracleCommand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 {
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 private:
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 IWebService::ICallback& callback_;
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 Orthanc::WebServiceParameters parameters_;
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 std::string uri_;
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 std::auto_ptr<Orthanc::IDynamicObject> payload_;
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 bool success_;
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 std::string answer_;
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 public:
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 WebServiceGetCommand(IWebService::ICallback& callback,
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 const Orthanc::WebServiceParameters& parameters,
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 const std::string& uri,
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 Orthanc::IDynamicObject* payload /* takes ownership */);
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 virtual void Execute();
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 virtual void Commit();
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 };
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 }