annotate Framework/Toolbox/IWebService.h @ 113:2eca030792aa wasm

using the Orthanc Framework
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 20 Sep 2017 15:32:32 +0200
parents f40a78cc7070
children e2fe9352f240
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
57
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Stone of Orthanc
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 * Copyright (C) 2017 Osimis, Belgium
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * the License, or (at your option) any later version.
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Affero General Public License for more details.
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #pragma once
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
113
2eca030792aa using the Orthanc Framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 80
diff changeset
24 #include <Core/IDynamicObject.h>
57
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 #include <string>
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 namespace OrthancStone
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 {
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 class IWebService : public boost::noncopyable
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 {
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 public:
58
468c48eaa01c refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 57
diff changeset
33 class ICallback : public boost::noncopyable
57
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 {
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 public:
58
468c48eaa01c refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 57
diff changeset
36 virtual ~ICallback()
57
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 {
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 }
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39
58
468c48eaa01c refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 57
diff changeset
40 virtual void NotifyError(const std::string& uri,
468c48eaa01c refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 57
diff changeset
41 Orthanc::IDynamicObject* payload) = 0;
57
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42
60
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 58
diff changeset
43 virtual void NotifySuccess(const std::string& uri,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 58
diff changeset
44 const void* answer,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 58
diff changeset
45 size_t answerSize,
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 58
diff changeset
46 Orthanc::IDynamicObject* payload) = 0;
57
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 };
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 virtual ~IWebService()
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 {
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 }
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52
58
468c48eaa01c refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 57
diff changeset
53 virtual void ScheduleGetRequest(ICallback& callback,
57
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 const std::string& uri,
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 Orthanc::IDynamicObject* payload) = 0;
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
58
468c48eaa01c refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 57
diff changeset
57 virtual void SchedulePostRequest(ICallback& callback,
57
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 const std::string& uri,
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 const std::string& body,
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 Orthanc::IDynamicObject* payload) = 0;
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 };
d20e25cfcf3a IWebService
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 }