~phablet-team/history-service/trunk

« back to all changes in this revision

Viewing changes to tools/tplogger-import/telepathylogreader.h

Remove the tools and their dependencies: they are obsolete and not useful anymore. 
Approved by: PS Jenkins bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2012-2013 Canonical, Ltd.
3
 
 *
4
 
 * Authors:
5
 
 *  Gustavo Pichorim Boiko <gustavo.boiko@canonical.com>
6
 
 *
7
 
 * This file is part of history-service.
8
 
 *
9
 
 * history-service is free software; you can redistribute it and/or modify
10
 
 * it under the terms of the GNU General Public License as published by
11
 
 * the Free Software Foundation; version 3.
12
 
 *
13
 
 * history-service is distributed in the hope that it will be useful,
14
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 
 * GNU General Public License for more details.
17
 
 *
18
 
 * You should have received a copy of the GNU General Public License
19
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
 
 */
21
 
 
22
 
#ifndef TELEPATHYLOGREADER_H
23
 
#define TELEPATHYLOGREADER_H
24
 
 
25
 
#include <QObject>
26
 
#include <TelepathyLoggerQt/PendingOperation>
27
 
#include <TelepathyLoggerQt/Types>
28
 
#include <TelepathyLoggerQt/LogManager>
29
 
#include <TelepathyLoggerQt/CallEvent>
30
 
#include <TelepathyLoggerQt/TextEvent>
31
 
#include <TelepathyQt/AccountManager>
32
 
#include <QDateTime>
33
 
#include <QList>
34
 
#include <QMap>
35
 
#include <QUrl>
36
 
 
37
 
class TelepathyLogReader : public QObject
38
 
{
39
 
    Q_OBJECT
40
 
public:
41
 
    static TelepathyLogReader *instance();
42
 
 
43
 
public Q_SLOTS:
44
 
    void fetchLog(const Tp::AccountPtr &account);
45
 
 
46
 
protected:
47
 
    void requestDatesForEntities(const Tp::AccountPtr &account, const Tpl::EntityPtrList &entities);
48
 
    void requestEventsForDates(const Tp::AccountPtr &account, const Tpl::EntityPtr &entity, const Tpl::QDateList &dates);
49
 
 
50
 
Q_SIGNALS:
51
 
    void loadedCallEvent(const Tpl::CallEventPtr &event);
52
 
    void loadedMessageEvent(const Tpl::TextEventPtr &event);
53
 
    void finished();
54
 
 
55
 
protected Q_SLOTS:
56
 
    void onAccountManagerReady(Tp::PendingOperation *op);
57
 
    void onPendingEntitiesFinished(Tpl::PendingOperation *op);
58
 
    void onPendingDatesFinished(Tpl::PendingOperation *op);
59
 
    void onPendingEventsFinished(Tpl::PendingOperation *op);
60
 
 
61
 
protected:
62
 
    Tpl::LogManagerPtr mLogManager;
63
 
    Tp::AccountManagerPtr mAccountManager;
64
 
 
65
 
private:
66
 
    explicit TelepathyLogReader(QObject *parent = 0);
67
 
    QList <Tpl::PendingOperation*> mOperations;
68
 
 
69
 
};
70
 
 
71
 
#endif // CALLLOGMODEL_H