~ci-train-bot/history-service/history-service-ubuntu-zesty-2629

« back to all changes in this revision

Viewing changes to src/thread.h

Initial cache implementation for grouped conversations.
Approved by: PS Jenkins bot, Gustavo Pichorim Boiko

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#ifndef HISTORY_THREAD_H
23
23
#define HISTORY_THREAD_H
24
24
 
 
25
#include <QDBusArgument>
25
26
#include <QDateTime>
26
27
#include <QScopedPointer>
27
28
#include <QStringList>
34
35
 
35
36
class ThreadPrivate;
36
37
class ItemFactory;
 
38
class Thread;
 
39
 
 
40
typedef QList<Thread> Threads;
37
41
 
38
42
class Thread
39
43
{
48
52
           const QStringList &participants,
49
53
           const Event &lastEvent = Event(),
50
54
           int count = 0,
51
 
           int unreadCount = 0);
 
55
           int unreadCount = 0,
 
56
           const Threads &groupedThreads = Threads());
52
57
    Thread(const Thread &other);
53
58
    virtual ~Thread();
54
59
    Thread& operator=(const Thread &other);
60
65
    Event lastEvent() const;
61
66
    int count() const;
62
67
    int unreadCount() const;
 
68
    Threads groupedThreads() const;
63
69
 
64
70
    bool isNull() const;
65
71
    bool operator==(const Thread &other) const;
73
79
    QSharedPointer<ThreadPrivate> d_ptr;
74
80
};
75
81
 
76
 
typedef QList<Thread> Threads;
 
82
const QDBusArgument &operator>>(const QDBusArgument &argument, Threads &threads);
77
83
 
78
84
}
79
85