diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-02-23 10:31:56 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-02-23 10:47:37 +0100 |
commit | 40d21ab3c75a7c18de940162563015ae80136709 (patch) | |
tree | d0a3333ba65b560c0cda709e85b03b69fd983dd3 /desktop/source/app/officeipcthread.hxx | |
parent | e4c7862ba289cc11b88f6059517fff091ab074f7 (diff) |
Adapted OfficeIPCThread to safer-to-use salhelper::Thread
Diffstat (limited to 'desktop/source/app/officeipcthread.hxx')
-rw-r--r-- | desktop/source/app/officeipcthread.hxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/desktop/source/app/officeipcthread.hxx b/desktop/source/app/officeipcthread.hxx index a1fe4c5f772a..8dfda8303965 100644 --- a/desktop/source/app/officeipcthread.hxx +++ b/desktop/source/app/officeipcthread.hxx @@ -34,10 +34,11 @@ #include <osl/pipe.hxx> #include <osl/security.hxx> #include <osl/signal.h> +#include <rtl/ref.hxx> #include <rtl/ustring.hxx> #include <cppuhelper/implbase2.hxx> #include <osl/conditn.hxx> -#include <osl/thread.hxx> +#include <salhelper/thread.hxx> #include "boost/optional.hpp" namespace desktop @@ -70,10 +71,10 @@ struct ProcessDocumentsRequest }; class DispatchWatcher; -class OfficeIPCThread : public osl::Thread +class OfficeIPCThread : public salhelper::Thread { private: - static OfficeIPCThread* pGlobalOfficeIPCThread; + static rtl::Reference< OfficeIPCThread > pGlobalOfficeIPCThread; osl::Pipe maPipe; osl::StreamPipe maStreamPipe; @@ -101,9 +102,10 @@ class OfficeIPCThread : public osl::Thread OfficeIPCThread(); - protected: + virtual ~OfficeIPCThread(); + /// Working method which should be overridden - virtual void SAL_CALL run(); + virtual void execute(); public: enum Status @@ -113,8 +115,6 @@ class OfficeIPCThread : public osl::Thread IPC_STATUS_BOOTSTRAP_ERROR }; - virtual ~OfficeIPCThread(); - // controlling pipe communication during shutdown static void SetDowning(); static void EnableRequests( bool i_bEnable = true ); @@ -126,7 +126,9 @@ class OfficeIPCThread : public osl::Thread static Status EnableOfficeIPCThread(); static void DisableOfficeIPCThread(); // start dispatching events... - static void SetReady(OfficeIPCThread* pThread = NULL); + static void SetReady( + rtl::Reference< OfficeIPCThread > const & pThread = + rtl::Reference< OfficeIPCThread >()); bool AreRequestsEnabled() const { return mbRequestsEnabled && ! mbDowning; } }; |