From 59e7685d8d812ee8773f57475cbe3aa2a0bdfc81 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Wed, 13 Oct 2010 01:56:29 -0500 Subject: Create an abstract interface to be used to implement a SolarMutex --- sal/inc/osl/mutex.hxx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'sal') diff --git a/sal/inc/osl/mutex.hxx b/sal/inc/osl/mutex.hxx index 3eb4c58a62c6..ba4d98dac763 100644 --- a/sal/inc/osl/mutex.hxx +++ b/sal/inc/osl/mutex.hxx @@ -247,6 +247,29 @@ namespace osl typedef Guard MutexGuard; typedef ClearableGuard ClearableMutexGuard; typedef ResettableGuard< Mutex > ResettableMutexGuard; + + /** SolarMutex interface, needed for SolarMutex. + Deprecated, used just for Application::GetSolarMutex(). + */ + class SolarMutex + { + public: + /** Blocks if mutex is already in use + */ + virtual void SAL_CALL acquire() = 0; + + /** Tries to get the mutex without blocking. + */ + virtual sal_Bool SAL_CALL tryToAcquire() = 0; + + /** Releases the mutex. + */ + virtual void SAL_CALL release() = 0; + + protected: + SolarMutex() {} + virtual ~SolarMutex() {} + }; } #endif /* __cplusplus */ -- cgit