summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-17 13:23:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-18 06:15:55 +0000
commit292560a957498bed70b625c992ec6bcf631dceb3 (patch)
tree4b4c39fbabf370d870ac9a5b2c6154df2238599a /ucb
parente64ea98801d20e5024da900a0ac8faaf565f4bf3 (diff)
loplugin:unusedmethods
Change-Id: Icf773925c37dde8b7404edac9864e7b10fe113b4 Reviewed-on: https://gerrit.libreoffice.org/29968 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/webdav-neon/DAVTypes.cxx53
-rw-r--r--ucb/source/ucp/webdav-neon/DAVTypes.hxx16
2 files changed, 0 insertions, 69 deletions
diff --git a/ucb/source/ucp/webdav-neon/DAVTypes.cxx b/ucb/source/ucp/webdav-neon/DAVTypes.cxx
index 5c1844d0f12d..02ae439eb758 100644
--- a/ucb/source/ucp/webdav-neon/DAVTypes.cxx
+++ b/ucb/source/ucp/webdav-neon/DAVTypes.cxx
@@ -171,31 +171,6 @@ void DAVOptionsCache::addDAVOptions( DAVOptions & rDAVOptions, const sal_uInt32
m_aTheCache[ aEncodedUrl ] = rDAVOptions;
}
-sal_uInt16 DAVOptionsCache::getHttpResponseStatusCode( const OUString & rURL, OUString & rHttpResponseStatusText )
-{
- osl::MutexGuard aGuard( m_aMutex );
- OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( NeonUri::unescape( rURL ) ) );
- normalizeURLLastChar( aEncodedUrl );
-
- DAVOptionsMap::iterator it;
- it = m_aTheCache.find( aEncodedUrl );
- if ( it != m_aTheCache.end() )
- {
- // first check for stale
- TimeValue t1;
- osl_getSystemTime( &t1 );
- if( (*it).second.getStaleTime() < t1.Seconds )
- {
- m_aTheCache.erase( it );
- return 0;
- }
-
- rHttpResponseStatusText = (*it).second.getHttpResponseStatusText();
- return (*it).second.getHttpResponseStatusCode();
- }
- return 0;
-}
-
void DAVOptionsCache::setHeadAllowed( const OUString & rURL, const bool HeadAllowed )
{
osl::MutexGuard aGuard( m_aMutex );
@@ -219,32 +194,4 @@ void DAVOptionsCache::setHeadAllowed( const OUString & rURL, const bool HeadAllo
}
}
-bool DAVOptionsCache::isHeadAllowed( const OUString & rURL )
-{
- osl::MutexGuard aGuard( m_aMutex );
- OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( NeonUri::unescape( rURL ) ) );
- normalizeURLLastChar( aEncodedUrl );
-
- DAVOptionsMap::iterator it;
- it = m_aTheCache.find( aEncodedUrl );
- if ( it != m_aTheCache.end() )
- {
- // first check for stale
- TimeValue t1;
- osl_getSystemTime( &t1 );
- if( (*it).second.getStaleTime() < t1.Seconds )
- {
- m_aTheCache.erase( it );
- return true; // to force again OPTIONS method
- }
-
- // check if the resource was present on server
- return (*it).second.isHeadAllowed();
- }
- // this value is needed because some web server don't implement
- // OPTIONS method, so the resource is considered found,
- // until detected otherwise
- return true;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/ucb/source/ucp/webdav-neon/DAVTypes.hxx b/ucb/source/ucp/webdav-neon/DAVTypes.hxx
index c7c37156bd4f..8474ad943f3a 100644
--- a/ucb/source/ucp/webdav-neon/DAVTypes.hxx
+++ b/ucb/source/ucp/webdav-neon/DAVTypes.hxx
@@ -180,22 +180,6 @@ namespace webdav_ucp
void removeDAVOptions( const OUString & rURL );
void addDAVOptions( DAVOptions & rDAVOptions, const sal_uInt32 nLifeTime );
- /** return the cached value of HTTP response status code
- If the cached value is found stale, it is removed.
-
- @param (in) OUString
- the resource URL
-
- @return int
- the cached
- are not present (meaning the resource should be checked for
- presence anyway)
- false if resource was not found
- */
- sal_uInt16 getHttpResponseStatusCode( const OUString & rURL, OUString & rHttpResponseStatusText );
-
- bool isHeadAllowed( const OUString & rURL );
-
void setHeadAllowed( const OUString & rURL, bool HeadAllowed = true );
private: