File indexing completed on 2025-01-19 04:46:48

0001 /*
0002   This file is part of kdepim.
0003 
0004   SPDX-FileCopyrightText: 2013 Sérgio Martins <iamsergio@gmail.com>
0005 
0006   SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 #pragma once
0010 
0011 #include <Akonadi/CalendarBase>
0012 #include <Akonadi/ITIPHandler>
0013 #include <IncidenceEditor/GroupwareUiDelegate>
0014 
0015 #include <QEventLoop>
0016 #include <QObject>
0017 
0018 class SyncItipHandler : public QObject
0019 {
0020     Q_OBJECT
0021 public:
0022     SyncItipHandler(const QString &receiver, const QString &iCal, const QString &type, const Akonadi::CalendarBase::Ptr &calendar, QObject *parent = nullptr);
0023     ~SyncItipHandler() override;
0024 
0025 public Q_SLOTS:
0026     void onITipMessageProcessed(Akonadi::ITIPHandler::Result, const QString &errorMessage);
0027 
0028 public:
0029     [[nodiscard]] QString errorMessage() const;
0030     [[nodiscard]] Akonadi::ITIPHandler::Result result() const;
0031 
0032 private:
0033     QString m_errorMessage;
0034     Akonadi::ITIPHandler::Result m_result = Akonadi::ITIPHandler::ResultSuccess;
0035     QEventLoop m_eventLoop;
0036     IncidenceEditorNG::GroupwareUiDelegate *const m_counterProposalEditorDelegate;
0037 };