bool IMAccountManager::setImAccountUserNetworkId( const IMAccount & imAccount ) { RecursiveMutex::ScopedLock lock(_mutex); bool result = false; IMAccount* pAcct = _imAccountList.findByAccount( imAccount ); if ( pAcct ) { pAcct->setUserNetworkId( imAccount.getUserNetworkId() ); result = true; } return result; }
void CUserProfile::updateContactThreadSafe(const ContactProfile contactProfile) { //We need to get the ServerProtocolId or UserNetworkId for the IMAccount. IMContact* imContact = contactProfile.getPreferredIMContact(); if ( imContact ) { IMAccount* imAccount = getUserProfile().getIMAccountManager().getIMAccount( imContact->getIMAccount()->getKey() ); if ( imAccount ) { imContact->setServerProtocolId( imAccount->getServerProtocolId() ); imContact->setUserNetworkId ( imAccount->getUserNetworkId() ); //VOXOX - JRT - 2009.06.09 getCContactList().updateContact(contactProfile); //This does the update. } } }