Attica

itemjob.cpp
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 #include "itemjob.h"
11 
12 using namespace Attica;
13 
14 template <class T>
15 ItemJob<T>::ItemJob(PlatformDependent *internals, const QNetworkRequest &request)
16  : GetJob(internals, request)
17 {
18 }
19 
20 template <class T>
21 void ItemJob<T>::parse(const QString &xml)
22 {
23  typename T::Parser p;
24  m_item = p.parse(xml);
25  setMetadata(p.metadata());
26 }
27 
28 template <class T>
29 T ItemJob<T>::result() const
30 {
31  return m_item;
32 }
33 
34 template <class T>
35 ItemDeleteJob<T>::ItemDeleteJob(PlatformDependent *internals, const QNetworkRequest &request)
36  : DeleteJob(internals, request)
37 {
38 }
39 
40 template <class T>
41 void ItemDeleteJob<T>::parse(const QString &xml)
42 {
43  typename T::Parser p;
44  m_item = p.parse(xml);
45  setMetadata(p.metadata());
46 }
47 
48 template <class T>
49 T ItemDeleteJob<T>::result() const
50 {
51  return m_item;
52 }
53 
54 template <class T>
55 ItemPostJob<T>::ItemPostJob(PlatformDependent *internals, const QNetworkRequest &request, QIODevice *data)
56  : PostJob(internals, request, data)
57 {
58 }
59 
60 template <class T>
61 ItemPostJob<T>::ItemPostJob(PlatformDependent *internals, const QNetworkRequest &request, const StringMap &parameters)
62  : PostJob(internals, request, parameters)
63 {
64 }
65 
66 template <class T>
67 void ItemPostJob<T>::parse(const QString &xml)
68 {
69  typename T::Parser p;
70  m_item = p.parse(xml);
71  setMetadata(p.metadata());
72 }
73 
74 template <class T>
75 T ItemPostJob<T>::result() const
76 {
77  return m_item;
78 }
79 
80 template <class T>
81 ItemPutJob<T>::ItemPutJob(PlatformDependent *internals, const QNetworkRequest &request, QIODevice *data)
82  : PutJob(internals, request, data)
83 {
84 }
85 
86 template <class T>
87 ItemPutJob<T>::ItemPutJob(PlatformDependent *internals, const QNetworkRequest &request, const StringMap &parameters)
88  : PutJob(internals, request, parameters)
89 {
90 }
91 
92 template <class T>
93 void ItemPutJob<T>::parse(const QString &xml)
94 {
95  typename T::Parser p;
96  m_item = p.parse(xml);
97  setMetadata(p.metadata());
98 }
99 
100 template <class T>
101 T ItemPutJob<T>::result() const
102 {
103  return m_item;
104 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 25 2021 23:06:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.