File: example_7_archiveHandling.h

package info (click to toggle)
qxmpp 1.14.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,508 kB
  • sloc: cpp: 73,846; xml: 1,366; ansic: 362; sh: 176; makefile: 16
file content (45 lines) | stat: -rw-r--r-- 1,036 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// SPDX-FileCopyrightText: 2012 Jeremy Lainé <jeremy.laine@m4x.org>
//
// SPDX-License-Identifier: LGPL-2.1-or-later

#ifndef XMPPCLIENT_H
#define XMPPCLIENT_H

#include "QXmppArchiveIq.h"
#include "QXmppClient.h"

#include <QDateTime>

class QXmppArchiveManager;
class QXmppResultSetReply;

class xmppClient : public QXmppClient
{
    Q_OBJECT

public:
    enum PageDirection {
        PageForwards = 0,
        PageBackwards
    };

    xmppClient(QObject *parent = nullptr);
    ~xmppClient() override;

    void setPageDirection(PageDirection direction);
    void setPageSize(int size);

    void clientConnected();
    void archiveListReceived(const QList<QXmppArchiveChat> &chats, const QXmppResultSetReply &rsmReply);
    void archiveChatReceived(const QXmppArchiveChat &chat, const QXmppResultSetReply &rsmReply);

private:
    QXmppArchiveManager *archiveManager;
    int m_collectionCount;
    QDateTime m_startDate;
    QDateTime m_endDate;
    PageDirection m_pageDirection;
    int m_pageSize;
};

#endif  // XMPPCLIENT_H