library/src/webchat/BP-WebChat.cc
// Load/register all event processors within a provided event manager.  This
// essentially primes the event recievers so that events can be dispatched.
Load/register all event processors within a provided event manager.  This
essentially primes the event recievers so that events can be dispatched.
Load / register all event processors within a provided event manager . This essentially primes the event recievers so that events can be dispatched .
BP_ERROR_T BP_WebChatRegisterEventProcessorsWithEVM
(
	P_BP_EVENT_MANAGER evm
)
{
	if(!evm)
		return ERR_FAILURE;
	P_BP_EVENT_PROCESSOR webchat_processor = BP_EventMgrLookupProcessorByName(evm, WEBCHAT_EVENT_PROCESSOR_NAME);
	if(!webchat_processor)
	{
		BP_EventMgrAddProcessor
		(
				evm,
				WEBCHAT_EVENT_PROCESSOR_NAME,
				"WebChat event processor.",
				BP_EVENT_PROCESSOR_COMPUTE_TARGET_TYPE_CPU_THREAD,
				BP_WebChatThreadCallbackEntryPoint
		);
	}
	webchat_processor = BP_EventMgrLookupProcessorByName(evm, WEBCHAT_EVENT_PROCESSOR_NAME);
	if(!webchat_processor)
		return ERR_FAILURE;
	return ERR_SUCCESS;
}
BP_ERROR_T BP_WebChatRegisterEventProcessorsWithEVM ( P_BP_EVENT_MANAGER evm ) { if ( ! evm ) return ERR_FAILURE ; P_BP_EVENT_PROCESSOR webchat_processor = BP_EventMgrLookupProcessorByName ( evm , WEBCHAT_EVENT_PROCESSOR_NAME ) ; if ( ! webchat_processor ) { BP_EventMgrAddProcessor ( evm , WEBCHAT_EVENT_PROCESSOR_NAME , " " , BP_EVENT_PROCESSOR_COMPUTE_TARGET_TYPE_CPU_THREAD , BP_WebChatThreadCallbackEntryPoint ) ; } webchat_processor = BP_EventMgrLookupProcessorByName ( evm , WEBCHAT_EVENT_PROCESSOR_NAME ) ; if ( ! webchat_processor ) return ERR_FAILURE ; return ERR_SUCCESS ; }
Load/register all event processors within a provided event manager.
Load / register all event processors within a provided event manager .
// ensure we have an event manager //attempt to lookup the webchat processor // attempt to add the processor if it doesn't exist // attempt to lookup again after addition attempt // return indicating success