File indexing completed on 2024-12-22 04:57:55
0001 /* 0002 SPDX-FileCopyrightText: 2016 Stefan Stäglich <sstaeglich@kdemail.net> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "tomboyjobbase.h" 0010 #include <Akonadi/Item> 0011 0012 class TomboyItemsDownloadJob : public TomboyJobBase 0013 { 0014 Q_OBJECT 0015 public: 0016 // ctor 0017 explicit TomboyItemsDownloadJob(Akonadi::Collection::Id id, QNetworkAccessManager *manager, QObject *parent = nullptr); 0018 // returns the parsed results wrapped in Akonadi::Item::List, see below 0019 Akonadi::Item::List items() const; 0020 0021 // automatically called by KJob 0022 void start() override; 0023 0024 private: 0025 const Akonadi::Collection::Id mCollectionId; 0026 // This will be called once the request is finished. 0027 void onRequestFinished(); 0028 Akonadi::Item::List mResultItems; 0029 };