Changeset View
Changeset View
Standalone View
Standalone View
src/ruqolacore/rocketchataccount.h
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | |||||
74 | 74 | | |||
75 | class LIBRUQOLACORE_EXPORT RocketChatAccount : public QObject | 75 | class LIBRUQOLACORE_EXPORT RocketChatAccount : public QObject | ||
76 | { | 76 | { | ||
77 | Q_OBJECT | 77 | Q_OBJECT | ||
78 | Q_PROPERTY(QString userName READ userName WRITE setUserName NOTIFY userNameChanged) | 78 | Q_PROPERTY(QString userName READ userName WRITE setUserName NOTIFY userNameChanged) | ||
79 | Q_PROPERTY(QString userID READ userID WRITE setUserID NOTIFY userIDChanged) | 79 | Q_PROPERTY(QString userID READ userID WRITE setUserID NOTIFY userIDChanged) | ||
80 | Q_PROPERTY(QString serverUrl READ serverUrl WRITE setServerUrl NOTIFY serverUrlChanged) | 80 | Q_PROPERTY(QString serverUrl READ serverUrl WRITE setServerUrl NOTIFY serverUrlChanged) | ||
81 | Q_PROPERTY(QString accountName READ accountName WRITE setAccountName NOTIFY accountNameChanged) | 81 | Q_PROPERTY(QString accountName READ accountName WRITE setAccountName NOTIFY accountNameChanged) | ||
82 | Q_PROPERTY(QString password READ password WRITE setPassword NOTIFY passwordChanged) | 82 | Q_PROPERTY(QString password READ password WRITE setPassword NOTIFY passwordChanged) | ||
mlaurent: Perhaps we can use an other name as code, doubleAuthenticationFactorCode ? | |||||
It's indeed called code in the realtime API. But I changed all variables/ accessors to twoFactorAuthenticationCode. cdywan: It's indeed called `code` in the realtime API. But I changed all variables/ accessors to… | |||||
83 | Q_PROPERTY(QString twoFactorAuthenticationCode READ twoFactorAuthenticationCode WRITE setTwoFactorAuthenticationCode NOTIFY twoFactorAuthenticationCodeChanged) | ||||
83 | Q_PROPERTY(DDPClient::LoginStatus loginStatus READ loginStatus NOTIFY loginStatusChanged) | 84 | Q_PROPERTY(DDPClient::LoginStatus loginStatus READ loginStatus NOTIFY loginStatusChanged) | ||
84 | Q_PROPERTY(bool editingMode READ editingMode NOTIFY editingModeChanged) | 85 | Q_PROPERTY(bool editingMode READ editingMode NOTIFY editingModeChanged) | ||
85 | Q_PROPERTY(bool sortUnreadOnTop READ sortUnreadOnTop NOTIFY sortUnreadOnTopChanged) | 86 | Q_PROPERTY(bool sortUnreadOnTop READ sortUnreadOnTop NOTIFY sortUnreadOnTopChanged) | ||
86 | public: | 87 | public: | ||
87 | explicit RocketChatAccount(const QString &accountName = QString(), QObject *parent = nullptr); | 88 | explicit RocketChatAccount(const QString &accountName = QString(), QObject *parent = nullptr); | ||
88 | ~RocketChatAccount(); | 89 | ~RocketChatAccount(); | ||
89 | 90 | | |||
90 | enum RoomInfoType { | 91 | enum RoomInfoType { | ||
▲ Show 20 Lines • Show All 186 Lines • ▼ Show 20 Line(s) | |||||
277 | Q_REQUIRED_RESULT QString accountName() const; | 278 | Q_REQUIRED_RESULT QString accountName() const; | ||
278 | 279 | | |||
279 | void setUserID(const QString &userID); | 280 | void setUserID(const QString &userID); | ||
280 | Q_REQUIRED_RESULT QString userID() const; | 281 | Q_REQUIRED_RESULT QString userID() const; | ||
281 | 282 | | |||
282 | void setPassword(const QString &password); | 283 | void setPassword(const QString &password); | ||
283 | Q_REQUIRED_RESULT QString password() const; | 284 | Q_REQUIRED_RESULT QString password() const; | ||
284 | 285 | | |||
286 | void setTwoFactorAuthenticationCode(const QString &twoFactorAuthenticationCode); | ||||
287 | Q_REQUIRED_RESULT QString twoFactorAuthenticationCode() const; | ||||
288 | | ||||
285 | void setAuthToken(const QString &token); | 289 | void setAuthToken(const QString &token); | ||
286 | Q_REQUIRED_RESULT QString authToken() const; | 290 | Q_REQUIRED_RESULT QString authToken() const; | ||
287 | 291 | | |||
288 | void setServerUrl(const QString &serverUrl); | 292 | void setServerUrl(const QString &serverUrl); | ||
289 | 293 | | |||
290 | void sendNotification(const QJsonArray &contents); | 294 | void sendNotification(const QJsonArray &contents); | ||
291 | void parseOtr(const QJsonArray &contents); | 295 | void parseOtr(const QJsonArray &contents); | ||
292 | void setServerVersion(const QString &version); | 296 | void setServerVersion(const QString &version); | ||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
338 | 342 | | |||
339 | 343 | | |||
340 | Q_SIGNALS: | 344 | Q_SIGNALS: | ||
341 | void connectedChanged(); | 345 | void connectedChanged(); | ||
342 | void accountNameChanged(); | 346 | void accountNameChanged(); | ||
343 | void userNameChanged(); | 347 | void userNameChanged(); | ||
344 | void userIDChanged(); | 348 | void userIDChanged(); | ||
345 | void passwordChanged(); | 349 | void passwordChanged(); | ||
350 | void twoFactorAuthenticationCodeChanged(); | ||||
346 | void serverUrlChanged(); | 351 | void serverUrlChanged(); | ||
347 | void loginStatusChanged(); | 352 | void loginStatusChanged(); | ||
348 | void logoutDone(const QString &accountname); | 353 | void logoutDone(const QString &accountname); | ||
349 | void added(const QJsonObject &item); | 354 | void added(const QJsonObject &item); | ||
350 | void changed(const QJsonObject &item); | 355 | void changed(const QJsonObject &item); | ||
351 | void removed(const QJsonObject &item); | 356 | void removed(const QJsonObject &item); | ||
352 | void notification(const QString &title, const QString &message, const QPixmap &pixmap); | 357 | void notification(const QString &title, const QString &message, const QPixmap &pixmap); | ||
353 | void fileDownloaded(const QString &filePath, const QUrl &cacheImageUrl); | 358 | void fileDownloaded(const QString &filePath, const QUrl &cacheImageUrl); | ||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |
Perhaps we can use an other name as code, doubleAuthenticationFactorCode ?