comparison Platforms/Wasm/Defaults.cpp @ 535:79bb0a02d1cc bgo-commands-codegen

- Added ORTHANC_OVERRIDE to several methods (translates to "override" in C++ 11 compilers) - Last fixes to new style command handling (removed useless commands and switch command handling in simple samples to use XxxxSerializedMessageXxxx instead of XxxxCommandXxxx - Fixed hardcoded input instance in SingleFrameEditorApplication
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 19 Mar 2019 09:13:57 +0100
parents 97a16b694321
children 70992b38aa8a
comparison
equal deleted inserted replaced
534:7016c35d163c 535:79bb0a02d1cc
355 } 355 }
356 printf("This Stone application does not have a Web Adapter"); 356 printf("This Stone application does not have a Web Adapter");
357 return NULL; 357 return NULL;
358 } 358 }
359 359
360 const char* EMSCRIPTEN_KEEPALIVE SendCommandToStoneApplication(const char* message)
361 {
362 static std::string output; // we don't want the string to be deallocated when we return to JS code so we always use the same string (this is fine since JS is single-thread)
363
364 printf("SendCommandToStoneApplication\n");
365 printf("%s", message);
366
367 if (applicationWasmAdapter.get() != NULL) {
368 applicationWasmAdapter->HandleCommandFromWeb(output, std::string(message));
369 return output.c_str();
370 }
371 printf("This Stone application does not have a Web Adapter");
372 return NULL;
373 }
374
375 #ifdef __cplusplus 360 #ifdef __cplusplus
376 } 361 }
377 #endif 362 #endif