digiKam
vkontakte_messageslistjob.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2011-02-19
7  * Description : a tool to export images to VKontakte web service
8  *
9  * Copyright (C) 2011-2015 by Alexander Potashev <aspotashev at gmail dot com>
10  * Copyright (C) 2011-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_VKONTAKTE_MESSAGESLISTJOB_H
25 #define DIGIKAM_VKONTAKTE_MESSAGESLISTJOB_H
26 
27 // Local includes
28 
29 #include "vkontakte_jobs.h"
30 #include "vkontakte_messageinfo.h"
31 
32 namespace Vkontakte
33 {
34 
35 // TODO: do not export in KF5 version
36 class MessagesListJob : public VkontakteJob
37 {
38 public:
39 
51  explicit MessagesListJob(const QString& accessToken,
52  int out = 0,
53  int offset = 0, int count = 100, int previewLength = 0,
54  int filters = 0, int timeOffset = 0);
55  ~MessagesListJob();
56 
57  QList<MessageInfoPtr> list() const;
58  int totalCount() const;
59 
63  int out() const;
64 
65 protected:
66 
67  void handleData(const QVariant& data) override;
68  void handleItem(const QVariant& data);
69 
70 private:
71 
72  class Private;
73  Private* const d;
74 };
75 
76 } // namespace Vkontakte
77 
78 #endif // DIGIKAM_VKONTAKTE_MESSAGESLISTJOB_H
Definition: piwigotalker.h:48