Kgapi

contactfetchphotojob.h
1 /*
2  * This file is part of LibKGAPI library
3  *
4  * Copyright (C) 2013 Daniel Vrátil <[email protected]>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) version 3, or any
10  * later version accepted by the membership of KDE e.V. (or its
11  * successor approved by the membership of KDE e.V.), which shall
12  * act as a proxy defined in Section 6 of version 3 of the license.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library. If not, see <https://www.gnu.org/licenses/>.
21  */
22 
23 #ifndef CONTACTFETCHPHOTOJOB_H
24 #define CONTACTFETCHPHOTOJOB_H
25 
26 #include "fetchjob.h"
27 #include "kgapicontacts_export.h"
28 
29 namespace KGAPI2
30 {
31 
38 class KGAPICONTACTS_EXPORT ContactFetchPhotoJob : public KGAPI2::FetchJob
39 {
40  Q_OBJECT
41  public:
42 
50  explicit ContactFetchPhotoJob(const ContactsList &contacts,
51  const AccountPtr &account, QObject *parent = nullptr);
52 
60  explicit ContactFetchPhotoJob(const ContactPtr &contact,
61  const AccountPtr &account, QObject *parent = nullptr);
62 
66  ~ContactFetchPhotoJob() override;
67 
68  Q_SIGNALS:
69 
79  void photoFetched(KGAPI2::Job *job, const KGAPI2::ContactPtr &contact);
80 
81  protected:
82 
86  void start() override;
87 
94  void handleReply(const QNetworkReply *reply,
95  const QByteArray &rawData) override;
96 
97  private:
98  class Private;
99  Private * const d;
100  friend class Private;
101 
102 };
103 
104 } // namespace KGAPI2
105 
106 #endif // CONTACTFETCHPHOTOJOB_H
A job to fetch contact photos.
Abstract base class for all jobs in LibKGAPI.
Definition: job.h:55
A job to fetch a single map tile described by a StaticMapUrl.
Definition: blog.h:30
Abstract superclass for all jobs that fetch resources from Google.
Definition: fetchjob.h:38
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Jun 6 2020 23:01:16 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.