Fix enum value and Add underscore prefix to internal function 76/281576/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Thu, 15 Sep 2022 02:11:57 +0000 (11:11 +0900)
committerTizen AI <ai.tzn.sec@samsung.com>
Tue, 20 Sep 2022 04:14:42 +0000 (13:14 +0900)
Change-Id: If6f8cf699fb5e5d6d5851414151eb68883bb59a4
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
src/mmimgr/mmi-common.h
src/mmimgr/mmi-core.c

index c777720eea25465d3cf0f11f4092561e7c91779c..75c2b4f6fbe9fc47da481c392e9e8d2ca61e3914 100644 (file)
@@ -43,8 +43,8 @@ MMI_API extern int MMI_VISION_EVENT_FINISH;
 
 //TODO. not use mmi_vision_state, use mmi_event_vision_type
 typedef enum {
-       MMI_INPUT_EVENT_TYPE_NONE = -1,
-       MMI_INPUT_EVENT_TYPE_VOICE_TOUCH = 0,
+       MMI_INPUT_EVENT_TYPE_NONE,
+       MMI_INPUT_EVENT_TYPE_VOICE_TOUCH,
        MMI_INPUT_EVENT_TYPE_VOICE_RECOGNITION
 } mmi_input_event_type_e;
 
index f76953878a4ddc780c7bec7c1c5f35afc0bb0e98..efb515c8531e541bea4b4a64dc8004a5d15d8248 100644 (file)
@@ -45,12 +45,12 @@ enum event_handlers {
 static Ecore_Event_Handler *_event_handlers[EVENT_HANDLER_MAX];
 static mmi_client *g_client = NULL;
 
-static void output_result_received_cb(const char *app_id, const char *json_data, void *user_data)
+static void __output_result_received_cb(const char *app_id, const char *json_data, void *user_data)
 {
        // TODO: implement
 }
 
-static void output_modality_received_cb(const char *app_id, int type, void *event, void *user_data)
+static void __output_modality_received_cb(const char *app_id, int type, void *event, void *user_data)
 {
        if (type == MMI_PROVIDER_EVENT_KEY) {
                mmi_provider_event_key *key_event = (mmi_provider_event_key *)event;
@@ -90,7 +90,7 @@ static void output_modality_received_cb(const char *app_id, int type, void *even
        }
 }
 
-static Eina_Bool _focus_change_cb(void *data EINA_UNUSED, int type, void *event)
+static Eina_Bool __focus_change_cb(void *data EINA_UNUSED, int type, void *event)
 {
        mmi_manager_event_focus_change *ev = (mmi_manager_event_focus_change *)event;
        _I("[focus change] cur focus : %p, new focus : %p", ev->cur_focus, ev->new_focus);
@@ -98,7 +98,7 @@ static Eina_Bool _focus_change_cb(void *data EINA_UNUSED, int type, void *event)
        return ECORE_CALLBACK_PASS_ON;
 }
 
-static Eina_Bool _state_change_cb(void *data EINA_UNUSED, int type, void *event)
+static Eina_Bool __state_change_cb(void *data EINA_UNUSED, int type, void *event)
 {
        mmi_manager_event_state_change *ev = (mmi_manager_event_state_change *)event;
        g_client = ev->client;
@@ -109,7 +109,7 @@ static Eina_Bool _state_change_cb(void *data EINA_UNUSED, int type, void *event)
        return ECORE_CALLBACK_PASS_ON;
 }
 
-static Eina_Bool _key_event_cb(void *data EINA_UNUSED, int type, void *event)
+static Eina_Bool __key_event_cb(void *data EINA_UNUSED, int type, void *event)
 {
        mmi_provider_event_key *ev = (mmi_provider_event_key *)event;
        _I("[key event] code : %d, name : %s, type : %d, timestamp : %d, source: %s", ev->keycode, ev->keyname, ev->type, ev->timestamp, ev->source);
@@ -121,7 +121,7 @@ static Eina_Bool _key_event_cb(void *data EINA_UNUSED, int type, void *event)
        return ECORE_CALLBACK_PASS_ON;
 }
 
-static Eina_Bool _gesture_event_cb(void *data EINA_UNUSED, int type, void *event)
+static Eina_Bool __gesture_event_cb(void *data EINA_UNUSED, int type, void *event)
 {
        mmi_provider_event_gesture *ev = (mmi_provider_event_gesture *)event;
        _I("[gesture event] type : %d, timestamp : %d", ev->type, ev->timestamp);
@@ -131,7 +131,7 @@ static Eina_Bool _gesture_event_cb(void *data EINA_UNUSED, int type, void *event
        return ECORE_CALLBACK_PASS_ON;
 }
 
-static Eina_Bool _voice_event_cb(void *data EINA_UNUSED, int type, void *event)
+static Eina_Bool __voice_event_cb(void *data EINA_UNUSED, int type, void *event)
 {
        mmi_provider_event_voice *ev = (mmi_provider_event_voice *)event;
        _I("[voice event] type : %d, timestamp : %d", ev->type, ev->timestamp);
@@ -141,7 +141,7 @@ static Eina_Bool _voice_event_cb(void *data EINA_UNUSED, int type, void *event)
        return ECORE_CALLBACK_PASS_ON;
 }
 
-static Eina_Bool _vision_event_cb(void *data EINA_UNUSED, int type, void *event)
+static Eina_Bool __vision_event_cb(void *data EINA_UNUSED, int type, void *event)
 {
        mmi_provider_event_vision *ev = (mmi_provider_event_vision *)event;
 
@@ -150,7 +150,7 @@ static Eina_Bool _vision_event_cb(void *data EINA_UNUSED, int type, void *event)
        return ECORE_CALLBACK_PASS_ON;
 }
 
-static Eina_Bool _screen_analyzer_event_cb(void *data EINA_UNUSED, int type, void *event)
+static Eina_Bool __screen_analyzer_event_cb(void *data EINA_UNUSED, int type, void *event)
 {
        mmi_provider_event_screen_analyzer *ev = (mmi_provider_event_screen_analyzer *)event;
        _I("[Screen analyzer] Number of items : %d, type : %d, timestamp : %d", ev->n_items, ev->type, ev->timestamp);
@@ -160,7 +160,7 @@ static Eina_Bool _screen_analyzer_event_cb(void *data EINA_UNUSED, int type, voi
        return ECORE_CALLBACK_PASS_ON;
 }
 
-static void shutdown_event_handler()
+static void __shutdown_event_handler()
 {
        _I("Shutdown event handlers");
        for (int i = 0; i < EVENT_HANDLER_MAX; i++) {
@@ -171,24 +171,24 @@ static void shutdown_event_handler()
        }
 }
 
-static void init_event_handler()
+static void __init_event_handler()
 {
        _I("Initialize event handlers");
        _event_handlers[EVENT_HANDLER_FOCUS_CHANGE] = ecore_event_handler_add(MMI_MANAGER_EVENT_FOCUS_CHANGE,
-                               _focus_change_cb, NULL);
+                               __focus_change_cb, NULL);
        _event_handlers[EVENT_HANDLER_STATE_CHANGE] = ecore_event_handler_add(MMI_MANAGER_EVENT_STATE_CHANGE,
-                               _state_change_cb, NULL);
+                               __state_change_cb, NULL);
 
        _event_handlers[EVENT_HANDLER_KEY] = ecore_event_handler_add(MMI_PROVIDER_EVENT_KEY,
-                               _key_event_cb, NULL);
+                               __key_event_cb, NULL);
        _event_handlers[EVENT_HANDLER_GESTURE] = ecore_event_handler_add(MMI_PROVIDER_EVENT_GESTURE,
-                               _gesture_event_cb, NULL);
+                               __gesture_event_cb, NULL);
        _event_handlers[EVENT_HANDLER_VOICE] = ecore_event_handler_add(MMI_PROVIDER_EVENT_VOICE,
-                               _voice_event_cb, NULL);
+                               __voice_event_cb, NULL);
        _event_handlers[EVENT_HANDLER_VISION] = ecore_event_handler_add(MMI_PROVIDER_EVENT_VISION,
-                               _vision_event_cb, NULL);
+                               __vision_event_cb, NULL);
        _event_handlers[EVENT_HANDLER_SCREEN_ANALYZER] = ecore_event_handler_add(MMI_PROVIDER_EVENT_SCREEN_ANALYZER,
-                               _screen_analyzer_event_cb, NULL);
+                               __screen_analyzer_event_cb, NULL);
 }
 
 int mmi_core_init()
@@ -201,15 +201,15 @@ int mmi_core_init()
                return ret;
        }
 
-       init_event_handler();
+       __init_event_handler();
 
-       ret = mmi_iu_set_output_intent_received_callback(output_result_received_cb, NULL);
+       ret = mmi_iu_set_output_intent_received_callback(__output_result_received_cb, NULL);
        if (ret != MMI_IU_ERROR_NONE) {
                _E("Error code : %d", ret);
                return ret;
        }
 
-       ret = mmi_iu_set_output_event_received_callback(output_modality_received_cb, NULL);
+       ret = mmi_iu_set_output_event_received_callback(__output_modality_received_cb, NULL);
        if (ret != MMI_IU_ERROR_NONE) {
                _E("Error code : %d", ret);
                return ret;
@@ -221,7 +221,7 @@ int mmi_core_init()
 int mmi_core_shutdown()
 {
        _I("Shutdown MMI core module");
-       shutdown_event_handler();
+       __shutdown_event_handler();
 
        int ret = mmi_iu_shutdown();
        return ret;