diff options
author | Noel Grandin <noel@peralex.com> | 2014-07-09 10:29:33 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-07-10 11:04:12 +0200 |
commit | 06d18374deabe00712d80eaee291fc966ce6cd99 (patch) | |
tree | f19df7d5d9b9f62d3a910014ef811af1b7df1677 /extensions | |
parent | 183e062e9f22d51e59054396ebb75e2148b067d7 (diff) |
use SimpleReferenceObject in extensions/update module
to replace hand-rolled version
Change-Id: I4cd74b3e95a61c32d3aa52646d654ce306791fae
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/CppunitTest_extensions_test_update.mk | 1 | ||||
-rw-r--r-- | extensions/Library_updchk.mk | 1 | ||||
-rw-r--r-- | extensions/source/update/check/actionlistener.hxx | 5 | ||||
-rw-r--r-- | extensions/source/update/check/download.hxx | 5 | ||||
-rw-r--r-- | extensions/source/update/check/updatecheck.cxx | 16 | ||||
-rw-r--r-- | extensions/source/update/check/updatecheck.hxx | 5 | ||||
-rw-r--r-- | extensions/source/update/check/updatecheckconfiglistener.hxx | 9 |
7 files changed, 13 insertions, 29 deletions
diff --git a/extensions/CppunitTest_extensions_test_update.mk b/extensions/CppunitTest_extensions_test_update.mk index 3fb72f3e6380..b6149b04a312 100644 --- a/extensions/CppunitTest_extensions_test_update.mk +++ b/extensions/CppunitTest_extensions_test_update.mk @@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,extensions_test_update, \ cppu \ cppuhelper \ sal \ + salhelper \ test \ unotest \ $(gb_UWINAPI) \ diff --git a/extensions/Library_updchk.mk b/extensions/Library_updchk.mk index 4ef8bde83b92..c7299d3116d7 100644 --- a/extensions/Library_updchk.mk +++ b/extensions/Library_updchk.mk @@ -24,6 +24,7 @@ $(eval $(call gb_Library_use_libraries,updchk,\ cppuhelper \ cppu \ sal \ + salhelper \ )) ifeq ($(OS),WNT) diff --git a/extensions/source/update/check/actionlistener.hxx b/extensions/source/update/check/actionlistener.hxx index 97d92b9c2bc1..25deba207292 100644 --- a/extensions/source/update/check/actionlistener.hxx +++ b/extensions/source/update/check/actionlistener.hxx @@ -21,8 +21,9 @@ #define INCLUDED_EXTENSIONS_SOURCE_UPDATE_CHECK_ACTIONLISTENER_HXX #include <rtl/ref.hxx> +#include <salhelper/simplereferenceobject.hxx> -class IActionListener : public rtl::IReference +class IActionListener : public virtual salhelper::SimpleReferenceObject { public: @@ -34,7 +35,7 @@ class IActionListener : public rtl::IReference virtual void closeAfterFailure() = 0; protected: - ~IActionListener() {} + virtual ~IActionListener() {} }; #endif // INCLUDED_EXTENSIONS_SOURCE_UPDATE_CHECK_ACTIONLISTENER_HXX diff --git a/extensions/source/update/check/download.hxx b/extensions/source/update/check/download.hxx index df12f48a8503..db3968f9163b 100644 --- a/extensions/source/update/check/download.hxx +++ b/extensions/source/update/check/download.hxx @@ -26,8 +26,9 @@ #include <rtl/ustring.hxx> #include <osl/conditn.hxx> #include <osl/file.h> +#include <salhelper/simplereferenceobject.hxx> -struct DownloadInteractionHandler : public rtl::IReference +struct DownloadInteractionHandler : public virtual salhelper::SimpleReferenceObject { virtual bool checkDownloadDestination(const OUString& rFileName) = 0; @@ -47,7 +48,7 @@ struct DownloadInteractionHandler : public rtl::IReference virtual void downloadFinished(const OUString& rFileName) = 0; protected: - ~DownloadInteractionHandler() {} + virtual ~DownloadInteractionHandler() {} }; diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index 3702f1fec4a4..e520c5a99a38 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -1606,20 +1606,4 @@ UpdateCheck::autoCheckIntervalChanged() m_aCondition.set(); }; - - -oslInterlockedCount SAL_CALL -UpdateCheck::acquire() -{ - return ReferenceObject::acquire(); -} - - - -oslInterlockedCount SAL_CALL -UpdateCheck::release() -{ - return ReferenceObject::release(); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/extensions/source/update/check/updatecheck.hxx b/extensions/source/update/check/updatecheck.hxx index ac971db52356..bf27bb4e0df2 100644 --- a/extensions/source/update/check/updatecheck.hxx +++ b/extensions/source/update/check/updatecheck.hxx @@ -55,7 +55,6 @@ class UpdateCheck : public UpdateCheckConfigListener, public IActionListener, public DownloadInteractionHandler, - public salhelper::ReferenceObject, public rtl::StaticWithInit< rtl::Reference< UpdateCheck >, UpdateCheckInitData > { UpdateCheck(); @@ -120,10 +119,6 @@ public: void resume() SAL_OVERRIDE; void closeAfterFailure() SAL_OVERRIDE; - // rtl::IReference - virtual oslInterlockedCount SAL_CALL acquire() SAL_OVERRIDE; - virtual oslInterlockedCount SAL_CALL release() SAL_OVERRIDE; - private: // Schedules or cancels next automatic check for updates diff --git a/extensions/source/update/check/updatecheckconfiglistener.hxx b/extensions/source/update/check/updatecheckconfiglistener.hxx index e6663b8ed7eb..b96355ae1cbe 100644 --- a/extensions/source/update/check/updatecheckconfiglistener.hxx +++ b/extensions/source/update/check/updatecheckconfiglistener.hxx @@ -17,22 +17,23 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <rtl/ref.hxx> - #ifndef INCLUDED_EXTENSIONS_SOURCE_UPDATE_CHECK_UPDATECHECKCONFIGLISTENER_HXX #define INCLUDED_EXTENSIONS_SOURCE_UPDATE_CHECK_UPDATECHECKCONFIGLISTENER_HXX +#include <rtl/ref.hxx> +#include <salhelper/simplereferenceobject.hxx> + /* This interface should be implemented by classes acting * as controller (as in the MVC pattern). */ -struct UpdateCheckConfigListener : public rtl::IReference +struct UpdateCheckConfigListener : public virtual salhelper::SimpleReferenceObject { virtual void autoCheckStatusChanged(bool enabled) = 0; virtual void autoCheckIntervalChanged() = 0; protected: - ~UpdateCheckConfigListener() {} + virtual ~UpdateCheckConfigListener() {} }; #endif |