Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Latest commit

 

History

History
530 lines (434 loc) · 18.9 KB

seasidecache.h

File metadata and controls

530 lines (434 loc) · 18.9 KB
 
Jul 16, 2013
Jul 16, 2013
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* Copyright (C) 2013 Jolla Mobile <andrew.den.exter@jollamobile.com>
*
* You may use this file under the terms of the BSD license as follows:
*
* "Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Nemo Mobile nor the names of its contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
*/
#ifndef SEASIDECACHE_H
#define SEASIDECACHE_H
#include "contactcacheexport.h"
Aug 7, 2013
Aug 7, 2013
36
#include "seasidenamegrouper.h"
Jul 16, 2013
Jul 16, 2013
37
38
#include <qtcontacts-extensions.h>
Jul 30, 2013
Jul 30, 2013
39
#include <QContactStatusFlags>
Jul 16, 2013
Jul 16, 2013
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include <QContact>
#include <QContactManager>
#include <QContactFetchRequest>
#include <QContactFetchByIdRequest>
#include <QContactRemoveRequest>
#include <QContactSaveRequest>
#include <QContactRelationshipFetchRequest>
#include <QContactRelationshipSaveRequest>
#include <QContactRelationshipRemoveRequest>
#ifdef USING_QTPIM
#include <QContactIdFilter>
#include <QContactIdFetchRequest>
#else
#include <QContactLocalIdFilter>
#include <QContactLocalIdFetchRequest>
#endif
#include <QBasicTimer>
#include <QSet>
#include <QElapsedTimer>
#include <QAbstractListModel>
#ifdef HAS_MLITE
#include <mgconfitem.h>
#endif
Aug 5, 2013
Aug 5, 2013
68
#ifdef USING_QTPIM
Aug 6, 2013
Aug 6, 2013
69
70
QTCONTACTS_USE_NAMESPACE
Aug 5, 2013
Aug 5, 2013
71
72
typedef QContactDetail::DetailType DetailTypeId;
#else
Aug 6, 2013
Aug 6, 2013
73
74
QTM_USE_NAMESPACE
Aug 5, 2013
Aug 5, 2013
75
typedef QString DetailTypeId;
Aug 5, 2013
Aug 5, 2013
76
77
#endif
Jul 16, 2013
Jul 16, 2013
78
79
80
81
82
83
class CONTACTCACHE_EXPORT SeasideNameGroupChangeListener
{
public:
SeasideNameGroupChangeListener() {}
~SeasideNameGroupChangeListener() {}
Sep 6, 2013
Sep 6, 2013
84
virtual void nameGroupsUpdated(const QHash<QString, QSet<quint32> > &groups) = 0;
Jul 16, 2013
Jul 16, 2013
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
};
class CONTACTCACHE_EXPORT SeasideCache : public QObject
{
Q_OBJECT
public:
typedef QtContactsSqliteExtensions::ApiContactIdType ContactIdType;
enum FilterType {
FilterNone,
FilterAll,
FilterFavorites,
FilterOnline,
FilterTypesCount
};
Aug 5, 2013
Aug 5, 2013
101
102
103
104
enum FetchDataType {
FetchNone = 0,
FetchAccountUri = (1 << 0),
FetchPhoneNumber = (1 << 1),
Jan 9, 2014
Jan 9, 2014
105
FetchEmailAddress = (1 << 2),
Jan 9, 2014
Jan 9, 2014
106
107
108
109
110
FetchOrganization = (1 << 3),
FetchTypesMask = (FetchAccountUri |
FetchPhoneNumber |
FetchEmailAddress |
FetchOrganization)
Aug 5, 2013
Aug 5, 2013
111
112
};
Jul 16, 2013
Jul 16, 2013
113
enum DisplayLabelOrder {
Aug 29, 2013
Aug 29, 2013
114
115
FirstNameFirst = 0,
LastNameFirst
Jul 16, 2013
Jul 16, 2013
116
117
118
119
};
enum ContactState {
ContactAbsent,
Aug 5, 2013
Aug 5, 2013
120
ContactPartial,
Jul 16, 2013
Jul 16, 2013
121
ContactRequested,
Aug 5, 2013
Aug 5, 2013
122
ContactComplete
Jul 16, 2013
Jul 16, 2013
123
124
};
Dec 6, 2013
Dec 6, 2013
125
126
127
128
129
enum {
// Must be after the highest bit used in QContactStatusFlags::Flag
HasValidOnlineAccount = (QContactStatusFlags::IsOnline << 1)
};
Jul 16, 2013
Jul 16, 2013
130
131
132
133
134
135
struct ItemData
{
virtual ~ItemData() {}
virtual void displayLabelOrderChanged(DisplayLabelOrder order) = 0;
Aug 5, 2013
Aug 5, 2013
136
virtual void updateContact(const QContact &newContact, QContact *oldContact, ContactState state) = 0;
Jul 16, 2013
Jul 16, 2013
137
138
139
140
141
142
143
144
virtual void constituentsFetched(const QList<int> &ids) = 0;
virtual void mergeCandidatesFetched(const QList<int> &ids) = 0;
virtual void aggregationOperationCompleted() = 0;
virtual QList<int> constituents() const = 0;
};
Aug 9, 2013
Aug 9, 2013
145
146
struct CacheItem;
struct ItemListener
Jul 16, 2013
Jul 16, 2013
147
{
Aug 9, 2013
Aug 9, 2013
148
149
ItemListener() : next(0), key(0) {}
virtual ~ItemListener() {}
Jul 16, 2013
Jul 16, 2013
150
Aug 9, 2013
Aug 9, 2013
151
152
153
154
155
virtual void itemUpdated(CacheItem *item) = 0;
virtual void itemAboutToBeRemoved(CacheItem *item) = 0;
ItemListener *next;
void *key;
Jul 16, 2013
Jul 16, 2013
156
157
158
159
};
struct CacheItem
{
Aug 9, 2013
Aug 9, 2013
160
CacheItem() : itemData(0), iid(0), contactState(ContactAbsent), listeners(0) {}
Jul 30, 2013
Jul 30, 2013
161
CacheItem(const QContact &contact)
Aug 9, 2013
Aug 9, 2013
162
163
: contact(contact), itemData(0), iid(internalId(contact)),
statusFlags(contact.detail<QContactStatusFlags>().flagsValue()), contactState(ContactAbsent), listeners(0) {}
Jul 16, 2013
Jul 16, 2013
164
165
166
ContactIdType apiId() const { return SeasideCache::apiId(contact); }
Aug 9, 2013
Aug 9, 2013
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
ItemListener *appendListener(ItemListener *listener, void *key)
{
if (listeners) {
ItemListener *existing(listeners);
while (existing->next) {
existing = existing->next;
}
existing->next = listener;
} else {
listeners = listener;
}
listener->next = 0;
listener->key = key;
return listener;
}
Aug 13, 2013
Aug 13, 2013
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
bool removeListener(ItemListener *listener)
{
if (listeners) {
ItemListener *existing(listeners);
ItemListener **previous = &listeners;
while (existing) {
if (existing == listener) {
*previous = listener->next;
return true;
}
previous = &existing->next;
existing = existing->next;
}
}
return false;
}
Aug 9, 2013
Aug 9, 2013
203
204
ItemListener *listener(void *key)
{
Aug 13, 2013
Aug 13, 2013
205
206
207
ItemListener *existing(listeners);
while (existing && (existing->key != key) && (existing->next)) {
existing = existing->next;
Aug 9, 2013
Aug 9, 2013
208
}
Aug 13, 2013
Aug 13, 2013
209
return (existing && (existing->key == key)) ? existing : 0;
Aug 9, 2013
Aug 9, 2013
210
211
}
Jul 16, 2013
Jul 16, 2013
212
213
QContact contact;
ItemData *itemData;
Jul 29, 2013
Jul 29, 2013
214
quint32 iid;
Jul 30, 2013
Jul 30, 2013
215
quint64 statusFlags;
Jul 16, 2013
Jul 16, 2013
216
ContactState contactState;
Aug 9, 2013
Aug 9, 2013
217
ItemListener *listeners;
Sep 6, 2013
Sep 6, 2013
218
QString nameGroup;
Aug 19, 2013
Aug 19, 2013
219
QString displayLabel;
Jul 16, 2013
Jul 16, 2013
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
};
struct ContactLinkRequest
{
ContactLinkRequest(const SeasideCache::ContactIdType &id) : contactId(id), constituentsFetched(false) {}
ContactLinkRequest(const ContactLinkRequest &req) : contactId(req.contactId), constituentsFetched(req.constituentsFetched) {}
SeasideCache::ContactIdType contactId;
bool constituentsFetched;
};
class ListModel : public QAbstractListModel
{
public:
ListModel(QObject *parent = 0) : QAbstractListModel(parent) {}
virtual ~ListModel() {}
virtual void sourceAboutToRemoveItems(int begin, int end) = 0;
virtual void sourceItemsRemoved() = 0;
virtual void sourceAboutToInsertItems(int begin, int end) = 0;
virtual void sourceItemsInserted(int begin, int end) = 0;
virtual void sourceDataChanged(int begin, int end) = 0;
Aug 16, 2013
Aug 16, 2013
245
246
virtual void sourceItemsChanged() = 0;
Jul 16, 2013
Jul 16, 2013
247
248
virtual void makePopulated() = 0;
virtual void updateDisplayLabelOrder() = 0;
Aug 29, 2013
Aug 29, 2013
249
virtual void updateSortProperty() = 0;
Aug 30, 2013
Aug 30, 2013
250
virtual void updateGroupProperty() = 0;
Jul 16, 2013
Jul 16, 2013
251
252
};
Aug 5, 2013
Aug 5, 2013
253
254
255
256
struct ResolveListener
{
virtual ~ResolveListener() {}
Aug 6, 2013
Aug 6, 2013
257
258
259
260
261
262
263
264
265
virtual void addressResolved(const QString &first, const QString &second, CacheItem *item) = 0;
};
struct ChangeListener
{
virtual ~ChangeListener() {}
virtual void itemUpdated(CacheItem *item) = 0;
virtual void itemAboutToBeRemoved(CacheItem *item) = 0;
Aug 5, 2013
Aug 5, 2013
266
267
};
Jul 16, 2013
Jul 16, 2013
268
static SeasideCache *instance();
Oct 21, 2013
Oct 21, 2013
269
static QContactManager *manager();
Jul 16, 2013
Jul 16, 2013
270
271
272
273
274
static ContactIdType apiId(const QContact &contact);
static ContactIdType apiId(quint32 iid);
static bool validId(const ContactIdType &id);
Jul 29, 2013
Jul 29, 2013
275
276
277
#ifndef USING_QTPIM
static bool validId(const QContactId &id);
#endif
Jul 16, 2013
Jul 16, 2013
278
279
280
281
282
283
284
static quint32 internalId(const QContact &contact);
static quint32 internalId(const QContactId &id);
#ifndef USING_QTPIM
static quint32 internalId(QContactLocalId id);
#endif
Jan 9, 2014
Jan 9, 2014
285
static void registerModel(ListModel *model, FilterType type, FetchDataType requiredTypes = FetchNone, FetchDataType extraTypes = FetchNone);
Jul 16, 2013
Jul 16, 2013
286
287
288
289
290
291
292
293
static void unregisterModel(ListModel *model);
static void registerUser(QObject *user);
static void unregisterUser(QObject *user);
static void registerNameGroupChangeListener(SeasideNameGroupChangeListener *listener);
static void unregisterNameGroupChangeListener(SeasideNameGroupChangeListener *listener);
Aug 6, 2013
Aug 6, 2013
294
295
296
297
298
static void registerChangeListener(ChangeListener *listener);
static void unregisterChangeListener(ChangeListener *listener);
static void unregisterResolveListener(ResolveListener *listener);
Aug 7, 2013
Aug 7, 2013
299
300
static void setNameGrouper(SeasideNameGrouper *grouper);
Jul 16, 2013
Jul 16, 2013
301
static DisplayLabelOrder displayLabelOrder();
Aug 29, 2013
Aug 29, 2013
302
static QString sortProperty();
Aug 30, 2013
Aug 30, 2013
303
static QString groupProperty();
Jul 16, 2013
Jul 16, 2013
304
305
306
307
static int contactId(const QContact &contact);
static CacheItem *existingItem(const ContactIdType &id);
Jul 29, 2013
Jul 29, 2013
308
#ifdef USING_QTPIM
Jul 29, 2013
Jul 29, 2013
309
static CacheItem *existingItem(quint32 iid);
Jul 29, 2013
Jul 29, 2013
310
#endif
Aug 5, 2013
Aug 5, 2013
311
static CacheItem *itemById(const ContactIdType &id, bool requireComplete = true);
Jul 16, 2013
Jul 16, 2013
312
#ifdef USING_QTPIM
Aug 5, 2013
Aug 5, 2013
313
static CacheItem *itemById(int id, bool requireComplete = true);
Jul 16, 2013
Jul 16, 2013
314
315
316
#endif
static ContactIdType selfContactId();
static QContact contactById(const ContactIdType &id);
Aug 5, 2013
Aug 5, 2013
317
318
static void ensureCompletion(CacheItem *cacheItem);
Aug 19, 2013
Aug 19, 2013
319
static void refreshContact(CacheItem *cacheItem);
Aug 5, 2013
Aug 5, 2013
320
Sep 6, 2013
Sep 6, 2013
321
322
static QString nameGroup(const CacheItem *cacheItem);
static QString determineNameGroup(const CacheItem *cacheItem);
Aug 16, 2013
Aug 16, 2013
323
Sep 6, 2013
Sep 6, 2013
324
325
static QStringList allNameGroups();
static QHash<QString, QSet<quint32> > nameGroupMembers();
Jul 16, 2013
Jul 16, 2013
326
Aug 5, 2013
Aug 5, 2013
327
328
329
330
331
332
333
334
static CacheItem *itemByPhoneNumber(const QString &number, bool requireComplete = true);
static CacheItem *itemByEmailAddress(const QString &address, bool requireComplete = true);
static CacheItem *itemByOnlineAccount(const QString &localUid, const QString &remoteUid, bool requireComplete = true);
static CacheItem *resolvePhoneNumber(ResolveListener *listener, const QString &number, bool requireComplete = true);
static CacheItem *resolveEmailAddress(ResolveListener *listener, const QString &address, bool requireComplete = true);
static CacheItem *resolveOnlineAccount(ResolveListener *listener, const QString &localUid, const QString &remoteUid, bool requireComplete = true);
Jul 16, 2013
Jul 16, 2013
335
static bool saveContact(const QContact &contact);
Jul 19, 2013
Jul 19, 2013
336
static bool removeContact(const QContact &contact);
Jul 16, 2013
Jul 16, 2013
337
338
339
340
static void aggregateContacts(const QContact &contact1, const QContact &contact2);
static void disaggregateContacts(const QContact &contact1, const QContact &contact2);
Jul 19, 2013
Jul 19, 2013
341
342
static bool fetchConstituents(const QContact &contact);
static bool fetchMergeCandidates(const QContact &contact);
Jul 16, 2013
Jul 16, 2013
343
344
345
346
static int importContacts(const QString &path);
static QString exportContacts();
Sep 20, 2013
Sep 20, 2013
347
static const QList<quint32> *contacts(FilterType filterType);
Jul 16, 2013
Jul 16, 2013
348
349
350
351
static bool isPopulated(FilterType filterType);
static QString generateDisplayLabel(const QContact &contact, DisplayLabelOrder order = FirstNameFirst);
static QString generateDisplayLabelFromNonNameDetails(const QContact &contact);
Sep 19, 2013
Sep 19, 2013
352
static QUrl filteredAvatarUrl(const QContact &contact, const QStringList &metadataFragments = QStringList());
Jul 16, 2013
Jul 16, 2013
353
Aug 20, 2013
Aug 20, 2013
354
static QString normalizePhoneNumber(const QString &input);
Oct 24, 2013
Oct 24, 2013
355
static QString minimizePhoneNumber(const QString &input);
Aug 20, 2013
Aug 20, 2013
356
Jul 16, 2013
Jul 16, 2013
357
358
359
bool event(QEvent *event);
// For synchronizeLists()
Sep 20, 2013
Sep 20, 2013
360
int insertRange(int index, int count, const QList<quint32> &source, int sourceIndex) { return insertRange(m_syncFilter, index, count, source, sourceIndex); }
Aug 5, 2013
Aug 5, 2013
361
int removeRange(int index, int count) { removeRange(m_syncFilter, index, count); return 0; }
Jul 16, 2013
Jul 16, 2013
362
363
364
protected:
void timerEvent(QTimerEvent *event);
Aug 29, 2013
Aug 29, 2013
365
void setSortOrder(const QString &property);
Jan 9, 2014
Jan 9, 2014
366
void startRequest(bool *idleProcessing);
Jul 16, 2013
Jul 16, 2013
367
368
369
370
371
372
373
374
375
376
private slots:
void contactsAvailable();
void contactIdsAvailable();
void relationshipsAvailable();
void requestStateChanged(QContactAbstractRequest::State state);
void updateContacts();
#ifdef USING_QTPIM
void contactsAdded(const QList<QContactId> &contactIds);
void contactsChanged(const QList<QContactId> &contactIds);
Dec 10, 2013
Dec 10, 2013
377
void contactsPresenceChanged(const QList<QContactId> &contactIds);
Jul 16, 2013
Jul 16, 2013
378
379
380
381
void contactsRemoved(const QList<QContactId> &contactIds);
#else
void contactsAdded(const QList<QContactLocalId> &contactIds);
void contactsChanged(const QList<QContactLocalId> &contactIds);
Dec 10, 2013
Dec 10, 2013
382
void contactsPresenceChanged(const QList<QContactLocalId> &contactIds);
Jul 16, 2013
Jul 16, 2013
383
384
385
void contactsRemoved(const QList<QContactLocalId> &contactIds);
#endif
void displayLabelOrderChanged();
Aug 29, 2013
Aug 29, 2013
386
void sortPropertyChanged();
Aug 30, 2013
Aug 30, 2013
387
void groupPropertyChanged();
Dec 10, 2013
Dec 10, 2013
388
void displayStatusChanged(const QString &);
Jul 16, 2013
Jul 16, 2013
389
390
private:
Aug 5, 2013
Aug 5, 2013
391
392
393
394
395
enum PopulateProgress {
Unpopulated,
FetchFavorites,
FetchMetadata,
FetchOnline,
Jan 9, 2014
Jan 9, 2014
396
Populated
Aug 5, 2013
Aug 5, 2013
397
398
};
Jul 16, 2013
Jul 16, 2013
399
400
401
402
403
SeasideCache();
~SeasideCache();
static void checkForExpiry();
Jan 9, 2014
Jan 9, 2014
404
void keepPopulated(quint32 requiredTypes, quint32 extraTypes);
Jul 16, 2013
Jul 16, 2013
405
406
void requestUpdate();
Oct 2, 2013
Oct 2, 2013
407
void appendContacts(const QList<QContact> &contacts, FilterType filterType, bool partialFetch, const QSet<DetailTypeId> &queryDetailTypes);
Jul 16, 2013
Jul 16, 2013
408
void fetchContacts();
Dec 10, 2013
Dec 10, 2013
409
void updateContacts(const QList<ContactIdType> &contactIds, QList<ContactIdType> *updateList);
Dec 9, 2013
Dec 9, 2013
410
411
void applyPendingContactUpdates();
void applyContactUpdates(const QList<QContact> &contacts, bool partialFetch, const QSet<DetailTypeId> &queryDetailTypes);
Jul 16, 2013
Jul 16, 2013
412
Aug 30, 2013
Aug 30, 2013
413
414
void resolveUnknownAddresses(const QString &first, const QString &second, CacheItem *item);
bool updateContactIndexing(const QContact &oldContact, const QContact &contact, quint32 iid, const QSet<DetailTypeId> &queryDetailTypes, CacheItem *item);
Dec 9, 2013
Dec 9, 2013
415
void updateCache(CacheItem *item, const QContact &contact, bool partialFetch, bool initialInsert);
Aug 29, 2013
Aug 29, 2013
416
void reportItemUpdated(CacheItem *item);
Aug 5, 2013
Aug 5, 2013
417
Jul 16, 2013
Jul 16, 2013
418
void removeRange(FilterType filter, int index, int count);
Sep 20, 2013
Sep 20, 2013
419
int insertRange(FilterType filter, int index, int count, const QList<quint32> &queryIds, int queryIndex);
Jul 16, 2013
Jul 16, 2013
420
Sep 20, 2013
Sep 20, 2013
421
422
423
void contactDataChanged(quint32 iid);
void contactDataChanged(quint32 iid, FilterType filter);
void removeContactData(quint32 iid, FilterType filter);
Jul 16, 2013
Jul 16, 2013
424
425
void makePopulated(FilterType filter);
Sep 6, 2013
Sep 6, 2013
426
427
428
void addToContactNameGroup(quint32 iid, const QString &group, QSet<QString> *modifiedGroups = 0);
void removeFromContactNameGroup(quint32 iid, const QString &group, QSet<QString> *modifiedGroups = 0);
void notifyNameGroupsChanged(const QSet<QString> &groups);
Jul 16, 2013
Jul 16, 2013
429
430
431
432
void updateConstituentAggregations(const ContactIdType &contactId);
void completeContactAggregation(const ContactIdType &contact1Id, const ContactIdType &contact2Id);
Aug 5, 2013
Aug 5, 2013
433
434
void resolveAddress(ResolveListener *listener, const QString &first, const QString &second, bool requireComplete);
Oct 24, 2013
Oct 24, 2013
435
436
CacheItem *itemMatchingPhoneNumber(const QString &number, const QString &normalized, bool requireComplete);
Sep 20, 2013
Sep 20, 2013
437
438
int contactIndex(quint32 iid, FilterType filter);
Jul 16, 2013
Jul 16, 2013
439
440
static QContactRelationship makeRelationship(const QString &type, const QContact &contact1, const QContact &contact2);
Sep 20, 2013
Sep 20, 2013
441
442
QList<quint32> m_contacts[FilterTypesCount];
Jul 16, 2013
Jul 16, 2013
443
444
445
QBasicTimer m_expiryTimer;
QBasicTimer m_fetchTimer;
QHash<quint32, CacheItem> m_people;
Oct 24, 2013
Oct 24, 2013
446
QMultiHash<QString, quint32> m_phoneNumberIds;
Jul 16, 2013
Jul 16, 2013
447
QHash<QString, quint32> m_emailAddressIds;
Aug 5, 2013
Aug 5, 2013
448
QHash<QPair<QString, QString>, quint32> m_onlineAccountIds;
Jul 16, 2013
Jul 16, 2013
449
QHash<ContactIdType, QContact> m_contactsToSave;
Sep 6, 2013
Sep 6, 2013
450
QHash<QString, QSet<quint32> > m_contactNameGroups;
Jul 16, 2013
Jul 16, 2013
451
QList<QContact> m_contactsToCreate;
Dec 9, 2013
Dec 9, 2013
452
QHash<FilterType, QPair<QSet<DetailTypeId>, QList<QContact> > > m_contactsToAppend;
Dec 9, 2013
Dec 9, 2013
453
QList<QPair<QSet<DetailTypeId>, QList<QContact> > > m_contactsToUpdate;
Jul 16, 2013
Jul 16, 2013
454
455
QList<ContactIdType> m_contactsToRemove;
QList<ContactIdType> m_changedContacts;
Dec 10, 2013
Dec 10, 2013
456
QList<ContactIdType> m_presenceChangedContacts;
Oct 14, 2013
Oct 14, 2013
457
QSet<ContactIdType> m_aggregatedContacts;
Jul 16, 2013
Jul 16, 2013
458
459
QList<QContactId> m_contactsToFetchConstituents;
QList<QContactId> m_contactsToFetchCandidates;
Sep 9, 2013
Sep 9, 2013
460
QList<QContactId> m_contactsToLinkTo;
Jul 16, 2013
Jul 16, 2013
461
462
463
QList<QPair<ContactLinkRequest, ContactLinkRequest> > m_contactPairsToLink;
QList<QContactRelationship> m_relationshipsToSave;
QList<QContactRelationship> m_relationshipsToRemove;
Aug 7, 2013
Aug 7, 2013
464
QScopedPointer<SeasideNameGrouper> m_nameGrouper;
Jul 16, 2013
Jul 16, 2013
465
QList<SeasideNameGroupChangeListener*> m_nameGroupChangeListeners;
Aug 6, 2013
Aug 6, 2013
466
QList<ChangeListener*> m_changeListeners;
Jul 16, 2013
Jul 16, 2013
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
QList<ListModel *> m_models[FilterTypesCount];
QSet<QObject *> m_users;
QHash<ContactIdType,int> m_expiredContacts;
QContactFetchRequest m_fetchRequest;
QContactFetchByIdRequest m_fetchByIdRequest;
#ifdef USING_QTPIM
QContactIdFetchRequest m_contactIdRequest;
#else
QContactLocalIdFetchRequest m_contactIdRequest;
#endif
QContactRelationshipFetchRequest m_relationshipsFetchRequest;
QContactRemoveRequest m_removeRequest;
QContactSaveRequest m_saveRequest;
QContactRelationshipSaveRequest m_relationshipSaveRequest;
QContactRelationshipRemoveRequest m_relationshipRemoveRequest;
Aug 22, 2013
Aug 22, 2013
482
483
QList<QContactSortOrder> m_sortOrder;
QList<QContactSortOrder> m_onlineSortOrder;
Oct 21, 2013
Oct 21, 2013
484
FilterType m_syncFilter;
Jul 16, 2013
Jul 16, 2013
485
486
#ifdef HAS_MLITE
MGConfItem m_displayLabelOrderConf;
Aug 29, 2013
Aug 29, 2013
487
MGConfItem m_sortPropertyConf;
Aug 30, 2013
Aug 30, 2013
488
MGConfItem m_groupPropertyConf;
Jul 16, 2013
Jul 16, 2013
489
490
491
492
#endif
int m_populated;
int m_cacheIndex;
int m_queryIndex;
Sep 19, 2013
Sep 19, 2013
493
494
int m_fetchProcessedCount;
int m_fetchByIdProcessedCount;
Jul 16, 2013
Jul 16, 2013
495
DisplayLabelOrder m_displayLabelOrder;
Aug 29, 2013
Aug 29, 2013
496
QString m_sortProperty;
Aug 30, 2013
Aug 30, 2013
497
QString m_groupProperty;
Jul 16, 2013
Jul 16, 2013
498
bool m_keepPopulated;
Aug 5, 2013
Aug 5, 2013
499
500
PopulateProgress m_populateProgress;
quint32 m_fetchTypes;
Jan 9, 2014
Jan 9, 2014
501
502
quint32 m_extraFetchTypes;
quint32 m_dataTypesFetched;
Jul 16, 2013
Jul 16, 2013
503
504
505
bool m_updatesPending;
bool m_refreshRequired;
bool m_contactsUpdated;
Dec 10, 2013
Dec 10, 2013
506
bool m_displayOff;
Sep 9, 2013
Sep 9, 2013
507
508
QSet<ContactIdType> m_constituentIds;
QSet<ContactIdType> m_candidateIds;
Jul 16, 2013
Jul 16, 2013
509
Aug 5, 2013
Aug 5, 2013
510
511
512
struct ResolveData {
QString first;
QString second;
Aug 30, 2013
Aug 30, 2013
513
QString compare;
Aug 5, 2013
Aug 5, 2013
514
515
516
517
bool requireComplete;
ResolveListener *listener;
};
QList<ResolveData> m_resolveAddresses;
Dec 11, 2013
Dec 11, 2013
518
QList<ResolveData> m_unknownResolveAddresses;
Aug 30, 2013
Aug 30, 2013
519
QList<ResolveData> m_unknownAddresses;
Aug 5, 2013
Aug 5, 2013
520
const ResolveData *m_activeResolve;
Oct 24, 2013
Oct 24, 2013
521
QSet<QString> m_resolvedPhoneNumbers;
Aug 5, 2013
Aug 5, 2013
522
Jul 16, 2013
Jul 16, 2013
523
524
525
526
QElapsedTimer m_timer;
QElapsedTimer m_fetchPostponed;
static SeasideCache *instancePtr;
Sep 6, 2013
Sep 6, 2013
527
static QStringList allContactNameGroups;
Jul 16, 2013
Jul 16, 2013
528
529
530
};
#endif