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

C++ LOG__函数代码示例

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

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



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

示例1: _T

BOOL SessionLayout::_DisplayMsgToIE(IN MessageEntity msg)
{
	CString jsInterface = _T("sendMessage");
	module::UserInfoEntity userInfo;
	if (!module::getUserListModule()->getUserInfoBySId(msg.talkerSid, userInfo))
	{
		return FALSE;
	}

	Json::Value root;
	root["name"] = util::cStringToString(userInfo.getRealName());
	root["avatar"] = userInfo.getAvatarPathWithoutOnlineState();
	root["msgtype"] = msg.msgRenderType;
	root["uuid"] = msg.talkerSid;
	root["mtype"] = msg.isMySendMsg() ? "me" : "other";
	CTime timeData(msg.msgTime);
	root["time"] = util::cStringToString(timeData.Format(_T("%Y-%m-%d %H:%M:%S")));

	//语音内容特殊处理
	if (MESSAGE_RENDERTYPE_AUDIO == msg.msgRenderType)
	{
		root["voiceid"] = msg.content;
		CString sVoicetime;
		sVoicetime.Format(_T("%d秒"), msg.msgAudioTime);
		root["voicetime"] = util::cStringToString(sVoicetime);
		root["voiceisread"] = msg.msgAudioReaded ? std::string("true") : string("false");
	}
	else
	{
		CString csContent = util::stringToCString(msg.content);
		ReceiveMsgManage::getInstance()->parseContent(csContent, FALSE, GetWidth());
		std::string content = util::cStringToString(csContent);
		root["content"] = content;
	}
	Json::StyledWriter styleWrite;
	std::string record = styleWrite.write(root);
	Json::Reader jsonRead;
	Json::Value rootRead;
	CString jsData = _T("[]");
	if (!jsonRead.parse(record, rootRead) || rootRead.isNull())
	{
		CString csError = util::stringToCString(record, CP_UTF8);
		LOG__(APP, _T("json parse error:%s"), csError);
		jsData = _T("[]");
		return FALSE;
	}
	else
		jsData = util::stringToCString(record, CP_UTF8);
	//调用页面的JS代码
	if (m_pWebBrowser)
	{
		VARIANT VarResult;
		if (!m_pWebBrowser->CallJScript(jsInterface.GetBuffer(), jsData.GetBuffer(), &VarResult))
		{
			LOG__(ERR, _T("CallJScript failed:%s"),jsData);
		}
		jsData.ReleaseBuffer();
	}
	return TRUE;
}
开发者ID:1072258106,项目名称:TeamTalk,代码行数:60,代码来源:SessionLayout_Function.cpp


示例2: LOG__

void FileTransferSocket::_fileLoginResponse(IN std::string& body)
{
	IM::File::IMFileLoginRsp imFileLoginRsp;
    if (!imFileLoginRsp.ParseFromString(body))
    {
        LOG__(ERR, _T("parse failed,body:%s"), util::stringToCString(body));
        return;
    }
	if (imFileLoginRsp.result_code() != 0)
	{
		LOG__(ERR, _T("file server login failed! "));
		return;
	}
	//打开文件
	std::string taskId = imFileLoginRsp.task_id();
	TransferFileEntity fileEntity;
	if (!TransferFileEntityManager::getInstance()->getFileInfoByTaskId(taskId, fileEntity))
	{
		LOG__(ERR, _T("file server login:can't find the fileInfo "));
		return;
	}

	LOG__(APP, _T("IMFileLoginRsp, file server login succeed"));
	//提示界面,界面上插入该项
	if (IM::BaseDefine::ClientFileRole::CLIENT_REALTIME_SENDER == fileEntity.nClientMode
		|| IM::BaseDefine::ClientFileRole::CLIENT_OFFLINE_UPLOAD == fileEntity.nClientMode)
	{
		module::getFileTransferModule()->asynNotifyObserver(module::KEY_FILETRANSFER_SENDFILE, fileEntity.sTaskID);
	}
	else if (IM::BaseDefine::ClientFileRole::CLIENT_REALTIME_RECVER == fileEntity.nClientMode
		|| IM::BaseDefine::ClientFileRole::CLIENT_OFFLINE_DOWNLOAD == fileEntity.nClientMode)
	{
		module::getFileTransferModule()->asynNotifyObserver(module::KEY_FILETRANSFER_REQUEST, fileEntity.sTaskID);
	}
}
开发者ID:1072258106,项目名称:TeamTalk,代码行数:35,代码来源:FileTransferSocket.cpp


示例3: catch

BOOL DatabaseModule_Impl::_execImMessageCreateTableDML()
{
	try
	{
		m_pSqliteDB->execDML(createImMessageSql.c_str());
		m_pSqliteDB->execDML(createImMessageIndex.c_str());
	}
	catch (CppSQLite3Exception& sqliteException)
	{
		CString csErrMsg = util::stringToCString(sqliteException.errorMessage(), CP_UTF8);
		LOG__(ERR, _T("create table failed,error msg:%s")
			, csErrMsg);
#ifdef _DEBUG
		MessageBoxA(0, sqliteException.errorMessage(), "BD ERROR", MB_OK | MB_ICONHAND);
#endif	
		return FALSE;
	}
	catch (...)
	{
		LOG__(ERR, _T("create table unknown exception"));
		return FALSE;
	}

	return TRUE;
}
开发者ID:0359xiaodong,项目名称:TeamTalk,代码行数:25,代码来源:DatabaseModule_MessageDB_Impl.cpp


示例4: LOG__

void FileTransferModule_Impl::_hasOfflineRes(IN std::string& body)
{
    IM::File::IMFileHasOfflineRsp imFileHasOfflineRsp;
    if (!imFileHasOfflineRsp.ParseFromString(body))
    {
        LOG__(ERR, _T("parse failed,body:%s"), util::stringToCString(body));
        return;
    }

    UINT32 nFileNum = imFileHasOfflineRsp.offline_file_list_size();
    for (UINT32 i = nFileNum; i > 0; --i)
    {
        const IM::BaseDefine::OfflineFileInfo& offLineInfo = imFileHasOfflineRsp.offline_file_list(i - 1);
        TransferFileEntity fileInfo;
        fileInfo.sFromID = util::uint32ToString(offLineInfo.from_user_id());
        fileInfo.sToID = module::getSysConfigModule()->userID();
        fileInfo.nFileSize = offLineInfo.file_size();
        fileInfo.sTaskID = offLineInfo.task_id();
        fileInfo.sFileName = offLineInfo.file_name();
        fileInfo.nClientMode = IM::BaseDefine::ClientFileRole::CLIENT_OFFLINE_DOWNLOAD;
        const IM::BaseDefine::IpAddr& ipAdd = offLineInfo.ip_addr_list(0);
        fileInfo.sIP = ipAdd.ip();
        fileInfo.nPort = ipAdd.port();
        fileInfo.time = static_cast<UInt32>(time(0));
        if (TransferFileEntityManager::getInstance()->pushTransferFileEntity(fileInfo))
        {
            LOG__(APP, _T("离线文件 sFileID = %s"), util::stringToCString(fileInfo.sTaskID));
            TransferFileEntityManager::getInstance()->openFileSocketByTaskId(fileInfo.sTaskID);
        }
    }
}
开发者ID:hlyces,项目名称:teamtalk_TT,代码行数:31,代码来源:FileTransferModule_Impl.cpp


示例5: LOG__

void SessionLayout::_AsynSendReadAck(IN MessageEntity& msg)
{
	if (MESSAGE_RENDERTYPE_SYSTEMTIPS == msg.msgRenderType
		|| MESSAGE_RENDERTYPE_FILETRANSFER == msg.msgRenderType)
	{
		LOG__(APP, _T("not send read ack msgRenderType:%d"),msg.msgRenderType);
		return;
	}
	if (MESSAGE_TYPE_HISTORY == msg.msgStatusType
		|| MESSAGE_TYPE_NONE == msg.msgStatusType)
	{
		LOG__(APP, _T("Not runtime or offline msgStatusType:%d,msgId:%d"), msg.msgStatusType,msg.msgId);
		return;
	}
	imcore::IMLibCoreStartOperationWithLambda(
		[=]()mutable
	{
		std::string OriginSessionId = msg.getOriginSessionId();
		IM::Message::IMMsgDataReadAck imMsgDataReadAck;
		imMsgDataReadAck.set_user_id(module::getSysConfigModule()->userId());
		imMsgDataReadAck.set_session_id(util::stringToInt32(OriginSessionId));
		imMsgDataReadAck.set_msg_id(msg.msgId);
		imMsgDataReadAck.set_session_type(static_cast<IM::BaseDefine::SessionType>(msg.msgSessionType));
		module::getTcpClientModule()->sendPacket(IM::BaseDefine::SID_MSG, IM::BaseDefine::CID_MSG_READ_ACK, &imMsgDataReadAck);
    },0, imcore::OPERATION_NAME_MSG_READ_ACK
	);
}
开发者ID:hgl888,项目名称:TeamTalk,代码行数:27,代码来源:SessionLayout.cpp


示例6: lock

void ReceiveMsgManage::removeAllMessage()
{
	CAutoLock lock(&m_lock);
	//记录下程序退出时所有的消息列表,并且记录下来,这个会成为离线消息
	SessionMessageMap::iterator iterMap = m_mapSessionMsg.begin();
	LOG__(ERR, _T("MessageMananger unread message trace begin:"));
	for (; iterMap != m_mapSessionMsg.end(); ++iterMap)
	{
		SessionMessage_List msgList;
		if (popMessagesBySId(iterMap->first, msgList))
		{
			SessionMessage_List::iterator iter = msgList.begin();
			for (; iter != msgList.end(); ++iter)
			{
				MessageEntity& msg = *iter;
				CString csUId = util::stringToCString(msg.talkerSid);
				CString csCnt = util::stringToCString(msg.content, CP_UTF8);
				CTime time(msg.msgTime);
				CString csTime = time.Format(_T("%Y-%m-%d %H:%M:%S"));
				LOG__(DEBG, _T("time:%s id:%s,content:%s"), csTime, csUId, csCnt);
			}
		}
	}
	LOG__(DEBG, _T("MessageMananger unread message trace end"));
	m_mapSessionMsg.clear();
}
开发者ID:hlyces,项目名称:teamtalk_TT,代码行数:26,代码来源:ReceiveMsgManage.cpp


示例7: LOG__

void MainListLayout::_UpdateRecentSessionItem(IN const std::string& sessionId, IN const UInt32 sessionType)
{
	SessionListItemInfo item;
	item.folder = false;
	item.empty = false;
	if (IM::BaseDefine::SessionType::SESSION_TYPE_GROUP == static_cast<IM::BaseDefine::SessionType>(sessionType))
	{
		module::GroupInfoEntity groupInfo;
		if (!module::getGroupListModule()->getGroupInfoBySId(sessionId, groupInfo))
		{
			LOG__(ERR, _T("Can't get the groupInfo, groupId = %s"), util::stringToCString(sessionId));
			return;
		}
		item.id = util::stringToCString(groupInfo.gId);
		item.avatarPath = util::stringToCString(groupInfo.getAvatarPath());
		item.nickName = groupInfo.csName;
		m_UIRecentConnectedList->UpdateItemInfo(item);
	}
	else if (IM::BaseDefine::SessionType::SESSION_TYPE_SINGLE == static_cast<IM::BaseDefine::SessionType>(sessionType))
	{
		module::UserInfoEntity userInfo;
		if (!module::getUserListModule()->getUserInfoBySId(sessionId, userInfo))
		{
			LOG__(ERR, _T("Can't get the userInfo, userId = %s"), util::stringToCString(sessionId));
			return;
		}
		item.id = util::stringToCString(userInfo.sId);
		item.avatarPath = util::stringToCString(userInfo.getAvatarPath());
		item.nickName = userInfo.getRealName();
		m_UIRecentConnectedList->UpdateItemInfo(item);
	}
}
开发者ID:hgl888,项目名称:TeamTalk,代码行数:32,代码来源:MainListLayout.cpp


示例8: catch

BOOL DatabaseModule_Impl::sqlDeleteGroupInfoEntity(IN const std::string& groupId)
{
	try
	{
		CppSQLite3Statement stmt = m_pSqliteDB->compileStatement(deleteGroupInfoSql.c_str());
		stmt.bind(1, groupId.c_str());
		stmt.execDML();
	}
	catch (CppSQLite3Exception& sqliteException)
	{
#ifdef _DEBUG
		MessageBoxA(0, sqliteException.errorMessage(), "BD ERROR", MB_OK | MB_ICONHAND);
#endif
		CString csErrMsg = util::stringToCString(sqliteException.errorMessage(), CP_UTF8);
		LOG__(ERR, _T("delete failed,error msg:%s"), csErrMsg);
		return FALSE;
	}
	catch (...)
	{
		LOG__(ERR, _T("db unknown exception"));
		return FALSE;
	}

	return TRUE;
}
开发者ID:hgl888,项目名称:TeamTalk,代码行数:25,代码来源:DatabaseModule_GroupInfoDB_Impl.cpp


示例9: int

BOOL DatabaseModule_Impl::sqlInsertOrReplaceGroupInfoEntity(IN const module::GroupInfoEntity& groupInfo)
{
	try
	{
		CppSQLite3Statement stmt = m_pSqliteDB->compileStatement(insertGroupInfoSql.c_str());
		stmt.bind(1, groupInfo.gId.c_str());
		stmt.bind(2, util::cStringToString(groupInfo.csName).c_str());
		stmt.bind(3, util::cStringToString(groupInfo.desc).c_str());
		stmt.bind(4, groupInfo.avatarUrl.c_str());
		stmt.bind(5, groupInfo.creatorId.c_str());
		stmt.bind(6, int(groupInfo.type));
		stmt.bind(7, int(groupInfo.version));
		stmt.bind(8, int(groupInfo.groupUpdated));
		stmt.bind(9, int(groupInfo.shieldStatus));
		std::string& strJson = _makeJsonForGroupMembers(groupInfo.groupMemeberList);
		stmt.bind(10, strJson.c_str());
		stmt.execDML();
	}
	catch (CppSQLite3Exception& sqliteException)
	{
#ifdef _DEBUG
		MessageBoxA(0, sqliteException.errorMessage(), "BD ERROR", MB_OK | MB_ICONHAND);
#endif
		CString csErrMsg = util::stringToCString(sqliteException.errorMessage(), CP_UTF8);
		LOG__(ERR, _T("insert failed,error msg:%s"), csErrMsg);
		return FALSE;
	}
	catch (...)
	{
		LOG__(ERR, _T("db unknown exception"));
		return FALSE;
	}

	return TRUE;
}
开发者ID:hgl888,项目名称:TeamTalk,代码行数:35,代码来源:DatabaseModule_GroupInfoDB_Impl.cpp


示例10: LOG__

void DatabaseModule_Impl::_parseJsonForGroupMembers(IN std::string strJson, OUT std::list<std::string>& groupMemeberList)
{
	Json::Reader reader;
	Json::Value root;

	try
	{
		if (reader.parse(strJson, root) || root.isNull())
		{
			const Json::Value arrayObj = root["UserIds"];
			for (int i = 0; i < static_cast<int>(arrayObj.size()); ++i)
			{
				groupMemeberList.push_back(arrayObj[i].asString());
			}
		}
		else
		{
			LOG__(ERR, _T("json parse falied! json data:%s"),util::stringToCString(strJson));
		}
	}
	catch (...)
	{
		LOG__(ERR, _T("json parse falied! json data:%s"), util::stringToCString(strJson));
	}
}
开发者ID:hgl888,项目名称:TeamTalk,代码行数:25,代码来源:DatabaseModule_GroupInfoDB_Impl.cpp


示例11: LOG__

// -----------------------------------------------------------------------------
// private   
void ReloginManager::doRelogin()
{
    try
    {
        if(m_bDoReloginNow)
        {
            LOG__(APP,_T("is doing Relogin now..."));
            return;
        }

        //清理掉队列里面 未发送的 消息已读确认 Operation《不处理可能会引发丢消息》
        imcore::IMLibCoreClearOperationByName(imcore::OPERATION_NAME_MSG_READ_ACK);

        LoginParam param;
		module::TTConfig* pCfg = module::getSysConfigModule()->getSystemConfig();
		param.mySelectedStatus = pCfg->myselectStatus;
		param.csUserName = pCfg->userName;
		param.password = pCfg->password;
		param.csUserName.Trim();

		LoginOperation* pOperation = new LoginOperation(BIND_CALLBACK_1(ReloginManager::OnOperationCallback), param);
		imcore::IMLibCoreStartOperation(pOperation);
        m_bDoReloginNow = TRUE;
    }
    catch (...)
    {
		module::getTcpClientModule()->shutdown();
        startReloginTimer(++m_secondCount);
        LOG__(ERR, _T("relogin unknown exception"));
        m_bDoReloginNow = FALSE;
    }
}
开发者ID:hgl888,项目名称:TeamTalk,代码行数:34,代码来源:ReloginManager.cpp


示例12: LOG__

BOOL ReceiveMsgManage::pushMessageBySId(const std::string& sId, MessageEntity& msg)
{
	if (sId.empty())
	{
		LOG__(ERR, _T("sId is empty!"));
		return FALSE;
	}
	CAutoLock lock(&m_lock);
	try
	{
		SessionMessage_List* listChatMsg = _getChatMsgListBySID(sId);
		if (listChatMsg)
		{
			listChatMsg->push_back(msg);
		}
		else
		{
			SessionMessage_List listChatMsg2;
			listChatMsg2.push_back(msg);
			m_mapSessionMsg[sId] = listChatMsg2;
		}
	}
	catch (...)
	{
		CString csSid = util::stringToCString(sId);
		CString csMsgCnt = util::stringToCString(msg.content, CP_UTF8);
		LOG__(ERR, _T("pushMessageBySId failed,SId:%s,msg conteng:%s"), csSid, csMsgCnt);
		return FALSE;
	}
	return TRUE;
}
开发者ID:hlyces,项目名称:teamtalk_TT,代码行数:31,代码来源:ReceiveMsgManage.cpp


示例13: LOG__

void LoginModule_Impl::notifyLoginDone()
{
	imcore::IMLibCoreStartOperationWithLambda(
		[]
	{
		//鑾峰彇閮ㄩ棬淇℃伅
		UInt32 lastTime = module::getSysConfigModule()->getDepartmentInfoLatestUpdateTime();
		IM::Buddy::IMDepartmentReq imDepartmentReq;
		imDepartmentReq.set_user_id(module::getSysConfigModule()->userId());
		imDepartmentReq.set_latest_update_time(lastTime);
		module::getTcpClientModule()->sendPacket(IM::BaseDefine::ServiceID::SID_BUDDY_LIST
			, IM::BaseDefine::BuddyListCmdID::CID_BUDDY_LIST_DEPARTMENT_REQUEST
			, &imDepartmentReq);
		LOG__(APP, _T("IMDepartmentReq,latest update time :%d"), lastTime);

		//澧為噺鑾峰彇鎵�鏈変汉淇℃伅
		lastTime = module::getSysConfigModule()->getUserInfoLatestUpdateTime();//鑾峰彇鏈�鍚庝竴娆℃洿鏂颁汉鍛樹俊鎭殑鏃堕棿
		IM::Buddy::IMAllUserReq imAllUserReq;
		imAllUserReq.set_user_id(module::getSysConfigModule()->userId());
		imAllUserReq.set_latest_update_time(lastTime);
		module::getTcpClientModule()->sendPacket(IM::BaseDefine::ServiceID::SID_BUDDY_LIST
			, IM::BaseDefine::BuddyListCmdID::CID_BUDDY_LIST_ALL_USER_REQUEST
			,&imAllUserReq);
		LOG__(APP, _T("IMAllUserReq,latest update time :%d"), lastTime);

		//澧為噺鑾峰彇缇ゅ垪琛�
		IM::Group::IMNormalGroupListReq imNormalGroupListReq;
		imNormalGroupListReq.set_user_id(module::getSysConfigModule()->userId());
		module::getTcpClientModule()->sendPacket(IM::BaseDefine::ServiceID::SID_GROUP
			, IM::BaseDefine::GroupCmdID::CID_GROUP_NORMAL_LIST_REQUEST
			, &imNormalGroupListReq);
		LOG__(APP, _T("IMNormalGroupListReq"));
	});
}
开发者ID:shaozhipeng,项目名称:TeamTalk,代码行数:34,代码来源:LoginModule_Impl.cpp


示例14: int

BOOL DatabaseModule_Impl::sqlUpdateRecentSessionInfoEntity(IN const module::SessionEntity& sessionInfo)
{
	try
	{
		CppSQLite3Statement stmt = m_pSqliteDB->compileStatement(updateRecentSessionByIdSql.c_str());
		stmt.bind(1, sessionInfo.sessionID.c_str());
		stmt.bind(2, int(sessionInfo.sessionType));
		stmt.bind(3, int(sessionInfo.updatedTime));
		stmt.bind(4, int(sessionInfo.latestmsgId));
		stmt.bind(5, sessionInfo.latestMsgContent.c_str());
		stmt.bind(6, sessionInfo.latestMsgFromId.c_str());

		stmt.bind(7, sessionInfo.sessionID.c_str());
		int countUpdate = stmt.execDML();
		if (0 == countUpdate)
		{
			return FALSE;
		}
	}
	catch (CppSQLite3Exception& sqliteException)
	{
#ifdef _DEBUG
		MessageBoxA(0, sqliteException.errorMessage(), "BD ERROR", MB_OK | MB_ICONHAND);
#endif
		CString csErrMsg = util::stringToCString(sqliteException.errorMessage(), CP_UTF8);
		LOG__(ERR, _T("db failed,error msg:%s"), csErrMsg);
		return FALSE;
	}
	catch (...)
	{
		LOG__(ERR, _T("db unknown exception"));
		return FALSE;
	}
	return TRUE;
}
开发者ID:hgl888,项目名称:TeamTalk,代码行数:35,代码来源:DatabaseModule_RecentSessionDB_Impl.cpp


示例15: _T

BOOL DatabaseModule_Impl::_startup()
{
	try
	{
		CString dbPathTemp = module::getMiscModule()->getTTCommonAppdataUserDir();
		util::createAllDirectories(dbPathTemp);
		module::TTConfig* pCfg = module::getSysConfigModule()->getSystemConfig();
		if (pCfg->csUserId.IsEmpty())
			return FALSE;
		CString dbPath = dbPathTemp + _T("\\") + pCfg->csUserId + _T(".db");
		dbPathTemp = module::getMiscModule()->getTTCommonAppdata();
		CString globalDBPath = dbPathTemp + _T("\\global.db");
		m_sDBPath = util::cStringToString(dbPath);
		m_sGlobalDBPath = util::cStringToString(globalDBPath);
		if (!_openDB())
		{
			LOG__(ERR, _T("open db failed"));
			return FALSE;
		}
	}
	catch (...)
	{
		LOG__(ERR, _T("unknown exception"));
		return FALSE;
	}

	return TRUE;
}
开发者ID:1072258106,项目名称:TeamTalk,代码行数:28,代码来源:DatabaseModule_Impl.cpp


示例16: LOG__

void LoginDialog::_DoLogin()
{
	LOG__(APP,_T("User Clicked LoginBtn"));

	m_ptxtTip->SetText(_T(""));
	CDuiString userName = m_pedtUserName->GetText();
	CDuiString password = m_pedtPassword->GetText();
	if (userName.IsEmpty())
	{
		CString csTip = util::getMultilingual()->getStringById(_T("STRID_LOGINDIALOG_USERNAME_EMPTY"));
		m_ptxtTip->SetText(csTip);
		return;
	}
	if (password.IsEmpty())
	{
		CString csTip = util::getMultilingual()->getStringById(_T("STRID_LOGINDIALOG_PASSWORD_EMPTY"));
		m_ptxtTip->SetText(csTip);
		return;
	}
	module::TTConfig* pCfg = module::getSysConfigModule()->getSystemConfig();
	pCfg->userName = userName;
	if (m_bPassChanged)
	{
		std::string sPass = util::cStringToString(CString(password));
		char* pOutData = 0;
		uint32_t nOutLen = 0;
		int retCode = EncryptPass(sPass.c_str(), sPass.length(), &pOutData, nOutLen);
		if (retCode == 0 && nOutLen > 0 && pOutData != 0)
		{
			pCfg->password = std::string(pOutData, nOutLen);
			Free(pOutData);
		}
		else
		{
			LOG__(ERR, _T("EncryptPass Failed!"));
			CString csTip = util::getMultilingual()->getStringById(_T("STRID_LOGINDIALOG_LOGIN_ENCRYPT_PASE_FAIL"));
			m_ptxtTip->SetText(csTip);			
			return;
		}
	}

	pCfg->isRememberPWD = m_pChkRememberPWD->GetCheck();
	module::getSysConfigModule()->saveData();

	CString csTxt = util::getMultilingual()->getStringById(_T("STRID_LOGINDIALOG_BTN_DOLOGIN"));
	m_pBtnLogin->SetText(csTxt);
	m_pBtnLogin->SetEnabled(false);

	//连接登陆服务器
	DoLoginServerParam param;
	DoLoginServerHttpOperation* pOper = new DoLoginServerHttpOperation(
		BIND_CALLBACK_1(LoginDialog::OnHttpCallbackOperation), param);
	module::getHttpPoolModule()->pushHttpOperation(pOper);
}
开发者ID:0359xiaodong,项目名称:TeamTalk,代码行数:54,代码来源:LoginDialog.cpp


示例17: LOG__

void P2PCmdModule_Impl::_p2pCmdNotifyResponse(std::string& pbBody)
{
    IM::SwitchService::IMP2PCmdMsg imP2PCmdMsg;
    if (!imP2PCmdMsg.ParseFromString(pbBody))
    {
        LOG__(ERR, _T("ParseFromString failed:%s"), util::stringToCString(pbBody));
        return;
    }
    std::string jsonMsgData = imP2PCmdMsg.cmd_msg_data();
    std::string sFromId = util::uint32ToString(imP2PCmdMsg.from_user_id());
    LOG__(APP, _T("IMP2PCmdMsg cmd_msg_data = %s,sFromId = %s"), util::stringToCString(jsonMsgData), util::stringToCString(sFromId));
    UINT32 nServiceID = 0;
    UINT32 nCmdID = 0;
    _parseMsgJsonData(jsonMsgData, nServiceID, nCmdID);

    if (module::KEY_P2PCMD_SHAKEWINDOW == nServiceID && module::KEY_P2PCMD_SHAKEWINDOW_NOTIFY == nCmdID)
    {
        //窗口抖动生成一条系统消息,提示用户
        module::UserInfoEntity userInfo;
        if (module::getUserListModule()->getUserInfoBySId(sFromId, userInfo))
        {
            CString csTipFormat = util::getMultilingual()->getStringById(_T("STRID_SESSIONMODULE_SHAKEWINDOW_TIP"));
            CString csTip;
            MessageEntity msg;
            csTip.Format(csTipFormat, userInfo.getRealName());
            msg.content = util::cStringToString(csTip);
            msg.sessionId = sFromId;
            msg.talkerSid = module::getSysConfigModule()->userID();
            msg.msgRenderType = MESSAGE_RENDERTYPE_SYSTEMTIPS;
            msg.msgSessionType = MESSAGETYPE_FROM_FRIEND;
            msg.msgTime = (UInt32)time(0);
            ReceiveMsgManage::getInstance()->pushMessageBySId(msg.sessionId, msg);
            module::getSessionModule()->asynNotifyObserver(module::KEY_SESSION_NEWMESSAGE, sFromId);//收到屏幕抖动消息提示
        }
        module::getSessionModule()->asynNotifyObserver(module::KEY_SESSION_SHAKEWINDOW_MSG, sFromId);//抖动窗口
    }
    else if (module::KEY_P2PCMD_WRITING == nServiceID)
    {
        if (module::KEY_P2PCMD_WRITING_NOTIFY == nCmdID)
        {
            module::getSessionModule()->asynNotifyObserver(module::KEY_SESSION_WRITING_MSG, sFromId);
        }
        else if (module::KEY_P2PCMD_STOP_WRITING_NOTIFY == nCmdID)
        {
            module::getSessionModule()->asynNotifyObserver(module::KEY_SESSION_STOPWRITING_MSG, sFromId);
        }
    }
    else
    {
        LOG__(APP, _T("Unkown p2p message,nServiceID:%d,nCmdID:%d"), nServiceID, nCmdID);
    }
}
开发者ID:Carbs0126,项目名称:TeamTalk,代码行数:52,代码来源:P2PCmdModule_Impl.cpp


示例18: LOG__

BOOL CUIRecentSessionList::AddNode(const std::string& sId)
{
	if (UIIMList::IsExistSId(sId))
	{
		LOG__(DEBG, _T("already exist!"));
		return FALSE;
	}
	SessionListItemInfo item;

	module::SessionEntity* pSessionInfo = SessionEntityManager::getInstance()->getSessionEntityBySId(sId);
	if (!pSessionInfo)
	{
		LOG__(DEBG, _T("Can't get the SessionEntity"));
		return FALSE;
	}
	item.folder = false;
	item.empty = false;
	item.description = util::stringToCString(pSessionInfo->latestMsgContent);
	item.Time = pSessionInfo->updatedTime;
	item.id = util::stringToCString(sId);
	if (pSessionInfo->sessionType == module::SESSION_USERTYPE)
	{
		module::UserInfoEntity userInfo;
		if (module::getUserListModule()->getUserInfoBySId(sId, userInfo))
		{
			item.avatarPath = util::stringToCString(userInfo.getAvatarPath());
			item.nickName = userInfo.getRealName();
		}
		else
		{
			item.nickName = util::stringToCString(sId);
			item.avatarPath = module::getUserListModule()->getDefaultAvatartPath();
		}
	}
	else if (module::SESSION_GROUPTYPE == pSessionInfo->sessionType)
	{
		module::GroupInfoEntity groupInfo;
		if (module::getGroupListModule()->getGroupInfoBySId(sId, groupInfo))
		{
			item.avatarPath = util::stringToCString(groupInfo.getAvatarPath());
			item.nickName = groupInfo.csName;
		}
		else
		{
			item.nickName = util::stringToCString(sId);
			item.avatarPath = module::getGroupListModule()->getDefaultAvatartPath();
		}
	}

	AddNode(item, NULL);
	return TRUE;
}
开发者ID:hgl888,项目名称:TeamTalk,代码行数:52,代码来源:UIRecentSessionList.cpp


示例19: LOG__

void TcpClientModule_Impl::onReceiveData(const char* data, int32_t size)
{
	if (m_pServerPingTimer)
		m_pServerPingTimer->m_bHasReceivedPing = TRUE;

	imcore::TTPBHeader header;
	header.unSerialize((byte*)data, imcore::HEADER_LENGTH);	
	if (IM::BaseDefine::CID_OTHER_HEARTBEAT == header.getCommandId() && IM::BaseDefine::SID_OTHER == header.getModuleId())
	{
		//模块器端过来的心跳包,不跳到业务层派发
		return;
	}

	LOG__(NET, _T("receiveData message moduleId:0x%x,commandId:0x%x")
		, header.getModuleId(), header.getCommandId());

	if (g_seqNum == header.getSeqNumber())
	{
		m_pImLoginResp->ParseFromArray(data + imcore::HEADER_LENGTH, size - imcore::HEADER_LENGTH);
		::SetEvent(m_eventReceived);
		return;
	}

	//将网络包包装成任务放到逻辑任务队列里面去
	_handlePacketOperation(data, size);
}
开发者ID:1072258106,项目名称:TeamTalk,代码行数:26,代码来源:TcpClientModule_Impl.cpp


示例20: LOG__

void CEventDispatch::RemoveEvent(SOCKET fd, uint8_t socket_event)
{
	if (epoll_ctl(m_epfd, EPOLL_CTL_DEL, fd, NULL) != 0)
	{
		LOG__(NET,  "epoll_ctl failed, errno=%d\n", errno);
	}
}
开发者ID:hgl888,项目名称:TeamTalk,代码行数:7,代码来源:EventDispatch.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ LOG_err函数代码示例发布时间:2022-05-30
下一篇:
C++ LOG_WINDOW函数代码示例发布时间: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