Fix build: synchronize Request API, fix GmailSynchronizer, and migrate UI to Qt6 Widgets
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
// changetype.h
|
||||
#ifndef CHANGETYPE_H
|
||||
#define CHANGETYPE_H
|
||||
|
||||
#include "eventbus.h"
|
||||
#include <QString>
|
||||
#include <QDateTime>
|
||||
|
||||
enum ChangeType {
|
||||
ADD,
|
||||
DELETE,
|
||||
UPDATE
|
||||
};
|
||||
|
||||
struct MailChange {
|
||||
QString mailItemId;
|
||||
QString type; // ADD, DELETE, UPDATE
|
||||
QString subject;
|
||||
QString body;
|
||||
QDateTime timestamp;
|
||||
QString changeSource; // e.g., "IMAP_SYNC", "SMTP_SYNC"
|
||||
};
|
||||
|
||||
class ChangeProcessor : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ChangeProcessor(EventBus* bus, QObject *parent = nullptr);
|
||||
|
||||
void processChange(const MailChange& change);
|
||||
|
||||
signals:
|
||||
void mailChangeDetected(const MailChange& change);
|
||||
|
||||
private:
|
||||
EventBus* m_eventBus;
|
||||
// In a real system, this would interface with the database/DAO layer.
|
||||
void applyChangeToModel(const MailChange& change);
|
||||
};
|
||||
|
||||
#endif // CHANGETYPE_H
|
||||
Reference in New Issue
Block a user