annotate Framework/Deprecated/Toolbox/BaseWebService.h @ 879:12b591d5d63c am-dev

some Qt integration (wip)
author Alain Mazy <alain@mazy.be>
date Fri, 05 Jul 2019 14:52:43 +0200
parents 200b4e0dddfc
children e713f1a99861 1c7ae79c426d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
434
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
1 /**
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
2 * Stone of Orthanc
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
5 * Copyright (C) 2017-2018 Osimis S.A., Belgium
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
6 *
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
10 * the License, or (at your option) any later version.
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
11 *
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
15 * Affero General Public License for more details.
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
16 *
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
19 **/
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
20
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
21
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
22 #pragma once
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
23
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
24 #include "IWebService.h"
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
25
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
26 #include <string>
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
27 #include <map>
872
733c6db3e5a3 limiting the size of the cache
Alain Mazy <alain@mazy.be>
parents: 732
diff changeset
28 #include <deque>
434
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
29
726
4f2416d519b4 moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 588
diff changeset
30 namespace Deprecated
434
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
31 {
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
32 // This is an intermediate of IWebService that implements some caching on
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
33 // the HTTP GET requests
726
4f2416d519b4 moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 588
diff changeset
34 class BaseWebService : public IWebService, public OrthancStone::IObserver
434
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
35 {
435
e641d3978856 WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents: 434
diff changeset
36 public:
434
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
37 class CachedHttpRequestSuccessMessage
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
38 {
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
39 protected:
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
40 std::string uri_;
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
41 void* answer_;
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
42 size_t answerSize_;
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
43 IWebService::HttpHeaders answerHeaders_;
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
44
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
45 public:
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
46 CachedHttpRequestSuccessMessage(const IWebService::HttpRequestSuccessMessage& message) :
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
47 uri_(message.GetUri()),
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
48 answerSize_(message.GetAnswerSize()),
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
49 answerHeaders_(message.GetAnswerHttpHeaders())
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
50 {
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
51 answer_ = malloc(answerSize_);
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
52 memcpy(answer_, message.GetAnswer(), answerSize_);
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
53 }
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
54
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
55 ~CachedHttpRequestSuccessMessage()
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
56 {
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
57 free(answer_);
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
58 }
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
59
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
60 const std::string& GetUri() const
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
61 {
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
62 return uri_;
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
63 }
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
64
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
65 const void* GetAnswer() const
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
66 {
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
67 return answer_;
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
68 }
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
69
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
70 size_t GetAnswerSize() const
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
71 {
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
72 return answerSize_;
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
73 }
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
74
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
75 const IWebService::HttpHeaders& GetAnswerHttpHeaders() const
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
76 {
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
77 return answerHeaders_;
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
78 }
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
79
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
80 };
435
e641d3978856 WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents: 434
diff changeset
81 protected:
434
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
82 class BaseWebServicePayload;
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
83
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
84 bool cacheEnabled_;
872
733c6db3e5a3 limiting the size of the cache
Alain Mazy <alain@mazy.be>
parents: 732
diff changeset
85 size_t cacheCurrentSize_;
733c6db3e5a3 limiting the size of the cache
Alain Mazy <alain@mazy.be>
parents: 732
diff changeset
86 size_t cacheMaxSize_;
733c6db3e5a3 limiting the size of the cache
Alain Mazy <alain@mazy.be>
parents: 732
diff changeset
87
733c6db3e5a3 limiting the size of the cache
Alain Mazy <alain@mazy.be>
parents: 732
diff changeset
88 typedef std::map<std::string, boost::shared_ptr<CachedHttpRequestSuccessMessage> > HttpCache;
733c6db3e5a3 limiting the size of the cache
Alain Mazy <alain@mazy.be>
parents: 732
diff changeset
89 HttpCache cache_;
733c6db3e5a3 limiting the size of the cache
Alain Mazy <alain@mazy.be>
parents: 732
diff changeset
90 std::deque<std::string> orderedCacheKeys_;
434
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
91
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
92 public:
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
93
726
4f2416d519b4 moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 588
diff changeset
94 BaseWebService(OrthancStone::MessageBroker& broker) :
434
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
95 IWebService(broker),
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
96 IObserver(broker),
875
200b4e0dddfc BaseWebService: disable cache + correct handling of cache
Alain Mazy <alain@mazy.be>
parents: 872
diff changeset
97 cacheEnabled_(false),
872
733c6db3e5a3 limiting the size of the cache
Alain Mazy <alain@mazy.be>
parents: 732
diff changeset
98 cacheCurrentSize_(0),
733c6db3e5a3 limiting the size of the cache
Alain Mazy <alain@mazy.be>
parents: 732
diff changeset
99 cacheMaxSize_(100*1024*1024)
434
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
100 {
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
101 }
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
102
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
103 virtual ~BaseWebService()
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
104 {
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
105 }
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
106
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
107 virtual void EnableCache(bool enable)
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
108 {
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
109 cacheEnabled_ = enable;
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
110 }
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
111
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
112 virtual void GetAsync(const std::string& uri,
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
113 const HttpHeaders& headers,
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
114 Orthanc::IDynamicObject* payload /* takes ownership */,
726
4f2416d519b4 moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 588
diff changeset
115 OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
4f2416d519b4 moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 588
diff changeset
116 OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
434
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
117 unsigned int timeoutInSeconds = 60);
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
118
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
119 protected:
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
120 virtual void GetAsyncInternal(const std::string& uri,
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
121 const HttpHeaders& headers,
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
122 Orthanc::IDynamicObject* payload /* takes ownership */,
726
4f2416d519b4 moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 588
diff changeset
123 OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback,
4f2416d519b4 moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 588
diff changeset
124 OrthancStone::MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL,
434
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
125 unsigned int timeoutInSeconds = 60) = 0;
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
126
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
127 virtual void NotifyHttpSuccessLater(boost::shared_ptr<BaseWebService::CachedHttpRequestSuccessMessage> cachedHttpMessage,
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
128 Orthanc::IDynamicObject* payload, // takes ownership
726
4f2416d519b4 moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 588
diff changeset
129 OrthancStone::MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback) = 0;
434
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
130
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
131 private:
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
132 void NotifyHttpSuccess(const IWebService::HttpRequestSuccessMessage& message);
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
133
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
134 void NotifyHttpError(const IWebService::HttpRequestErrorMessage& message);
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
135
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
136 void CacheAndNotifyHttpSuccess(const IWebService::HttpRequestSuccessMessage& message);
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
137
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
138 };
3a8bcc45c221 moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff changeset
139 }