summary refs log tree commit diff
path: root/src/timeline/TimelineViewManager.h
diff options
context:
space:
mode:
authortrilene <trilene@runbox.com>2020-07-10 19:19:48 -0400
committertrilene <trilene@runbox.com>2020-07-10 19:19:48 -0400
commit7a206441c86cd2aa84cbbbc6be803f03b2f355ab (patch)
tree1fe734ab983daa8998eb23432bd560d7dabf7866 /src/timeline/TimelineViewManager.h
parentFix m.relates_to being sent as 'null' when not set in encrypted messages. (diff)
downloadnheko-7a206441c86cd2aa84cbbbc6be803f03b2f355ab.tar.xz
Support voice calls
Diffstat (limited to 'src/timeline/TimelineViewManager.h')
-rw-r--r--src/timeline/TimelineViewManager.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/timeline/TimelineViewManager.h b/src/timeline/TimelineViewManager.h
index ed095058..5224cd56 100644
--- a/src/timeline/TimelineViewManager.h
+++ b/src/timeline/TimelineViewManager.h
@@ -18,6 +18,7 @@
 
 class MxcImageProvider;
 class BlurhashProvider;
+class CallManager;
 class ColorImageProvider;
 class UserSettings;
 
@@ -31,7 +32,9 @@ class TimelineViewManager : public QObject
           bool isInitialSync MEMBER isInitialSync_ READ isInitialSync NOTIFY initialSyncChanged)
 
 public:
-        TimelineViewManager(QSharedPointer<UserSettings> userSettings, QWidget *parent = nullptr);
+        TimelineViewManager(QSharedPointer<UserSettings> userSettings,
+                            CallManager *callManager,
+                            QWidget *parent = nullptr);
         QWidget *getWidget() const { return container; }
 
         void sync(const mtx::responses::Rooms &rooms);
@@ -96,6 +99,11 @@ public slots:
                                const QString &url,
                                const QString &mime,
                                uint64_t dsize);
+        void queueCallMessage(const QString &roomid, const mtx::events::msg::CallInvite &);
+        void queueCallMessage(const QString &roomid, const mtx::events::msg::CallCandidates &);
+        void queueCallMessage(const QString &roomid, const mtx::events::msg::CallAnswer &);
+        void queueCallMessage(const QString &roomid, const mtx::events::msg::CallHangUp &);
+
         void updateEncryptedDescriptions();
 
 private:
@@ -111,7 +119,8 @@ private:
         BlurhashProvider *blurhashProvider;
 
         QHash<QString, QSharedPointer<TimelineModel>> models;
-        TimelineModel *timeline_ = nullptr;
+        TimelineModel *timeline_  = nullptr;
+        CallManager *callManager_ = nullptr;
 
         bool isInitialSync_ = true;