Fix build: synchronize Request API, fix GmailSynchronizer, and migrate UI to Qt6 Widgets
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#ifndef MIMESTORAGESERVICE_H
|
||||
#define MIMESTORAGESERVICE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include "core/mailitem.h"
|
||||
|
||||
class MimeStorageService : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MimeStorageService(QObject *parent = nullptr);
|
||||
~MimeStorageService() override = default;
|
||||
|
||||
QString saveEmlFile(const QString &accountId, const QString &folderId, const MailItem &mail);
|
||||
QString getEmlFilePath(const QString &fileId) const;
|
||||
QByteArray readEmlFile(const QString &fileId) const;
|
||||
bool deleteEmlFile(const QString &fileId);
|
||||
|
||||
QStringList listAttachments(const QString &mailItemId) const;
|
||||
bool saveAttachment(const QString &mailItemId, const QString &fileName, const QByteArray &data);
|
||||
|
||||
private:
|
||||
QString storagePath() const;
|
||||
QString ensureDirectory(const QString &path) const;
|
||||
};
|
||||
|
||||
#endif // MIMESTORAGESERVICE_H
|
||||
Reference in New Issue
Block a user