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


C++ UmcSession类代码示例

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


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

示例1: AppOnSessionTerminate

apt_bool_t AppOnSessionTerminate(mrcp_application_t *application, mrcp_session_t *session, mrcp_sig_status_code_e status)
{
	UmcSession* pSession = (UmcSession*) mrcp_application_session_object_get(session);
	if(!pSession->OnSessionTerminate(status))
		return false;

	UmcFramework* pFramework = (UmcFramework*) mrcp_application_object_get(application);
	pFramework->RemoveSession(pSession);
	delete pSession;
	return true;
}
开发者ID:Jared-Prime,项目名称:UniMRCP,代码行数:11,代码来源:umcframework.cpp

示例2: printf

void UmcFramework::ProcessShowSessions()
{
	UmcSession* pSession;
	void* pVal;
	printf("%d Session(s)\n", apr_hash_count(m_pSessionTable));
	apr_hash_index_t* it = apr_hash_first(m_pPool,m_pSessionTable);
	for(; it; it = apr_hash_next(it)) 
	{
		apr_hash_this(it,NULL,NULL,&pVal);
		pSession = (UmcSession*) pVal;
		if(pSession)
		{
			printf("[%s] - %s\n", pSession->GetId(), pSession->GetScenario()->GetName());
		}
	}
}
开发者ID:Jared-Prime,项目名称:UniMRCP,代码行数:16,代码来源:umcframework.cpp

示例3: apr_hash_first

void UmcFramework::ProcessKillRequest(const char* id)
{
	UmcSession* pSession;
	void* pVal;
	apr_hash_index_t* it = apr_hash_first(m_pPool,m_pSessionTable);
	for(; it; it = apr_hash_next(it)) 
	{
		apr_hash_this(it,NULL,NULL,&pVal);
		pSession = (UmcSession*) pVal;
		if(pSession && strcasecmp(pSession->GetId(),id) == 0)
		{
			/* first, terminate session */
			pSession->Terminate();
			return;
		}
	}
}
开发者ID:Jared-Prime,项目名称:UniMRCP,代码行数:17,代码来源:umcframework.cpp

示例4: apr_hash_first

void UmcFramework::ProcessStopRequest(const char* id)
{
	UmcSession* pSession;
	void* pVal;
	apr_hash_index_t* it = apr_hash_first(m_pPool,m_pSessionTable);
	for(; it; it = apr_hash_next(it)) 
	{
		apr_hash_this(it,NULL,NULL,&pVal);
		pSession = (UmcSession*) pVal;
		if(pSession && strcasecmp(pSession->GetId(),id) == 0)
		{
			/* stop in-progress request */
			pSession->Stop();
			return;
		}
	}
}
开发者ID:calejost,项目名称:unimrcp,代码行数:17,代码来源:umcframework.cpp

示例5: apr_hash_get

bool UmcFramework::ProcessRunRequest(const char* pScenarioName, const char* pProfileName)
{
	UmcScenario* pScenario = (UmcScenario*) apr_hash_get(m_pScenarioTable,pScenarioName,APR_HASH_KEY_STRING);
	if(!pScenario)
		return false;

	UmcSession* pSession = pScenario->CreateSession();
	if(!pSession)
		return false;

	printf("[%s]\n",pSession->GetId());
	pSession->SetMrcpProfile(pProfileName);
	pSession->SetMrcpApplication(m_pMrcpApplication);
	if(!pSession->Run())
	{
		delete pSession;
		return false;
	}

	AddSession(pSession);
	return true;
}
开发者ID:Jared-Prime,项目名称:UniMRCP,代码行数:22,代码来源:umcframework.cpp

示例6: AppOnResourceDiscover

apt_bool_t AppOnResourceDiscover(mrcp_application_t *application, mrcp_session_t *session, mrcp_session_descriptor_t *descriptor, mrcp_sig_status_code_e status)
{
	UmcSession* pSession = (UmcSession*) mrcp_application_session_object_get(session);
	return pSession->OnResourceDiscover(descriptor,status);
}
开发者ID:Jared-Prime,项目名称:UniMRCP,代码行数:5,代码来源:umcframework.cpp

示例7: AppOnTerminateEvent

apt_bool_t AppOnTerminateEvent(mrcp_application_t *application, mrcp_session_t *session, mrcp_channel_t *channel)
{
	UmcSession* pSession = (UmcSession*) mrcp_application_session_object_get(session);
	return pSession->OnTerminateEvent(channel);
}
开发者ID:Jared-Prime,项目名称:UniMRCP,代码行数:5,代码来源:umcframework.cpp

示例8: AppOnMessageReceive

apt_bool_t AppOnMessageReceive(mrcp_application_t *application, mrcp_session_t *session, mrcp_channel_t *channel, mrcp_message_t *message)
{
	UmcSession* pSession = (UmcSession*) mrcp_application_session_object_get(session);
	return pSession->OnMessageReceive(channel,message);
}
开发者ID:Jared-Prime,项目名称:UniMRCP,代码行数:5,代码来源:umcframework.cpp

示例9: AppOnChannelRemove

apt_bool_t AppOnChannelRemove(mrcp_application_t *application, mrcp_session_t *session, mrcp_channel_t *channel, mrcp_sig_status_code_e status)
{
	UmcSession* pSession = (UmcSession*) mrcp_application_session_object_get(session);
	return pSession->OnChannelRemove(channel,status);
}
开发者ID:Jared-Prime,项目名称:UniMRCP,代码行数:5,代码来源:umcframework.cpp

示例10: AppOnSessionUpdate

apt_bool_t AppOnSessionUpdate(mrcp_application_t *application, mrcp_session_t *session, mrcp_sig_status_code_e status)
{
	UmcSession* pSession = (UmcSession*) mrcp_application_session_object_get(session);
	return pSession->OnSessionUpdate(status);
}
开发者ID:Jared-Prime,项目名称:UniMRCP,代码行数:5,代码来源:umcframework.cpp


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