#ifndef __DATASTRUCTURE_H__
#define __DATASTRUCTURE_H__

#include <QObject>
#include <QQmlEngine>

constexpr int ImageWidth = 576;
constexpr int ImageHeight = 320;
enum class ImageFormat : int {
    Jpeg = 0,
    YUV,  // nv21 576x320
    None, // 新增枚举需要放在这上面
};
std::ostream &operator<<(std::ostream &os, const ImageFormat &format);

struct NetworkInfomation {
    Q_GADGET
    QML_NAMED_ELEMENT(networkInfomation)
    Q_PROPERTY(bool dhcp MEMBER dhcp)
    Q_PROPERTY(QString ip MEMBER ip)
    Q_PROPERTY(QString netmask MEMBER netmask)
    Q_PROPERTY(QString gateway MEMBER gateway)
    Q_PROPERTY(QString dns MEMBER dns)
public:
    bool dhcp;
    QString ip;
    QString netmask;
    QString gateway;
    QString dns = "8.8.8.8"; // dns被屏蔽,现在默认赋值 8.8.8.8 以通过校验
};
Q_DECLARE_METATYPE(NetworkInfomation)

#endif // __DATASTRUCTURE_H__