Attica

itemjob.h
1 /*
2  This file is part of KDE.
3 
4  SPDX-FileCopyrightText: 2009 Frederik Gladhorn <[email protected]>
5  SPDX-FileCopyrightText: 2011 Laszlo Papp <[email protected]>
6 
7  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
8  */
9 
10 #ifndef ATTICA_ITEMJOB_H
11 #define ATTICA_ITEMJOB_H
12 
13 #include "attica_export.h"
14 #include "getjob.h"
15 #include "deletejob.h"
16 #include "postjob.h"
17 #include "putjob.h"
18 
19 namespace Attica
20 {
21 class Provider;
22 
23 template <class T>
24 class ATTICA_EXPORT ItemJob : public GetJob
25 {
26 public:
27  T result() const;
28 
29 private:
30  ItemJob(PlatformDependent *, const QNetworkRequest &request);
31  void parse(const QString &xml) override;
32  T m_item;
33  friend class Attica::Provider;
34 };
35 
36 template <class T>
37 class ATTICA_EXPORT ItemDeleteJob : public DeleteJob
38 {
39 public:
40  T result() const;
41 
42 private:
43  ItemDeleteJob(PlatformDependent *, const QNetworkRequest &request);
44  void parse(const QString &xml) override;
45  T m_item;
46  friend class Attica::Provider;
47 };
48 
49 template <class T>
50 class ATTICA_EXPORT ItemPostJob : public PostJob
51 {
52 public:
53  T result() const;
54 
55 private:
56  ItemPostJob(PlatformDependent *internals, const QNetworkRequest &request, QIODevice *data);
57  ItemPostJob(PlatformDependent *internals, const QNetworkRequest &request, const StringMap &parameters = StringMap());
58 
59  void parse(const QString &xml) override;
60  T m_item;
61  friend class Attica::Provider;
62 };
63 
64 template <class T>
65 class ATTICA_EXPORT ItemPutJob : public PutJob
66 {
67 public:
68  T result() const;
69 
70 private:
71  ItemPutJob(PlatformDependent *internals, const QNetworkRequest &request, QIODevice *data);
72  ItemPutJob(PlatformDependent *internals, const QNetworkRequest &request, const StringMap &parameters = StringMap());
73 
74  void parse(const QString &xml) override;
75  T m_item;
76  friend class Attica::Provider;
77 };
78 
79 }
80 
81 #endif
QVector< QVariant > parse(const QString &message, const QDate &externalIssueDate=QDate())
The Provider class represents one Open Collaboration Service provider.
Definition: provider.h:95
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 23 2021 03:59:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.