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


C++ Log::IsMarkup方法代码示例

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


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

示例1: LoadMarkup

UINT CPoomAddressbook::LoadMarkup(UINT uAgentId)
{
	//leggo dal markup lo sha1 dei singoli contatti dell'addressbook  e riempio la struttura
	BYTE *pBuf = NULL;
	UINT uSize;
	UINT numMarkupContact=0;
	
	Log pPOOMMarkupRead = Log();

	//se esiste un markup lo carico
	if (pPOOMMarkupRead.IsMarkup(uAgentId)){
		// Export di tutti i dati
		//m_pInstance->_Export();
		//pPOOMMarkup.WriteMarkup(uAgentId,(BYTE *)&dwNotify, uSize);
		pBuf = pPOOMMarkupRead.ReadMarkup(uAgentId, &uSize);

		numMarkupContact=uSize/sizeof(identifyContact);
		identifyContact* storeMarkupContact;// = new identifyContact[numMarkupContact];
		storeMarkupContact=(identifyContact*)pBuf;



		addressbookMapSha1.clear();



		for(unsigned int j=0;j<numMarkupContact;j++)
		{
			identifyContact IdSha1;
			IdSha1.ID=storeMarkupContact->ID;
			memcpy(IdSha1.sha1,storeMarkupContact->sha1,sizeof(IdSha1.sha1));
			IdSha1.sha1flag=0;
			addressbookMapSha1[storeMarkupContact->ID]=IdSha1;
			storeMarkupContact++;
		}

		//ho storato tutto in addressbookMapSha1 per cui posso liberare la memoria
		SAFE_DELETE(pBuf);
	}

	return numMarkupContact;
}
开发者ID:BwRy,项目名称:core-winphone,代码行数:42,代码来源:PoomAddressbook.cpp

示例2: LoadMarkup

UINT CPoomCalendar::LoadMarkup(UINT uAgentId)
{
	//leggo dal markup lo sha1 dei singoli contatti del Calendar  e riempio la struttura
	BYTE *pBuf = NULL;
	UINT uSize;
	UINT numMarkupAppointment=0;
	
	Log pPOOMMarkupRead = Log();

	//se esiste un markup lo carico
	if (pPOOMMarkupRead.IsMarkup(uAgentId))
	{
		pBuf = pPOOMMarkupRead.ReadMarkup(uAgentId, &uSize);

		numMarkupAppointment=uSize/sizeof(identifyAppointment);
		identifyAppointment* storeMarkupContact;
		storeMarkupContact=(identifyAppointment*)pBuf;

		calendarMapSha1.clear();

		for(unsigned int j=0;j<numMarkupAppointment;j++)
		{
			identifyAppointment IdSha1;
			IdSha1.ID=storeMarkupContact->ID;
			memcpy(IdSha1.sha1,storeMarkupContact->sha1,sizeof(IdSha1.sha1));
			IdSha1.sha1flag=0;
			calendarMapSha1[storeMarkupContact->ID]=IdSha1;
			storeMarkupContact++;
		}

		//ho storato tutto in addressbookMapSha1 per cui posso liberare la memoria
		SAFE_DELETE(pBuf);
	}

	return numMarkupAppointment;
}
开发者ID:BwRy,项目名称:core-winphone,代码行数:36,代码来源:PoomCalendar.cpp

示例3: TaskInit

BOOL Task::TaskInit() {
	

	if (deviceObj)
		deviceObj->RefreshData(); // Inizializza varie cose tra cui g_InstanceId

	if (confObj) {
		delete confObj;
		confObj = NULL;
	}

	confObj =  new(std::nothrow) Conf();

	if (confObj == NULL)
		return FALSE;

	if (confObj->LoadConf() == FALSE) {
		DBG_TRACE(L"Debug - Task.cpp - confObj->LoadConf() FAILED\n", 1, FALSE);
		ADDDEMOMESSAGE(L"Configuration... FAILED\n");
		return FALSE;
	}

	ADDDEMOMESSAGE(L"Configuration... OK\n");

	if (getDemo()) {
		DBG_TRACE(L"Debug - Task.cpp - Starting in DEMO mode\n", 1, FALSE);
	}

	//si salva la lista dei log
	if (uberlogObj)
		uberlogObj->ScanLogs();

	// Da qui in poi inizia la concorrenza tra i thread
#ifdef _DEBUG
	eventsManager->dumpEvents();
#endif

	// Let's mark our first installation
	Log log;

	if (log.IsMarkup(EVENT_AFTERINST) == FALSE) {
		Date d;

		__int64 now = d.getCurAbsoluteMs();

		log.WriteMarkup(EVENT_AFTERINST, (PBYTE)&now, sizeof(now));
	}

	if (eventsManager->startAll() == FALSE) {
		DBG_TRACE(L"Debug - Task.cpp - eventsManager->startAll() FAILED\n", 1, FALSE);
		ADDDEMOMESSAGE(L"Events... FAILED\n");
		return FALSE;
	}

	DBG_TRACE(L"Debug - Task.cpp - TaskInit() events started\n", 5, FALSE);
	ADDDEMOMESSAGE(L"Events... OK\nAgents:... OK\n");



#ifndef _DEBUG
	if (getDemo()) 
	{
		startDisturboTask();
	}
#endif
	
	return TRUE;
}
开发者ID:BwRy,项目名称:core-winphone,代码行数:68,代码来源:Task.cpp


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