Mercurial > hg > orthanc-stone
annotate Framework/Toolbox/BaseWebService.h @ 522:700aa66f2f29 bgo-commands-codegen
Removed deleted file from cmakelists + fixed renames in compilation. Samples build OK in WAS but still not fully functional
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 12 Mar 2019 15:01:36 +0100 |
parents | e641d3978856 |
children | 2a8ac2d426db |
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> |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
28 |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
29 namespace OrthancStone |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
30 { |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
31 // 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
|
32 // the HTTP GET requests |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
33 class BaseWebService : public IWebService, public IObserver |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
34 { |
435
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
434
diff
changeset
|
35 public: |
434
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
36 class CachedHttpRequestSuccessMessage |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
37 { |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
38 protected: |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
39 std::string uri_; |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
40 void* answer_; |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
41 size_t answerSize_; |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
42 IWebService::HttpHeaders answerHeaders_; |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
43 |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
44 public: |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
45 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
|
46 uri_(message.GetUri()), |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
47 answerSize_(message.GetAnswerSize()), |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
48 answerHeaders_(message.GetAnswerHttpHeaders()) |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
49 { |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
50 answer_ = malloc(answerSize_); |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
51 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
|
52 } |
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 ~CachedHttpRequestSuccessMessage() |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
55 { |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
56 free(answer_); |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
57 } |
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 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
|
60 { |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
61 return uri_; |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
62 } |
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 const void* GetAnswer() const |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
65 { |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
66 return answer_; |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
67 } |
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 size_t GetAnswerSize() const |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
70 { |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
71 return answerSize_; |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
72 } |
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 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
|
75 { |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
76 return answerHeaders_; |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
77 } |
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 }; |
435
e641d3978856
WasmWebService now using BaseWebService and supporting cache
am@osimis.io
parents:
434
diff
changeset
|
80 protected: |
434
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
81 class BaseWebServicePayload; |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
82 |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
83 bool cacheEnabled_; |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
84 std::map<std::string, boost::shared_ptr<CachedHttpRequestSuccessMessage>> cache_; // TODO: this is currently an infinite cache ! |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
85 |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
86 public: |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
87 |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
88 BaseWebService(MessageBroker& broker) : |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
89 IWebService(broker), |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
90 IObserver(broker), |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
91 cacheEnabled_(true) |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
92 { |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
93 } |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
94 |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
95 virtual ~BaseWebService() |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
96 { |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
97 } |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
98 |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
99 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
|
100 { |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
101 cacheEnabled_ = enable; |
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 |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
104 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
|
105 const HttpHeaders& headers, |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
106 Orthanc::IDynamicObject* payload /* takes ownership */, |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
107 MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback, |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
108 MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL, |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
109 unsigned int timeoutInSeconds = 60); |
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 protected: |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
112 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
|
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 */, |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
115 MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback, |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
116 MessageHandler<IWebService::HttpRequestErrorMessage>* failureCallback = NULL, |
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) = 0; |
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 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
|
120 Orthanc::IDynamicObject* payload, // takes ownership |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
121 MessageHandler<IWebService::HttpRequestSuccessMessage>* successCallback) = 0; |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
122 |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
123 private: |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
124 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
|
125 |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
126 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
|
127 |
3a8bcc45c221
moved the HTTP cache from OrthancApiClient to BaseWebService (not implemented yet in WASM)
am@osimis.io
parents:
diff
changeset
|
128 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
|
129 |
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 } |