summaryrefslogtreecommitdiff
path: root/include/comphelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-05-14 13:15:38 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-05-14 14:41:54 +0200
commit11fd73acce5d8bff7025bb6ddcbaf99d9d70b545 (patch)
tree1a3d4dbe24e4bbbf301eca3a277e211483b3312a /include/comphelper
parenta883783c2a1b0e7a8ee5b46387d1e1e3bc5e19bd (diff)
SolarMutex does not belong into the URE interface
...so move it from osl/mutex.hxx to its own comphelper/solarmutex.hxx. It looks like a newbie mistake that 59e7685d8d812ee8773f57475cbe3aa2a0bdfc81 "Create an abstract interface to be used to implement a SolarMutex" put it here in the first place. I do not consider this an incompatible change really, as no external URE client code should have used SolarMutex anyway. (Also included some clean up, like removing unused {Clearable,Resettable}SolarGuard, and spelling out SolarGuard in the few places it is used.) Change-Id: I121ffb5b7cefbc19e88b5405e5a85ffc895be852
Diffstat (limited to 'include/comphelper')
-rw-r--r--include/comphelper/ChainablePropertySet.hxx5
-rw-r--r--include/comphelper/MasterPropertySet.hxx5
-rw-r--r--include/comphelper/SettingsHelper.hxx2
-rw-r--r--include/comphelper/solarmutex.hxx50
4 files changed, 57 insertions, 5 deletions
diff --git a/include/comphelper/ChainablePropertySet.hxx b/include/comphelper/ChainablePropertySet.hxx
index 2dfe5f3ca256..62546c0605e5 100644
--- a/include/comphelper/ChainablePropertySet.hxx
+++ b/include/comphelper/ChainablePropertySet.hxx
@@ -25,6 +25,7 @@
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <comphelper/PropertyInfoHash.hxx>
#include "comphelper/comphelperdllapi.h"
+#include "comphelper/solarmutex.hxx"
namespace comphelper
{
@@ -59,7 +60,7 @@ namespace comphelper
friend class MasterPropertySet;
protected:
ChainablePropertySetInfo *mpInfo;
- osl::SolarMutex* mpMutex;
+ SolarMutex* mpMutex;
::com::sun::star::uno::Reference < com::sun::star::beans::XPropertySetInfo > mxInfo;
virtual void _preSetValues ()
@@ -89,7 +90,7 @@ namespace comphelper
throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException );
public:
- ChainablePropertySet( comphelper::ChainablePropertySetInfo* pInfo, osl::SolarMutex* pMutex = NULL )
+ ChainablePropertySet( comphelper::ChainablePropertySetInfo* pInfo, SolarMutex* pMutex = NULL )
throw();
virtual ~ChainablePropertySet()
throw();
diff --git a/include/comphelper/MasterPropertySet.hxx b/include/comphelper/MasterPropertySet.hxx
index 266137fdb9b4..00784c4f16f2 100644
--- a/include/comphelper/MasterPropertySet.hxx
+++ b/include/comphelper/MasterPropertySet.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <comphelper/PropertyInfoHash.hxx>
#include "comphelper/comphelperdllapi.h"
+#include "comphelper/solarmutex.hxx"
#include <map>
namespace comphelper
@@ -60,7 +61,7 @@ namespace comphelper
{
protected:
MasterPropertySetInfo *mpInfo;
- osl::SolarMutex* mpMutex;
+ SolarMutex* mpMutex;
sal_uInt8 mnLastId;
SlaveMap maSlaveMap;
::com::sun::star::uno::Reference < com::sun::star::beans::XPropertySetInfo > mxInfo;
@@ -92,7 +93,7 @@ namespace comphelper
throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException );
public:
- MasterPropertySet( comphelper::MasterPropertySetInfo* pInfo, ::osl::SolarMutex* pMutex = NULL )
+ MasterPropertySet( comphelper::MasterPropertySetInfo* pInfo, SolarMutex* pMutex = NULL )
throw();
virtual ~MasterPropertySet()
throw();
diff --git a/include/comphelper/SettingsHelper.hxx b/include/comphelper/SettingsHelper.hxx
index d623fa3e5494..341b7431db06 100644
--- a/include/comphelper/SettingsHelper.hxx
+++ b/include/comphelper/SettingsHelper.hxx
@@ -43,7 +43,7 @@ namespace comphelper
public ComphelperBase
{
public:
- SettingsHelperNoState ( ComphelperBaseInfo *pInfo, ::osl::SolarMutex* pMutex = NULL)
+ SettingsHelperNoState ( ComphelperBaseInfo *pInfo, SolarMutex* pMutex = NULL)
: ComphelperBase ( pInfo, pMutex )
{}
virtual ~SettingsHelperNoState () throw( ) {}
diff --git a/include/comphelper/solarmutex.hxx b/include/comphelper/solarmutex.hxx
new file mode 100644
index 000000000000..f8fce1e3a608
--- /dev/null
+++ b/include/comphelper/solarmutex.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_COMPHELPER_SOLARMUTEX_HXX
+#define INCLUDED_COMPHELPER_SOLARMUTEX_HXX
+
+#include "sal/config.h"
+
+#include "boost/noncopyable.hpp"
+#include "comphelper/comphelperdllapi.h"
+
+namespace comphelper {
+
+/** SolarMutex interface, needed for Application::GetSolarMutex().
+*/
+class COMPHELPER_DLLPUBLIC SolarMutex: private boost::noncopyable {
+public:
+ virtual void acquire() = 0;
+
+ virtual void release() = 0;
+
+ virtual bool tryToAcquire() = 0;
+
+protected:
+ SolarMutex();
+
+ virtual ~SolarMutex();
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */