summary refs log tree commit diff
path: root/include/MatrixClient.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-12-01 17:33:49 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-12-01 17:33:49 +0200
commit5573548fb1adbaef6ef8e30fd76855b90c0fe26c (patch)
tree2204a70a9de4c565ad9ab1c49a97ef90bc1e059d /include/MatrixClient.h
parentInstall qt-multimedia on travis (diff)
downloadnheko-5573548fb1adbaef6ef8e30fd76855b90c0fe26c.tar.xz
Allow audio clip uploads
Diffstat (limited to 'include/MatrixClient.h')
-rw-r--r--include/MatrixClient.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/MatrixClient.h b/include/MatrixClient.h
index b0f6993d..722a8611 100644
--- a/include/MatrixClient.h
+++ b/include/MatrixClient.h
@@ -17,6 +17,7 @@
 
 #pragma once
 
+#include <QFileInfo>
 #include <QNetworkAccessManager>
 #include <QUrl>
 
@@ -43,6 +44,7 @@ public:
                              int txnId,
                              const QString &roomid,
                              const QString &msg,
+                             const QFileInfo &info,
                              const QString &url = "") noexcept;
         void login(const QString &username, const QString &password) noexcept;
         void registerUser(const QString &username,
@@ -57,6 +59,7 @@ public:
         void messages(const QString &room_id, const QString &from_token, int limit = 30) noexcept;
         void uploadImage(const QString &roomid, const QString &filename);
         void uploadFile(const QString &roomid, const QString &filename);
+        void uploadAudio(const QString &roomid, const QString &filename);
         void joinRoom(const QString &roomIdOrAlias);
         void leaveRoom(const QString &roomId);
         void sendTypingNotification(const QString &roomid, int timeoutInMillis = 20000);
@@ -94,6 +97,7 @@ signals:
         void versionSuccess();
         void imageUploaded(const QString &roomid, const QString &filename, const QString &url);
         void fileUploaded(const QString &roomid, const QString &filename, const QString &url);
+        void audioUploaded(const QString &roomid, const QString &filename, const QString &url);
 
         void roomAvatarRetrieved(const QString &roomid, const QPixmap &img);
         void userAvatarRetrieved(const QString &userId, const QImage &img);
@@ -116,6 +120,8 @@ signals:
         void leftRoom(const QString &room_id);
 
 private:
+        QNetworkReply *makeUploadRequest(const QString &filename);
+
         // Client API prefix.
         QString clientApiUrl_;