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


C++ ContactRef::IsMemberOfHardwiredGroup方法代码示例

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


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

示例1: OnContactListChanged

void CSkypeProto::OnContactListChanged(const ContactRef &contact)
{
	bool result;

	contact->IsMemberOfHardwiredGroup(CContactGroup::ALL_BUDDIES, result);
	if (result)
	{
		if ( !this->contactList.contains(contact))
		{
			CContact::Ref newContact(contact);
			this->contactList.append(newContact);
			newContact.fetch();
		}
	}

	contact->IsMemberOfHardwiredGroup(CContactGroup::CONTACTS_WAITING_MY_AUTHORIZATION, result);
	if (result)
	{
		SEString data;

		uint newTS = 0;
		contact->GetPropAuthreqTimestamp(newTS);

		this->RaiseAuthRequestEvent(newTS, contact);
	}
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:26,代码来源:skype_contacts.cpp

示例2: OnPrebuildContactMenu

int CSkypeProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
{
	MCONTACT hContact = (MCONTACT)wParam;
	if ( !hContact)
		return 0;

	if ( !this->IsOnline() || ::lstrcmpA(::GetContactProto(hContact), m_szModuleName))
		return 0;

	if ( !this->isChatRoom(hContact))
	{
		bool ctrlPressed = (::GetKeyState(VK_CONTROL) & 0x8000) != 0;
		
		bool authNeed = this->getByte(hContact, "Auth", 0) > 0;
		bool grantNeed = this->getByte(hContact, "Grant", 0) > 0;
		
		::Menu_ShowItem(CSkypeProto::contactMenuItems[CMI_AUTH_REQUEST], ctrlPressed || authNeed);
		::Menu_ShowItem(CSkypeProto::contactMenuItems[CMI_AUTH_GRANT], ctrlPressed || grantNeed);
		::Menu_ShowItem(CSkypeProto::contactMenuItems[CMI_AUTH_REVOKE], ctrlPressed || (!grantNeed && !authNeed));
		::Menu_ShowItem(CSkypeProto::contactMenuItems[CMI_HISTORY], TRUE);

		{
			SEString sid(_T2A(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID)));
			
			ContactRef contact;
			this->GetContact(sid, contact);

			bool isBlocked = false;
			contact->IsMemberOfHardwiredGroup(ContactGroup::CONTACTS_BLOCKED_BY_ME, isBlocked);
		
			CLISTMENUITEM clmi = { sizeof(clmi) };
			clmi.cbSize = sizeof(CLISTMENUITEM);
			clmi.flags = CMIM_FLAGS;
			if (isBlocked)
			{
				clmi.flags |= CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
				clmi.icolibItem = CSkypeProto::GetSkinIconHandle("contact");
				clmi.ptszName = LPGENT("Unblock this person...");
			}
			else
			{
				clmi.flags |= CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
				clmi.icolibItem = CSkypeProto::GetSkinIconHandle("block");
				clmi.ptszName = LPGENT("Block this person...");
			}
			::CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)CSkypeProto::contactMenuItems[CMI_BLOCK], (LPARAM)&clmi);
		}
	}

	return 0;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:51,代码来源:skype_menus.cpp

示例3: UpdateContactAuthState

void CSkypeProto::UpdateContactAuthState(MCONTACT hContact, const ContactRef &contact)
{
	uint newTS = 0;
	contact->GetPropAuthreqTimestamp(newTS);
	DWORD oldTS = this->getDword("AuthTS", 0);
	if (newTS > oldTS)
	{
		bool result;
		if (contact->HasAuthorizedMe(result) && !result)
			this->setByte(hContact, "Auth", !result);
		else
		{
			this->delSetting(hContact, "Auth");
			if (contact->IsMemberOfHardwiredGroup(CContactGroup::ALL_BUDDIES, result) && !result)
				this->setByte(hContact, "Grant", !result);
			else
				this->delSetting(hContact, "Grant");
		}

		this->setDword(hContact, "AuthTS", newTS);
	}
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:22,代码来源:skype_contacts.cpp


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