// src/services/synchronizerprovider.h
#ifndef SYNCHRONIZER_PROVIDER_H
#define SYNCHRONIZER_PROVIDER_H

#include <QString>
#include <QObject>
#include "mailservice.h" // Include MailService definitions if needed for context

class SynchronizerProvider {
public:
    virtual ~SynchronizerProvider() = default;
    virtual bool isPop3Supported() const = 0;
    virtual QVector<MailItem> fetchMailItems(const QString &folderId, int offset) = 0;
    virtual bool sendMail(const MailItem &mail, const QString &accountId) = 0;
    virtual void fetchMails(const QString &accountId, const QString &folderId) = 0;
    virtual void moveMail(const QString &mailItemId, const QString &targetFolderId) = 0;
    virtual void deleteMail(const QString &mailItemId) = 0;
    virtual void markAsRead(const QString &mailItemId, bool read) = 0;
};

// Singleton pattern for easy access
class SynchronizerProviderInstance {
public:
    static SynchronizerProvider* instance();
    void setProvider(SynchronizerProvider* provider);

private:
    SynchronizerProviderInstance() = default;
    SynchronizerProvider* m_provider = nullptr;
};

#endif // SYNCHRONIZER_PROVIDER_H