|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 ** |
|
7 ** This file is part of the Qt Mobility Components. |
|
8 ** |
|
9 ** $QT_BEGIN_LICENSE:LGPL$ |
|
10 ** No Commercial Usage |
|
11 ** This file contains pre-release code and may not be distributed. |
|
12 ** You may use this file in accordance with the terms and conditions |
|
13 ** contained in the Technology Preview License Agreement accompanying |
|
14 ** this package. |
|
15 ** |
|
16 ** GNU Lesser General Public License Usage |
|
17 ** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 ** General Public License version 2.1 as published by the Free Software |
|
19 ** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 ** packaging of this file. Please review the following information to |
|
21 ** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 ** |
|
24 ** In addition, as a special exception, Nokia gives you certain additional |
|
25 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 ** |
|
28 ** If you have questions regarding the use of this file, please contact |
|
29 ** Nokia at qt-info@nokia.com. |
|
30 ** |
|
31 ** |
|
32 ** |
|
33 ** |
|
34 ** |
|
35 ** |
|
36 ** |
|
37 ** |
|
38 ** $QT_END_LICENSE$ |
|
39 ** |
|
40 ****************************************************************************/ |
|
41 |
|
42 #ifndef QCONTACTREQUESTS_P_H |
|
43 #define QCONTACTREQUESTS_P_H |
|
44 |
|
45 // |
|
46 // W A R N I N G |
|
47 // ------------- |
|
48 // |
|
49 // This file is not part of the Qt API. It exists purely as an |
|
50 // implementation detail. This header file may change from version to |
|
51 // version without notice, or even be removed. |
|
52 // |
|
53 // We mean it. |
|
54 // |
|
55 |
|
56 #include "qcontactabstractrequest_p.h" |
|
57 #include "qcontactfilter.h" |
|
58 #include "qcontactrelationshipfilter.h" |
|
59 #include "qcontactsortorder.h" |
|
60 #include "qcontact.h" |
|
61 #include "qtcontactsglobal.h" |
|
62 |
|
63 #include <QStringList> |
|
64 #include <QList> |
|
65 |
|
66 QTM_BEGIN_NAMESPACE |
|
67 |
|
68 class QContactSaveRequestPrivate : public QContactAbstractRequestPrivate |
|
69 { |
|
70 public: |
|
71 QContactSaveRequestPrivate() |
|
72 : QContactAbstractRequestPrivate() |
|
73 { |
|
74 } |
|
75 |
|
76 ~QContactSaveRequestPrivate() |
|
77 { |
|
78 } |
|
79 |
|
80 QContactAbstractRequest::RequestType type() const |
|
81 { |
|
82 return QContactAbstractRequest::ContactSaveRequest; |
|
83 } |
|
84 |
|
85 QList<QContact> m_contacts; |
|
86 QMap<int, QContactManager::Error> m_errors; |
|
87 }; |
|
88 |
|
89 class QContactFetchRequestPrivate : public QContactAbstractRequestPrivate |
|
90 { |
|
91 public: |
|
92 QContactFetchRequestPrivate() |
|
93 : QContactAbstractRequestPrivate() |
|
94 { |
|
95 } |
|
96 |
|
97 ~QContactFetchRequestPrivate() |
|
98 { |
|
99 } |
|
100 |
|
101 QContactAbstractRequest::RequestType type() const |
|
102 { |
|
103 return QContactAbstractRequest::ContactFetchRequest; |
|
104 } |
|
105 |
|
106 QContactFilter m_filter; |
|
107 QList<QContactSortOrder> m_sorting; |
|
108 QContactFetchHint m_fetchHint; |
|
109 |
|
110 QList<QContact> m_contacts; |
|
111 }; |
|
112 |
|
113 class QContactRemoveRequestPrivate : public QContactAbstractRequestPrivate |
|
114 { |
|
115 public: |
|
116 QContactRemoveRequestPrivate() |
|
117 : QContactAbstractRequestPrivate() |
|
118 { |
|
119 } |
|
120 |
|
121 ~QContactRemoveRequestPrivate() |
|
122 { |
|
123 } |
|
124 |
|
125 QContactAbstractRequest::RequestType type() const |
|
126 { |
|
127 return QContactAbstractRequest::ContactRemoveRequest; |
|
128 } |
|
129 |
|
130 QList<QContactLocalId> m_contactIds; |
|
131 QMap<int, QContactManager::Error> m_errors; |
|
132 }; |
|
133 |
|
134 class QContactLocalIdFetchRequestPrivate : public QContactAbstractRequestPrivate |
|
135 { |
|
136 public: |
|
137 QContactLocalIdFetchRequestPrivate() |
|
138 : QContactAbstractRequestPrivate() |
|
139 { |
|
140 } |
|
141 |
|
142 ~QContactLocalIdFetchRequestPrivate() |
|
143 { |
|
144 } |
|
145 |
|
146 QContactAbstractRequest::RequestType type() const |
|
147 { |
|
148 return QContactAbstractRequest::ContactLocalIdFetchRequest; |
|
149 } |
|
150 |
|
151 QContactFilter m_filter; |
|
152 QList<QContactSortOrder> m_sorting; |
|
153 |
|
154 QList<QContactLocalId> m_ids; |
|
155 }; |
|
156 |
|
157 class QContactDetailDefinitionFetchRequestPrivate : public QContactAbstractRequestPrivate |
|
158 { |
|
159 public: |
|
160 QContactDetailDefinitionFetchRequestPrivate() |
|
161 : QContactAbstractRequestPrivate(), |
|
162 m_contactType(QString(QLatin1String(QContactType::TypeContact))) |
|
163 { |
|
164 } |
|
165 |
|
166 ~QContactDetailDefinitionFetchRequestPrivate() |
|
167 { |
|
168 } |
|
169 |
|
170 QContactAbstractRequest::RequestType type() const |
|
171 { |
|
172 return QContactAbstractRequest::DetailDefinitionFetchRequest; |
|
173 } |
|
174 |
|
175 QString m_contactType; |
|
176 QStringList m_names; |
|
177 QMap<QString, QContactDetailDefinition> m_definitions; |
|
178 QMap<int, QContactManager::Error> m_errors; |
|
179 }; |
|
180 |
|
181 class QContactDetailDefinitionSaveRequestPrivate : public QContactAbstractRequestPrivate |
|
182 { |
|
183 public: |
|
184 QContactDetailDefinitionSaveRequestPrivate() |
|
185 : QContactAbstractRequestPrivate(), |
|
186 m_contactType(QString(QLatin1String(QContactType::TypeContact))) |
|
187 { |
|
188 } |
|
189 |
|
190 ~QContactDetailDefinitionSaveRequestPrivate() |
|
191 { |
|
192 } |
|
193 |
|
194 QContactAbstractRequest::RequestType type() const |
|
195 { |
|
196 return QContactAbstractRequest::DetailDefinitionSaveRequest; |
|
197 } |
|
198 |
|
199 QString m_contactType; |
|
200 QList<QContactDetailDefinition> m_definitions; |
|
201 QMap<int, QContactManager::Error> m_errors; |
|
202 }; |
|
203 |
|
204 class QContactDetailDefinitionRemoveRequestPrivate : public QContactAbstractRequestPrivate |
|
205 { |
|
206 public: |
|
207 QContactDetailDefinitionRemoveRequestPrivate() |
|
208 : QContactAbstractRequestPrivate(), |
|
209 m_contactType(QString(QLatin1String(QContactType::TypeContact))) |
|
210 { |
|
211 } |
|
212 |
|
213 ~QContactDetailDefinitionRemoveRequestPrivate() |
|
214 { |
|
215 } |
|
216 |
|
217 QContactAbstractRequest::RequestType type() const |
|
218 { |
|
219 return QContactAbstractRequest::DetailDefinitionRemoveRequest; |
|
220 } |
|
221 |
|
222 QString m_contactType; |
|
223 QStringList m_names; |
|
224 QMap<int, QContactManager::Error> m_errors; |
|
225 }; |
|
226 |
|
227 class QContactRelationshipFetchRequestPrivate : public QContactAbstractRequestPrivate |
|
228 { |
|
229 public: |
|
230 QContactRelationshipFetchRequestPrivate() |
|
231 : QContactAbstractRequestPrivate() |
|
232 { |
|
233 } |
|
234 |
|
235 ~QContactRelationshipFetchRequestPrivate() |
|
236 { |
|
237 } |
|
238 |
|
239 QContactAbstractRequest::RequestType type() const |
|
240 { |
|
241 return QContactAbstractRequest::RelationshipFetchRequest; |
|
242 } |
|
243 |
|
244 // selection criteria |
|
245 QContactId m_first; |
|
246 QContactId m_second; |
|
247 QString m_relationshipType; |
|
248 |
|
249 // results |
|
250 QList<QContactRelationship> m_relationships; |
|
251 }; |
|
252 |
|
253 class QContactRelationshipSaveRequestPrivate : public QContactAbstractRequestPrivate |
|
254 { |
|
255 public: |
|
256 QContactRelationshipSaveRequestPrivate() |
|
257 : QContactAbstractRequestPrivate() |
|
258 { |
|
259 } |
|
260 |
|
261 ~QContactRelationshipSaveRequestPrivate() |
|
262 { |
|
263 } |
|
264 |
|
265 QContactAbstractRequest::RequestType type() const |
|
266 { |
|
267 return QContactAbstractRequest::RelationshipSaveRequest; |
|
268 } |
|
269 |
|
270 QList<QContactRelationship> m_relationships; |
|
271 QMap<int, QContactManager::Error> m_errors; |
|
272 }; |
|
273 |
|
274 class QContactRelationshipRemoveRequestPrivate : public QContactAbstractRequestPrivate |
|
275 { |
|
276 public: |
|
277 QContactRelationshipRemoveRequestPrivate() |
|
278 : QContactAbstractRequestPrivate() |
|
279 { |
|
280 } |
|
281 |
|
282 ~QContactRelationshipRemoveRequestPrivate() |
|
283 { |
|
284 } |
|
285 |
|
286 QContactAbstractRequest::RequestType type() const |
|
287 { |
|
288 return QContactAbstractRequest::RelationshipRemoveRequest; |
|
289 } |
|
290 |
|
291 QList<QContactRelationship> m_relationships; |
|
292 QMap<int, QContactManager::Error> m_errors; |
|
293 }; |
|
294 |
|
295 QTM_END_NAMESPACE |
|
296 |
|
297 #endif |