From b8762ddb38dd975b0acb217b793594dfed83a824 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 12 Sep 2020 14:10:13 +0300 Subject: Initial commit --- chatlist.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 chatlist.h (limited to 'chatlist.h') 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 +#include +#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}; +}; -- cgit v1.2.3-70-g09d2