31 #include <rtl/ustring.hxx>
33 #include <osl/thread.hxx>
51 :
Thread(
"NeonTickerThread" ), m_bFinish( false )
52 , m_rLockStore( rLockStore )
60 virtual void execute()
override;
67 SAL_INFO(
"ucb.ucp.webdav",
"TickerThread: start." );
81 salhelper::Thread::wait(TimeValue(0, 1000000000 / nNth));
84 SAL_INFO(
"ucb.ucp.webdav",
"TickerThread: stop." );
88 : m_pNeonLockStore( ne_lockstore_create() )
107 osl::ClearableMutexGuard aGuard(
m_aMutex);
117 rLockInfo.second.xSession->UNLOCK( pLock );
120 ne_lock_destroy( pLock );
151 if (pTickerThread.is() && pTickerThread->getIdentifier() != osl::Thread::getCurrentIdentifier())
152 pTickerThread->join();
168 rUri, RTL_TEXTENCODING_UTF8 ).getStr(), &aUri );
174 sal_Int32 nLastChanceToSendRefreshRequest )
180 =
LockInfo( xSession, nLastChanceToSendRefreshRequest );
187 osl::ClearableMutexGuard aGuard(
m_aMutex );
209 LockInfo & rInfo = rLockInfo.second;
214 osl_getSystemTime( &t1 );
216 <= sal_Int32( t1.Seconds ) )
219 sal_Int32 nlastChanceToSendRefreshRequest = -1;
222 nlastChanceToSendRefreshRequest ) )
225 = nlastChanceToSendRefreshRequest;
238 m_aRemoveDeferred.clear();
LockInfoMap m_aLockInfoMap
NeonLock * findByUri(std::u16string_view rUri)
void registerSession(HttpSession *pHttpSession)
NeonLockStore & m_rLockStore
rtl::Reference< NeonSession > xSession
void removeLockDeferred(NeonLock *pLock)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
ne_lock_store * m_pNeonLockStore
sal_Int32 nLastChanceToSendRefreshRequest
void stopTicker(osl::ClearableMutexGuard &rGuard)
rtl::Reference< TickerThread > m_pTickerThread
void addLock(NeonLock *pLock, rtl::Reference< NeonSession > const &xSession, sal_Int32 nLastChanceToSendRefreshRequest)
#define SAL_WARN_IF(condition, area, stream)
virtual void execute() override
TickerThread(NeonLockStore &rLockStore)
#define SAL_INFO(area, stream)
void removeLock(NeonLock *pLock)
std::vector< NeonLock * > m_aRemoveDeferred