diff options
-rw-r--r-- | sd/CppunitTest_sd_uimpress.mk | 2 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/Server.cxx | 15 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/Server.hxx | 9 |
3 files changed, 18 insertions, 8 deletions
diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk index 4e453153d85d..d7e7f15dabac 100644 --- a/sd/CppunitTest_sd_uimpress.mk +++ b/sd/CppunitTest_sd_uimpress.mk @@ -36,7 +36,7 @@ $(eval $(call gb_CppunitTest_add_defs,sd_uimpress,\ -DSD_DLLIMPLEMENTATION \ )) -$(eval $(call gb_CppunitTest_use_sdk_api,sd_uimpress,\ +$(eval $(call gb_CppunitTest_use_api,sd_uimpress,\ offapi \ udkapi \ )) diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx index 9ebe555fabd3..00ecd2acc78b 100644 --- a/sd/source/ui/remotecontrol/Server.cxx +++ b/sd/source/ui/remotecontrol/Server.cxx @@ -88,10 +88,19 @@ void Server::execute() } +Server *sd::Server::spServer = NULL; + +void Server::setup() +{ + if (spServer) + return; + + spServer = new Server(); + spServer->launch(); +} + void SdDLL::RegisterRemotes() { fprintf( stderr, "Register our remote control goodness\n" ); - Server server; - server.launch(); - // FIXME: create a thread + sd::Server::setup(); } diff --git a/sd/source/ui/remotecontrol/Server.hxx b/sd/source/ui/remotecontrol/Server.hxx index 9aa9687a8595..46bac2d66905 100644 --- a/sd/source/ui/remotecontrol/Server.hxx +++ b/sd/source/ui/remotecontrol/Server.hxx @@ -27,18 +27,19 @@ namespace sd { class Server : public salhelper::Thread - { + { public: + static void setup(); + private: Server(); ~Server(); - private: + static Server *spServer; osl::AcceptorSocket mSocket; osl::StreamSocket mStreamSocket; void listenThread(); Receiver mReceiver; void execute(); - }; - + }; } #endif // _SD_IMPRESSREMOTE_SERVER_HXX |