Changeset 81:f28f1b8f3ef7 in xplra for src/plugin
- Timestamp:
- 05/12/13 05:16:48 (11 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/plugin/src/xplra
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/plugin/src/xplra/Makefile.am
r75 r81 18 18 SetMultiDataRefRequest.cc \ 19 19 ReloadPluginsRequest.cc \ 20 SaveSituationRequest.cc \ 20 21 Globals.cc \ 21 22 MessageWindow.cc \ … … 39 40 SetMultiDataRefRequest.h \ 40 41 ReloadPluginsRequest.h \ 42 SaveSituationRequest.h \ 41 43 Globals.h \ 42 44 MessageWindow.h \ -
src/plugin/src/xplra/Protocol.h
r45 r81 102 102 103 103 /** 104 * Command: save the current situation. 105 * 106 * Followed by a string containing the path of the file to save 107 * relative to the X-System directory. 108 */ 109 static const uint8_t COMMAND_SAVE_SITUATION = 0x33; 110 111 /** 104 112 * Command: show a message in the message window. 105 113 */ -
src/plugin/src/xplra/ServerThread.cc
r46 r81 40 40 #include "SetMultiDataRefRequest.h" 41 41 #include "ReloadPluginsRequest.h" 42 #ifdef XPLM200 43 #include "SaveSituationRequest.h" 44 #endif 42 45 #include "MessageRequest.h" 43 46 #include "Globals.h" … … 170 173 } else if (command==Protocol::COMMAND_RELOAD_PLUGINS) { 171 174 if (!handleReloadPlugins()) break; 175 #ifdef XPLM200 176 } else if (command==Protocol::COMMAND_SAVE_SITUATION) { 177 if (!handleSaveSituation()) break; 178 #endif 172 179 } else if (command==Protocol::COMMAND_SHOW_MESSAGE) { 173 180 if (!handleShowMessage()) break; … … 446 453 //------------------------------------------------------------------------------ 447 454 455 #ifdef XPLM200 456 457 bool ServerThread::handleSaveSituation() 458 { 459 string path = stream.readString(); 460 SaveSituationRequest request(path); 461 if (!requestQueue.execute(&request)) return false; 462 463 stream.writeU8(request.getSuccess() ? Protocol::RESULT_OK : 464 Protocol::RESULT_OTHER_ERROR); 465 466 return true; 467 } 468 469 #endif 470 471 //------------------------------------------------------------------------------ 472 448 473 bool ServerThread::handleShowMessage() 449 474 { -
src/plugin/src/xplra/ServerThread.h
r45 r81 256 256 bool handleReloadPlugins(); 257 257 258 #ifdef XPLM200 259 /** 260 * Handle the COMMAND_SAVE_SITUATION command. 261 * 262 * @return true, if we can continue, false if the thread should quit 263 */ 264 bool handleSaveSituation(); 265 #endif 266 258 267 /** 259 268 * Handle the COMMAND_SHOW_MESSAGE command
Note:
See TracChangeset
for help on using the changeset viewer.