void TAccountXmpp::Contacts_RosterUpdate(const CXmlNode * pXmlNodeQuery) { Assert(pXmlNodeQuery != NULL); Assert(pXmlNodeQuery->FCompareTagName("query")); MessageLog_AppendTextFormatSev(eSeverityNoise, "TAccountXmpp::Contacts_RosterUpdate()\n"); // Loop through every <item> under the <query> element const CXmlNode * pXmlNodeItemRoster = pXmlNodeQuery->m_pElementsList; while (pXmlNodeItemRoster != NULL) { Contact_RosterUpdateItem(pXmlNodeItemRoster); pXmlNodeItemRoster = pXmlNodeItemRoster->m_pNextSibling; } // Make sure every contact is subscribed TContact * pContact; TContact ** ppContactStop; TContact ** ppContact = m_arraypaContacts.PrgpGetContactsStop(OUT &ppContactStop); while (ppContact != ppContactStop) { pContact = *ppContact++; if (pContact->XmppRoster_PszGetSubscription() == NULL) Contact_RosterSubscribe(pContact); //pContact->XmppRosterSubscribed(); } } // Contacts_RosterUpdate()
void TAccountXmpp::Contacts_RosterDisplayDebug(PSZAC pszName) { MessageLog_AppendTextFormatSev(eSeverityNoise, "Roster subscription for account $S: $s\n", &m_strJID, pszName); TContact * pContact; TContact ** ppContactStop; TContact ** ppContact = m_arraypaContacts.PrgpGetContactsStop(OUT &ppContactStop); while (ppContact != ppContactStop) { pContact = *ppContact++; PSZUC pszSubscription = pContact->XmppRoster_PszGetSubscription(); if (pszSubscription != NULL) MessageLog_AppendTextFormatSev(eSeverityNoise, "\t $S: $s\n", &pContact->m_strJidBare, pszSubscription); } }