skeleton of mmi_client_set_result_cb 94/281594/1
authordyamy-lee <dyamy.lee@samsung.com>
Mon, 5 Sep 2022 09:35:01 +0000 (18:35 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Tue, 20 Sep 2022 04:52:26 +0000 (13:52 +0900)
create skeleton of mmi_client_set_result_cb and, it's tests

Change-Id: I88d6621612b4cb26ef702089f71d8d28adf1d0f1

src/mmi-client.c
src/mmi-client.h
src/mmi-common.h
tests/mmi-main-test.cpp

index f6ae932d1dca9afecd1bdbbf27258aa23f259956..6ec1934ba8e3f1971f5e2a605baca9fc68610b64 100644 (file)
@@ -65,3 +65,8 @@ int mmi_client_destroy(void)
 
        return MMI_ERROR_NONE;
 }
+
+int mmi_client_set_result_cb(int input_event_type, result_cb callback, void* user_data)
+{
+       return MMI_ERROR_NONE;
+}
index aa0248a182848f4c877a8e094471998a46d9d46f..4ec2669a9f23591d467ad668a93d8b969856b6ca 100644 (file)
@@ -42,6 +42,7 @@ extern "C" {
 
 int mmi_client_create(void);
 int mmi_client_destroy(void);
+int mmi_client_set_result_cb(int input_event_type, result_cb callback, void* user_data);
 
 #ifdef __cplusplus
 }
index b6a8bec0a08979af50d527dfdb42a3423f789a08..3942f3e630e7ac4873c3e3ae6a920bf809781d3e 100644 (file)
@@ -49,4 +49,6 @@ typedef enum {
        MMI_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< MMI NOT supported */
 } mmi_error_e;
 
+typedef void (*result_cb)(void *user_data, int input_event_type, const char *result_out);
+
 #endif //__MMI_COMMON_H__
index fced459386602ebfb8b1c6996aefe438b75bbd96..fe2c0ae619c6a0d83aa80e309ff672f55ea2d540 100644 (file)
@@ -60,3 +60,16 @@ TEST_F(MMIMainTest, MmiClientCreateSuccess)
 
        mmi_client_destroy();
 }
+
+TEST_F(MMIMainTest, MMIClientSetResultCb)
+{
+       int res = mmi_init();
+       int input_event_type = 0;
+
+       EXPECT_EQ(res, MMI_ERROR_NONE);
+
+       res = mmi_client_set_result_cb(input_event_type, NULL, NULL);
+       EXPECT_EQ(res, MMI_ERROR_NONE);
+
+       mmi_shutdown();
+}