* @brief A structure for the VC engine functions.
* @details This structure contains essential callback functions for operating VC engine.
* @since_tizen @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif
- * @remarks You must register all callbacks except optional callbacks for operating VC engine.
+ * @remarks You must register all callbacks except optional callbacks for operating VC engine.\n
+ * The following callbacks are optional callbacks : \n
+ * - vce_private_data_set_cb \n
+ * - vce_private_data_requested_cb \n
+ * - vce_nlu_base_info_requested_cb \n
+ * - vce_specific_engine_request_cb \n
+ * If you want to use the optional callbacks, you can set them using vce_set_private_data_set_cb(), vce_set_private_data_requested_cb(), vce_set_nlu_base_info_requested_cb(), and vce_set_specific_engine_request_cb() functions.
+ *
+ * @see vce_main()
+ * @see vce_set_private_data_set_cb()
+ * @see vce_set_private_data_requested_cb()
+ * @see vce_set_nlu_base_info_requested_cb()
+ * @see vce_set_specific_engine_request_cb()
*/
typedef struct {
int version; /**< Version */
g_dynamic_engine.callbacks->process_list_event = callback->process_list_event;
g_dynamic_engine.callbacks->process_haptic_event = callback->process_haptic_event;
- g_dynamic_engine.callbacks->private_data_set = callback->private_data_set;
- g_dynamic_engine.callbacks->private_data_request = callback->private_data_request;
- g_dynamic_engine.callbacks->nlu_base_info_request = callback->nlu_base_info_request;
- g_dynamic_engine.callbacks->specific_engine_request = callback->specific_engine_request;
+ g_dynamic_engine.internal_callbacks->private_data_set = NULL;
+ g_dynamic_engine.internal_callbacks->private_data_request = NULL;
+ g_dynamic_engine.internal_callbacks->nlu_base_info_request = NULL;
+ g_dynamic_engine.internal_callbacks->specific_engine_request = NULL;
g_dynamic_engine.internal_callbacks->request_tts = NULL;
g_dynamic_engine.internal_callbacks->request_tts_user_data = NULL;
}
int ret = -1;
- if (true == g_dynamic_engine.is_loaded && NULL != g_dynamic_engine.callbacks->nlu_base_info_request) {
- ret = g_dynamic_engine.callbacks->nlu_base_info_request(key, value);
+ if (true == g_dynamic_engine.is_loaded && NULL != g_dynamic_engine.internal_callbacks->nlu_base_info_request) {
+ ret = g_dynamic_engine.internal_callbacks->nlu_base_info_request(key, value);
if (0 != ret) {
SLOG(LOG_ERROR, TAG_VCD, "[Engine Agent ERROR] Fail to get nlu base info (%d)", ret);
return VCD_ERROR_OPERATION_FAILED;
vcd_recorder_set_pcm_path(data);
int ret = -1;
- if (true == g_dynamic_engine.is_loaded && NULL != g_dynamic_engine.callbacks->private_data_set) {
- ret = g_dynamic_engine.callbacks->private_data_set(key, data);
+ if (true == g_dynamic_engine.is_loaded && NULL != g_dynamic_engine.internal_callbacks->private_data_set) {
+ ret = g_dynamic_engine.internal_callbacks->private_data_set(key, data);
if (0 != ret) {
SLOG(LOG_ERROR, TAG_VCD, "[Engine Agent ERROR] Fail to set private data (%d)", ret);
return VCD_ERROR_OPERATION_FAILED;
}
int ret = -1;
- if (true == g_dynamic_engine.is_loaded && NULL != g_dynamic_engine.callbacks->private_data_request) {
- ret = g_dynamic_engine.callbacks->private_data_request(key, data);
+ if (true == g_dynamic_engine.is_loaded && NULL != g_dynamic_engine.internal_callbacks->private_data_request) {
+ ret = g_dynamic_engine.internal_callbacks->private_data_request(key, data);
if (0 != ret) {
SLOG(LOG_ERROR, TAG_VCD, "[Engine Agent ERROR] Fail to get private data (%d)", ret);
return VCD_ERROR_OPERATION_FAILED;
}
int ret = -1;
- if (true == g_dynamic_engine.is_loaded && NULL != g_dynamic_engine.callbacks->specific_engine_request) {
- ret = g_dynamic_engine.callbacks->specific_engine_request(engine_app_id, event, request);
+ if (true == g_dynamic_engine.is_loaded && NULL != g_dynamic_engine.internal_callbacks->specific_engine_request) {
+ ret = g_dynamic_engine.internal_callbacks->specific_engine_request(engine_app_id, event, request);
if (0 != ret) {
SLOG(LOG_ERROR, TAG_VCD, "[Engine Agent ERROR] Fail to set specific engine request (%d)", ret);
return VCD_ERROR_OPERATION_FAILED;
return VCD_ERROR_OPERATION_FAILED;
}
- g_dynamic_engine.callbacks->private_data_set = callback_func;
+ g_dynamic_engine.internal_callbacks->private_data_set = callback_func;
return VCD_ERROR_NONE;
}
return VCD_ERROR_OPERATION_FAILED;
}
- g_dynamic_engine.callbacks->private_data_request = callback_func;
+ g_dynamic_engine.internal_callbacks->private_data_request = callback_func;
return VCD_ERROR_NONE;
}
return VCD_ERROR_OPERATION_FAILED;
}
- g_dynamic_engine.callbacks->nlu_base_info_request = callback_func;
+ g_dynamic_engine.internal_callbacks->nlu_base_info_request = callback_func;
return VCD_ERROR_NONE;
}
return VCD_ERROR_OPERATION_FAILED;
}
- g_dynamic_engine.callbacks->specific_engine_request = callback_func;
+ g_dynamic_engine.internal_callbacks->specific_engine_request = callback_func;
return VCD_ERROR_NONE;
}