Rename 'update_result_state' to 'update_recognition_result'
authorJi-hoon Lee <dalton.lee@samsung.com>
Wed, 21 Aug 2019 08:52:03 +0000 (17:52 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Wed, 21 Aug 2019 08:52:59 +0000 (17:52 +0900)
In order to provide recognition result event to wakeup engines,
renamed existing 'update_result_state' function to
'update_recognition_result' and added implementation for
update_recognition_result handler in engine manager side.

Change-Id: Ie198690e21239577eb3659dd07b010c309d20c66

16 files changed:
inc/multi_assistant_service.h
inc/multi_assistant_service_plugin.h
inc/multi_wakeup_recognizer.h
plugins/wakeup-manager/inc/wakeup_engine_manager.h
plugins/wakeup-manager/inc/wakeup_manager.h
plugins/wakeup-manager/inc/wakeup_manager_wrapper.h
plugins/wakeup-manager/inc/wakeup_policy.h
plugins/wakeup-manager/inc/wakeup_policy_default.h
plugins/wakeup-manager/inc/wakeup_policy_impl.h
plugins/wakeup-manager/src/wakeup_engine_manager.cpp
plugins/wakeup-manager/src/wakeup_manager.cpp
plugins/wakeup-manager/src/wakeup_manager_wrapper.cpp
plugins/wakeup-manager/src/wakeup_policy.cpp
plugins/wakeup-manager/src/wakeup_policy_default.cpp
src/multi_assistant_service.c
src/multi_assistant_service_plugin.c

index 90e45dc..7f55bc8 100644 (file)
@@ -51,7 +51,7 @@ int mas_client_update_voice_feedback_state(int pid, int state);
 
 int mas_client_send_assistant_specific_command(int pid, const char *command);
 
-int mas_client_update_result_state(int pid, int state);
+int mas_client_update_recognition_result(int pid, int result);
 
 int mas_ui_client_initialize(int pid);
 
index 57bb958..b23ee3e 100644 (file)
@@ -63,7 +63,7 @@ int multi_assistant_service_plugin_send_assistant_specific_command(const char *a
 
 int multi_assistant_service_plugin_change_system_volume(const char *appid, int event);
 
-int multi_assistant_service_plugin_update_result_state(const char* appid, int state);
+int multi_assistant_service_plugin_update_recognition_result(const char* appid, int result);
 
 int multi_assistant_service_plugin_process_event(int event, void* data, int len);
 
@@ -126,8 +126,8 @@ typedef int (*wakeup_manager_update_voice_feedback_state)(const char* appid, int
 typedef int (*wakeup_manager_send_assistant_specific_command)(const char* appid, const char* command);
 #define MA_WAKEUP_MANAGER_FUNC_CHANGE_SYSTEM_VOLUME "wakeup_manager_change_system_volume"
 typedef int (*wakeup_manager_change_system_volume)(const char* appid, int event);
-#define MA_WAKEUP_MANAGER_FUNC_UPDATE_RESULT_STATE "wakeup_manager_update_result_state"
-typedef int (*wakeup_manager_update_result_state)(const char* appid, int state);
+#define MA_WAKEUP_MANAGER_FUNC_UPDATE_RECOGNITION_RESULT "wakeup_manager_update_recognition_result"
+typedef int (*wakeup_manager_update_recognition_result)(const char* appid, int result);
 #define MA_WAKEUP_MANAGER_FUNC_PROCESS_EVENT "wakeup_manager_process_event"
 typedef int (*wakeup_manager_process_event)(int event, void* data, int len);
 #define MA_WAKEUP_MANAGER_FUNC_START_STREAMING_UTTERANCE_DATA "wakeup_manager_start_streaming_utterance_data"
@@ -172,7 +172,7 @@ typedef struct {
        wakeup_manager_update_voice_feedback_state                               update_voice_feedback_state;
        wakeup_manager_send_assistant_specific_command                   send_assistant_specific_command;
        wakeup_manager_change_system_volume                                              change_system_volume;
-       wakeup_manager_update_result_state                                               update_result_state;
+       wakeup_manager_update_recognition_result                                 update_recognition_result;
        wakeup_manager_process_event                                                     process_event;
        wakeup_manager_start_streaming_utterance_data                    start_streaming_utterance_data;
        wakeup_manager_stop_streaming_utterance_data                     stop_streaming_utterance_data;
index 394ae49..0b4287f 100644 (file)
@@ -62,7 +62,7 @@ typedef enum {
 } wakeup_asr_result_event_e;
 
 
-typedef void (*wakeup_service_wakeup_event_cb)(wakeup_event_info event, const char* wakeup_word, void* user_data);
+typedef void (*wakeup_service_wakeup_event_cb)(wakeup_event_info wakeup_info, const char* wakeup_word, void* user_data);
 
 typedef void (*wakeup_service_speech_streaming_cb)(wakeup_speech_streaming_event_e event, unsigned char* buffer, int len, void *user_data);
 
index 23f5e57..27fd175 100644 (file)
@@ -55,6 +55,8 @@ typedef int (*wakeup_engine_add_language)(const char* appid, const char* languag
 typedef int (*wakeup_engine_set_language)(const char* language);
 #define MA_WAKEUP_ENGINE_FUNC_UPDATE_MANAGER_STATE "wakeup_engine_update_manager_state"
 typedef int (*wakeup_engine_update_manager_state)(wakeup_manager_state_e state);
+#define MA_WAKEUP_ENGINE_FUNC_UPDATE_RECOGNITION_RESULT "wakeup_engine_update_recognition_result"
+typedef int (*wakeup_engine_update_recognition_result)(const char* appid, int result);
 #define MA_WAKEUP_ENGINE_FUNC_SET_AUDIO_FORMAT "wakeup_engine_set_audio_format"
 typedef int (*wakeup_engine_set_audio_format)(int rate, int channel, int audio_type);
 #define MA_WAKEUP_ENGINE_FUNC_GET_AUDIO_FORMAT "wakeup_engine_get_audio_format"
@@ -85,6 +87,7 @@ typedef struct {
        wakeup_engine_add_language                                                              add_language;
        wakeup_engine_set_language                                                              set_language;
        wakeup_engine_update_manager_state                                              update_manager_state;
+       wakeup_engine_update_recognition_result                                 update_recognition_result;
        wakeup_engine_set_audio_format                                                  set_audio_format;
        wakeup_engine_get_audio_format                                                  get_audio_format;
        wakeup_engine_feed_audio_data                                                   feed_audio_data;
@@ -101,7 +104,7 @@ class IEngineEventObserver
 {
 public:
        virtual ~IEngineEventObserver() = default;
-       virtual bool on_wakeup_event(string engine_name, wakeup_event_info info) = 0;
+       virtual bool on_wakeup_event(string engine_name, wakeup_event_info wakeup_info) = 0;
        virtual bool on_speech_status(string engine_name, wakeup_service_speech_status_e status) = 0;
        virtual bool on_error(string engine_name, int error_code, string error_message) = 0;
        virtual bool on_audio_data_require_status(string engine_name, bool require) = 0;
@@ -127,7 +130,7 @@ public:
        void unsubscribe(IEngineEventObserver *observer);
 
        bool get_audio_data_required();
-       void set_selected_wakeup_info(wakeup_event_info info);
+       void set_selected_wakeup_info(wakeup_event_info wakeup_info);
 
        bool set_language(string language);
        void set_assistant_activated(string appid, bool activated);
@@ -136,13 +139,14 @@ public:
        void stop_streaming_current_utterance_data();
 
        void update_manager_state(wakeup_manager_state_e state);
+       void update_recognition_result(string appid, int result);
 
        void engine_add_target_assistant(string engine_name, string appid);
        void engine_add_wakeup_word(string appid, string wakeup_word, string language);
        void engine_set_assistant_specific_command(string appid, string command);
        void engine_feed_audio_data(long time, void* data, int len);
 
-       bool on_wakeup_event(string engine_name, wakeup_event_info info);
+       bool on_wakeup_event(string engine_name, wakeup_event_info wakeup_info);
        bool on_speech_status(string engine_name, wakeup_service_speech_status_e status);
        bool on_error(string engine_name, int error_code, string error_message);
        bool on_audio_data_require_status(string engine_name, bool require);
index d94b4ad..01481ff 100644 (file)
@@ -44,7 +44,7 @@ enum class STREAMING_MODE {
 class IWakeupEventObserver {
 public:
        virtual ~IWakeupEventObserver() = default;
-       virtual void on_wakeup(wakeup_event_info info) = 0;
+       virtual void on_wakeup(wakeup_event_info wakeup_info) = 0;
        virtual void on_streaming_audio_data(
                wakeup_speech_streaming_event_e event, void* buffer, unsigned int len) = 0;
 };
@@ -78,7 +78,7 @@ public:
        bool update_voice_feedback_state(string appid, bool state);
        bool send_assistant_specific_command(string appid, string command);
        bool change_system_volume(string appid, int event);
-       bool update_result_state(string appid, int state);
+       bool update_recognition_result(string appid, int result);
        bool process_event(ma_plugin_event_e event, void* data, int len);
        bool get_audio_format(int* rate, int* channel, int* audio_type);
        bool get_audio_source_type(char** type);
@@ -101,7 +101,7 @@ public:
        CWakeupSettings* get_wakeup_settings();
 
        vector<IWakeupEventObserver*> get_observers();
-       void set_last_wakeup_event_info(wakeup_event_info info);
+       void set_last_wakeup_event_info(wakeup_event_info wakeup_info);
 
        bool change_manager_state(wakeup_manager_state_e state);
        wakeup_manager_state_e get_manager_state();
@@ -111,7 +111,7 @@ private:
        class CEngineEventObserver : public IEngineEventObserver
        {
        public:
-               bool on_wakeup_event(string engine_name, wakeup_event_info info) override;
+               bool on_wakeup_event(string engine_name, wakeup_event_info wakeup_info) override;
                bool on_speech_status(string engine_name, wakeup_service_speech_status_e status) override;
                bool on_error(string engine_name, int error_code, string error_message) override;
                bool on_audio_data_require_status(string engine_name, bool require) override;
@@ -127,7 +127,7 @@ private:
        class CPolicyEventObserver : public IPolicyEventObserver
        {
        public:
-               void on_wakeup(wakeup_event_info info) override;
+               void on_wakeup(wakeup_event_info wakeup_info) override;
 
                void set_wakeup_manager(CWakeupManager *manager) { mWakeupManager = manager; }
        private:
index 9fc88a1..c9c0781 100644 (file)
@@ -43,7 +43,7 @@ typedef enum {
        WAKEUP_MANAGER_STATE_VOICE_FEEDBACK = 4
 } wakeup_manager_state_e;
 
-typedef void (*wakeup_service_wakeup_event_cb)(wakeup_event_info info, void* user_data);
+typedef void (*wakeup_service_wakeup_event_cb)(wakeup_event_info wakeup_info, void* user_data);
 
 typedef void (*wakeup_service_speech_streaming_cb)(wakeup_speech_streaming_event_e event, void* buffer, int len, void *user_data);
 
@@ -94,7 +94,7 @@ EXPORT_API int wakeup_manager_send_assistant_specific_command(const char* appid,
 
 EXPORT_API int wakeup_manager_change_system_volume(const char *appid, int event);
 
-EXPORT_API int wakeup_manager_update_result_state(const char *appid, int state);
+EXPORT_API int wakeup_manager_update_recognition_result(const char *appid, int result);
 
 EXPORT_API int wakeup_manager_process_event(int event, void* data, int len);
 
index 71ed0a1..d1738ab 100644 (file)
@@ -33,7 +33,7 @@ class IPolicyEventObserver
 {
 public:
        virtual ~IPolicyEventObserver() = default;
-       virtual void on_wakeup(wakeup_event_info info) = 0;
+       virtual void on_wakeup(wakeup_event_info wakeup_info) = 0;
 };
 
 class CWakeupPolicyImpl;
@@ -51,7 +51,7 @@ public:
        void subscribe(IPolicyEventObserver *observer);
        void unsubscribe(IPolicyEventObserver *observer);
 
-       virtual void wakeup_candidate(wakeup_event_info info) = 0;
+       virtual void wakeup_candidate(wakeup_event_info wakeup_info) = 0;
 protected:
        unique_ptr<CWakeupPolicyImpl> mImpl;
 };
index 619d6b5..be20625 100644 (file)
@@ -41,7 +41,7 @@ public:
        void set_assistant_priority(string appid, int priority);
        void set_delay(float seconds);
 
-       void wakeup_candidate(wakeup_event_info info);
+       void wakeup_candidate(wakeup_event_info wakeup_info);
        void timer_expired();
 private:
        typedef struct {
index a072250..63723f1 100644 (file)
@@ -35,7 +35,7 @@ public:
        void subscribe(IPolicyEventObserver *observer);
        void unsubscribe(IPolicyEventObserver *observer);
 
-       void wakeup(wakeup_event_info info);
+       void wakeup(wakeup_event_info wakeup_info);
 private:
        vector<IPolicyEventObserver*> mObservers;
 };
index 39ff338..75baf6b 100644 (file)
@@ -122,6 +122,7 @@ bool CWakeupEngineManager::get_audio_data_required()
 
 void CWakeupEngineManager::set_selected_wakeup_info(wakeup_event_info wakeup_info)
 {
+       mSelectedEngine = nullptr;
        for (const auto& info : mEngineInfo) {
                string appid = string{wakeup_info.wakeup_appid};
                bool found = contains(info.assistant_list, appid);
@@ -278,6 +279,15 @@ void CWakeupEngineManager::update_manager_state(wakeup_manager_state_e state)
        }
 }
 
+void CWakeupEngineManager::update_recognition_result(string appid, int result)
+{
+       if (mSelectedEngine) {
+               if (mSelectedEngine->interface.update_recognition_result) {
+                       mSelectedEngine->interface.update_recognition_result(appid.c_str(), result);
+               }
+       }
+}
+
 void CWakeupEngineManager::engine_add_target_assistant(string engine_name, string appid)
 {
        const auto& iter = find_if(mEngineInfo.begin(), mEngineInfo.end(),
@@ -469,6 +479,9 @@ void CWakeupEngineManager::add_engine(string name, string path)
        info.interface.update_manager_state =
                (wakeup_engine_update_manager_state)dlsym(info.engine_handle,
                MA_WAKEUP_ENGINE_FUNC_UPDATE_MANAGER_STATE);
+       info.interface.update_recognition_result =
+               (wakeup_engine_update_recognition_result)dlsym(info.engine_handle,
+               MA_WAKEUP_ENGINE_FUNC_UPDATE_RECOGNITION_RESULT);
        info.interface.set_audio_format =
                (wakeup_engine_set_audio_format)dlsym(info.engine_handle,
                MA_WAKEUP_ENGINE_FUNC_SET_AUDIO_FORMAT);
index ee68f22..0cbd338 100644 (file)
@@ -30,26 +30,26 @@ static bool check_language_valid(string language)
        return true;
 }
 
-static bool initialize_wakeup_event_info(wakeup_event_info* info)
+static bool initialize_wakeup_event_info(wakeup_event_info* wakeup_info)
 {
        bool ret = false;
-       if (info) {
+       if (wakeup_info) {
                ret = true;
 
-               info->wakeup_appid = nullptr;
-               info->wakeup_word = nullptr;
-               info->wakeup_language = nullptr;
-               info->wakeup_voice_id = nullptr;
-               info->wakeup_engine = nullptr;
-               info->wakeup_confidence_score = 0.0f;
+               wakeup_info->wakeup_appid = nullptr;
+               wakeup_info->wakeup_word = nullptr;
+               wakeup_info->wakeup_language = nullptr;
+               wakeup_info->wakeup_voice_id = nullptr;
+               wakeup_info->wakeup_engine = nullptr;
+               wakeup_info->wakeup_confidence_score = 0.0f;
 
-               info->wakeup_start_time = 0;
-               info->wakeup_end_time = 0L;
-               info->wakeup_time_valid = false;
+               wakeup_info->wakeup_start_time = 0;
+               wakeup_info->wakeup_end_time = 0L;
+               wakeup_info->wakeup_time_valid = false;
 
-               info->extra_data = nullptr;
-               info->extra_data_length = 0;
-               info->extra_data_description = nullptr;
+               wakeup_info->extra_data = nullptr;
+               wakeup_info->extra_data_length = 0;
+               wakeup_info->extra_data_description = nullptr;
        }
        return ret;
 }
@@ -351,14 +351,13 @@ bool CWakeupManager::change_system_volume(string appid, int event)
        return ret;
 }
 
-bool CWakeupManager::update_result_state(string appid, int state)
+bool CWakeupManager::update_recognition_result(string appid, int result)
 {
        MWR_LOGD("[ENTER]");
-       if (0 == state) {
-               if (WAKEUP_MANAGER_STATE_PROCESSING == mWakeupManagerState ||
-                       WAKEUP_MANAGER_STATE_UTTERANCE == mWakeupManagerState) {
-                       change_manager_state(WAKEUP_MANAGER_STATE_LISTENING);
-               }
+       mWakeupEngineManager.update_recognition_result(appid, result);
+       if (WAKEUP_MANAGER_STATE_PROCESSING == mWakeupManagerState ||
+               WAKEUP_MANAGER_STATE_UTTERANCE == mWakeupManagerState) {
+               change_manager_state(WAKEUP_MANAGER_STATE_LISTENING);
        }
        MWR_LOGD("[END]");
        return true;
@@ -400,20 +399,21 @@ bool CWakeupManager::process_event(ma_plugin_event_e event, void* data, int len)
 
                        /* Wakeup default assistant */
                        /* TODO: apply conversation timeout for selecting assistant here */
-                       wakeup_event_info event_info;
-                       initialize_wakeup_event_info(&event_info);
+                       wakeup_event_info wakeup_info;
+                       initialize_wakeup_event_info(&wakeup_info);
                        /* Make sure to use background data */
-                       event_info.wakeup_time_valid = true;
-                       event_info.wakeup_end_time = get_current_milliseconds_after_epoch();
-                       event_info.wakeup_engine = WAKEUP_ENGINE_VOICE_KEY;
+                       wakeup_info.wakeup_time_valid = true;
+                       wakeup_info.wakeup_end_time = get_current_milliseconds_after_epoch();
+                       wakeup_info.wakeup_engine = WAKEUP_ENGINE_VOICE_KEY;
 
                        string appid = mWakeupSettings.get_default_assistant_appid();
-                       event_info.wakeup_appid = appid.c_str();
-                       MWR_LOGD("wakeup_appid : %s", event_info.wakeup_appid);
+                       wakeup_info.wakeup_appid = appid.c_str();
+                       MWR_LOGD("wakeup_appid : %s", wakeup_info.wakeup_appid);
 
-                       set_last_wakeup_event_info(event_info);
+                       set_last_wakeup_event_info(wakeup_info);
+                       mWakeupEngineManager.set_selected_wakeup_info(wakeup_info);
                        for (const auto& observer : mObservers) {
-                               observer->on_wakeup(event_info);
+                               observer->on_wakeup(wakeup_info);
                        }
                }
        } else if (MA_PLUGIN_EVENT_VOICE_KEY_RELEASED_AFTER_PUSH == event) {
@@ -446,9 +446,9 @@ vector<IWakeupEventObserver*> CWakeupManager::get_observers()
        return mObservers;
 }
 
-void CWakeupManager::set_last_wakeup_event_info(wakeup_event_info info)
+void CWakeupManager::set_last_wakeup_event_info(wakeup_event_info wakeup_info)
 {
-       mLastWakeupEventInfo = info;
+       mLastWakeupEventInfo = wakeup_info;
 }
 
 static Eina_Bool streaming_duration_expired(void *data)
@@ -709,14 +709,14 @@ void CWakeupManager::feed_audio_data(wakeup_speech_streaming_event_e event, void
        mAudioManager.feed_audio_data(event, buffer, len);
 }
 
-bool CWakeupManager::CEngineEventObserver::on_wakeup_event(string engine_name, wakeup_event_info info)
+bool CWakeupManager::CEngineEventObserver::on_wakeup_event(string engine_name, wakeup_event_info wakeup_info)
 {
        MWR_LOGD("[ENTER]");
        if (nullptr == mWakeupManager) return false;
 
        CWakeupPolicy* policy = mWakeupManager->get_wakeup_policy();
        if (policy) {
-               policy->wakeup_candidate(info);
+               policy->wakeup_candidate(wakeup_info);
        }
        return true;
 }
@@ -777,7 +777,7 @@ bool CWakeupManager::CEngineEventObserver::on_streaming_audio_data(
        return true;
 }
 
-void CWakeupManager::CPolicyEventObserver::on_wakeup(wakeup_event_info info)
+void CWakeupManager::CPolicyEventObserver::on_wakeup(wakeup_event_info wakeup_info)
 {
        if (nullptr == mWakeupManager) return;
        mWakeupManager->stop_streaming_utterance_data();
@@ -788,11 +788,11 @@ void CWakeupManager::CPolicyEventObserver::on_wakeup(wakeup_event_info info)
        CWakeupEngineManager *engine_manager = mWakeupManager->get_engine_manager();
        if (nullptr == engine_manager) return;
 
-       mWakeupManager->set_last_wakeup_event_info(info);
-       engine_manager->set_selected_wakeup_info(info);
+       mWakeupManager->set_last_wakeup_event_info(wakeup_info);
+       engine_manager->set_selected_wakeup_info(wakeup_info);
        vector<IWakeupEventObserver*> observers = mWakeupManager->get_observers();
        for (const auto& observer : observers) {
-               observer->on_wakeup(info);
+               observer->on_wakeup(wakeup_info);
        }
 }
 
index 5da291c..73fe02f 100644 (file)
@@ -39,7 +39,7 @@ static void* g_error_user_data;
 
 class CWakeupEventObserver : public IWakeupEventObserver
 {
-       void on_wakeup(wakeup_event_info info) override;
+       void on_wakeup(wakeup_event_info wakeup_info) override;
        void on_streaming_audio_data(
                wakeup_speech_streaming_event_e event, void* buffer, unsigned int len) override;
 };
@@ -242,7 +242,7 @@ int wakeup_manager_change_system_volume(const char* appid, int event)
        return 0;
 }
 
-int wakeup_manager_update_result_state(const char* appid, int state)
+int wakeup_manager_update_recognition_result(const char* appid, int result)
 {
        MWR_LOGD("[ENTER]");
 
@@ -252,7 +252,7 @@ int wakeup_manager_update_result_state(const char* appid, int state)
        } else {
                appid_string = appid;
        }
-       g_wakeup_manager.update_result_state(appid_string, state);
+       g_wakeup_manager.update_recognition_result(appid_string, result);
 
        MWR_LOGD("[END]");
        return 0;
@@ -460,10 +460,10 @@ int wakeup_manager_feed_audio_data(wakeup_speech_streaming_event_e event, void*
        return 0;
 }
 
-void CWakeupEventObserver::on_wakeup(wakeup_event_info info)
+void CWakeupEventObserver::on_wakeup(wakeup_event_info wakeup_info)
 {
        if (NULL != g_wakeup_event_cb) {
-               g_wakeup_event_cb(info, g_wakeup_event_user_data);
+               g_wakeup_event_cb(wakeup_info, g_wakeup_event_user_data);
        }
 }
 
index eb01c7f..1ab9f12 100644 (file)
@@ -22,11 +22,11 @@ void CWakeupPolicyImpl::unsubscribe(IPolicyEventObserver *observer)
        }
 }
 
-void CWakeupPolicyImpl::wakeup(wakeup_event_info info)
+void CWakeupPolicyImpl::wakeup(wakeup_event_info wakeup_info)
 {
        for (const auto& observer : mObservers) {
                if (observer) {
-                       observer->on_wakeup(info);
+                       observer->on_wakeup(wakeup_info);
                }
        }
 }
index 3175733..2415636 100644 (file)
@@ -58,9 +58,9 @@ static Eina_Bool timer_func(void *data)
        return ECORE_CALLBACK_CANCEL;
 }
 
-void CWakeupPolicyDefault::wakeup_candidate(wakeup_event_info info)
+void CWakeupPolicyDefault::wakeup_candidate(wakeup_event_info wakeup_info)
 {
-       mWakeupInfos.push_back(info);
+       mWakeupInfos.push_back(wakeup_info);
        if (nullptr == mTimer) {
                ecore_thread_main_loop_begin();
                mTimer = ecore_timer_add(mDelaySeconds, timer_func, this);
index c0e7e47..21889fa 100644 (file)
@@ -295,7 +295,7 @@ int mas_client_send_result(int pid, char* display_text, char* utterance_text, ch
                MAS_LOGE("[ERROR] Fail to send result, ret(%d)", ret);
        }
 
-       multi_assistant_service_plugin_update_result_state(NULL, MA_RECOGNITION_RESULT_EVENT_SUCCESS);
+       multi_assistant_service_plugin_update_recognition_result(NULL, MA_RECOGNITION_RESULT_EVENT_SUCCESS);
 
        return ret;
 }
@@ -308,7 +308,7 @@ int mas_client_send_recognition_result(int pid, int result)
                MAS_LOGE("[ERROR] Fail to send recognition result, ret(%d)", ret);
        }
 
-       multi_assistant_service_plugin_update_result_state(NULL, result);
+       multi_assistant_service_plugin_update_recognition_result(NULL, result);
 
        return ret;
 }
@@ -365,9 +365,9 @@ int mas_client_change_system_volume(int pid, int event)
        return 0;
 }
 
-int mas_client_update_result_state(int pid, int state)
+int mas_client_update_recognition_result(int pid, int state)
 {
-       multi_assistant_service_plugin_update_result_state(NULL, state);
+       multi_assistant_service_plugin_update_recognition_result(NULL, state);
        return 0;
 }
 
index e51ec28..e8b0c74 100644 (file)
@@ -138,9 +138,9 @@ Eina_Bool __launch_assistant_by_wakeup_word_timer(char* wakeup_word)
        return ECORE_CALLBACK_CANCEL;
 }
 
-static void __wakeup_event_cb(wakeup_event_info event, void* user_data)
+static void __wakeup_event_cb(wakeup_event_info wakeup_info, void* user_data)
 {
-       MAS_LOGD("[SUCCESS] __wakeup_event_cb is called, wakeup_word(%s)", event.wakeup_word);
+       MAS_LOGD("[SUCCESS] __wakeup_event_cb is called, wakeup_word(%s)", wakeup_info.wakeup_word);
        int ret = -1;
 
        if (is_ui_panel_enabled()) {
@@ -206,13 +206,13 @@ static void __wakeup_event_cb(wakeup_event_info event, void* user_data)
                ecore_thread_main_loop_end();
        }
 #endif /* - TEST_CODE */
-       if (event.wakeup_appid) {
+       if (wakeup_info.wakeup_appid) {
                ecore_thread_main_loop_begin();
-               ecore_timer_add(0.0f, __launch_assistant_by_wakeup_appid_timer, (void*)strdup(event.wakeup_appid));
+               ecore_timer_add(0.0f, __launch_assistant_by_wakeup_appid_timer, (void*)strdup(wakeup_info.wakeup_appid));
                ecore_thread_main_loop_end();
-       } else if (event.wakeup_word) {
+       } else if (wakeup_info.wakeup_word) {
                ecore_thread_main_loop_begin();
-               ecore_timer_add(0.0f, __launch_assistant_by_wakeup_word_timer, (void*)strdup(event.wakeup_word));
+               ecore_timer_add(0.0f, __launch_assistant_by_wakeup_word_timer, (void*)strdup(wakeup_info.wakeup_word));
                ecore_thread_main_loop_end();
        }
 
@@ -383,9 +383,9 @@ int multi_assistant_service_plugin_initialize(void)
        _wakeup_manager_interface.change_system_volume =
                (wakeup_manager_change_system_volume)dlsym(g_handle,
                MA_WAKEUP_MANAGER_FUNC_CHANGE_SYSTEM_VOLUME);
-       _wakeup_manager_interface.update_result_state =
-               (wakeup_manager_update_result_state)dlsym(g_handle,
-               MA_WAKEUP_MANAGER_FUNC_UPDATE_RESULT_STATE);
+       _wakeup_manager_interface.update_recognition_result =
+               (wakeup_manager_update_recognition_result)dlsym(g_handle,
+               MA_WAKEUP_MANAGER_FUNC_UPDATE_RECOGNITION_RESULT);
        _wakeup_manager_interface.process_event =
                (wakeup_manager_process_event)dlsym(g_handle,
                MA_WAKEUP_MANAGER_FUNC_PROCESS_EVENT);
@@ -684,13 +684,13 @@ int multi_assistant_service_plugin_change_system_volume(const char* appid, int e
        return ret;
 }
 
-int multi_assistant_service_plugin_update_result_state(const char* appid, int state)
+int multi_assistant_service_plugin_update_recognition_result(const char* appid, int state)
 {
        int ret = -1;
        if (NULL != g_handle) {
-               wakeup_manager_update_result_state func = _wakeup_manager_interface.update_result_state;
+               wakeup_manager_update_recognition_result func = _wakeup_manager_interface.update_recognition_result;
                 if (NULL == func) {
-                       MAS_LOGE("[ERROR] symbol lookup failed : %s", MA_WAKEUP_MANAGER_FUNC_UPDATE_RESULT_STATE);
+                       MAS_LOGE("[ERROR] symbol lookup failed : %s", MA_WAKEUP_MANAGER_FUNC_UPDATE_RECOGNITION_RESULT);
                } else {
                        ret = func(appid, state);
                        if (0 != ret) {