digiKam
vkontakte_savephotojob.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_SAVEPHOTOJOB_H
25 #define DIGIKAM_VKONTAKTE_SAVEPHOTOJOB_H
26 
27 // Qt includes
28 
29 #include <QVariantMap>
30 #include <QJsonValue>
31 
32 // Local includes
33 
34 #include "vkontakte_jobs.h"
35 #include "vkontakte_photoinfo.h"
37 
38 namespace Vkontakte
39 {
40 
41 class SavePhotoJob : public VkontakteJob
42 {
43  Q_OBJECT
44 
45 public:
46 
47  SavePhotoJob(const QString& accessToken,
48  UploadPhotosJob::Dest dest,
49  const QVariantMap& photoIdData, int gid = -1);
50 
51  QList<PhotoInfo> list() const;
52 
53 protected:
54 
55  QString getMethod(Vkontakte::UploadPhotosJob::Dest dest);
56  void handleItem(const QJsonValue& item);
57  void handleData(const QJsonValue& data) override;
58 
59 private:
60 
61  UploadPhotosJob::Dest m_dest;
62  QList<PhotoInfo> m_list;
63 
64 private:
65 
66  // Disable
67  SavePhotoJob(QObject*) = delete;
68 };
69 
70 } // namespace Vkontakte
71 
72 #endif // DIGIKAM_VKONTAKTE_SAVEPHOTOJOB_H
Definition: piwigotalker.h:48