Files
frelay/Struct/InfoMsg.h

32 lines
695 B
C
Raw Normal View History

2025-06-17 11:48:13 +08:00
#ifndef INFO_MSG_H
2025-06-15 14:31:54 +08:00
#define INFO_MSG_H
#include <QBuffer>
#include <QDataStream>
#include <QIODevice>
#include <QString>
#include <QVector>
struct InfoMsg {
qint32 mark{};
QString msg;
2025-06-17 16:42:39 +08:00
QString fromPath;
QString toPath;
quint64 size{};
quint32 permissions{};
2025-06-15 14:31:54 +08:00
void serialize(QDataStream& data) const
{
2025-06-17 16:42:39 +08:00
data << mark << msg << fromPath << toPath << size << permissions;
2025-06-15 14:31:54 +08:00
}
void deserialize(QDataStream& data)
{
2025-06-17 16:42:39 +08:00
data >> mark >> msg >> fromPath >> toPath >> size >> permissions;
2025-06-15 14:31:54 +08:00
}
};
QDataStream& operator<<(QDataStream& data, const InfoMsg& info);
QDataStream& operator>>(QDataStream& data, InfoMsg& info);
2025-06-17 16:42:39 +08:00
#endif // INFO_MSG_H