File indexing completed on 2025-02-16 04:50:14
0001 /* 0002 SPDX-FileCopyrightText: 2006 Till Adam <adam@kde.org> 0003 SPDX-FileCopyrightText: 2009 David Jarvie <djarvie@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #pragma once 0009 0010 #include "icalresourcebase.h" 0011 0012 #include <KCalendarCore/IncidenceBase> 0013 0014 class ICalResource : public ICalResourceBase 0015 { 0016 Q_OBJECT 0017 0018 public: 0019 explicit ICalResource(const QString &id); 0020 ~ICalResource() override; 0021 0022 protected: 0023 /** 0024 * Constructor for derived classes. 0025 * @param mimeTypes mimeTypes to be handled by the resource. 0026 * @param icon icon name to use. 0027 */ 0028 ICalResource(const QString &id, const QStringList &mimeTypes, const QString &icon); 0029 0030 bool doRetrieveItems(const Akonadi::Item::List &items, const QSet<QByteArray> &parts) override; 0031 void doRetrieveItems(const Akonadi::Collection &col) override; 0032 0033 void itemAdded(const Akonadi::Item &item, const Akonadi::Collection &) override; 0034 void itemChanged(const Akonadi::Item &item, const QSet<QByteArray> &parts) override; 0035 0036 /** 0037 Returns the Akonadi specific @c text/calendar sub MIME type of the given @p incidence. 0038 */ 0039 virtual QString mimeType(const KCalendarCore::IncidenceBase::Ptr &incidence) const; 0040 0041 /** 0042 Returns a list of all calendar component sub MIME types. 0043 */ 0044 virtual QStringList allMimeTypes() const; 0045 };