Update API descriptions 78/276478/4
authorInHong Han <inhong1.han@samsung.com>
Fri, 17 Jun 2022 06:21:32 +0000 (15:21 +0900)
committerInHong Han <inhong1.han@samsung.com>
Tue, 28 Jun 2022 02:55:09 +0000 (11:55 +0900)
Change-Id: Ibff44e843a9e6773d05f607dfb2c2724adc1fcb0

client/ma.c
include/multi_assistant.h

index 85046fe15154f4d9e664d70d76bd4ee8b344a05f..0308d9fa678af118273084815ce40af6989f9db1 100644 (file)
@@ -2460,7 +2460,7 @@ int ma_remove_wake_word(const char* wake_word, const char *language) {
 int ma_get_wakeup_info_wake_word(char** wake_word)
 {
        if (wake_word) {
-               *wake_word = g_wakeup_info.wake_word;
+               *wake_word = strdup(g_wakeup_info.wake_word);
        }
        return 0;
 }
@@ -2468,7 +2468,9 @@ int ma_get_wakeup_info_wake_word(char** wake_word)
 int ma_get_wakeup_info_extra_data(unsigned char** extra_data, int* extra_data_length, char **extra_data_desc)
 {
        if (extra_data) {
-               *extra_data = g_wakeup_info.extra_data;
+               *extra_data = (unsigned char*)malloc(g_wakeup_info.extra_data_length);
+               if (*extra_data)
+                       memcpy(*extra_data, g_wakeup_info.extra_data, g_wakeup_info.extra_data_length);
        }
 
        if (extra_data_length) {
@@ -2476,7 +2478,7 @@ int ma_get_wakeup_info_extra_data(unsigned char** extra_data, int* extra_data_le
        }
 
        if (extra_data_desc) {
-               *extra_data_desc = g_wakeup_info.extra_data_desc;
+               *extra_data_desc = strdup(g_wakeup_info.extra_data_desc);
        }
 
        return 0;
index 80c4caf7dc4d228397ce9dd7a8a0cc3c349e0b18..f5a2e1e39f2d6dfe88da0c0a395d2dc63fb2ef00 100644 (file)
@@ -522,7 +522,7 @@ int ma_assistant_info_get_app_id(ma_assistant_info_h handle, char** app_id);
  * @since_tizen 5.5
  *
  * @param[in] handle The handle to the assistant's information
- * @param[in] status The enable status of the given assistant handle
+ * @param[out] status The enable status of the given assistant handle
  *
  * @return @c 0 on success, otherwise a negative error value
  * @retval #MA_ERROR_NONE Successful
@@ -844,8 +844,8 @@ int ma_remove_wake_word(const char* wake_word, const char *language);
  * @brief Retrieves wake word information of the last wakeup event.
  * @since_tizen 7.0
  *
- * @remarks You must not release @a wake_word using free().
- *          @a wake_word can be changed whenever @a ma_active_state_changed_cb is called.
+ * @remarks You must release @a wake_word using free().
+ *          @a wake_word can be changed whenever @c ma_active_state_changed_cb is called.
  * @param[out] wake_word The wake word information, if exists.
  *
  * @return @c 0 on success, otherwise a negative error value
@@ -867,8 +867,8 @@ int ma_get_wakeup_info_wake_word(char** wake_word);
  *          The information MUST be defined by both wakeup engine and voice assistant.
  * @since_tizen 7.0
  *
- * @remarks You must not release @a extra_data and @a extra_data_desc using free().
- *          @a extra_data can be changed whenever @a ma_active_state_changed_cb is called.
+ * @remarks You must release @a extra_data and @a extra_data_desc using free().
+ *          @a extra_data can be changed whenever @c ma_active_state_changed_cb is called.
  * @param[out] extra_data The extra data information, if exists.
  * @param[out] extra_data_length The length of extra data.
  * @param[out] extra_data_desc The string value describing the type of extra data.