38 lines
564 B
C
Raw Normal View History

2022-01-06 15:29:19 -04:00
#pragma once
#include <QJsonValue>
#include <QString>
#include <QVector>
namespace Accounts
{
class Image
{
public:
QString keyUid;
QString imgType;
QString uri;
int width;
int height;
int fileSize;
int resizeTarget;
2022-01-06 15:29:19 -04:00
};
class AccountDto
{
public:
QString name;
long timestamp;
QString identicon;
QString keycardPairing;
QString keyUid;
QVector<Image> images;
2022-01-06 15:29:19 -04:00
bool isValid() const;
2022-01-06 15:29:19 -04:00
};
Image toImage(const QJsonValue& jsonObj);
2022-01-06 15:29:19 -04:00
AccountDto toAccountDto(const QJsonValue& jsonObj);
} // namespace Accounts