From 8f67ef65c039c052c476656e89c70e945d353bce Mon Sep 17 00:00:00 2001 From: dyamy-lee Date: Mon, 5 Sep 2022 14:05:12 +0900 Subject: [PATCH] rename about module : mmi-core to mmi-client this module's role is more related saving client data. So, changed module name from mmi-core to mmi-client Change-Id: Iaa90457d8bc60996c26789e79ec32c62804048eb --- src/meson.build | 4 ++-- src/{mmi-core.c => mmi-client.c} | 6 +++--- src/{mmi-core.h => mmi-client.h} | 10 +++++----- src/mmi.c | 10 +++++----- tests/mmi-main-test.cpp | 8 ++++---- 5 files changed, 19 insertions(+), 19 deletions(-) rename src/{mmi-core.c => mmi-client.c} (95%) rename src/{mmi-core.h => mmi-client.h} (91%) diff --git a/src/meson.build b/src/meson.build index 13c5ee4..aea3c8b 100644 --- a/src/meson.build +++ b/src/meson.build @@ -6,8 +6,8 @@ mmi_srcs = [ 'mmi-dbg.h', 'mmi_proxy.h', 'mmi_proxy.c', - 'mmi-core.h', - 'mmi-core.c', + 'mmi-client.h', + 'mmi-client.c', ] install_headers( diff --git a/src/mmi-core.c b/src/mmi-client.c similarity index 95% rename from src/mmi-core.c rename to src/mmi-client.c index 35b8e3a..f6ae932 100644 --- a/src/mmi-core.c +++ b/src/mmi-client.c @@ -23,11 +23,11 @@ #include "mmi-ipc.h" #include "mmi-dbg.h" -#include "mmi-core.h" +#include "mmi-client.h" static mmi_handle mmi_h = NULL; -int mmi_core_create(void) +int mmi_client_create(void) { mmi_h = (mmi_handle)calloc(1, sizeof(mmi_struct_s)); @@ -52,7 +52,7 @@ int mmi_core_create(void) return MMI_ERROR_NONE; } -int mmi_core_destroy(void) +int mmi_client_destroy(void) { if (mmi_h == NULL) { LOGE("A mmi_h is already NULL"); diff --git a/src/mmi-core.h b/src/mmi-client.h similarity index 91% rename from src/mmi-core.h rename to src/mmi-client.h index 2d86325..aa0248a 100644 --- a/src/mmi-core.h +++ b/src/mmi-client.h @@ -21,8 +21,8 @@ * DEALINGS IN THE SOFTWARE. */ -#ifndef __MMI_CORE_H__ -#define __MMI_CORE_H__ +#ifndef __MMI_CLIENT_H__ +#define __MMI_CLIENT_H__ #include "mmi-common.h" @@ -40,11 +40,11 @@ typedef mmi_struct_s* mmi_handle; extern "C" { #endif -int mmi_core_create(void); -int mmi_core_destroy(void); +int mmi_client_create(void); +int mmi_client_destroy(void); #ifdef __cplusplus } #endif -#endif //__MMI_CORE_H__ \ No newline at end of file +#endif //__MMI_CLIENT_H__ \ No newline at end of file diff --git a/src/mmi.c b/src/mmi.c index 54370a7..022974c 100644 --- a/src/mmi.c +++ b/src/mmi.c @@ -22,14 +22,14 @@ */ #include "mmi.h" -#include "mmi-core.h" +#include "mmi-client.h" #include "mmi-dbg.h" MMI_API int mmi_init(void) { - int ret = mmi_core_create(); + int ret = mmi_client_create(); if(ret != MMI_ERROR_NONE) { - LOGE("Fail to create mmi handle instance(%d)", ret); + LOGE("Fail to create mmi client(%d)", ret); return MMI_ERROR_NOT_SUPPORTED; } @@ -38,9 +38,9 @@ MMI_API int mmi_init(void) MMI_API int mmi_shutdown(void) { - int ret = mmi_core_destroy(); + int ret = mmi_client_destroy(); if(ret != MMI_ERROR_NONE) { - LOGE("Fail to destroy mmi handle instance(%d)", ret); + LOGE("Fail to destroy mmi client(%d)", ret); return MMI_ERROR_NOT_SUPPORTED; } diff --git a/tests/mmi-main-test.cpp b/tests/mmi-main-test.cpp index ca59c5a..fced459 100644 --- a/tests/mmi-main-test.cpp +++ b/tests/mmi-main-test.cpp @@ -22,7 +22,7 @@ */ #include "mmi.h" -#include "mmi-core.h" +#include "mmi-client.h" #include "mmi-tests.h" #include "mmi-ipc.h" @@ -52,11 +52,11 @@ TEST_F(MMIMainTest, MMIMainInit) mmi_shutdown(); } -TEST_F(MMIMainTest, MmiInstanceCreateSuccess) +TEST_F(MMIMainTest, MmiClientCreateSuccess) { - int res = mmi_core_create(); + int res = mmi_client_create(); EXPECT_EQ(res, MMI_ERROR_NONE); - mmi_core_destroy(); + mmi_client_destroy(); } -- 2.34.1