コード例 #1
0
void TeamEventForm::InvokeLoadEvents()
{
	is_loading_ = true;
	btn_recycle_->SetEnabled(false);

	QLOG_PRO(L"query begin events: time={0}") <<farst_time_;
	nim::SystemMsg::QueryMsgAsync(kSysmsgCount, farst_time_, nbase::Bind(&TeamEventForm::LoadEventsCb, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
}
コード例 #2
0
void ChatroomCallback::OnReceiveMsgCallback(__int64 room_id, const ChatRoomMessage& result)
{
	QLOG_PRO(L"Chatroom:OnReceiveMsgCallback: {0} from client: {1}") << result.client_msg_id_ << result.from_client_type_;
	//QLOG_PRO(L"Chatroom:OnReceiveMsgCallback ext: {0}") << result.ext_;
	//QLOG_PRO(L"Chatroom:OnReceiveMsgCallback from_ext: {0}") << result.from_ext_;

	StdClosure cb = [=](){
		ChatroomForm* chat_form = static_cast<ChatroomForm*>(nim_ui::WindowsManager::GetInstance()->GetWindow(ChatroomForm::kClassName, nbase::Int64ToString16(room_id)));
		if (chat_form != NULL && result.msg_type_ != kNIMChatRoomMsgTypeUnknown)
		{
			chat_form->OnReceiveMsgCallback(result);
		}
	};
	Post2UI(cb);
}
コード例 #3
0
void TeamEventForm::LoadEventsCb(int count, int unread, const std::list<nim::SysMessage> &result)
{
	QLOG_PRO(L"query end events: count={0}") <<count;

	is_loading_ = false;
	btn_recycle_->SetEnabled(true);
	OpEventTip(false);

	UpdateSysmsgUnread(unread);
	for (auto& content : result)
	{
		AddEvent(content, false);
	}
	UpdateFarstTime();

	if (result.size() == kSysmsgCount)
		has_more_ = true;
	else
		has_more_ = false;
}
コード例 #4
0
void AudioCallback::OnPlayAudioCallback( int code, const char* file_path, const char* sid, const char* cid )
{
	QLOG_PRO(L"OnPlayAudioCallback: sid={0} cid={1} code={2}") <<sid <<cid <<code;
	Post2UI( nbase::Bind(&UIPlayAudioCallback, code, std::string(sid), std::string(cid)) );
}