File indexing completed on 2024-05-12 05:10:50

0001 /*
0002   SPDX-FileCopyrightText: 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
0003   SPDX-FileCopyrightText: 2010-2012 Sérgio Martins <iamsergio@gmail.com>
0004 
0005   SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #pragma once
0009 
0010 #include <Akonadi/Collection>
0011 #include <Akonadi/Item>
0012 #include <KCalendarCore/Incidence>
0013 
0014 #include <QString>
0015 #include <QStringList>
0016 
0017 /**
0018  * Util functions that have no place to live.
0019  */
0020 
0021 class QWidget;
0022 
0023 namespace Akonadi
0024 {
0025 namespace CalendarUtils
0026 {
0027 [[nodiscard]] QString fullName();
0028 [[nodiscard]] QString email();
0029 [[nodiscard]] bool thatIsMe(const QString &email);
0030 
0031 // faster version, because we know that attendee->email() is only the email address
0032 [[nodiscard]] bool thatIsMe(const KCalendarCore::Attendee &attendee);
0033 
0034 [[nodiscard]] QStringList allEmails();
0035 
0036 [[nodiscard]] Akonadi::Collection
0037 selectCollection(QWidget *parent, int &dialogCode, const QStringList &mimeTypes, const Akonadi::Collection &defaultCollection = Akonadi::Collection());
0038 }
0039 }