Kaydet (Commit) 06d18374 authored tarafından Noel Grandin's avatar Noel Grandin

use SimpleReferenceObject in extensions/update module

to replace hand-rolled version

Change-Id: I4cd74b3e95a61c32d3aa52646d654ce306791fae
üst 183e062e
......@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,extensions_test_update, \
cppu \
cppuhelper \
sal \
salhelper \
test \
unotest \
$(gb_UWINAPI) \
......
......@@ -24,6 +24,7 @@ $(eval $(call gb_Library_use_libraries,updchk,\
cppuhelper \
cppu \
sal \
salhelper \
))
ifeq ($(OS),WNT)
......
......@@ -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
......
......@@ -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() {}
};
......
......@@ -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: */
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment