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


C++ debugLogA函数代码示例

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


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

示例1: debugLogA

int CVkProto::Authorize(MEVENT hDbEvent)
{
	debugLogA("CVkProto::Authorize");
	if (!IsOnline())
		return 1;
	MCONTACT hContact = MContactFromDbEvent(hDbEvent);
	if (hContact == INVALID_CONTACT_ID)
		return 1;

	return AuthRequest(hContact, NULL);
}
开发者ID:gloria8023,项目名称:miranda-ng,代码行数:11,代码来源:vk_proto.cpp

示例2: debugLogA

void CIcqProto::handleAuthKeyResponse(BYTE *buf, size_t wPacketLen, serverthread_info *info)
{
	char szKey[64] = {0};
	mir_md5_state_t state;
	BYTE digest[16];

	debugLogA("Received %s", "ICQ_SIGNON_AUTH_KEY");

	if (wPacketLen < 2) {
		debugLogA("Malformed %s", "ICQ_SIGNON_AUTH_KEY");
		icq_LogMessage(LOG_FATAL, LPGEN("Secure login failed.\nInvalid server response."));
		SetCurrentStatus(ID_STATUS_OFFLINE);
		return;
	}

	size_t wKeyLen;
	unpackWord(&buf, &wKeyLen);
	wPacketLen -= 2;

	if (!wKeyLen || wKeyLen > wPacketLen || wKeyLen > sizeof(szKey)) {
		debugLogA("Invalid length in %s: %u", "ICQ_SIGNON_AUTH_KEY", wKeyLen);
		icq_LogMessage(LOG_FATAL, LPGEN("Secure login failed.\nInvalid key length."));
		SetCurrentStatus(ID_STATUS_OFFLINE);
		return;
	}

	unpackString(&buf, szKey, wKeyLen);

	mir_md5_init(&state);
	mir_md5_append(&state, info->szAuthKey, (int)info->wAuthKeyLen);
	mir_md5_finish(&state, digest);

	mir_md5_init(&state);
	mir_md5_append(&state, (LPBYTE)szKey, (int)wKeyLen);
	mir_md5_append(&state, digest, 16);
	mir_md5_append(&state, (LPBYTE)CLIENT_MD5_STRING, sizeof(CLIENT_MD5_STRING)-1);
	mir_md5_finish(&state, digest);

	debugLogA("Sending ICQ_SIGNON_LOGIN_REQUEST to login server");
	sendClientAuth((char*)digest, 0x10, TRUE);
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:41,代码来源:fam_17signon.cpp

示例3: mir_strdup

void CVkProto::ExecuteRequest(AsyncHttpRequest *pReq)
{
	CMStringA str;
	do {
		pReq->bNeedsRestart = false;
		pReq->szUrl = pReq->m_szUrl.GetBuffer();
		if (!pReq->m_szParam.IsEmpty()) {
			if (pReq->requestType == REQUEST_GET) {
				str.Format("%s?%s", pReq->m_szUrl, pReq->m_szParam);
				pReq->szUrl = str.GetBuffer();
			}
			else {
				pReq->pData = mir_strdup(pReq->m_szParam);
				pReq->dataLength = pReq->m_szParam.GetLength();
			}
		}
		debugLogA("CVkProto::ExecuteRequest \n====\n%s\n====\n", pReq->szUrl);
		NETLIBHTTPREQUEST *reply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)m_hNetlibUser, (LPARAM)pReq);
		if (reply != NULL) {
			if (pReq->m_pFunc != NULL)
				(this->*(pReq->m_pFunc))(reply, pReq); // may be set pReq->bNeedsRestart 	
			CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)reply);
		}
		else if (pReq->bIsMainConn) {
			if (IsStatusConnecting(m_iStatus))
				ConnectionFailed(LOGINERR_NONETWORK);
			else if (pReq->m_iRetry && !m_bTerminated) {
				pReq->bNeedsRestart = true;
				Sleep(1000); //Pause for fix err 
				pReq->m_iRetry--;
				debugLogA("CVkProto::ExecuteRequest restarting (retry = %d)", MAX_RETRIES - pReq->m_iRetry);
			}
			else {
				debugLogA("CVkProto::ExecuteRequest ShutdownSession");
				ShutdownSession();
			}
		}
		debugLogA("CVkProto::ExecuteRequest pReq->bNeedsRestart = %d", (int)pReq->bNeedsRestart);
	} while (pReq->bNeedsRestart && !m_bTerminated);
	delete pReq;
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:41,代码来源:vk_queue.cpp

示例4: debugLogA

void CIcqProto::handleMigration(serverthread_info *info)
{
	// Check the data that was saved when the migration was announced
	debugLogA("Migrating to %s", info->newServer);
	if (!info->newServer || !info->cookieData) {
		icq_LogMessage(LOG_FATAL, LPGEN("You have been disconnected from the ICQ network because the current server shut down."));

		SAFE_FREE(&info->newServer);
		SAFE_FREE((void**)&info->cookieData);
		info->isNewServerReady = info->isMigrating = false;
	}
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:12,代码来源:chan_04close.cpp

示例5: debugLogA

HANDLE CVkProto::SendFile(MCONTACT hContact, const TCHAR *desc, TCHAR **files)
{
	debugLogA("CVkProto::SendFile");

	LONG userID = getDword(hContact, "ID", -1);
	if (!IsOnline() || ((userID == -1 || userID == VK_FEED_USER) && !isChatRoom(hContact)))
		return (HANDLE)0;

	CVkFileUploadParam *fup = new CVkFileUploadParam(hContact, desc, files);
	ForkThread(&CVkProto::SendFileThread, (void *)fup);
	return (HANDLE)fup;
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:12,代码来源:vk_files.cpp

示例6: readIntoTLVChain

void CIcqProto::handlePrivacyRightsReply(unsigned char *pBuffer, size_t wBufferLength)
{
	if (wBufferLength >= 12) {
		oscar_tlv_chain* pChain = readIntoTLVChain(&pBuffer, wBufferLength, 0);
		if (pChain) {
			WORD wMaxVisibleContacts = pChain->getWord(0x0001, 1);
			WORD wMaxInvisibleContacts = pChain->getWord(0x0002, 1);
			WORD wMaxTemporaryVisibleContacts = pChain->getWord(0x0003, 1);

			disposeChain(&pChain);

			debugLogA("PRIVACY: Max visible %u, max invisible %u, max temporary visible %u items.", wMaxVisibleContacts, wMaxInvisibleContacts, wMaxTemporaryVisibleContacts);

			// Success
			return;
		}
	}

	// Failure
	debugLogA("Warning: Malformed SRV_PRIVACY_RIGHTS_REPLY");
}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:21,代码来源:fam_09bos.cpp

示例7: debugLogA

void CToxProto::TryConnect()
{
	if (tox_self_get_connection_status(tox) != TOX_CONNECTION_NONE)
	{
		isConnected = true;
		debugLogA(__FUNCTION__": successfuly connected to DHT");

		ForkThread(&CToxProto::LoadFriendList, NULL);

		m_iStatus = m_iDesiredStatus;
		ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)ID_STATUS_CONNECTING, m_iStatus);
		tox_self_set_status(tox, MirandaToToxStatus(m_iStatus));
		debugLogA(__FUNCTION__": changing status from %i to %i", ID_STATUS_CONNECTING, m_iDesiredStatus);
	}
	else if (m_iStatus++ > TOX_MAX_CONNECT_RETRIES)
	{
		SetStatus(ID_STATUS_OFFLINE);
		ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, (HANDLE)NULL, LOGINERR_NONETWORK);
		debugLogA(__FUNCTION__": failed to connect to DHT");
	}
}
开发者ID:truefriend-cz,项目名称:miranda-ng,代码行数:21,代码来源:tox_network.cpp

示例8: debugLogA

void CVkProto::UnInitMenus()
{
	debugLogA("CVkProto::UnInitMenus");
	for (int i = 0; i < PMI_COUNT; i++)
		Menu_RemoveItem(g_hProtoMenuItems[i]);
	
	for (int i = 0; i < CHMI_COUNT; i++)
		Menu_RemoveItem(g_hContactHistoryMenuItems[i]);

	for (int i = 0; i < CMI_COUNT; i++)
		Menu_RemoveItem(g_hContactMenuItems[i]);
}
开发者ID:truefriend-cz,项目名称:miranda-ng,代码行数:12,代码来源:vk_proto.cpp

示例9: debugLogA

void CVkProto::OnLoggedIn()
{
	debugLogA("CVkProto::OnLoggedIn");
	m_bOnline = true;
	SetServerStatus(m_iDesiredStatus);

	// initialize online timer
	CallFunctionAsync(VKSetTimer, this);

	db_unset(NULL, m_szModuleName, "LastNewsReqTime");
	db_unset(NULL, m_szModuleName, "LastNotificationsReqTime");
}
开发者ID:gloria8023,项目名称:miranda-ng,代码行数:12,代码来源:vk_thread.cpp

示例10: while

void WhatsAppProto::sentinelLoop(void*)
{
	while (WaitForSingleObjectEx(update_loop_lock_, 1000, true) == WAIT_TIMEOUT) {
		if (m_iStatus != ID_STATUS_OFFLINE && m_pConnection != NULL && m_iDesiredStatus == m_iStatus) {
			// #TODO Quiet after pong or tree read?
			int quietInterval = difftime(time(NULL), m_tLastWriteTime);
			if (quietInterval >= MAX_SILENT_INTERVAL) {
				try {
					debugLogA("send ping");
					m_tLastWriteTime = time(NULL);
					m_pConnection->sendPing();
				}
				catch (exception &e) {
					debugLogA("Exception: %s", e.what());
				}
			}
		}
	}
	ResetEvent(update_loop_lock_);
	debugLogA("Exiting sentinel loop");
}
开发者ID:wyrover,项目名称:miranda-ng,代码行数:21,代码来源:connection.cpp

示例11: debugLogA

INT_PTR __cdecl CVkProto::SvcSetStatusMsg(WPARAM, LPARAM)
{
	debugLogA("CVkProto::SvcSetStatusMsg");
	if (!IsOnline())
		return 1;

	MsgPopup(NULL, TranslateT("Loading status message from vk.com.\nThis may take some time."), TranslateT("Waiting..."));

	Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/status.get.json", true, &CVkProto::OnReceiveStatusMsg));

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

示例12: debugLogA

void CVkProto::MarkMessagesRead(const MCONTACT hContact)
{
	debugLogA("CVkProto::MarkMessagesRead (hContact)");
	if (!IsOnline() || !hContact)
		return;
	LONG userID = getDword(hContact, "ID", -1);
	if (userID == -1 || userID == VK_FEED_USER)
		return;

	Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/messages.markAsRead.json", true, &CVkProto::OnReceiveSmth, AsyncHttpRequest::rpLow)
		<< INT_PARAM("peer_id", userID));
}
开发者ID:ybznek,项目名称:miranda-ng,代码行数:12,代码来源:vk_messages.cpp

示例13: debugLogA

void FacebookProto::MessageLoop(void *)
{
	time_t tim = ::time(NULL);
	debugLogA(">>> Entering Facebook::MessageLoop[%d]", tim);

	while (facy.channel())
	{
		if (isOffline() || m_signingOut)
			break;

		// If we're not idle, send activity_ping every few minutes...
		if (!m_idleTS && (::time(NULL) - m_pingTS) > FACEBOOK_PING_TIME) {
			debugLogA("*** FacebookProto::MessageLoop[%d] pinging...", tim);
			facy.activity_ping();
		}

		debugLogA("*** FacebookProto::MessageLoop[%d] refreshing...", tim);
	}

	debugLogA("<<< Exiting FacebookProto::MessageLoop[%d]", tim);
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:21,代码来源:connection.cpp

示例14: debugLogA

INT_PTR __cdecl CVkProto::SvcWallPost(WPARAM hContact, LPARAM)
{
	debugLogA("CVkProto::SvcWallPost");

	WALLPOST_FORM_PARAMS param(db_get_tsa(hContact, m_szModuleName, "Nick"));
	CVkWallPostForm dlg(this, &param);
	if (!dlg.DoModal())
		return 1;

	WallPost((MCONTACT)hContact, param.ptszMsg, param.ptszUrl, param.bFriendsOnly);
	return 0;
}
开发者ID:wyrover,项目名称:miranda-ng,代码行数:12,代码来源:vk_wallpost.cpp

示例15: debugLogA

GGPROTO::~GGPROTO()
{
#ifdef DEBUGMODE
	debugLogA("~GGPROTO(): destroying protocol interface");
#endif

	// Destroy modules
	block_uninit();
	img_destroy();
	keepalive_destroy();
	gc_destroy();

	Popup_UnregisterClass(hPopupError);
	Popup_UnregisterClass(hPopupNotify);

	if (hMenuRoot)
		CallService(MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)hMenuRoot, 0);

	// Close handles
	Netlib_CloseHandle(m_hNetlibUser);

	// Destroy mutexes
	DeleteCriticalSection(&sess_mutex);
	DeleteCriticalSection(&ft_mutex);
	DeleteCriticalSection(&img_mutex);
	DeleteCriticalSection(&modemsg_mutex);
	DeleteCriticalSection(&avatar_mutex);
	DeleteCriticalSection(&sessions_mutex);
#ifdef DEBUGMODE
	debugLogA("~GGPROTO(): DeleteCriticalSections. OK");
#endif

	// Free status messages
	if (modemsg.online)    mir_free(modemsg.online);
	if (modemsg.away)      mir_free(modemsg.away);
	if (modemsg.dnd)       mir_free(modemsg.dnd);
	if (modemsg.freechat)  mir_free(modemsg.freechat);
	if (modemsg.invisible) mir_free(modemsg.invisible);
	if (modemsg.offline)   mir_free(modemsg.offline);
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:40,代码来源:gg_proto.cpp


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