31 #include "ListenThread.h"
35 #include <hu/varadiistvan/xplcommon/Util.h>
36 #include <hu/varadiistvan/scpl/config.h>
37 #include <hu/varadiistvan/scpl/Log.h>
40 #include <XPLMProcessing.h>
41 #include <XPLMMenus.h>
56 using hu::varadiistvan::xplcommon::Util;
58 using hu::varadiistvan::scpl::Log;
74 PLUGIN_API
int XPluginStart(
char* outName,
char* outSignature,
77 Log::registerFunction(&Util::debug);
78 Util::debug(
"hu.varadiistvan.xplra called\n");
80 strcpy(outName,
"X-Plane Remote Access");
81 strcpy(outSignature,
"hu.varadiistvan.xplra");
82 strcpy(outDescription,
"Provides remote access to datarefs");
85 signal(SIGPIPE, SIG_IGN);
93 PLUGIN_API
void XPluginEnable(
void)
95 Util::debug(
"hu.varadiistvan.xplra.XPluginEnable called\n");
101 listenThread->start();
106 PLUGIN_API
void XPluginReceiveMessage(XPLMPluginID inFrom,
long inMessage,
109 Util::debug(
"hu.varadiistvan.xplra.XPluginReceiveMessage called, inFrom=%d, inMessage=%ld, inParam=%p\n",
110 inFrom, inMessage, inParam);
115 PLUGIN_API
void XPluginDisable(
void)
117 Util::debug(
"hu.varadiistvan.xplra.XPluginDisable called\n");
120 if (listenThread!=0) {
121 listenThread->
quit();
122 listenThread->join();
127 delete globals; globals = 0;
128 Util::debug(
"hu.varadiistvan.xplra.XPluginDisable done\n");
133 PLUGIN_API
void XPluginStop(
void)
135 Util::debug(
"hu.varadiistvan.xplra.XPluginStop called\n");