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