• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GetContactProto函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetContactProto函数的典型用法代码示例。如果您正苦于以下问题:C++ GetContactProto函数的具体用法?C++ GetContactProto怎么用?C++ GetContactProto使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: HookContactSettingChanged

static int HookContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
	DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
	char *szProto = GetContactProto(hContact);
	if (strcmpnull(cws->szModule, "CList") && strcmpnull(cws->szModule, szProto))
		return 0;

	WindowList_Broadcast(g_hSendWindowList, DM_UPDATETITLE, 0, 0);
	WindowList_Broadcast(g_hRecvWindowList, DM_UPDATETITLE, 0, 0);
	return 0;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:11,代码来源:main.cpp


示例2: CreateTemporaryContactForItem

static MCONTACT CreateTemporaryContactForItem(HWND hwndDlg, TRecvContactsData *wndData, int iItem)
{
	TCHAR *caUIN = ListView_GetItemTextEx(GetDlgItem(hwndDlg, IDC_CONTACTS), iItem, 0);
	char *szProto = GetContactProto(wndData->mhContact);
	wndData->rhSearch = (HANDLE)CallProtoService(szProto, PS_BASICSEARCH, 0, (LPARAM)caUIN); // find it
	replaceStrT(wndData->haUin, caUIN);
	for (int j = 0; j < wndData->cbReceived; j++)
		if (!lstrcmp(wndData->maReceived[j]->mcaUIN, caUIN))
			return (MCONTACT)CallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(PALF_TEMPORARY, j), (LPARAM)wndData->mhDbEvent);
	return NULL;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:11,代码来源:receive.cpp


示例3: HideNudgeButton

void HideNudgeButton(MCONTACT hContact)
{
	char *szProto = GetContactProto(hContact);
	if (!ProtoServiceExists(szProto, PS_SEND_NUDGE)) {
		BBButton bbd = { sizeof(bbd) };
		bbd.bbbFlags = BBSF_HIDDEN | BBSF_DISABLED;
		bbd.pszModuleName = "Nudge";
		bbd.dwButtonID = 6000;
		CallService(MS_BB_SETBUTTONSTATE, hContact, (LPARAM)&bbd);
	}
}
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:11,代码来源:main.cpp


示例4: ContactChangeGroup

INT_PTR ContactChangeGroup(WPARAM hContact, LPARAM lParam)
{
	CallService(MS_CLUI_CONTACTDELETED, hContact, 0);
	if ((HANDLE)lParam == NULL)
		db_unset(hContact, "CList", "Group");
	else
		db_set_s(hContact, "CList", "Group", (char*)CallService(MS_CLIST_GROUPGETNAME2, lParam, (LPARAM)(int*)NULL));

	CallService(MS_CLUI_CONTACTADDED, hContact, ExtIconFromStatusMode(hContact, GetContactProto(hContact), GetContactStatus(hContact)));
	return 0;
}
开发者ID:martok,项目名称:miranda-ng,代码行数:11,代码来源:contact.cpp


示例5: onContactSettingChanged

int onContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
	DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
	const char *proto = GetContactProto((MCONTACT)hContact);
	if (!proto) return 0;

	if (!strcmp(cws->szModule, proto))
		if (!strcmp(cws->szSetting, "Auth") || !strcmp(cws->szSetting, "Grant") || !strcmp(cws->szSetting, "ServerId") || !strcmp(cws->szSetting, "ContactType"))
			onExtraImageApplying(hContact, 1);

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


示例6: onContactSettingChanged

int onContactSettingChanged(WPARAM wParam, LPARAM lParam)
{
    char *proto = GetContactProto(wParam);
    if (!proto)
        return 0;

    DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
    if (!strcmp(cws->szModule, proto) && !strcmp(cws->szSetting, "MirVer"))
        ExtraIconsApply(wParam, 1);

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


示例7: ReloadExtraInfo

void ReloadExtraInfo(MCONTACT hContact)
{
	if(hContact && pcli->hwndContactTree) {
		int index = cfg::getCache(hContact, NULL);
		if(index >= 0 && index < cfg::nextCacheEntry) {
			char *szProto = GetContactProto(hContact);

			TZ_LoadTimeZone(hContact, &cfg::eCache[index], szProto);
			InvalidateRect(pcli->hwndContactTree, NULL, FALSE);
		}
	}
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:12,代码来源:clcitems.cpp


示例8: GetInstanceByHContact

// Helper functions
static WhatsAppProto* GetInstanceByHContact(MCONTACT hContact)
{
	char *proto = GetContactProto(hContact);
	if (!proto)
		return 0;

	for (int i = 0; i < g_Instances.getCount(); i++)
		if (!mir_strcmp(proto, g_Instances[i].m_szModuleName))
			return &g_Instances[i];

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


示例9: IcqGetInstanceByHContact

static CIcqProto* IcqGetInstanceByHContact(HANDLE hContact)
{
	char* szProto = GetContactProto(hContact);
	if (szProto == NULL)
		return NULL;

	for (int i = 0; i < g_Instances.getCount(); i++)
		if (!strcmp(szProto, g_Instances[i]->m_szModuleName))
			return g_Instances[i];

	return NULL;
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:12,代码来源:icq_menu.cpp


示例10: memset

std::wstring EventList::GetMyId()
{
	std::wstring myId;
	CONTACTINFO ci;
	memset(&ci, 0, sizeof(ci));
	ci.cbSize = sizeof(ci);
	ci.szProto = GetContactProto(hContact);
	ci.hContact = 0;
	ci.dwFlag = CNF_DISPLAYUID | CNF_TCHAR;
	GetInfo(ci, myId);
	return myId;
}
开发者ID:biddyweb,项目名称:miranda-ng,代码行数:12,代码来源:EventList.cpp


示例11: GetContactId

inline std::wstring GetContactId(MCONTACT hContact)
{
	std::wstring id;
	CONTACTINFO ci;
	memset(&ci, 0, sizeof(ci));
	ci.cbSize = sizeof(ci);
	ci.szProto = GetContactProto(hContact);
	ci.hContact = hContact;
	ci.dwFlag = CNF_DISPLAYUID | CNF_TCHAR;
	GetInfo(ci, id);
	return id;
}
开发者ID:biddyweb,项目名称:miranda-ng,代码行数:12,代码来源:EventList.cpp


示例12: CreateTemporaryContactForItem

static HANDLE CreateTemporaryContactForItem(HWND hwndDlg, TRecvContactsData* wndData, int iItem)
{
  char* caUIN = ListView_GetItemTextEx(GetDlgItem(hwndDlg, IDC_CONTACTS), iItem, 0);
  char* szProto = GetContactProto(wndData->mhContact);
  wndData->rhSearch = (HANDLE)SRCCallProtoService(szProto, PS_BASICSEARCH, 0, (LPARAM)caUIN); // find it
  SAFE_FREE((void**)&wndData->haUin);
  wndData->haUin = caUIN;
  for (int j = 0; j < wndData->cbReceived; j++)
    if (!strcmpnull(wndData->maReceived[j]->mcaUIN, caUIN))
      return (HANDLE)SRCCallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(PALF_TEMPORARY, j), (LPARAM)wndData->mhDbEvent);
  return NULL;
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:12,代码来源:receive.cpp


示例13: GetProtoDefaultAvatar

protoPicCacheEntry* GetProtoDefaultAvatar(MCONTACT hContact)
{
	char *szProto = GetContactProto(hContact);
	if (szProto) {
		for (int i = 0; i < g_ProtoPictures.getCount(); i++) {
			protoPicCacheEntry& p = g_ProtoPictures[i];
			if (!mir_strcmp(p.szProtoname, szProto) && p.hbmPic != NULL)
				return &g_ProtoPictures[i];
		}
	}
	return NULL;
}
开发者ID:martok,项目名称:miranda-ng,代码行数:12,代码来源:utils.cpp


示例14: GetContactProto

//---------------------------------------------------------------------------
void CSend::SetContact(MCONTACT hContact)
{
	m_hContact = hContact;
	if (hContact) {
		m_pszProto = GetContactProto(hContact);
		m_ChatRoom = db_get_b(hContact, m_pszProto, "ChatRoom", 0);
		/*
		m_PFflag = hasCap(PF1_URLSEND);
		m_PFflag = hasCap(PF1_CHAT);
		m_PFflag = hasCap(PF1_IMSEND);// */
	}
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:13,代码来源:CSend.cpp


示例15: ReloadExtraInfo

void ReloadExtraInfo(MCONTACT hContact)
{
	if (hContact && pcli->hwndContactTree) {
		TExtraCache *p = cfg::getCache(hContact, NULL);
		if (p) {
			char *szProto = GetContactProto(hContact);

			TZ_LoadTimeZone(hContact, p, szProto);
			InvalidateRect(pcli->hwndContactTree, NULL, FALSE);
		}
	}
}
开发者ID:fatty-,项目名称:miranda-ng,代码行数:12,代码来源:clcitems.cpp


示例16: MIR_CORE_DLL

MIR_CORE_DLL(HANDLE) TimeZone_CreateByContact(MCONTACT hContact, LPCSTR szModule, DWORD dwFlags)
{
	if (hContact == NULL && szModule == NULL)
		return (dwFlags & (TZF_DIFONLY | TZF_KNOWNONLY)) ? NULL : &myInfo.myTZ;

	if (szModule == NULL) szModule = "UserInfo";

	DBVARIANT dbv;
	if (!db_get_ts(hContact, szModule, "TzName", &dbv)) {
		HANDLE res = TimeZone_CreateByName(dbv.ptszVal, dwFlags);
		db_free(&dbv);
		if (res) return res;
	}

	signed char timezone = (signed char)db_get_b(hContact, szModule, "Timezone", -1);
	if (timezone == -1) {
		char *szProto = GetContactProto(hContact);
		if (!db_get_ts(hContact, szProto, "TzName", &dbv)) {
			HANDLE res = TimeZone_CreateByName(dbv.ptszVal, dwFlags);
			db_free(&dbv);
			if (res) return res;
		}
		timezone = (signed char)db_get_b(hContact, szProto, "Timezone", -1);
	}

	if (timezone != -1) {
		MIM_TIMEZONE tzsearch;
		tzsearch.tzi.Bias = timezone * 30;
		if (myInfo.myTZ.tzi.Bias == tzsearch.tzi.Bias) {
			if (dwFlags & TZF_DIFONLY) return NULL;
			return &myInfo.myTZ;
		}

		int i = g_timezonesBias.getIndex(&tzsearch);
		while (i >= 0 && g_timezonesBias[i]->tzi.Bias == tzsearch.tzi.Bias) --i;

		int delta = LONG_MAX;
		for (int j = ++i; j < g_timezonesBias.getCount() && g_timezonesBias[j]->tzi.Bias == tzsearch.tzi.Bias; ++j) {
			int delta1 = abs(g_timezonesBias[j]->tzi.DaylightDate.wMonth - myInfo.myTZ.tzi.DaylightDate.wMonth);
			if (delta1 <= delta) {
				delta = delta1;
				i = j;
			}
		}

		if (i >= 0) {
			MIM_TIMEZONE *tz = g_timezonesBias[i];
			return ((dwFlags & TZF_DIFONLY) && IsSameTime(tz)) ? NULL : tz;
		}
	}
	return (dwFlags & (TZF_DIFONLY | TZF_KNOWNONLY)) ? NULL : &myInfo.myTZ;
}
开发者ID:ybznek,项目名称:miranda-ng,代码行数:52,代码来源:timezones.cpp


示例17: db_mc_getMostOnline

int CLC::AddContactToGroup(struct ClcData *dat, struct ClcGroup *group, MCONTACT hContact)
{
	int i = coreCli.pfnAddContactToGroup( dat, group, hContact );
	struct ClcContact* p = group->cl.items[i];

	p->wStatus = cfg::getWord(hContact, p->proto, "Status", ID_STATUS_OFFLINE);
	p->xStatus = cfg::getByte(hContact, p->proto, "XStatusId", 0);
    //p->iRowHeight = -1;

	if (p->proto)
		p->bIsMeta = !strcmp(p->proto, cfg::dat.szMetaName);
	else
		p->bIsMeta = FALSE;
	if (p->bIsMeta && cfg::dat.bMetaAvail) {
		p->hSubContact = db_mc_getMostOnline(hContact);
		p->metaProto = GetContactProto(p->hSubContact);
		p->iImage = CallService(MS_CLIST_GETCONTACTICON, (WPARAM) p->hSubContact, 0);
	} else {
		p->iImage = CallService(MS_CLIST_GETCONTACTICON, (WPARAM) hContact, 0);
		p->metaProto = NULL;
	}
    p->bSecondLine = cfg::dat.dualRowMode;
    p->bSecondLineLocal = cfg::getByte(hContact, "CList", "CLN_2ndline", -1);

    p->dwDFlags = cfg::getDword(hContact, "CList", "CLN_Flags", 0);

	if(dat->bisEmbedded)
		p->extraCacheEntry = -1;
	else {
		p->extraCacheEntry = cfg::getCache(p->hContact, p->proto);
		GetExtendedInfo( p, dat);
		if(p->extraCacheEntry >= 0 && p->extraCacheEntry < cfg::nextCacheEntry) {
			cfg::eCache[p->extraCacheEntry].proto_status_item = GetProtocolStatusItem(p->bIsMeta ? p->metaProto : p->proto);
			if(cfg::getByte(p->hContact, "CList", "floating", 0) && g_floatoptions.enabled) {
				if(cfg::eCache[p->extraCacheEntry].floater == NULL)
					FLT_Create(p->extraCacheEntry);
				else {
					ShowWindow(cfg::eCache[p->extraCacheEntry].floater->hwnd, SW_SHOWNOACTIVATE);
					FLT_Update(dat, p);
				}
			}
		}
        LoadAvatarForContact(p);
        // notify other plugins to re-supply their extra images (icq for xstatus, mBirthday etc...)
		pcli->pfnSetAllExtraIcons(hContact);
	}
	RTL_DetectAndSet( p, p->hContact);
	p->avatarLeft = p->extraIconRightBegin = -1;
	p->flags |= cfg::getByte(p->hContact, "CList", "Priority", 0) ? CONTACTF_PRIORITY : 0;

	return i;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:52,代码来源:clcitems.cpp


示例18: HContactFromNumericID

static MCONTACT HContactFromNumericID(char *pszProtoName, char *pszSetting, DWORD dwID)
{
    MCONTACT hContact = dstDb->FindFirstContact();
    while (hContact != NULL) {
        if ( db_get_dw((MCONTACT)hContact, pszProtoName, pszSetting, 0) == dwID) {
            char* szProto = GetContactProto((MCONTACT)hContact);
            if (szProto != NULL && !lstrcmpA(szProto, pszProtoName))
                return hContact;
        }
        hContact = dstDb->FindNextContact((MCONTACT)hContact);
    }
    return INVALID_CONTACT_ID;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:13,代码来源:import.cpp


示例19: mir_strcmpi

void CToxProto::ChatValidateContact(HWND hwndList, const std::vector<MCONTACT> &contacts, MCONTACT hContact)
{
	bool isProtoContact = mir_strcmpi(GetContactProto(hContact), m_szModuleName) == 0;
	if (isProtoContact && !isChatRoom(hContact))
	{
		if (std::find(contacts.begin(), contacts.end(), hContact) != contacts.end())
		{
			SendMessage(hwndList, CLM_DELETEITEM, (WPARAM)hContact, 0);
		}
		return;
	}
	SendMessage(hwndList, CLM_DELETEITEM, (WPARAM)hContact, 0);
}
开发者ID:ybznek,项目名称:miranda-ng,代码行数:13,代码来源:tox_chatrooms.cpp


示例20: createProtoOverlayedIcon

HICON createProtoOverlayedIcon(MCONTACT hContact)
{
	HICON icon1 = LoadIconEx(I_OVERLAY);

	char *szProto = GetContactProto(hContact);
	HICON icon0 = LoadSkinnedProtoIcon(szProto, ID_STATUS_ONLINE);

	HICON resIcon = getOverlayedIcon(icon0, icon1, FALSE);

	ReleaseIconEx(icon1);
	Skin_ReleaseIcon(icon0);
	return resIcon;
}
开发者ID:biddyweb,项目名称:miranda-ng,代码行数:13,代码来源:icolib.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetContainer函数代码示例发布时间:2022-05-30
下一篇:
C++ GetConsoleTitle函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap