Mercurial > hg > orthanc-stone
comparison Framework/Oracle/WebAssemblyOracle.cpp @ 1273:398ea4259e65
merge
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 03 Feb 2020 14:57:22 +0100 |
parents | 2d8ab34c8c91 |
children | 7ec8fea061b9 8a0a62189f46 |
comparison
equal
deleted
inserted
replaced
1272:a989c7d46b9a | 1273:398ea4259e65 |
---|---|
1 /** | 1 /** |
2 * Stone of Orthanc | 2 * Stone of Orthanc |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
4 * Department, University Hospital of Liege, Belgium | 4 * Department, University Hospital of Liege, Belgium |
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium | 5 * Copyright (C) 2017-2020 Osimis S.A., Belgium |
6 * | 6 * |
7 * This program is free software: you can redistribute it and/or | 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 | 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 | 9 * as published by the Free Software Foundation, either version 3 of |
10 * the License, or (at your option) any later version. | 10 * the License, or (at your option) any later version. |
106 same address (it often happens in the [single-threaded] browser context). | 106 same address (it often happens in the [single-threaded] browser context). |
107 */ | 107 */ |
108 class WebAssemblyOracle::FetchContext : public boost::noncopyable | 108 class WebAssemblyOracle::FetchContext : public boost::noncopyable |
109 { | 109 { |
110 private: | 110 private: |
111 Emitter emitter_; | 111 Emitter emitter_; |
112 const IObserver& receiver_; | 112 const IObserver& receiver_; |
113 std::auto_ptr<IOracleCommand> command_; | 113 std::auto_ptr<IOracleCommand> command_; |
114 std::string expectedContentType_; | 114 std::string expectedContentType_; |
115 std::string receiverFingerprint_; | 115 int64_t receiverFingerprint_; |
116 | 116 |
117 public: | 117 public: |
118 FetchContext(WebAssemblyOracle& oracle, | 118 FetchContext(WebAssemblyOracle& oracle, |
119 const IObserver& receiver, | 119 const IObserver& receiver, |
120 IOracleCommand* command, | 120 IOracleCommand* command, |
221 | 221 |
222 // TODO: remove this line because we are NOT allowed to call methods on GetReceiver that is maybe a dangling ref | 222 // TODO: remove this line because we are NOT allowed to call methods on GetReceiver that is maybe a dangling ref |
223 if (context->GetReceiver().DoesFingerprintLookGood()) | 223 if (context->GetReceiver().DoesFingerprintLookGood()) |
224 { | 224 { |
225 callHandler = true; | 225 callHandler = true; |
226 std::string currentFingerprint(context->GetReceiver().GetFingerprint()); | 226 int64_t currentFingerprint(context->GetReceiver().GetFingerprint()); |
227 | 227 |
228 LOG(TRACE) << "SuccessCallback for object at address (" << std::hex | 228 LOG(TRACE) << "SuccessCallback for object at address (" << std::hex |
229 << &(context->GetReceiver()) << std::dec | 229 << &(context->GetReceiver()) << std::dec |
230 << " with current fingerprint = " << currentFingerprint | 230 << " with current fingerprint = " << currentFingerprint |
231 << ". Fingerprint looks OK"; | 231 << ". Fingerprint looks OK"; |