Example #1
0
//TODO: VOXOX CHANGE by Rolando 04-29-09, fix this method to be able to get all phonenumbers of contacts when SQLite is integrated
void QtConferenceCallWidget::populateVoxOxContactsMap()
{
	//VOXOX - JRT - 2009.07.27 - TODO: this _voxOxContactsMap seems like overkill and includes ALL contacts.
	CUserProfile * currentCUserProfile = _cWengoPhone.getCUserProfileHandler().getCUserProfile();

	if (currentCUserProfile) 
	{
		CContactList& currentCContactList = currentCUserProfile->getCContactList();
		StringList    currentContactsIds  = currentCContactList.getContactIds();

		for (StringList::const_iterator it = currentContactsIds.begin(); it != currentContactsIds.end(); ++it) 
		{
			ContactProfile	tmpContactProfile = currentCContactList.getContactProfile(*it);
			QString			displayName		  = QString::fromUtf8(tmpContactProfile.getDisplayName().c_str());			
			std::string		freePhoneNumber   = tmpContactProfile.getVoxOxPhone();
			std::string		displayNameStr	  = displayName.toStdString();

			_voxOxContactsMap[displayNameStr] = freePhoneNumber;
		}
	}
}