comparison Platforms/Wasm/Defaults.cpp @ 510:97a16b694321 bgo-commands-codegen

Fixes for API changes related to message passing
author Benjamin Golinvaux <bgo@osimis.io>
date Wed, 06 Mar 2019 18:26:35 +0100
parents 7105a0bad250
children 79bb0a02d1cc
comparison
equal deleted inserted replaced
509:1b9973905e15 510:97a16b694321
348 348
349 printf("SendSerializedMessageToStoneApplication\n"); 349 printf("SendSerializedMessageToStoneApplication\n");
350 printf("%s", message); 350 printf("%s", message);
351 351
352 if (applicationWasmAdapter.get() != NULL) { 352 if (applicationWasmAdapter.get() != NULL) {
353 printf("sending serialized message to C++\n");
354 applicationWasmAdapter->HandleSerializedMessageFromWeb(output, std::string(message)); 353 applicationWasmAdapter->HandleSerializedMessageFromWeb(output, std::string(message));
355 return output.c_str(); 354 return output.c_str();
356 } 355 }
357 printf("This Stone application does not have a Web Adapter"); 356 printf("This Stone application does not have a Web Adapter");
358 return NULL; 357 return NULL;
364 363
365 printf("SendCommandToStoneApplication\n"); 364 printf("SendCommandToStoneApplication\n");
366 printf("%s", message); 365 printf("%s", message);
367 366
368 if (applicationWasmAdapter.get() != NULL) { 367 if (applicationWasmAdapter.get() != NULL) {
369 printf("sending command to C++\n");
370 applicationWasmAdapter->HandleCommandFromWeb(output, std::string(message)); 368 applicationWasmAdapter->HandleCommandFromWeb(output, std::string(message));
371 return output.c_str(); 369 return output.c_str();
372 } 370 }
373 printf("This Stone application does not have a Web Adapter"); 371 printf("This Stone application does not have a Web Adapter");
374 return NULL; 372 return NULL;