equal
deleted
inserted
replaced
23 /*! |
23 /*! |
24 Presence listener for contact card. It provides aggregated |
24 Presence listener for contact card. It provides aggregated |
25 presence information for a contact and separately for each |
25 presence information for a contact and separately for each |
26 valid QContactOnlineAccount. |
26 valid QContactOnlineAccount. |
27 */ |
27 */ |
28 CntPresenceListener::CntPresenceListener(const QContact& contact, QObject* parent) : |
28 CntPresenceListener::CntPresenceListener(QObject* parent) : |
29 QObject(parent), |
29 QObject(parent), |
30 mReader(NULL), |
30 mReader(NULL) |
31 mContact(contact) |
|
32 { |
31 { |
33 mReader = PrcPresenceReader::createReader(); |
32 mReader = PrcPresenceReader::createReader(); |
34 connect(mReader, SIGNAL(signalPresenceNotification(bool, PrcPresenceBuddyInfoQt*)), |
33 connect(mReader, SIGNAL(signalPresenceNotification(bool, PrcPresenceBuddyInfoQt*)), |
35 this, SLOT(handlePresenceUpdate(bool, PrcPresenceBuddyInfoQt*))); |
34 this, SLOT(handlePresenceUpdate(bool, PrcPresenceBuddyInfoQt*))); |
36 } |
35 } |
49 returns initial presence statuses for each of the accounts. |
48 returns initial presence statuses for each of the accounts. |
50 |
49 |
51 \param combinedOnlineStatus aggregated online status |
50 \param combinedOnlineStatus aggregated online status |
52 \return QMap with account specific (for example "sip:sip@sip.com") online information |
51 \return QMap with account specific (for example "sip:sip@sip.com") online information |
53 */ |
52 */ |
54 QMap<QString, bool> CntPresenceListener::initialPresences(bool &combinedOnlineStatus) |
53 QMap<QString, bool> CntPresenceListener::initialPresences(const QContact& contact, bool &combinedOnlineStatus) |
55 { |
54 { |
56 QMap<QString, bool> initialMap; |
55 QMap<QString, bool> initialMap; |
57 |
56 |
58 QList<QContactOnlineAccount> accounts = mContact.details<QContactOnlineAccount>(); |
57 QList<QContactOnlineAccount> accounts = contact.details<QContactOnlineAccount>(); |
59 |
58 |
60 QList<PrcPresenceBuddyInfoQt*> buddies; |
59 QList<PrcPresenceBuddyInfoQt*> buddies; |
61 |
60 |
62 foreach (QContactOnlineAccount account, accounts) |
61 foreach (QContactOnlineAccount account, accounts) |
63 { |
62 { |