Patryk Osmaczko c0024ec6b1 refactor(@desktop/cpp): improve cpp code
Good coding practices applied only,
architecture and logic were not altered.
2022-03-01 16:05:21 +01:00

38 lines
564 B
C++

#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;
};
class AccountDto
{
public:
QString name;
long timestamp;
QString identicon;
QString keycardPairing;
QString keyUid;
QVector<Image> images;
bool isValid() const;
};
Image toImage(const QJsonValue& jsonObj);
AccountDto toAccountDto(const QJsonValue& jsonObj);
} // namespace Accounts