| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2019 Volker Krause <vkrause@kde.org> |
| 3 | |
| 4 | SPDX-License-Identifier: LGPL-2.0-or-later |
| 5 | */ |
| 6 | |
| 7 | #ifndef KDAV_PROTOCOLINFO_H |
| 8 | #define KDAV_PROTOCOLINFO_H |
| 9 | |
| 10 | #include "enums.h" |
| 11 | #include "kdav_export.h" |
| 12 | |
| 13 | namespace KDAV |
| 14 | { |
| 15 | /*! |
| 16 | * \namespace KDAV::ProtocolInfo |
| 17 | * \inheaderfile KDAV/ProtocolInfo |
| 18 | * \inmodule KDAV |
| 19 | * |
| 20 | * \brief Information about a DAV protocol. |
| 21 | */ |
| 22 | namespace ProtocolInfo |
| 23 | { |
| 24 | /*! |
| 25 | * Returns whether the \a protocol dialect supports the MULTIGET command. |
| 26 | * |
| 27 | * If MULTIGET is supported, the content of all DAV resources |
| 28 | * can be fetched in Akonadi::ResourceBase::retrieveItems() already and |
| 29 | * there is no need to call Akonadi::ResourceBase::retrieveItem() for every single |
| 30 | * DAV resource. |
| 31 | */ |
| 32 | Q_REQUIRED_RESULT KDAV_EXPORT bool useMultiget(KDAV::Protocol protocol); |
| 33 | |
| 34 | /*! Returns the principal home set of \a protocol. */ |
| 35 | Q_REQUIRED_RESULT KDAV_EXPORT QString principalHomeSet(KDAV::Protocol protocol); |
| 36 | |
| 37 | /*! Returns the principal home set namespace of \a protocol. */ |
| 38 | Q_REQUIRED_RESULT KDAV_EXPORT QString principalHomeSetNS(KDAV::Protocol protocol); |
| 39 | |
| 40 | /*! |
| 41 | * Returns the untranslated name of the given DAV \a protocol dialect. |
| 42 | */ |
| 43 | Q_REQUIRED_RESULT KDAV_EXPORT QString protocolName(KDAV::Protocol protocol); |
| 44 | |
| 45 | /*! |
| 46 | * Returns the protocol matching the given name. This is the opposite of |
| 47 | * ProtocolInfo::protocolName(). |
| 48 | */ |
| 49 | Q_REQUIRED_RESULT KDAV_EXPORT KDAV::Protocol protocolByName(const QString &name); |
| 50 | |
| 51 | /*! |
| 52 | * Returns the mimetype that shall be used for contact DAV resources using \a protocol. |
| 53 | */ |
| 54 | Q_REQUIRED_RESULT KDAV_EXPORT QString contactsMimeType(KDAV::Protocol protocol); |
| 55 | } |
| 56 | |
| 57 | } |
| 58 | |
| 59 | #endif // KDAV_PROTOCOLINFO_H |
| 60 | |