36 lines
976 B
C++
36 lines
976 B
C++
// /mnt/c/Users/javie/wino-mail-dtkqt/include/synchronizerprovider.h
|
|
#ifndef SYNCHRONIZERPROVIDER_H
|
|
#define SYNCHRONIZERPROVIDER_H
|
|
|
|
#include <QObject>
|
|
#include <QList>
|
|
|
|
// Forward declarations for models (assuming they are defined elsewhere)
|
|
class FolderListModel;
|
|
class EmailListModel;
|
|
|
|
class SynchronizerProvider : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit SynchronizerProvider(QObject *parent = nullptr);
|
|
|
|
// Primary method to fetch all necessary data
|
|
void syncAllData();
|
|
|
|
signals:
|
|
// Signals emitted upon successful synchronization
|
|
void dataSynchronized(const QList<QString>& folders, const QList<EmailItem>& emails);
|
|
|
|
public slots:
|
|
// This slot will be called by the main window to initiate the load
|
|
void requestSync();
|
|
|
|
private:
|
|
// Simulated backend interaction methods
|
|
QList<QString> fetchFoldersFromBackend() const;
|
|
QList<EmailItem> fetchEmailsFromBackend(const QString& folder) const;
|
|
};
|
|
|
|
#endif // SYNCHRONIZERPROVIDER_H
|