/* -*- 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 .
*/
// UNO service name for the content. inline constexpr OUString WEBDAV_CONTENT_SERVICE_NAME = u"com.sun.star.ucb.WebDAVContent"_ustr;
class ContentProvider; class ContentProperties; class CachableContentProperties;
class Content : public ::ucbhelper::ContentImplHelper, public css::ucb::XContentCreator
{ enum ResourceType
{
UNKNOWN, // the type of the Web resource is unknown
NOT_FOUND, // the Web resource does not exists
NON_DAV, // the Web resource exists but it's not DAV
DAV, // the type of the Web resource is DAV with lock/unlock available
DAV_NOLOCK // the type of the Web resource is DAV with no lock/unlock available
};
std::unique_ptr< DAVResourceAccess > m_xResAccess;
std::unique_ptr< CachableContentProperties > m_xCachedProps; // locally cached props
OUString m_aEscapedTitle; // resource type for general DAV methods
ResourceType m_eResourceType; // resource type for general LOCK method only
ResourceType m_eResourceTypeForLocks;
ContentProvider* m_pProvider; // No need for a ref, base class holds object bool m_bTransient; boolconst m_bCollection; bool m_bDidGetOrHead;
std::vector< OUString > m_aFailedPropNames; // Options Cache lifetime // for web site implementing OPTIONS, but not dav
sal_uInt32 m_nOptsCacheLifeImplWeb; // for WebDAV site where OPTIONS is mandatory
sal_uInt32 m_nOptsCacheLifeDAV; // same as above, but when the resource is locked by us
sal_uInt32 m_nOptsCacheLifeDAVLocked; // For web site not implementing OPTIONS // during this time we assume the site doesn't turn to WebDAV // but remains a simple Web
sal_uInt32 m_nOptsCacheLifeNotImpl; // When resource is not found // may be the resource is unavailable only briefly? // so better have this small
sal_uInt32 m_nOptsCacheLifeNotFound;
/// Use OPTIONS method to retrieve the type of the Web resource /// @throws css::uno::Exception void getResourceOptions( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv,
DAVOptions& rDAVOptions, const std::unique_ptr< DAVResourceAccess > & rResAccess, bool * networkAccessAllowed = nullptr);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.