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


C++ PINGLIST::end方法代码示例

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


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

示例1: write_ping_addresses

// call with list_cs locked
void write_ping_addresses() {
	int index = 0;
	for(PINGLIST::iterator i = list_items.begin(); i != list_items.end(); i++, index++) {
		i->index = index;
		write_ping_address(&(*i));
	}
}
开发者ID:darkscout,项目名称:sje-miranda-plugins,代码行数:8,代码来源:pinglist.cpp

示例2: FillList

int FillList(WPARAM, LPARAM)
{

	if (options.logging)
		CallService(PLUG "/Log", (WPARAM)_T("ping address list reload"), 0);

	PINGLIST pl;
	CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);

	SendMessage(list_hwnd, WM_SETREDRAW, FALSE, 0);
	{
		mir_cslock lck(data_list_cs);
		data_list = pl;
		SendMessage(list_hwnd, LB_RESETCONTENT, 0, 0);

		int index = 0;
		for (pinglist_it j = data_list.begin(); j != data_list.end(); ++j, index++) {
			SendMessage(list_hwnd, LB_INSERTSTRING, (WPARAM)-1, (LPARAM)&(*j));
		}
		set_list_changed(true);

		list_size = data_list.size();
	}
	SendMessage(list_hwnd, WM_SETREDRAW, TRUE, 0);

	InvalidateRect(list_hwnd, 0, FALSE);

	SetEvent(hWakeEvent);

	if (!ServiceExists(MS_CLIST_FRAMES_ADDFRAME) && options.attach_to_clist)
		UpdateFrame();

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

示例3: reset_myhandle

void reset_myhandle() {
	EnterCriticalSection(&list_cs);
	set_changing_clist_handle(true);
	for(PINGLIST::iterator i = list_items.begin(); i != list_items.end(); i++) {
		DBWriteContactSettingString(i->hContact, "CList", "MyHandle", i->pszLabel);
	}
	set_changing_clist_handle(false);
	LeaveCriticalSection(&list_cs);
}
开发者ID:darkscout,项目名称:sje-miranda-plugins,代码行数:9,代码来源:pinglist.cpp

示例4: PingDisableAll

INT_PTR PingDisableAll(WPARAM, LPARAM) {
	PINGLIST pl;
	CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);
	for (pinglist_it i = pl.begin(); i != pl.end(); ++i) {
		i->status = PS_DISABLED;
		i->miss_count = 0;
	}
	CallService(PLUG "/SetPingList", (WPARAM)&pl, 0);
	return 0;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:10,代码来源:utils.cpp

示例5: PingEnableAll

INT_PTR PingEnableAll(WPARAM, LPARAM) {
	PINGLIST pl;
	CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);
	for (pinglist_it i = pl.begin(); i != pl.end(); ++i) {
		if (i->status == PS_DISABLED) {
			i->status = PS_NOTRESPONDING;
		}
	}
	CallService(PLUG "/SetPingList", (WPARAM)&pl, 0);
	return 0;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:11,代码来源:utils.cpp

示例6: PingEnableAll

int PingEnableAll(WPARAM wParam, LPARAM lParam) {
	PINGLIST pl;
	CallService(PROTO "/GetPingList", 0, (LPARAM)&pl);
	for(PINGLIST::iterator i = pl.begin(); i != pl.end(); i++) {
		if(i->status == options.off_status) {
			i->status = options.nrstatus;
			DBWriteContactSettingWord(i->hContact, PROTO, "Status", i->status);
		}
	}
	CallService(PROTO "/SetPingList", (WPARAM)&pl, 0);
	return 0;
}
开发者ID:darkscout,项目名称:sje-miranda-plugins,代码行数:12,代码来源:utils.cpp

示例7: PingDisableAll

int PingDisableAll(WPARAM wParam, LPARAM lParam) {
	PINGLIST pl;
	CallService(PROTO "/GetPingList", 0, (LPARAM)&pl);
	for(PINGLIST::iterator i = pl.begin(); i != pl.end(); i++) {
		i->status = options.off_status;
		DBWriteContactSettingWord(i->hContact, PROTO, "Status", i->status);
		set_changing_clist_handle(TRUE);
		DBWriteContactSettingString(i->hContact, "CList", "MyHandle", i->pszLabel);
		set_changing_clist_handle(FALSE);
	}
	CallService(PROTO "/SetPingList", (WPARAM)&pl, 0);
	return 0;
}
开发者ID:darkscout,项目名称:sje-miranda-plugins,代码行数:13,代码来源:utils.cpp

示例8: ContactDblClick

int ContactDblClick(WPARAM wParam, LPARAM lParam) {
	PINGLIST pl;
	CallService(PROTO "/GetPingList", 0, (LPARAM)&pl);
	for(PINGLIST::iterator i = pl.begin(); i != pl.end(); i++) {
		if(i->hContact == (HANDLE)wParam) {
			if(strlen(i->pszCommand)) {
				ShellExecute(0, "open", i->pszCommand, i->pszParams, 0, SW_SHOW);
			} else {
				CallService(PROTO "/ToggleEnabled", wParam, 0);
			}
		}
	}
	return 0;
}
开发者ID:darkscout,项目名称:sje-miranda-plugins,代码行数:14,代码来源:utils.cpp

示例9: SetAndSavePingList

// wParam is address of a PINGLIST structure to replace the current one
// lParam is zero
int SetAndSavePingList(WPARAM wParam, LPARAM lParam) {
	PINGLIST *pli = (PINGLIST *)wParam;
	
	EnterCriticalSection(&list_cs);
	// delete items that aren't in the new list
	bool found;
	for(PINGLIST::iterator i = list_items.begin(); i != list_items.end(); i++) {
		found = false;
		for(PINGLIST::iterator j = pli->begin(); j != pli->end(); j++) {
			if(i->hContact == j->hContact) {
				found = true;
				break;
			}

		}
		if(!found) {
			//MessageBox(0, "Deleting contact", "Ping", MB_OK);
			// remove prot first, so that our contact deleted event handler isn't activated
			CallService(MS_PROTO_REMOVEFROMCONTACT, (WPARAM)i->hContact, (LPARAM)PROTO);
			CallService(MS_DB_CONTACT_DELETE, (WPARAM)i->hContact, 0);
		}
	}

	// set new list
	if(pli->size())
		list_items = *pli;
	else 
		list_items.clear();

	write_ping_addresses();
	LeaveCriticalSection(&list_cs);
	
	NotifyEventHooks(reload_event_handle, 0, 0);
	
	return 0;
}
开发者ID:darkscout,项目名称:sje-miranda-plugins,代码行数:38,代码来源:pinglist.cpp

示例10: DblClick

INT_PTR DblClick(WPARAM wParam, LPARAM) {
	PINGLIST pl;
	CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);
	for (pinglist_it i = pl.begin(); i != pl.end(); ++i) {
		if (i->item_id == (DWORD)wParam) {
			if (mir_tstrlen(i->pszCommand)) {
				ShellExecute(0, _T("open"), i->pszCommand, i->pszParams, 0, SW_SHOW);
			}
			else {
				return CallService(PLUG "/ToggleEnabled", wParam, 0);
			}
		}
	}
	return 0;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:15,代码来源:utils.cpp

示例11: read_ping_addresses

// call with list_cs locked
void read_ping_addresses() {
	HANDLE hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
	PINGADDRESS pa;

	list_items.clear();
	while ( hContact != NULL ) {
		char *proto = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, ( WPARAM )hContact,0 );
		if ( proto && lstrcmp( PROTO, proto) == 0) {
			pa.hContact = hContact;
			read_ping_address(pa);
			list_items.push_back(pa);
		}

		hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDNEXT,( WPARAM )hContact, 0 );
	}	
	std::sort(list_items.begin(), list_items.end(), SAscendingSort());
}
开发者ID:darkscout,项目名称:sje-miranda-plugins,代码行数:18,代码来源:pinglist.cpp

示例12: ToggleEnabled

INT_PTR ToggleEnabled(WPARAM wParam, LPARAM) {
	int retval = 0;
	PINGLIST pl;
	CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);
	for (pinglist_it i = pl.begin(); i != pl.end(); ++i) {
		if (i->item_id == (DWORD)wParam) {

			if (i->status == PS_DISABLED)
				i->status = PS_NOTRESPONDING;
			else {
				i->status = PS_DISABLED;
				i->miss_count = 0;
				retval = 1;
			}
		}
	}
	CallService(PLUG "/SetPingList", (WPARAM)&pl, 0);
	return 0;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:19,代码来源:utils.cpp

示例13: EditContact

int EditContact(WPARAM wParam, LPARAM lParam) {
	PINGLIST pl;
	HWND hwndList = (HWND)CallService(MS_CLUI_GETHWND, 0, 0);

	CallService(PROTO "/GetPingList", 0, (LPARAM)&pl);
	for(PINGLIST::iterator i = pl.begin(); i != pl.end(); i++) {
		if(i->hContact == (HANDLE)wParam) {

			add_edit_addr = *i;
	
			if(DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG3), hwndList, DlgProcDestEdit) == IDOK) {
	
				*i = add_edit_addr;
				CallService(PROTO "/SetAndSavePingList", (WPARAM)&pl, 0);
				return 0;
			}
		}
	}
	return 1;
}
开发者ID:darkscout,项目名称:sje-miranda-plugins,代码行数:20,代码来源:utils.cpp

示例14: EditContact

INT_PTR EditContact(WPARAM wParam, LPARAM)
{
	PINGLIST pl;
	HWND hwndList = pcli->hwndContactList;

	CallService(PLUG "/GetPingList", 0, (LPARAM)&pl);
	for (pinglist_it i = pl.begin(); i != pl.end(); ++i) {
		if (i->item_id == (DWORD)wParam) {

			add_edit_addr = *i;

			if (DialogBox(hInst, MAKEINTRESOURCE(IDD_DIALOG3), hwndList, DlgProcDestEdit) == IDOK) {

				*i = add_edit_addr;
				CallService(PLUG "/SetAndSavePingList", (WPARAM)&pl, 0);
				return 0;
			}
		}
	}
	return 1;
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:21,代码来源:utils.cpp

示例15: write_ping_addresses

// call with list_cs locked
void write_ping_addresses()
{
	int index = 0;
	for (pinglist_it i = list_items.begin(); i != list_items.end(); ++i, index++)
	{
		i->index = index;
		write_ping_address(*i);
	}

	// mark further destinations in the DB as invalid
	char buff[16];
	bool found;

	do {
		found = false;
		mir_snprintf(buff, "PING_DEST_%d", index++);
		if (db_get_dw(0, buff, "Id", 0) != 0) {
			found = true;
			db_set_dw(0, buff, "Id", 0);
		}
	} while (found);
}
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:23,代码来源:pinglist.cpp


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