File indexing completed on 2024-04-28 03:53:56

0001 /*
0002     SPDX-FileCopyrightText: 2019 Volker Krause <vkrause@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KDAV_PROTOCOLINFO_H
0008 #define KDAV_PROTOCOLINFO_H
0009 
0010 #include "enums.h"
0011 #include "kdav_export.h"
0012 
0013 namespace KDAV
0014 {
0015 /** Information about a DAV protocol. */
0016 namespace ProtocolInfo
0017 {
0018 /**
0019  * Returns whether the @p protocol dialect supports the MULTIGET command.
0020  *
0021  * If MULTIGET is supported, the content of all DAV resources
0022  * can be fetched in Akonadi::ResourceBase::retrieveItems() already and
0023  * there is no need to call Akonadi::ResourceBase::retrieveItem() for every single
0024  * DAV resource.
0025  */
0026 Q_REQUIRED_RESULT KDAV_EXPORT bool useMultiget(KDAV::Protocol protocol);
0027 
0028 /** Returns the principal home set of @p protocol. */
0029 Q_REQUIRED_RESULT KDAV_EXPORT QString principalHomeSet(KDAV::Protocol protocol);
0030 
0031 /** Returns the principal home set namespace of @p protocol. */
0032 Q_REQUIRED_RESULT KDAV_EXPORT QString principalHomeSetNS(KDAV::Protocol protocol);
0033 
0034 /**
0035  * Returns the untranslated name of the given DAV @p protocol dialect.
0036  */
0037 Q_REQUIRED_RESULT KDAV_EXPORT QString protocolName(KDAV::Protocol protocol);
0038 
0039 /**
0040  * Returns the protocol matching the given name. This is the opposite of
0041  * ProtocolInfo::protocolName().
0042  */
0043 Q_REQUIRED_RESULT KDAV_EXPORT KDAV::Protocol protocolByName(const QString &name);
0044 
0045 /**
0046  * Returns the mimetype that shall be used for contact DAV resources using @p protocol.
0047  */
0048 Q_REQUIRED_RESULT KDAV_EXPORT QString contactsMimeType(KDAV::Protocol protocol);
0049 }
0050 
0051 }
0052 
0053 #endif // KDAV_PROTOCOLINFO_H