aboutsummaryrefslogtreecommitdiff
path: root/chatlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'chatlist.h')
-rw-r--r--chatlist.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/chatlist.h b/chatlist.h
new file mode 100644
index 0000000..8186d3a
--- /dev/null
+++ b/chatlist.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include <QObject>
+#include <deltachat.h>
+#include "lot.h"
+
+class DcChatlist : public QObject {
+ Q_OBJECT
+
+public:
+ explicit DcChatlist(QObject *parent = nullptr);
+ explicit DcChatlist(dc_chatlist_t *context, QObject *parent = nullptr);
+ ~DcChatlist();
+
+ Q_INVOKABLE size_t getChatCount() const;
+ Q_INVOKABLE uint32_t getChatId(size_t index) const;
+ Q_INVOKABLE uint32_t getMsgId(size_t index) const;
+ Q_INVOKABLE DcLot *getSummary(size_t index) const;
+
+private:
+ dc_chatlist_t *m_chatlist{nullptr};
+};