File indexing completed on 2024-06-16 04:52:27
0001 /* 0002 Copyright (c) 2010 Tobias Koenig <tokoe@kde.org> 0003 Copyright (c) 2018 RĂ©mi Nicole <minijackson@riseup.net> 0004 0005 This program is free software; you can redistribute it and/or modify 0006 it under the terms of the GNU General Public License as published by 0007 the Free Software Foundation; either version 2 of the License, or 0008 (at your option) any later version. 0009 0010 This program is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 GNU General Public License for more details. 0014 0015 You should have received a copy of the GNU General Public License 0016 along with this program; if not, write to the Free Software 0017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 0018 */ 0019 0020 #ifndef KDAV2_DAVCOLLECTIONFETCHJOB_H 0021 #define KDAV2_DAVCOLLECTIONFETCHJOB_H 0022 0023 #include "kpimkdav2_export.h" 0024 0025 #include "davcollection.h" 0026 #include "davjobbase.h" 0027 #include "davurl.h" 0028 0029 namespace KDAV2 0030 { 0031 0032 /** 0033 * @short A job that fetches a DAV collection from the DAV server. 0034 */ 0035 class KPIMKDAV2_EXPORT DavCollectionFetchJob : public DavJobBase 0036 { 0037 Q_OBJECT 0038 0039 public: 0040 /** 0041 * Creates a new dav collection fetch job. 0042 * 0043 * @param item The collection that shall be fetched. 0044 * @param parent The parent object. 0045 */ 0046 DavCollectionFetchJob(const DavCollection &collection, QObject *parent = nullptr); 0047 0048 /** 0049 * Starts the job. 0050 */ 0051 void start() Q_DECL_OVERRIDE; 0052 0053 /** 0054 * Returns the fetched collection including current etag information. 0055 */ 0056 DavCollection collection() const; 0057 0058 private Q_SLOTS: 0059 void davJobFinished(KJob *); 0060 0061 private: 0062 DavCollection mCollection; 0063 }; 0064 0065 } 0066 0067 #endif