remove related fusion module 00/281600/1
authordyamy-lee <dyamy.lee@samsung.com>
Wed, 14 Sep 2022 11:33:27 +0000 (20:33 +0900)
committerTizen AI <ai.tzn.sec@samsung.com>
Tue, 20 Sep 2022 04:53:20 +0000 (13:53 +0900)
remove ref-fusion module, mmi-fusion in mmimgr.
also, remove ref-fusion-tests.

Change-Id: Ic1f734096e34d8fab99a632011b0ce06de013968

17 files changed:
meson.build
packaging/mmi-manager.spec
src/mmimgr/meson.build
src/mmimgr/mmi-common.h
src/mmimgr/mmi-fusion-iface.h [deleted file]
src/mmimgr/mmi-fusion.c [deleted file]
src/mmimgr/mmi-fusion.h [deleted file]
src/mmimgr/mmi-manager.c
src/modules/ref_fusion/meson.build [deleted file]
src/modules/ref_fusion/mmi-ref-fusion.c [deleted file]
src/modules/ref_fusion/mmi-ref-fusion.h [deleted file]
tests/meson.build
tests/mmi-fusion-tests.cpp [deleted file]
tests/ref-fusion/main.cpp [deleted file]
tests/ref-fusion/main.h [deleted file]
tests/ref-fusion/meson.build [deleted file]
tests/ref-fusion/mmi-ref-fusion-tests.cpp [deleted file]

index 3d4bf73..d59aa3c 100644 (file)
@@ -19,10 +19,8 @@ install_data('mmi-manager.xml', install_dir:'/usr/share/packages/')
 
 subdir('src/mmimgr')
 subdir('src/bin')
-subdir('src/modules/ref_fusion')
 subdir('src/modules/modality_keyboard')
 subdir('src/modules/modality_vision')
 subdir('tests')
 subdir('tests/keyboard-provider')
 subdir('tests/vision-provider')
-subdir('tests/ref-fusion')
index ff4cafe..89ad182 100644 (file)
@@ -86,7 +86,6 @@ mkdir -p %{buildroot}%{_libdir}/provider
 %{_datadir}/iu/*
 %{_datadir}/mmi-provider/*
 %{_libdir}/provider/libmmi*.so
-%{_libdir}/fusion/libmmi*.so
 %{_datadir}/packages/%{name}.xml
 
 %files devel
@@ -102,4 +101,3 @@ mkdir -p %{buildroot}%{_libdir}/provider
 %{_bindir}/mmi-manager-tests
 %{_bindir}/modality_keyboard-tests
 %{_bindir}/modality_vision-tests
-%{_bindir}/ref_fusion-tests
index 306c793..2772a55 100644 (file)
@@ -12,9 +12,6 @@ mmimgr_srcs = [
        'mmi-provider.c',
        'mmi-provider.h',
        'mmi-provider-iface.h',
-       'mmi-fusion.c',
-       'mmi-fusion.h',
-       'mmi-fusion-iface.h',
        'mmi-manager-dbg.h',
        'mmi_stub.h',
        'mmi_stub.c',
@@ -47,7 +44,6 @@ install_headers(
        'mmi-manager-dbg.h',
        'mmi-common.h',
        'mmi-provider-iface.h',
-       'mmi-fusion-iface.h'
        )
 
 install_data('iu/data/default_rule.json', install_dir : '/usr/share/iu/')
index b2bafe1..d45094c 100644 (file)
@@ -343,10 +343,6 @@ typedef struct _mmi_provider_module_data mmi_provider_module_data;
 typedef struct _mmi_provider_module mmi_provider_module;
 typedef struct _mmi_provider_handle mmi_provider_handle;
 
-typedef struct _mmi_fusion_module_data mmi_fusion_module_data;
-typedef struct _mmi_fusion_module mmi_fusion_module;
-typedef struct _mmi_fusion_handle mmi_fusion_handle;
-
 #define TIZEN_ERROR_MMI        -0x030F0000
 
 typedef enum {
diff --git a/src/mmimgr/mmi-fusion-iface.h b/src/mmimgr/mmi-fusion-iface.h
deleted file mode 100644 (file)
index bb5d7b6..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-* Copyright © 2021 Samsung Electronics co., Ltd. All Rights Reserved.
-*
-* Permission is hereby granted, free of charge, to any person obtaining a
-* copy of this software and associated documentation files (the "Software"),
-* to deal in the Software without restriction, including without limitation
-* the rights to use, copy, modify, merge, publish, distribute, sublicense,
-* and/or sell copies of the Software, and to permit persons to whom the
-* Software is furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice (including the next
-* paragraph) shall be included in all copies or substantial portions of the
-* Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-* DEALINGS IN THE SOFTWARE.
-*/
-
-#ifndef __MMI_FUSION_IFACE_H__
-#define __MMI_FUSION_IFACE_H__
-
-#include "mmi-common.h"
-
-#define MMI_FUSION_ABI_MAJOR_MASK     0xFFFF0000
-#define MMI_FUSION_ABI_MINOR_MASK     0x0000FFFF
-
-#define MMI_FUSION_GET_ABI_MAJOR(m)   (((m) & MMI_FUSION_ABI_MAJOR_MASK) >> 16)
-#define MMI_FUSION_GET_ABI_MINOR(m)   ((m) & MMI_FUSION_ABI_MINOR_MASK)
-
-#define MMI_FUSION_SET_ABI_VERSION(major, minor)      \
-                ((((major) << 16) & MMI_FUSION_ABI_MAJOR_MASK) \
-                 | ((minor) & MMI_FUSION_ABI_MINOR_MASK))
-
-#define MMI_FUSION_API __attribute__ ((visibility("default")))
-
-struct _mmi_fusion_module
-{
-       const char *name; /**< The name of a fusion module */
-       const char *so_name; /**< The shared library name of a fusion module */
-       unsigned long abi_version; /**< The API version of a fusion module */
-
-       mmi_fusion_module_data *(*fusion_init)(void);
-       void (*fusion_deinit)(mmi_fusion_module_data *fusion_data);
-};
-
-struct _mmi_fusion_handle
-{
-       void *fusion_info;
-       mmi_fusion_module *module_info;
-       mmi_fusion_module_data *module_data;
-       mmi_state state;
-};
-
-struct _mmi_fusion_module_data
-{
-       mmi_state (*set_state)(mmi_state state);
-       mmi_state (*get_state)(void);
-};
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-//APIs for fusions
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__MMI_FUSION_IFACE_H__
diff --git a/src/mmimgr/mmi-fusion.c b/src/mmimgr/mmi-fusion.c
deleted file mode 100644 (file)
index 47acdca..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
-* Copyright © 2021 Samsung Electronics co., Ltd. All Rights Reserved.
-*
-* Permission is hereby granted, free of charge, to any person obtaining a
-* copy of this software and associated documentation files (the "Software"),
-* to deal in the Software without restriction, including without limitation
-* the rights to use, copy, modify, merge, publish, distribute, sublicense,
-* and/or sell copies of the Software, and to permit persons to whom the
-* Software is furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice (including the next
-* paragraph) shall be included in all copies or substantial portions of the
-* Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-* DEALINGS IN THE SOFTWARE.
-*/
-
-#include "mmi-fusion.h"
-#include "mmi-fusion-iface.h"
-#include "mmi-manager-dbg.h"
-
-#include <Ecore.h>
-#include <dirent.h>
-#include <stdio.h>
-#include <dlfcn.h>
-#include <string.h>
-
-Eina_List *_fusion_list = NULL;
-int _loaded_fusion_cnt = 0;
-mmi_fusion_handle *_cur_fusion = NULL;
-
-int
-_fusion_load_module(const char *fusion_name)
-{
-       mmi_fusion_handle *fusion = (mmi_fusion_handle *)calloc(1, sizeof(mmi_fusion_handle));
-
-       if (!fusion)
-       {
-               LOGE("Failed to alloc fusion handle");
-               return 0;
-       }
-
-       void *fusion_info = NULL;
-       mmi_fusion_module *mmi_fusion_module_info = NULL;
-
-       fusion_info = dlopen(fusion_name, RTLD_LAZY);
-
-       if(!fusion_info)
-       {
-               LOGE("Failed to dlopen(error :%s, path :%s)!\n", dlerror(), fusion_name);
-               goto err;
-       }
-
-       mmi_fusion_module_info = dlsym(fusion_info, "mmi_fusion_module_info");
-
-       if(!mmi_fusion_module_info)
-       {
-               LOGE("Module(%s) dosen't have mmi_fusion_module_info \n", fusion_name);
-               goto err;
-       }
-
-       if(!mmi_fusion_module_info->fusion_init || !mmi_fusion_module_info->fusion_deinit)
-       {
-               LOGE("Module(%s) doesn't have init/deinit function\n", fusion_name);
-               goto err;
-       }
-
-       ++_loaded_fusion_cnt;
-
-       fusion->fusion_info = fusion_info;
-       fusion->module_info = mmi_fusion_module_info;
-
-       //FIXME: init() of a fusion module needs to be called in mmi-manager
-       //Right now, we initiate a fusion module found for the first time.
-       if (_loaded_fusion_cnt == 1)
-       {
-               fusion->module_data = fusion->module_info->fusion_init();
-               if (!fusion->module_data)
-               {
-                       LOGE("Failed to init of a fusion module (name:%s) !\n", fusion->module_info->name);
-                       goto err;
-               }
-               _cur_fusion = fusion;
-       }
-
-       _fusion_list = eina_list_append(_fusion_list, fusion);
-
-       return 1;
-
-err:
-       if(fusion_info)
-               dlclose(fusion_info);
-
-       if(fusion)
-               free(fusion);
-       return 0;
-}
-
-int
-_modality_fusions_lookup(void)
-{
-       int cnt = 0;
-       DIR *dir;
-       struct dirent *entry;
-
-       dir = opendir(FUSION_PATH);
-
-       if(!dir)
-       {
-               LOGE("no dir = %s\n", FUSION_PATH);
-               return -1;
-       }
-
-       while((entry = readdir(dir)) != NULL)
-       {
-               char fusion_name[512];
-               if(strstr(entry->d_name, "fusion") != NULL)
-               {
-                       snprintf(fusion_name, sizeof(fusion_name), "%s%s", FUSION_PATH, entry->d_name);
-                       LOGD("Fusion full path = %s\n", fusion_name);
-                       cnt += _fusion_load_module(fusion_name);
-               }
-       }
-
-       closedir(dir);
-
-       return cnt;
-}
-
-mmi_fusion_handle *
-modality_fusions_get_client_fusion(mmi_client *client)
-{
-       return _cur_fusion;
-}
-
-mmi_state
-modality_fusion_get_state(mmi_fusion_handle *fusion)
-{
-       mmi_state state = MMI_STATE_NONE;
-
-       if (!fusion)
-       {
-               LOGE("Given fusion handle is invalid !\n");
-               return state;
-       }
-
-       state = fusion->module_data->get_state();
-       return state;
-}
-
-mmi_state
-modality_fusion_set_state(mmi_fusion_handle *fusion, mmi_state state)
-{
-       if (!fusion)
-       {
-               LOGE("Given fusion handle is invalid !\n");
-               return MMI_STATE_NONE;
-       }
-
-       return fusion->module_data->set_state(state);
-}
-
-
-void
-modality_fusions_init(void)
-{
-       int fusion_cnt = -1;
-
-       LOGD("FUSION_PATH=%s\n", FUSION_PATH);
-
-       fusion_cnt = _modality_fusions_lookup();
-
-       if(fusion_cnt < 0)
-       {
-               LOGE("No find any fusion in path = %s\n", FUSION_PATH);
-               return;
-       }
-
-       LOGD("%d fusion modules have been loaded !\n", fusion_cnt);
-}
-
-void
-modality_fusions_shutdown(void)
-{
-       if(!_fusion_list)
-               return;
-
-       Eina_List *l = NULL;
-       mmi_fusion_handle *fusion = NULL;
-       EINA_LIST_FOREACH(_fusion_list, l, fusion)
-       {
-               if(fusion->module_info)
-               {
-                       if(fusion->module_data)
-                               fusion->module_info->fusion_deinit(fusion->module_data);
-                       fusion->module_data = NULL;
-                       fusion->module_info = NULL;
-               }
-               if(fusion->fusion_info)
-                       dlclose(fusion->fusion_info);
-       }
-
-       _fusion_list = eina_list_free(_fusion_list);
-       _fusion_list = NULL;
-       _loaded_fusion_cnt = 0;
-       _cur_fusion = NULL;
-}
diff --git a/src/mmimgr/mmi-fusion.h b/src/mmimgr/mmi-fusion.h
deleted file mode 100644 (file)
index 328c85b..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-* Copyright © 2021 Samsung Electronics co., Ltd. All Rights Reserved.
-*
-* Permission is hereby granted, free of charge, to any person obtaining a
-* copy of this software and associated documentation files (the "Software"),
-* to deal in the Software without restriction, including without limitation
-* the rights to use, copy, modify, merge, publish, distribute, sublicense,
-* and/or sell copies of the Software, and to permit persons to whom the
-* Software is furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice (including the next
-* paragraph) shall be included in all copies or substantial portions of the
-* Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-* DEALINGS IN THE SOFTWARE.
-*/
-
-#ifndef __MMI_FUSION_H__
-#define __MMI_FUSION_H__
-
-#include "mmi-common.h"
-#include "mmi-client.h"
-
-mmi_fusion_handle *modality_fusions_get_client_fusion(mmi_client *client);
-mmi_state modality_fusion_get_state(mmi_fusion_handle *fusion);
-mmi_state modality_fusion_set_state(mmi_fusion_handle *fusion, mmi_state state);
-
-void modality_fusions_init(void);
-void modality_fusions_shutdown(void);
-
-#endif //__MMI_FUSION_H__
index 3f2b602..5998ffb 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "mmi-manager.h"
 #include "mmi-core.h"
-#include "mmi-fusion.h"
 #include "mmi-provider.h"
 #include "mmi-common.h"
 #include "mmi-manager-dbg.h"
@@ -70,7 +69,6 @@ mmi_manager_init()
 
        mmi_core_init();
        modality_providers_init();
-       modality_fusions_init();
        client_manager_init();
        mmi_api_handler_initialize();
 
@@ -117,7 +115,6 @@ mmi_manager_shutdown()
 
        mmi_api_handler_deinitialize();
        client_manager_shutdown();
-       modality_fusions_shutdown();
        modality_providers_shutdown();
        mmi_core_shutdown();
 
diff --git a/src/modules/ref_fusion/meson.build b/src/modules/ref_fusion/meson.build
deleted file mode 100644 (file)
index d6fdca8..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-ref_fusion_srcs = [
-       'mmi-ref-fusion.h',
-       'mmi-ref-fusion.c',
-       ]
-
-ref_fusion_include_dirs = include_directories('.')
-
-glib_dep = dependency('glib-2.0', method : 'pkg-config')
-dlog_dep = dependency('dlog', method : 'pkg-config')
-ecore_dep = dependency('ecore', method : 'pkg-config')
-
-ref_fusion_deps = [
-       glib_dep,
-       dlog_dep,
-       ecore_dep,
-       mmimgr_declared_dep
-       ]
-
-mmi_fusion_prefix_libdir = join_paths(mmi_manager_prefix_libdir, 'fusion')
-
-ref_fusion_shared = shared_library(
-       'mmi_ref_fusion',
-       ref_fusion_srcs,
-       include_directories : [ref_fusion_include_dirs],
-       dependencies : [ref_fusion_deps],
-       install_dir : mmi_fusion_prefix_libdir,
-       install : true,
-       #pie : true
-       )
-
-reffusion_declared_dep = declare_dependency(
-       link_with : ref_fusion_shared,
-       dependencies : [ ref_fusion_deps ],
-       include_directories : [ ref_fusion_include_dirs ]
-       )
diff --git a/src/modules/ref_fusion/mmi-ref-fusion.c b/src/modules/ref_fusion/mmi-ref-fusion.c
deleted file mode 100644 (file)
index b22878a..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
-* Copyright © 2021 Samsung Electronics co., Ltd. All Rights Reserved.
-*
-* Permission is hereby granted, free of charge, to any person obtaining a
-* copy of this software and associated documentation files (the "Software"),
-* to deal in the Software without restriction, including without limitation
-* the rights to use, copy, modify, merge, publish, distribute, sublicense,
-* and/or sell copies of the Software, and to permit persons to whom the
-* Software is furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice (including the next
-* paragraph) shall be included in all copies or substantial portions of the
-* Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-* DEALINGS IN THE SOFTWARE.
-*/
-
-#include "mmi-ref-fusion.h"
-#include <mmi-client.h>
-#include <mmi-manager.h>
-#include <mmi-provider.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <Ecore.h>
-
-unsigned long long state_caps[MMI_STATE_TERMINATION+1] =
-{
-       //MMI_STATE_NONE
-       MODALITY_PROVIDER_CAP_NONE,
-       //MMI_STATE_INITIATION
-       MODALITY_PROVIDER_CAP_KEY_EVENT |
-       MODALITY_PROVIDER_CAP_VOICE_EVENT |
-       MODALITY_PROVIDER_CAP_GESTURE_EVENT,
-       //MMI_STATE_EXPLORATION
-       MODALITY_PROVIDER_CAP_KEY_EVENT |
-       MODALITY_PROVIDER_CAP_VOICE_EVENT |
-       MODALITY_PROVIDER_CAP_GESTURE_EVENT,
-       //MMI_STATE_EXECUTION
-       MODALITY_PROVIDER_CAP_KEY_EVENT |
-       MODALITY_PROVIDER_CAP_VOICE_EVENT |
-       MODALITY_PROVIDER_CAP_GESTURE_EVENT,
-       //MMI_STATE_FEEDBACK
-       MODALITY_PROVIDER_CAP_KEY_EVENT |
-       MODALITY_PROVIDER_CAP_VOICE_EVENT |
-       MODALITY_PROVIDER_CAP_GESTURE_EVENT,
-       //MMI_STATE_OBSERVATION
-       MODALITY_PROVIDER_CAP_VOICE_EVENT |
-       MODALITY_PROVIDER_CAP_GESTURE_EVENT |
-       MODALITY_PROVIDER_CAP_VISION_EVENT,
-       //MMI_STATE_TERMINATION
-       MODALITY_PROVIDER_CAP_KEY_EVENT |
-       MODALITY_PROVIDER_CAP_VOICE_EVENT |
-       MODALITY_PROVIDER_CAP_GESTURE_EVENT |
-       MODALITY_PROVIDER_CAP_VISION_EVENT
-};
-
-mmi_client *_focus_client = NULL;
-mmi_state _prev_state = MMI_STATE_NONE;
-mmi_state _state = MMI_STATE_NONE;
-static Ecore_Event_Handler *_event_handlers;
-
-static Eina_Bool
-_focus_change_cb(void *data EINA_UNUSED, int type, void *event)
-{
-       int r;
-       mmi_state state = MMI_STATE_NONE;
-       unsigned long long caps = MODALITY_PROVIDER_CAP_NONE;
-
-       LOGI("...");
-
-       mmi_manager_event_focus_change *ev = (mmi_manager_event_focus_change *)event;
-
-       if (ev->cur_focus && ev->cur_focus != _focus_client)
-       {
-               LOGE("Abnormal situation ! (_focus_client=%p, ev->cur_focus=%p)\n",
-                       _focus_client, ev->cur_focus);
-               return ECORE_CALLBACK_PASS_ON;
-       }
-
-       if (!ev->cur_focus && !ev->new_focus){
-               state = _state;
-               _state = MMI_STATE_NONE;
-       }
-       else if (ev->cur_focus)
-       {
-               //Set op_mode to MODALITY_PROVIDER_MODE_DROP_EVENT
-               //state = client_manager_get_client_state(ev->cur_focus);
-               LOGI("state=%d, ev->cur_focus(%p) !\n", state, ev->cur_focus);
-       }
-
-       if (state != MMI_STATE_NONE)
-       {
-               caps = state_caps[state];
-               LOGI("caps=%llu!\n", caps);
-
-               r = mmi_provider_set_op_mode_on_caps(caps, MODALITY_PROVIDER_MODE_DROP_EVENT);
-               if (r)
-               {
-                       LOGE("Failed on setting op_mode(%d) on caps(%llu) !\n",
-                               MODALITY_PROVIDER_MODE_DROP_EVENT, caps);
-                       return ECORE_CALLBACK_PASS_ON;
-               }
-       }
-
-       _focus_client = ev->new_focus;
-
-       return ECORE_CALLBACK_PASS_ON;
-}
-
-static mmi_fusion_module_data *
-ref_fusion_init(void)
-{
-       mmi_fusion_module_data *ref_fusion_data = NULL;
-       LOGD("ref fusion init \n");
-
-       ref_fusion_data = (mmi_fusion_module_data *)calloc(1, sizeof(mmi_fusion_module_data));
-       if(!ref_fusion_data)
-       {
-               LOGE("Failed alloc ref fusion data \n");
-               return NULL;
-       }
-
-       ref_fusion_data->get_state = ref_fusion_get_state;
-       ref_fusion_data->set_state = ref_fusion_set_state;
-
-       _event_handlers = ecore_event_handler_add(MMI_MANAGER_EVENT_FOCUS_CHANGE,
-                       _focus_change_cb, NULL);
-
-       return ref_fusion_data;
-}
-
-mmi_state
-ref_fusion_set_state(mmi_state state)
-{
-       int r;
-       unsigned long long caps = MODALITY_PROVIDER_CAP_NONE;
-
-       LOGD("ref_fusion_set_state(%d)\n", state);
-
-       if (state == _state)
-       {
-               LOGE("Given state equals to existing state(%d) !\n", _state);
-               return _state;
-       }
-
-       if (_state != MMI_STATE_NONE)
-       {
-               //Set op_mode to MODALITY_PROVIDER_MODE_DROP_EVENT
-               caps  = state_caps[_state];
-
-               r = mmi_provider_set_op_mode_on_caps(caps, MODALITY_PROVIDER_MODE_DROP_EVENT);
-               if (r)
-               {
-                       LOGE("Failed on setting op_mode(%d) on caps(%llu) !\n",
-                               MODALITY_PROVIDER_MODE_DROP_EVENT, caps);
-               }
-       }
-
-       if (state != MMI_STATE_NONE)
-       {
-               //Set op_mode to MODALITY_PROVIDER_MODE_PROPAGATE_EVENT
-               caps  = state_caps[state];
-
-               r = mmi_provider_set_op_mode_on_caps(caps, MODALITY_PROVIDER_MODE_PROPAGATE_EVENT);
-               if (r)
-               {
-                       LOGE("Failed on setting op_mode(%d) on caps(%llu) !\n",
-                               MODALITY_PROVIDER_MODE_PROPAGATE_EVENT, caps);
-               }
-
-       }
-
-       _state = state;
-       return _state;
-}
-
-mmi_state
-ref_fusion_get_state(void)
-{
-       LOGD("ref_fusion_get_state(%d)\n", _state);
-       return _state;
-}
-
-static void
-ref_fusion_deinit(mmi_fusion_module_data *module_data)
-{
-       if(!module_data)
-       {
-               LOGE("No have module data\n");
-               return;
-       }
-
-       LOGD("ref_fusion_deinit\n");
-
-       ecore_event_handler_del(_event_handlers);
-       _event_handlers = NULL;
-
-       module_data->get_state = NULL;
-       module_data->set_state = NULL;
-
-       free(module_data);
-       module_data = NULL;
-}
-
-MMI_FUSION_API mmi_fusion_module mmi_fusion_module_info = {
-       "ref_fusion",
-       "libmmi_ref_fusion.so",
-       MMI_FUSION_SET_ABI_VERSION(1,0),
-       ref_fusion_init,
-       ref_fusion_deinit
-};
diff --git a/src/modules/ref_fusion/mmi-ref-fusion.h b/src/modules/ref_fusion/mmi-ref-fusion.h
deleted file mode 100644 (file)
index e42fd7f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-* Copyright © 2021 Samsung Electronics co., Ltd. All Rights Reserved.
-*
-* Permission is hereby granted, free of charge, to any person obtaining a
-* copy of this software and associated documentation files (the "Software"),
-* to deal in the Software without restriction, including without limitation
-* the rights to use, copy, modify, merge, publish, distribute, sublicense,
-* and/or sell copies of the Software, and to permit persons to whom the
-* Software is furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice (including the next
-* paragraph) shall be included in all copies or substantial portions of the
-* Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-* DEALINGS IN THE SOFTWARE.
-*/
-
-#ifndef __MMI_REF_FUSION_H__
-#define __MMI_REF_FUSION_H__
-
-#include <mmi-common.h>
-#include <mmi-fusion-iface.h>
-#include <mmi-manager-dbg.h>
-
-mmi_state ref_fusion_set_state(mmi_state state);
-mmi_state ref_fusion_get_state(void);
-
-#endif //__MMI_REF_FUSION_H__
index d7607b3..0448ef0 100644 (file)
@@ -2,7 +2,6 @@ mmi_manager_tests_srcs = [
        'mmi-manager-tests.cpp',
        'mmi-provider-tests.cpp',
        'mmi-client-tests.cpp',
-       'mmi-fusion-tests.cpp',
        'mmi-manager-main-tests.cpp',
        'ecore-event-dispatcher.cpp',
        'iu/intent_understanding_engine_rule_unittests.cpp',
diff --git a/tests/mmi-fusion-tests.cpp b/tests/mmi-fusion-tests.cpp
deleted file mode 100644 (file)
index 1a801c0..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-* Copyright © 2021 Samsung Electronics co., Ltd. All Rights Reserved.
-*
-* Permission is hereby granted, free of charge, to any person obtaining a
-* copy of this software and associated documentation files (the "Software"),
-* to deal in the Software without restriction, including without limitation
-* the rights to use, copy, modify, merge, publish, distribute, sublicense,
-* and/or sell copies of the Software, and to permit persons to whom the
-* Software is furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice (including the next
-* paragraph) shall be included in all copies or substantial portions of the
-* Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-* DEALINGS IN THE SOFTWARE.
-*/
-#include "mmi-manager-tests.h"
-extern "C" {
-#include "mmi-fusion.h"
-}
-
-#include <Ecore.h>
-#include <dirent.h>
-#include <dlfcn.h>
-
-class MMIFusionTest : public ::testing::Test
-{
-public:
-       void SetUp(void) override
-       {
-               ecore_init();
-       }
-
-       void TearDown(void) override
-       {
-               ecore_shutdown();
-       }
-};
-
-TEST_F(MMIFusionTest, MMIFusionInitShutdown)
-{
-       int res = 0;
-       modality_fusions_init();
-       res = 1;
-
-       EXPECT_EQ(res, 1);
-
-       modality_fusions_shutdown();
-}
-
-TEST_F(MMIFusionTest, MMIFusionGetClientFusion)
-{
-       mmi_fusion_handle *fusion = NULL;
-       mmi_client *client = NULL;
-
-       modality_fusions_init();
-
-       fusion = modality_fusions_get_client_fusion(client);
-       EXPECT_NE(fusion, nullptr);
-
-       modality_fusions_shutdown();
-}
-
-TEST_F(MMIFusionTest, MMIFusionSetGetState)
-{
-       mmi_state state = MMI_STATE_NONE;
-       mmi_fusion_handle *fusion = NULL;
-       mmi_client *client = NULL;
-
-       modality_fusions_init();
-
-       fusion = modality_fusions_get_client_fusion(client);
-       EXPECT_NE(fusion, nullptr);
-
-       state = modality_fusion_get_state(NULL);
-       EXPECT_EQ(state, MMI_STATE_NONE);
-
-       //set_state Fail Case
-       state = MMI_STATE_NONE;
-       state = modality_fusion_set_state(NULL, MMI_STATE_INITIATION);
-       EXPECT_EQ(state, MMI_STATE_NONE);
-
-       //set_state Success Case
-       state = MMI_STATE_NONE;
-       state = modality_fusion_set_state(fusion, MMI_STATE_INITIATION);
-       EXPECT_EQ(state, MMI_STATE_INITIATION);
-
-       //get_state Fail Case
-       state = modality_fusion_get_state(NULL);
-       EXPECT_EQ(state, MMI_STATE_NONE);
-
-       //get_state Success Case
-       state = modality_fusion_get_state(fusion);
-       EXPECT_EQ(state, MMI_STATE_INITIATION);
-
-       modality_fusions_shutdown();
-}
diff --git a/tests/ref-fusion/main.cpp b/tests/ref-fusion/main.cpp
deleted file mode 100644 (file)
index 3187c80..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-* Copyright © 2021 Samsung Electronics co., Ltd. All Rights Reserved.
-*
-* Permission is hereby granted, free of charge, to any person obtaining a
-* copy of this software and associated documentation files (the "Software"),
-* to deal in the Software without restriction, including without limitation
-* the rights to use, copy, modify, merge, publish, distribute, sublicense,
-* and/or sell copies of the Software, and to permit persons to whom the
-* Software is furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice (including the next
-* paragraph) shall be included in all copies or substantial portions of the
-* Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-* DEALINGS IN THE SOFTWARE.
-*/
-
-#include "main.h"
-
-int main(int argc, char **argv)
-{
-       auto testResults = false;
-
-#ifdef TIZEN_TEST_GCOV
-        setenv("GCOV_PREFIX", "/tmp", 1);
-#endif
-       try
-       {
-               ::testing::InitGoogleMock(&argc, argv);
-               ::testing::FLAGS_gtest_death_test_style = "fast";
-       }
-       catch ( ... )
-       {
-               PRINT("Error occurred while trying to initialize GoogleTest.\n");
-               exit(EXIT_FAILURE);
-       }
-
-       try
-       {
-               testResults = (RUN_ALL_TESTS() == 0) ? true : false;
-       }
-       catch (const ::testing::internal::GoogleTestFailureException &e)
-       {
-               testResults = false;
-               PRINT("GoogleTestFailureException has been thrown: %s\n", e.what());
-       }
-
-#ifdef TIZEN_TEST_GCOV
-        __gcov_flush();
-#endif
-       return testResults;
-}
-
diff --git a/tests/ref-fusion/main.h b/tests/ref-fusion/main.h
deleted file mode 100644 (file)
index 9a9fcc6..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
-* Copyright © 2021 Samsung Electronics co., Ltd. All Rights Reserved.
-*
-* Permission is hereby granted, free of charge, to any person obtaining a
-* copy of this software and associated documentation files (the "Software"),
-* to deal in the Software without restriction, including without limitation
-* the rights to use, copy, modify, merge, publish, distribute, sublicense,
-* and/or sell copies of the Software, and to permit persons to whom the
-* Software is furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice (including the next
-* paragraph) shall be included in all copies or substantial portions of the
-* Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-* DEALINGS IN THE SOFTWARE.
-*/
-
-#ifndef __MMI_REF_FUSION_TESTS_H__
-#define __MMI_REF_FUSION_TESTS_H__
-
-#include <stdio.h>
-#include <gmock/gmock.h>
-#include <Ecore.h>
-
-#define PRINT printf
-
-#ifdef TIZEN_TEST_GCOV
-extern "C" void __gcov_flush(void);
-#endif
-
-using ::testing::TestWithParam;
-using ::testing::Bool;
-using ::testing::Values;
-using ::testing::Combine;
-
-#endif //__MMI_REF_FUSION_TESTS_H__
diff --git a/tests/ref-fusion/meson.build b/tests/ref-fusion/meson.build
deleted file mode 100644 (file)
index 1bea49d..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-ref_fusion_tests_srcs = [
-       'main.cpp',
-       'mmi-ref-fusion-tests.cpp'
-       ]
-
-gmock_dep = dependency('gmock', method : 'pkg-config')
-ecore_dep = dependency('ecore', method : 'pkg-config')
-
-ref_fusion_tests_rpath = ('/' + get_option('libdir') + '/fusion/')
-
-executable(
-       'ref_fusion-tests',
-       ref_fusion_tests_srcs,
-       dependencies : [mmimgr_declared_dep, reffusion_declared_dep, gmock_dep, ecore_dep],
-       install_rpath: ref_fusion_tests_rpath,
-       install_dir : mmi_manager_prefix_bindir,
-       install : true
-       )
diff --git a/tests/ref-fusion/mmi-ref-fusion-tests.cpp b/tests/ref-fusion/mmi-ref-fusion-tests.cpp
deleted file mode 100644 (file)
index 6a8c131..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-* Copyright © 2021 Samsung Electronics co., Ltd. All Rights Reserved.
-*
-* Permission is hereby granted, free of charge, to any person obtaining a
-* copy of this software and associated documentation files (the "Software"),
-* to deal in the Software without restriction, including without limitation
-* the rights to use, copy, modify, merge, publish, distribute, sublicense,
-* and/or sell copies of the Software, and to permit persons to whom the
-* Software is furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice (including the next
-* paragraph) shall be included in all copies or substantial portions of the
-* Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-* DEALINGS IN THE SOFTWARE.
-*/
-
-#include "main.h"
-
-extern "C" {
-#include "mmi-ref-fusion.h"
-}
-
-#include <Ecore.h>
-#include <string.h>
-#include <gtest/gtest.h>
-
-class MMIRefFusionTest : public ::testing::Test
-{
-public:
-       void SetUp(void) override
-       {
-               ecore_init();
-       }
-
-       void TearDown(void) override
-       {
-               ecore_shutdown();
-       }
-};
-
-TEST_F(MMIRefFusionTest, MMIRefFusionSetGetMode)
-{
-       mmi_state state = MMI_STATE_NONE;
-
-       state = ref_fusion_set_state(MMI_STATE_INITIATION);
-       EXPECT_EQ(state, MMI_STATE_INITIATION);
-
-       state = MMI_STATE_NONE;
-       state = ref_fusion_get_state();
-       EXPECT_EQ(state, MMI_STATE_INITIATION);
-
-       state = ref_fusion_set_state(MMI_STATE_EXPLORATION);
-       EXPECT_EQ(state, MMI_STATE_EXPLORATION);
-
-       state = ref_fusion_set_state(MMI_STATE_EXPLORATION);
-       EXPECT_EQ(state, MMI_STATE_EXPLORATION);
-}