ewsmtaresource.h 1.08 KB
Newer Older
1
/*
2
3
4
    SPDX-FileCopyrightText: 2015-2016 Krzysztof Nowicki <krissn@op.pl>

    SPDX-License-Identifier: LGPL-2.0-or-later
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
*/

#ifndef EWSMTARESOURCE_H
#define EWSMTARESOURCE_H

#include <AkonadiAgentBase/ResourceBase>
#include <AkonadiAgentBase/TransportResourceBase>
#include <AkonadiCore/Item>

class OrgKdeAkonadiEwsResourceInterface;

class EwsMtaResource : public Akonadi::ResourceBase, public Akonadi::TransportResourceBase
{
    Q_OBJECT
public:
    explicit EwsMtaResource(const QString &id);
Laurent Montel's avatar
Laurent Montel committed
21
    ~EwsMtaResource() override;
22
23
24
25
26
27
28
29
30
31
32
33
34

    void sendItem(const Akonadi::Item &item) override;
public Q_SLOTS:
    void configure(WId windowId) override;
protected Q_SLOTS:
    void retrieveCollections() override;
    void retrieveItems(const Akonadi::Collection &collection) override;
    bool retrieveItems(const Akonadi::Item::List &items, const QSet<QByteArray> &parts) override;
private Q_SLOTS:
    void messageSent(const QString &id, const QString &error);
private:
    bool connectEws();

Laurent Montel's avatar
Laurent Montel committed
35
    OrgKdeAkonadiEwsResourceInterface *mEwsResource = nullptr;
36
37
38
39
    QHash<QString, Akonadi::Item> mItemHash;
};

#endif