[ITC][capi-ui-inputmethod][ACR-1372][Added new api for intelligent reply suggestion... 85/206785/4
authormansankar <karanam.s@samsung.com>
Mon, 27 May 2019 05:12:32 +0000 (10:42 +0530)
committermanoj gupta <manoj.g2@samsung.com>
Mon, 27 May 2019 08:36:12 +0000 (08:36 +0000)
Change-Id: I22d5d884fcfd90c54d765895fc509c6a8423dc13
Signed-off-by: mansankar <karanam.s@samsung.com>
src/itc/capi-ui-inputmethod/ITs-capi-ui-inputmethod.c
src/itc/capi-ui-inputmethod/tct-capi-ui-inputmethod-native_mobile.h
src/itc/capi-ui-inputmethod/tct-capi-ui-inputmethod-native_tizeniot.h
src/itc/capi-ui-inputmethod/tct-capi-ui-inputmethod-native_wearable.h

index 5f59f3abd75ae2967f411ea17334017f524ed33e..5625258b445fca6d4594f2ace6aa3e4ae7137d42 100755 (executable)
@@ -165,6 +165,32 @@ static void InputMethodGetRequestHideCb()
        elm_exit();
 }
 
+/**
+* @function                    InputMethodPredictionHintDataSetCb
+* @description         Callback for ime_run to set prediction hint data event callback.
+* @parameter           char *key, char *value, char *user_data
+* @return                      NA
+*/
+static void InputMethodPredictionHintDataSetCb(char *key, char *value, char *user_data)
+{
+       FPRINTF("[Line : %d][%s] InputMethodPredictionHintDataSetCb Callback called\\n", __LINE__, API_NAMESPACE);
+}
+
+/**
+* @function                    InputMethodEventSetPredictionHintDataSetCb
+* @description         Callback for ime_run to set prediction hint data event callback.
+* @parameter           NA
+* @return                      NA
+*/
+static void InputMethodEventSetPredictionHintDataSetCb()
+{
+       g_bCallbackCalled = true;
+       FPRINTF("[Line : %d][%s] InputMethodEventSetPredictionHintDataSetCb Callback called\\n", __LINE__, API_NAMESPACE);
+       g_nRet = ime_event_set_prediction_hint_data_set_cb(InputMethodPredictionHintDataSetCb, NULL);
+       PRINT_RESULT_NORETURN(IME_ERROR_NONE, g_nRet, "ime_event_set_prediction_hint_data_set_cb", InputGetError(g_nRet));
+       elm_exit();
+}
+
 /**
  * @function           ITs_capi_ui_inputmethod_startup
  * @description                Called before each test
@@ -345,5 +371,36 @@ int ITc_ime_request_hide_p(void)
 
        return 0;
 }
+
+//& purpose Sets prediction hint data event callback function.
+//& type: auto
+/**
+* @testcase                            ITc_ime_event_set_prediction_hint_data_set_cb_p
+* @since_tizen                 5.0
+* @author                              SRID(karanam.s)
+* @reviewer                            SRID(manoj.g2)
+* @type                                        auto
+* @description                 Sets prediction hint data event callback function.
+* @scenario                            Sets prediction hint data event callback function.
+* @apicovered                  ime_event_set_prediction_hint_data_set_cb
+* @passcase                            If callback gets called and api returns IME_ERROR_NONE
+* @failcase                            If fails to called callback and/or api returns other than IME_ERROR_NONE
+* @precondition                        NA
+* @postcondition               The ime_run() function should be called to start to run IME application's main loop.
+*/
+int ITc_ime_event_set_prediction_hint_data_set_cb_p(void)
+{
+       START_TEST;
+
+       g_nRet = -1;
+       g_bCallbackCalled = false;
+
+       int nRet = ime_run(&basic_callback, (void *)InputMethodEventSetPredictionHintDataSetCb);
+
+       PRINT_RESULT(IME_ERROR_NONE, nRet, "ime_run", InputGetError(nRet));
+       PRINT_RESULT(true, g_bCallbackCalled, "ime_event_set_prediction_hint_data_set_cb", "Callback not invoked");
+       PRINT_RESULT(IME_ERROR_NONE, g_nRet, "ime_event_set_prediction_hint_data_set_cb", InputGetError(g_nRet));
+
+}
 /** @} */
 /** @} */
index 091619c1e10767fecd713778713ff472ef5fab31..b876fb357101a1d8bd22282094c574502d223824 100755 (executable)
@@ -27,6 +27,7 @@ extern int ITc_ime_set_floating_drag_start_p(void);
 extern int ITc_ime_set_floating_drag_end_p(void);
 extern int ITc_ime_get_selected_text_p(void);
 extern int ITc_ime_request_hide_p(void);
+extern int ITc_ime_event_set_prediction_hint_data_set_cb_p(void);
 
 testcase tc_array[] = {
        {"ITc_ime_set_floating_mode_p", ITc_ime_set_floating_mode_p, ITs_capi_ui_inputmethod_startup, ITs_capi_ui_inputmethod_cleanup},
@@ -34,6 +35,7 @@ testcase tc_array[] = {
        {"ITc_ime_set_floating_drag_end_p", ITc_ime_set_floating_drag_end_p, ITs_capi_ui_inputmethod_startup, ITs_capi_ui_inputmethod_cleanup},
        {"ITc_ime_get_selected_text_p", ITc_ime_get_selected_text_p, ITs_capi_ui_inputmethod_startup, ITs_capi_ui_inputmethod_cleanup},
        {"ITc_ime_request_hide_p", ITc_ime_request_hide_p, ITs_capi_ui_inputmethod_startup, ITs_capi_ui_inputmethod_cleanup},
+       {"ITc_ime_event_set_prediction_hint_data_set_cb_p", ITc_ime_event_set_prediction_hint_data_set_cb_p, ITs_capi_ui_inputmethod_startup, ITs_capi_ui_inputmethod_cleanup},
        {NULL, NULL}
 };
 
index 091619c1e10767fecd713778713ff472ef5fab31..b876fb357101a1d8bd22282094c574502d223824 100755 (executable)
@@ -27,6 +27,7 @@ extern int ITc_ime_set_floating_drag_start_p(void);
 extern int ITc_ime_set_floating_drag_end_p(void);
 extern int ITc_ime_get_selected_text_p(void);
 extern int ITc_ime_request_hide_p(void);
+extern int ITc_ime_event_set_prediction_hint_data_set_cb_p(void);
 
 testcase tc_array[] = {
        {"ITc_ime_set_floating_mode_p", ITc_ime_set_floating_mode_p, ITs_capi_ui_inputmethod_startup, ITs_capi_ui_inputmethod_cleanup},
@@ -34,6 +35,7 @@ testcase tc_array[] = {
        {"ITc_ime_set_floating_drag_end_p", ITc_ime_set_floating_drag_end_p, ITs_capi_ui_inputmethod_startup, ITs_capi_ui_inputmethod_cleanup},
        {"ITc_ime_get_selected_text_p", ITc_ime_get_selected_text_p, ITs_capi_ui_inputmethod_startup, ITs_capi_ui_inputmethod_cleanup},
        {"ITc_ime_request_hide_p", ITc_ime_request_hide_p, ITs_capi_ui_inputmethod_startup, ITs_capi_ui_inputmethod_cleanup},
+       {"ITc_ime_event_set_prediction_hint_data_set_cb_p", ITc_ime_event_set_prediction_hint_data_set_cb_p, ITs_capi_ui_inputmethod_startup, ITs_capi_ui_inputmethod_cleanup},
        {NULL, NULL}
 };
 
index 091619c1e10767fecd713778713ff472ef5fab31..b876fb357101a1d8bd22282094c574502d223824 100755 (executable)
@@ -27,6 +27,7 @@ extern int ITc_ime_set_floating_drag_start_p(void);
 extern int ITc_ime_set_floating_drag_end_p(void);
 extern int ITc_ime_get_selected_text_p(void);
 extern int ITc_ime_request_hide_p(void);
+extern int ITc_ime_event_set_prediction_hint_data_set_cb_p(void);
 
 testcase tc_array[] = {
        {"ITc_ime_set_floating_mode_p", ITc_ime_set_floating_mode_p, ITs_capi_ui_inputmethod_startup, ITs_capi_ui_inputmethod_cleanup},
@@ -34,6 +35,7 @@ testcase tc_array[] = {
        {"ITc_ime_set_floating_drag_end_p", ITc_ime_set_floating_drag_end_p, ITs_capi_ui_inputmethod_startup, ITs_capi_ui_inputmethod_cleanup},
        {"ITc_ime_get_selected_text_p", ITc_ime_get_selected_text_p, ITs_capi_ui_inputmethod_startup, ITs_capi_ui_inputmethod_cleanup},
        {"ITc_ime_request_hide_p", ITc_ime_request_hide_p, ITs_capi_ui_inputmethod_startup, ITs_capi_ui_inputmethod_cleanup},
+       {"ITc_ime_event_set_prediction_hint_data_set_cb_p", ITc_ime_event_set_prediction_hint_data_set_cb_p, ITs_capi_ui_inputmethod_startup, ITs_capi_ui_inputmethod_cleanup},
        {NULL, NULL}
 };