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


C++ CMultiXAppMsg::ID方法代码示例

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


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

示例1:

bool	CMultiXWSStream::CallServiceNoWait(CMultiXAppMsg	&Msg)
{
	if(!IsRunning())
		if(!Start())
			return	false;
	CMultiXWSStreamEvent	*Ev	=	new	CMultiXWSStreamEvent(CMultiXWSStreamEvent::CallServiceFromMessage);
	Msg.Keep();
	Ev->m_MsgID	=	Msg.ID();
	QueueEvent(Ev);
	return	true;
}
开发者ID:donyriyanto,项目名称:bforce8583,代码行数:11,代码来源:MultiXWSStream.cpp

示例2: EnableSender

void CMultiXProcess::EnableSender(bool bValue)
{
    if(SenderEnabled()	==	bValue)
        return;

    m_bSenderEnabled	=	bValue;

    if(!SenderEnabled())
    {
        m_SupportedMsgs.clear();
        CMultiXAppMsg	*Msg;
        m_pOutQueue->Lock();
        while(Msg	=	m_pOutQueue->GetFirst())
        {
            Msg->SetError(MsgErrCanceled);
            CancelMsg(Msg->ID(),false);
        }
    }
}
开发者ID:bmanojlovic,项目名称:bforce8583,代码行数:19,代码来源:MultiXProcess.cpp

示例3: Send

bool CMultiXProcess::Send(CMultiXAppMsg &Msg)
{
    if(Msg.IsResponse())
    {
        Msg.MultiXMsg()->SetAsResponse(true);
    }	else
    {
        Msg.MultiXMsg()->SetAsResponse(false);
    }

    if(Msg.m_Timeout	>	0)
    {
        CMultiXProcessTimer	*Timer	=	new	CMultiXProcessTimer(CMultiXProcessTimer::SendMsgTimerCode,Msg.m_Timeout,m_pAlertableObject->ID());
        Timer->MsgID()	=	Msg.ID();
        Owner()->SetMultiXTimer(Timer);
        if(Msg.m_Timeout	<	5000)
        {
            Msg.MultiXMsg()->m_SendSem.Initialize();
        }
    }
    SendMsg(*Msg.MultiXMsg());
    return	true;
}
开发者ID:bmanojlovic,项目名称:bforce8583,代码行数:23,代码来源:MultiXProcess.cpp

示例4: OnAppMsg

bool CMultiXProcess::OnAppMsg(CMultiXMsg &Msg)
{
    if(!ReceiverEnabled()	||	!SenderEnabled())
        return	false;
    CMultiXAppMsg	*OrgMsg	=	NULL;
    CMultiXSession	*Session	=	NULL;
    CMultiXAppMsg	*AppMsg	=	CreateNewAppMsg(&Msg);
    //if(m_MsgCount++	==	1)
//		m_LastPrintTime	=	Owner()->GetMilliClock();
    m_LastMsgRecvMilliClock	=	Owner()->GetMilliClock();

    AddToMsgQueue(m_pInQueue,AppMsg);

    if(!AppMsg->ResponseRequired())
    {
        if(AppMsg->NotifyAny())
            AppMsg->Reply(MultiXNoError);
    }

    if(AppMsg->IsResponse())
    {
        OrgMsg	=	AppMsg->ReceiverMsgID().GetObject();
        if(OrgMsg	!=	NULL)
        {
            Session	=	Owner()->FindSession(OrgMsg->SessionID());
            OrgMsg->m_bKeep	=	false;
            OrgMsg->ID().RemoveObject();

            if(AppMsg->AppDataSize()	||	OrgMsg->ResponseRequired())
            {
                if(Session)
                {
                    if(AppMsg->IsCtrlMsgFromTpm())
                        Session->OnDataReplyFromTpmReceived(*AppMsg,*OrgMsg);
                    else
                        Session->OnDataReplyReceivedNV(*AppMsg,*OrgMsg);
                }	else
                {
                    if(AppMsg->IsCtrlMsgFromTpm())
                        OnDataReplyFromTpmReceived(*AppMsg,*OrgMsg);
                    else
                        OnDataReplyReceived(*AppMsg,*OrgMsg);
                }
            }	else if(AppMsg->Error())
            {
                if(OrgMsg->NotifyError())
                {
                    if(Session)
                    {
                        if(AppMsg->IsCtrlMsgFromTpm())
                            Session->OnSendMsgToTpmFailed(*OrgMsg);
                        else
                            Session->OnSendMsgFailedNV(*OrgMsg);
                    }	else
                    {
                        if(AppMsg->IsCtrlMsgFromTpm())
                            OnSendMsgToTpmFailed(*OrgMsg);
                        else
                            OnSendMsgFailed(*OrgMsg);
                    }
                }
            }	else
            {
                if(OrgMsg->NotifySuccess())
                {
                    if(Session)
                    {
                        if(AppMsg->IsCtrlMsgFromTpm())
                            Session->OnSendMsgToTpmCompleted(*OrgMsg);
                        else
                            Session->OnSendMsgCompletedNV(*OrgMsg);
                    }	else
                    {
                        if(AppMsg->IsCtrlMsgFromTpm())
                            OnSendMsgToTpmCompleted(*OrgMsg);
                        else
                            OnSendMsgCompleted(*OrgMsg);
                    }
                }
            }
        }	else	//	it is a response but the original does not exist
        {
            AppMsg->Reply(TpmErrUnableToForwardMsg);
        }
    }	else
    {
        Session	=	Owner()->FindSession(AppMsg->SessionID(),true);
        if(Session)
        {
            if(AppMsg->IsCtrlMsgFromTpm())
                Session->OnNewMsgFromTpm(*AppMsg);
            else
                Session->OnNewMsgNV(*AppMsg);
        }	else
        {
            if(AppMsg->IsCtrlMsgFromTpm())
                OnNewMsgFromTpm(*AppMsg);
            else
                OnNewMsg(*AppMsg);
        }
//.........这里部分代码省略.........
开发者ID:bmanojlovic,项目名称:bforce8583,代码行数:101,代码来源:MultiXProcess.cpp


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