本文整理汇总了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);
}
}
示例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;
}
示例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);
}
}