Example #1
0
bool IMAccountManager::setImAccountServerProtocolId( const IMAccount & imAccount )
{
	RecursiveMutex::ScopedLock lock(_mutex);

	bool result = false;
	IMAccount* pAcct = _imAccountList.findByAccount( imAccount );

	if ( pAcct )
	{
		pAcct->setServerProtocolId( imAccount.getServerProtocolId() );
		result = true;
	}

	return result;
}
Example #2
0
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.
		}
	}
}