当前位置: 首页>>代码示例>>C++>>正文


C++ Contact::getQtIMProtocol方法代码示例

本文整理汇总了C++中Contact::getQtIMProtocol方法的典型用法代码示例。如果您正苦于以下问题:C++ Contact::getQtIMProtocol方法的具体用法?C++ Contact::getQtIMProtocol怎么用?C++ Contact::getQtIMProtocol使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Contact的用法示例。


在下文中一共展示了Contact::getQtIMProtocol方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: callContact

void CUserProfile::callContact( const std::string& contactId )
{
	Contact* contact = getCContactList().getContactById( contactId );

	if ( contact )
	{
		//VOXOX - CJC - 2009.06.23 Fix bug not calling voxox contact
		if ( contact->getPreferredIMContact()->isIMAccountVoxOx() )
		{
			//VOXOX - JRT - 2009.09.24 - TODO: Reversed logic?  This prevents block of code prevents retrieval of SIP number for this contact.
			//								   Most of this logic already exists in makeContactCallThreadSafe(), which is called by makeContactCall()
			if ( contact->getVoxOxPhone().empty() )
			{
				makeContactCall( contactId );
			}
			else
			{
				makeCall( contact->getPreferredNumber());	//VOXOX - CJC - 2009.06.11 
			}
		}
		else if(contact->getQtIMProtocol() == QtEnumIMProtocol::IMProtocolSkype){
			makeContactCall(contactId);
		}
		else
		{
			if ( contact->getTelephones().hasValid() )
			{
				makeCall( contact->getPreferredNumber());	//VOXOX - CJC - 2009.06.11 
			}
		}
	}
}
开发者ID:,项目名称:,代码行数:32,代码来源:

示例2: determineStatus

QtContactPixmap::ContactPixmap ParticipantList::determineStatus( Contact& contact ) 
{
	QtContactPixmap::ContactPixmap status =  QtContactPixmap::ContactUnknown;

	QtEnumIMProtocol::IMProtocol     qtImProtocol = contact.getQtIMProtocol();
	EnumPresenceState::PresenceState eState		  = contact.getPresenceState();

	bool hasAvailableSipNumber = contact.hasPstnCall();
	bool blocked			   = contact.isBlocked();

	status = QtContactPixmap::determinePixmap( qtImProtocol, eState, hasAvailableSipNumber,blocked );

	return status;
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例3: makeContactCallThreadSafe

void CUserProfile::makeContactCallThreadSafe(std::string contactId) {
	Contact * contact = _cContactList.getContact(contactId);
	
	if (contact) 
	{
		//VOXOXCHANGE CJC CALL VOXOX NUMBERS
		if(contact->getIsIMAccountVoxox())
		{
			//We don't get the number if we already have it//TODO CHANGE THIS IF NUMBERS ARE CHANGED FREQUENTLY
			if(!contact->getVoxOxPhone().empty())
			{
				EnumMakeCallError::MakeCallError error = _userProfile.makeCall(*contact);
				if (error != EnumMakeCallError::NoError) 
				{
					makeCallErrorEvent(*this, error, contact->getVoxOxPhone());//VOXOX CHANGE by Rolando - 2009.05.29 - added parameter phonenumber to check what call failed
				}
			}
			else
			{
				if(_userProfile.getWsContactNumber())
				{
					WsContactNumber & wsContactNumber = *_userProfile.getWsContactNumber();
					wsContactNumber.setContactId(contact->getKey());
					wsContactNumber.contactNumberEvent +=	boost::bind(&CUserProfile::contactNumberEventHandler, this, _1, _2, _3);
					wsContactNumber.execute();
				}
			}	

		}else if(contact->getQtIMProtocol() == QtEnumIMProtocol::IMProtocolSkype){
			_userProfile.makeCall(*contact);
		}
		else
		{
			EnumMakeCallError::MakeCallError error = _userProfile.makeCall(*contact);
			if (error != EnumMakeCallError::NoError) 
			{
				makeCallErrorEvent(*this, error, contactId);//VOXOX CHANGE by Rolando - 2009.05.29 - added parameter contactId to check what call failed
			}
		}
	}
	else
	{
		makeCallErrorEvent(*this, EnumMakeCallError::ContactNotFound, contactId);//VOXOX CHANGE by Rolando - 2009.05.29 - added parameter contactId to check what call failed
	}
}
开发者ID:,项目名称:,代码行数:45,代码来源:


注:本文中的Contact::getQtIMProtocol方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。