equal
deleted
inserted
replaced
73 are emitted as the pieces of information arrive -- up to three times per contact; |
73 are emitted as the pieces of information arrive -- up to three times per contact; |
74 once for text, once for icon1 and once for icon2. |
74 once for text, once for icon1 and once for icon2. |
75 */ |
75 */ |
76 class CntCache : public QObject |
76 class CntCache : public QObject |
77 { |
77 { |
|
78 friend class TestCntCache; |
|
79 friend class TestCntListModel; |
78 Q_OBJECT |
80 Q_OBJECT |
79 public: |
81 public: |
80 static CntCache* instance(); |
82 static CntCache* instance(); |
81 CntContactInfo fetchContactInfo(int row, const QList<QContactLocalId>& idList); |
83 CntContactInfo fetchContactInfo(int row, const QList<QContactLocalId>& idList); |
82 |
84 |
99 void onNewInfo(int contactId, const ContactInfoField& infoField, const QString& infoValue); |
101 void onNewInfo(int contactId, const ContactInfoField& infoField, const QString& infoValue); |
100 void onInfoCancelled(int contactId); |
102 void onInfoCancelled(int contactId); |
101 void onNewIcon(const QString& iconName, const HbIcon& icon); |
103 void onNewIcon(const QString& iconName, const HbIcon& icon); |
102 void onIconCancelled(const QString& iconName); |
104 void onIconCancelled(const QString& iconName); |
103 void onShutdown(); |
105 void onShutdown(); |
|
106 void updateContactsInCache(const QList<QContactLocalId>& contactIds); |
104 void removeContactsFromCache(const QList<QContactLocalId>& contactIds); |
107 void removeContactsFromCache(const QList<QContactLocalId>& contactIds); |
105 void scheduleOneReadAheadItem(); |
108 void scheduleOneReadAheadItem(); |
106 |
109 |
107 private: |
110 private: |
108 static CntCache* mInstance; // the one and only instance of CntCache |
111 static CntCache* mInstance; // the one and only instance of CntCache |