summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2012-11-23 17:59:41 +0100
committerThorsten Behrens <tbehrens@suse.com>2012-11-24 15:01:44 +0100
commitc50fdef7cf89e8c59db5a8539bbe51c3430d9271 (patch)
treedc2897a7ea2f27ad335cb07ad11b7d950b4fa089 /sd
parentcbc5fc321fefd2ce864276fab5e66eb2465e3e94 (diff)
cleanup - no need for salhelper::Thread mostly
Change-Id: I27461e094141efd364a2c21da75151da490da2f3
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/remotecontrol/BluetoothServer.cxx9
-rw-r--r--sd/source/ui/remotecontrol/BluetoothServer.hxx6
-rw-r--r--sd/source/ui/remotecontrol/Communicator.cxx8
-rw-r--r--sd/source/ui/remotecontrol/Communicator.hxx1
-rw-r--r--sd/source/ui/remotecontrol/DiscoveryService.cxx10
-rw-r--r--sd/source/ui/remotecontrol/DiscoveryService.hxx8
-rw-r--r--sd/source/ui/remotecontrol/Listener.cxx3
-rw-r--r--sd/source/ui/remotecontrol/Listener.hxx1
-rw-r--r--sd/source/ui/remotecontrol/Server.cxx1
-rw-r--r--sd/source/ui/remotecontrol/Transmitter.cxx7
-rw-r--r--sd/source/ui/remotecontrol/Transmitter.hxx8
11 files changed, 28 insertions, 34 deletions
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index 56fd4718f068..41255ba91fc5 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -86,9 +86,8 @@ DBusGProxy* bluezGetDefaultAdapter( DBusGConnection* aConnection,
}
#endif // defined(LINUX) && defined(ENABLE_DBUS)
-BluetoothServer::BluetoothServer( std::vector<Communicator*>* pCommunicators ):
- Thread( "BluetoothServer" ),
- mpCommunicators( pCommunicators )
+BluetoothServer::BluetoothServer( std::vector<Communicator*>* pCommunicators )
+ : mpCommunicators( pCommunicators )
{
}
@@ -238,7 +237,7 @@ void BluetoothServer::setDiscoverable( bool aDiscoverable )
#endif
}
-void BluetoothServer::execute()
+void SAL_CALL BluetoothServer::run()
{
SAL_INFO( "sdremote.bluetooth", "BluetoothServer::execute called" );
#if (defined(LINUX) && !defined(__FreeBSD_kernel__)) && defined(ENABLE_DBUS)
@@ -435,7 +434,7 @@ void BluetoothServer::setup( std::vector<Communicator*>* pCommunicators )
return;
spServer = new BluetoothServer( pCommunicators );
- spServer->launch();
+ spServer->create();
}
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.hxx b/sd/source/ui/remotecontrol/BluetoothServer.hxx
index 317a6f03ac2e..51be45f7d9bc 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.hxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.hxx
@@ -9,7 +9,7 @@
#ifndef _SD_IMPRESSREMOTE_BLUETOOTHSERVER_HXX
#define _SD_IMPRESSREMOTE_BLUETOOTHSERVER_HXX
-#include <salhelper/thread.hxx>
+#include <osl/thread.hxx>
#include <vector>
namespace sd
@@ -17,7 +17,7 @@ namespace sd
class Communicator;
class BluetoothServer:
- public salhelper::Thread
+ public osl::Thread
{
public:
static void setup( std::vector<Communicator*>* pCommunicators );
@@ -29,7 +29,7 @@ namespace sd
~BluetoothServer();
static BluetoothServer *spServer;
- void execute(); // salhelper::Thread
+ virtual void SAL_CALL run();
std::vector<Communicator*>* mpCommunicators;
};
diff --git a/sd/source/ui/remotecontrol/Communicator.cxx b/sd/source/ui/remotecontrol/Communicator.cxx
index 0d1beb62d1f3..f567b106ff8d 100644
--- a/sd/source/ui/remotecontrol/Communicator.cxx
+++ b/sd/source/ui/remotecontrol/Communicator.cxx
@@ -12,7 +12,6 @@
#include <comphelper/processfactory.hxx>
#include "Communicator.hxx"
-#include "ImagePreparer.hxx"
#include "Listener.hxx"
#include "Receiver.hxx"
#include "RemoteServer.hxx"
@@ -38,7 +37,7 @@ Communicator::~Communicator()
void Communicator::execute()
{
pTransmitter = new Transmitter( mpSocket );
- pTransmitter->launch();
+ pTransmitter->create();
pTransmitter->addMessage( "LO_SERVER_SERVER_PAIRED\n\n",
Transmitter::PRIORITY_HIGH );
@@ -99,8 +98,9 @@ void Communicator::execute()
void Communicator::informListenerDestroyed()
{
- pTransmitter->addMessage( "slideshow_finished\n\n",
- Transmitter::PRIORITY_HIGH );
+ if ( pTransmitter )
+ pTransmitter->addMessage( "slideshow_finished\n\n",
+ Transmitter::PRIORITY_HIGH );
mListener.clear();
}
diff --git a/sd/source/ui/remotecontrol/Communicator.hxx b/sd/source/ui/remotecontrol/Communicator.hxx
index 81b9e673acd4..cd3e312f3065 100644
--- a/sd/source/ui/remotecontrol/Communicator.hxx
+++ b/sd/source/ui/remotecontrol/Communicator.hxx
@@ -32,7 +32,6 @@ namespace sd
class Transmitter;
class Listener;
- class ImagePreparer;
/** Class used for communication with one single client, dealing with all
* tasks specific to this client.
diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx
index 805ce0cdbd7b..f02559c36ac5 100644
--- a/sd/source/ui/remotecontrol/DiscoveryService.cxx
+++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx
@@ -32,10 +32,8 @@ using namespace rtl;
using namespace sd;
using namespace std;
-DiscoveryService::DiscoveryService()
- :
- Thread( "sd::DiscoveryService" )
-// mSocket()
+DiscoveryService::DiscoveryService() :
+ mSocket(0)
{
mSocket = socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP );
@@ -62,7 +60,7 @@ DiscoveryService::~DiscoveryService()
{
}
-void DiscoveryService::execute()
+void SAL_CALL DiscoveryService::run()
{
char aBuffer[BUFFER_SIZE];
while ( true )
@@ -97,7 +95,7 @@ void DiscoveryService::setup()
return;
spService = new DiscoveryService();
- spService->launch();
+ spService->create();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/remotecontrol/DiscoveryService.hxx b/sd/source/ui/remotecontrol/DiscoveryService.hxx
index 46c629b34927..02486ba6a324 100644
--- a/sd/source/ui/remotecontrol/DiscoveryService.hxx
+++ b/sd/source/ui/remotecontrol/DiscoveryService.hxx
@@ -16,7 +16,7 @@
#include <osl/socket.hxx>
#include <rtl/ref.hxx>
-#include <salhelper/thread.hxx>
+#include <osl/thread.hxx>
namespace css = ::com::sun::star;
@@ -35,7 +35,7 @@ namespace sd
- class DiscoveryService : public salhelper::Thread
+ class DiscoveryService : public osl::Thread
{
public:
static void setup();
@@ -45,7 +45,7 @@ namespace sd
~DiscoveryService();
static DiscoveryService *spService;
- void execute();
+ virtual void SAL_CALL run();
// osl::DatagramSocket mSocket;
int mSocket;
@@ -54,4 +54,4 @@ namespace sd
}
#endif // _SD_IMPRESSREMOTE_DISCOVERYSERVICE_HXX
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/remotecontrol/Listener.cxx b/sd/source/ui/remotecontrol/Listener.cxx
index 344fc27499a2..30b29a90a4ce 100644
--- a/sd/source/ui/remotecontrol/Listener.cxx
+++ b/sd/source/ui/remotecontrol/Listener.cxx
@@ -14,6 +14,7 @@
#include <rtl/strbuf.hxx>
#include "Listener.hxx"
+#include "ImagePreparer.hxx"
using namespace sd;
using namespace ::com::sun::star::presentation;
@@ -53,7 +54,7 @@ void Listener::init( const css::uno::Reference< css::presentation::XSlideShowCon
Transmitter::PRIORITY_HIGH );
ImagePreparer* pPreparer = new ImagePreparer( aController, pTransmitter );
- pPreparer->launch();
+ pPreparer->create();
}
else
{
diff --git a/sd/source/ui/remotecontrol/Listener.hxx b/sd/source/ui/remotecontrol/Listener.hxx
index 49405a60b380..63f7dc32c41b 100644
--- a/sd/source/ui/remotecontrol/Listener.hxx
+++ b/sd/source/ui/remotecontrol/Listener.hxx
@@ -20,7 +20,6 @@
#include "Communicator.hxx"
#include "Transmitter.hxx"
-#include "ImagePreparer.hxx"
namespace css = ::com::sun::star;
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index c2bff30e5af9..b33b64ea4a60 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -24,7 +24,6 @@
#include "sddll.hxx"
#include "DiscoveryService.hxx"
-#include "ImagePreparer.hxx"
#include "Listener.hxx"
#include "Receiver.hxx"
#include "RemoteServer.hxx"
diff --git a/sd/source/ui/remotecontrol/Transmitter.cxx b/sd/source/ui/remotecontrol/Transmitter.cxx
index 2b0eb1a6e7e9..e8e3388d7e88 100644
--- a/sd/source/ui/remotecontrol/Transmitter.cxx
+++ b/sd/source/ui/remotecontrol/Transmitter.cxx
@@ -14,8 +14,7 @@ using namespace osl; // Sockets etc.
using namespace sd;
Transmitter::Transmitter( BufferedStreamSocket* aSocket )
- : Thread( "TransmitterThread" ),
- pStreamSocket( aSocket ),
+ : pStreamSocket( aSocket ),
mQueuesNotEmpty(),
mFinishRequested(),
mQueueMutex(),
@@ -24,7 +23,7 @@ Transmitter::Transmitter( BufferedStreamSocket* aSocket )
{
}
-void Transmitter::execute()
+void SAL_CALL Transmitter::run()
{
while ( true )
{
@@ -85,4 +84,4 @@ void Transmitter::addMessage( const OString& aMessage, const Priority aPriority
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/remotecontrol/Transmitter.hxx b/sd/source/ui/remotecontrol/Transmitter.hxx
index e227c577e2e7..80e09b1793df 100644
--- a/sd/source/ui/remotecontrol/Transmitter.hxx
+++ b/sd/source/ui/remotecontrol/Transmitter.hxx
@@ -12,7 +12,7 @@
#include <osl/conditn.hxx>
#include <osl/mutex.hxx>
#include "BufferedStreamSocket.hxx"
-#include <salhelper/thread.hxx>
+#include <osl/thread.hxx>
#include <rtl/string.hxx>
#include <queue>
@@ -21,7 +21,7 @@ namespace sd
{
class Transmitter
-: public salhelper::Thread
+: public osl::Thread
{
public:
enum Priority { PRIORITY_LOW = 1, PRIORITY_HIGH };
@@ -31,7 +31,7 @@ public:
void notifyFinished();
private:
- void execute();
+ virtual void SAL_CALL run();
::sd::BufferedStreamSocket* pStreamSocket;
@@ -46,4 +46,4 @@ private:
}
#endif // _SD_IMPRESSREMOTE_TRANSMITTER_HXX
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */