framework/src/st_things/things_stack/things_stack.c
//----------------------------------------------------------------------------------
/**
 * Owner ship transfer method callback.
 */
Owner ship transfer method callback.
Owner ship transfer method callback .
static void otm_event_cb(const char *addr, uint16_t port, const char *uuid, int event)
{
	switch (event) {
	case OIC_OTM_READY:
		THINGS_LOG_D(TAG, "OIC_OTM_READY");
		break;
	case OIC_OTM_STARTED:
		THINGS_LOG_D(TAG, "OIC_OTM_STARTED");
		THINGS_LOG_D(TAG, "[%s:%d][%s]", addr, port, uuid);
		break;
	case OIC_OTM_DONE:
		THINGS_LOG_D(TAG, "OIC_OTM_DONE");
		THINGS_LOG_D(TAG, "[%s:%d][%s]", addr, port, uuid);
		break;
	case OIC_OTM_ERROR:
		THINGS_LOG_E(TAG, "OIC_OTM_ERROR");
		break;
	default:
		THINGS_LOG_E(TAG, "Unknown");
		break;
	}
	if (g_otm_event_handler) {
		THINGS_LOG_D(TAG, "Call the registered funcation...");
		g_otm_event_handler(addr, port, uuid, event);
	}
}
static void otm_event_cb ( const char * addr , uint16_t port , const char * uuid , int event ) { switch ( event ) { case OIC_OTM_READY : THINGS_LOG_D ( TAG , " " ) ; break ; case OIC_OTM_STARTED : THINGS_LOG_D ( TAG , " " ) ; THINGS_LOG_D ( TAG , " " , addr , port , uuid ) ; break ; case OIC_OTM_DONE : THINGS_LOG_D ( TAG , " " ) ; THINGS_LOG_D ( TAG , " " , addr , port , uuid ) ; break ; case OIC_OTM_ERROR : THINGS_LOG_E ( TAG , " " ) ; break ; default : THINGS_LOG_E ( TAG , " " ) ; break ; } if ( g_otm_event_handler ) { THINGS_LOG_D ( TAG , " " ) ; g_otm_event_handler ( addr , port , uuid , event ) ; } }
Owner ship transfer method callback.
Owner ship transfer method callback .