Libkdav2

davcollectioncreatejob.h
1/*
2 Copyright (c) 2010 Grégory Oestreicher <greg@kamago.net>
3 Copyright (c) 2018 Rémi Nicole <minijackson@riseup.net>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KDAV2_DAVCOLLECTIONCREATEJOB_H
21#define KDAV2_DAVCOLLECTIONCREATEJOB_H
22
23#include "kpimkdav2_export.h"
24
25#include "davjobbase.h"
26#include "davcollection.h"
27#include "davurl.h"
28
29namespace KDAV2
30{
31
32/**
33 * @short A job that creates a DAV collection.
34 */
35class KPIMKDAV2_EXPORT DavCollectionCreateJob : public DavJobBase
36{
37 Q_OBJECT
38
39public:
40 /**
41 * Creates a new dav collection create job.
42 *
43 * @param collection The collection that shall be created.
44 * @param parent The parent object.
45 */
46 DavCollectionCreateJob(const DavCollection &collection, QObject *parent = nullptr);
47
48 /**
49 * Starts the job.
50 */
51 void start() Q_DECL_OVERRIDE;
52
53 /**
54 * Returns the created DAV item including the correct identifier url
55 * and current etag information.
56 */
57 DavCollection collection() const;
58
59 QUrl collectionUrl() const;
60
61private Q_SLOTS:
62 void collectionCreated(KJob *);
63 void collectionModified(KJob *);
64 void collectionRefreshed(KJob *);
65
66private:
67 DavCollection mCollection;
68 int mRedirectCount;
69
70 void createCalendar();
71 void createAddressbook();
72};
73
74}
75
76#endif
A job that creates a DAV collection.
A helper class to store information about DAV collection.
base class for the jobs used by the resource.
Definition davjobbase.h:38
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:28 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.