From: dyamy-lee Date: Wed, 7 Sep 2022 08:01:23 +0000 (+0900) Subject: rename function of mmi.h X-Git-Tag: accepted/tizen/unified/20220927.132357~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F07%2F281607%2F1;p=platform%2Fcore%2Fuifw%2Fmmi-framework.git rename function of mmi.h following the it's role, it's more suit to rename as initialize/deinitialize Change-Id: I850f9001c931deb996bdc04f2907f83e724d9ecb --- diff --git a/src/mmi.c b/src/mmi.c index 5d017b9..f0f1b07 100644 --- a/src/mmi.c +++ b/src/mmi.c @@ -19,7 +19,7 @@ #include "mmi-client.h" #include "mmi-dbg.h" -MMI_API int mmi_init(void) +MMI_API int mmi_initialize(void) { int ret = mmi_client_create(); if(ret != MMI_ERROR_NONE) { @@ -30,7 +30,7 @@ MMI_API int mmi_init(void) return MMI_ERROR_NONE; } -MMI_API int mmi_shutdown(void) +MMI_API int mmi_deinitialize(void) { int ret = mmi_client_destroy(); if(ret != MMI_ERROR_NONE) { diff --git a/src/mmi.h b/src/mmi.h index 61f3669..2fd64db 100644 --- a/src/mmi.h +++ b/src/mmi.h @@ -54,8 +54,8 @@ typedef enum { extern "C" { #endif -MMI_API int mmi_init(void); -MMI_API int mmi_shutdown(void); +MMI_API int mmi_initialize(void); +MMI_API int mmi_deinitialize(void); MMI_API int mmi_set_result_cb(int input_event_type, result_cb callback, void* user_data); #ifdef __cplusplus diff --git a/tests/mmi-ipc-test.cpp b/tests/mmi-ipc-test.cpp index 9de4dcb..9e549a2 100644 --- a/tests/mmi-ipc-test.cpp +++ b/tests/mmi-ipc-test.cpp @@ -38,18 +38,18 @@ public: TEST_F(MMIIpcTest, MMIFWIpcInitSuccess) { - int res = mmi_init(); + int res = mmi_initialize(); EXPECT_EQ(res, MMI_ERROR_NONE); - mmi_shutdown(); + mmi_deinitialize(); } TEST_F(MMIIpcTest, MMIIpcInitFail) { - int res = mmi_init(); + int res = mmi_initialize(); EXPECT_EQ(res, MMI_ERROR_NONE); - mmi_shutdown(); + mmi_deinitialize(); } diff --git a/tests/mmi-main-test.cpp b/tests/mmi-main-test.cpp index 1990c6a..a8ac6bc 100644 --- a/tests/mmi-main-test.cpp +++ b/tests/mmi-main-test.cpp @@ -39,11 +39,11 @@ public: TEST_F(MMIMainTest, MMIMainInit) { - int res = mmi_init(); + int res = mmi_initialize(); EXPECT_EQ(res, MMI_ERROR_NONE); - mmi_shutdown(); + mmi_deinitialize(); } TEST_F(MMIMainTest, MmiClientCreateSuccess) @@ -65,7 +65,7 @@ void voice_recognition_callback(void *user_data, int input_event_type, const cha TEST_F(MMIMainTest, MMIClientSetResultCbSuccess) { - int res = mmi_init(); + int res = mmi_initialize(); mmi_input_event_type_e input_event_type = MMI_VOICE_TOUCH; EXPECT_EQ(res, MMI_ERROR_NONE); @@ -89,12 +89,12 @@ TEST_F(MMIMainTest, MMIClientSetResultCbSuccess) EXPECT_TRUE(false); } - mmi_shutdown(); + mmi_deinitialize(); } TEST_F(MMIMainTest, MMIClientSetResultCbFail) { - int res = mmi_init(); + int res = mmi_initialize(); mmi_input_event_type_e input_event_type = MMI_VOICE_TOUCH; EXPECT_EQ(res, MMI_ERROR_NONE); @@ -102,12 +102,12 @@ TEST_F(MMIMainTest, MMIClientSetResultCbFail) res = mmi_client_set_result_cb(input_event_type, NULL, NULL); EXPECT_EQ(res, MMI_ERROR_INVALID_PARAMETER); - mmi_shutdown(); + mmi_deinitialize(); } TEST_F(MMIMainTest, MMISetResultCbSuccess) { - int res = mmi_init(); + int res = mmi_initialize(); mmi_input_event_type_e input_event_type = MMI_VOICE_TOUCH; EXPECT_EQ(res, MMI_ERROR_NONE); @@ -115,12 +115,12 @@ TEST_F(MMIMainTest, MMISetResultCbSuccess) res = mmi_set_result_cb(input_event_type, voice_touch_callback, NULL); EXPECT_EQ(res, MMI_ERROR_NONE); - mmi_shutdown(); + mmi_deinitialize(); } TEST_F(MMIMainTest, MMISetResultCbFail) { - int res = mmi_init(); + int res = mmi_initialize(); mmi_input_event_type_e input_event_type = MMI_VOICE_TOUCH; EXPECT_EQ(res, MMI_ERROR_NONE); @@ -128,12 +128,12 @@ TEST_F(MMIMainTest, MMISetResultCbFail) res = mmi_set_result_cb(input_event_type, NULL, NULL); EXPECT_EQ(res, MMI_ERROR_INVALID_PARAMETER); - mmi_shutdown(); + mmi_deinitialize(); } TEST_F(MMIMainTest, MMIClientDestroyRemoveGList) { - int res = mmi_init(); + int res = mmi_initialize(); mmi_input_event_type_e input_event_type = MMI_VOICE_TOUCH; EXPECT_EQ(res, MMI_ERROR_NONE);