#pragma once #include #include #include #include "MatrixClient.h" class DeviceInfo { public: DeviceInfo(const QString deviceID, const QString displayName) : device_id(deviceID) , display_name(displayName) {} DeviceInfo() {} QString device_id; QString display_name; }; class UserProfile : public QObject { Q_OBJECT Q_PROPERTY(QString userId READ getUserId WRITE setUserId NOTIFY userIdChanged) Q_PROPERTY(QVector deviceList READ getDeviceList NOTIFY deviceListUpdated) public: // constructor explicit UserProfile(QObject *parent = 0); // getters QVector getDeviceList(); QString getUserId(); // setters void setUserId(const QString &userId); Q_INVOKABLE void fetchDeviceList(const QString &userID); Q_INVOKABLE void updateDeviceList(); signals: void userIdChanged(); void deviceListUpdated(); private: QVector deviceList; QString userId; };