diff options
author | trilene <trilene@runbox.com> | 2020-09-22 12:07:36 -0400 |
---|---|---|
committer | trilene <trilene@runbox.com> | 2020-09-22 12:07:36 -0400 |
commit | da27670cbe474cf7e4f487b11d58c63e7cefb976 (patch) | |
tree | d4b80df8c1214a21b1d8be5e36e8d5d6e656c80d /src/timeline/TimelineViewManager.h | |
parent | Translated using Weblate (Estonian) (diff) | |
download | nheko-da27670cbe474cf7e4f487b11d58c63e7cefb976.tar.xz |
Port ActiveCallBar to Qml
Diffstat (limited to 'src/timeline/TimelineViewManager.h')
-rw-r--r-- | src/timeline/TimelineViewManager.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/timeline/TimelineViewManager.h b/src/timeline/TimelineViewManager.h index 1a98f64d..fdf1603d 100644 --- a/src/timeline/TimelineViewManager.h +++ b/src/timeline/TimelineViewManager.h @@ -13,6 +13,7 @@ #include "Logging.h" #include "TimelineModel.h" #include "Utils.h" +#include "WebRTCSession.h" #include "emoji/EmojiModel.h" #include "emoji/Provider.h" @@ -33,6 +34,8 @@ class TimelineViewManager : public QObject bool isInitialSync MEMBER isInitialSync_ READ isInitialSync NOTIFY initialSyncChanged) Q_PROPERTY( bool isNarrowView MEMBER isNarrowView_ READ isNarrowView NOTIFY narrowViewChanged) + Q_PROPERTY( + webrtc::State callState READ callState NOTIFY callStateChanged) public: TimelineViewManager(QSharedPointer<UserSettings> userSettings, @@ -48,6 +51,8 @@ public: Q_INVOKABLE TimelineModel *activeTimeline() const { return timeline_; } Q_INVOKABLE bool isInitialSync() const { return isInitialSync_; } bool isNarrowView() const { return isNarrowView_; } + webrtc::State callState() const { return WebRTCSession::instance().state(); } + Q_INVOKABLE bool toggleMuteAudioSource() { return WebRTCSession::instance().toggleMuteAudioSource(); } Q_INVOKABLE void openImageOverlay(QString mxcUrl, QString eventId) const; Q_INVOKABLE QColor userColor(QString id, QColor background); Q_INVOKABLE QString escapeEmoji(QString str) const; @@ -72,6 +77,7 @@ signals: void inviteUsers(QStringList users); void showRoomList(); void narrowViewChanged(); + void callStateChanged(webrtc::State); public slots: void updateReadReceipts(const QString &room_id, const std::vector<QString> &event_ids); |