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
13namespace KDAV
14{
15/** Information about a DAV protocol. */
16namespace ProtocolInfo
17{
18/**
19 * Returns whether the @p protocol dialect supports the MULTIGET command.
20 *
21 * If MULTIGET is supported, the content of all DAV resources
22 * can be fetched in Akonadi::ResourceBase::retrieveItems() already and
23 * there is no need to call Akonadi::ResourceBase::retrieveItem() for every single
24 * DAV resource.
25 */
26Q_REQUIRED_RESULT KDAV_EXPORT bool useMultiget(KDAV::Protocol protocol);
27
28/** Returns the principal home set of @p protocol. */
29Q_REQUIRED_RESULT KDAV_EXPORT QString principalHomeSet(KDAV::Protocol protocol);
30
31/** Returns the principal home set namespace of @p protocol. */
32Q_REQUIRED_RESULT KDAV_EXPORT QString principalHomeSetNS(KDAV::Protocol protocol);
33
34/**
35 * Returns the untranslated name of the given DAV @p protocol dialect.
36 */
37Q_REQUIRED_RESULT KDAV_EXPORT QString protocolName(KDAV::Protocol protocol);
38
39/**
40 * Returns the protocol matching the given name. This is the opposite of
41 * ProtocolInfo::protocolName().
42 */
43Q_REQUIRED_RESULT KDAV_EXPORT KDAV::Protocol protocolByName(const QString &name);
44
45/**
46 * Returns the mimetype that shall be used for contact DAV resources using @p protocol.
47 */
48Q_REQUIRED_RESULT KDAV_EXPORT QString contactsMimeType(KDAV::Protocol protocol);
49}
50
51}
52
53#endif // KDAV_PROTOCOLINFO_H
54

source code of kdav/src/common/protocolinfo.h