aboutsummaryrefslogtreecommitdiff
path: root/chatlist.h
blob: 8186d3a8394b066869c8408b833c71396343c29c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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};
};