Changed the API name and description related to the MIME type 51/141351/1
authorInHong Han <inhong1.han@samsung.com>
Fri, 28 Jul 2017 07:41:30 +0000 (16:41 +0900)
committerInHong Han <inhong1.han@samsung.com>
Mon, 31 Jul 2017 04:49:20 +0000 (13:49 +0900)
Change-Id: Ia21963956b29861b489b1cf08fa573bbeb02e73f

include/inputmethod.h
src/inputmethod.cpp

index b447782a79a7f935dcbd231d7ca9054085f033eb..e2462b5420914cdd327d9c0511e1cf46bc5d89b5 100644 (file)
@@ -685,7 +685,7 @@ typedef void (*ime_option_window_destroyed_cb)(Evas_Object *window, void *user_d
 typedef void (*ime_prediction_hint_set_cb)(const char *prediction_hint, void *user_data);
 
 /**
- * @brief Called to set the mime type to deliver to the input panel.
+ * @brief Called when an associated text input UI control requests the text entry to set the MIME type.
  *
  * @since_tizen 4.0
  *
@@ -693,14 +693,15 @@ typedef void (*ime_prediction_hint_set_cb)(const char *prediction_hint, void *us
  *
  * @privilege %http://tizen.org/privilege/ime
  *
- * @remarks This function is used by the applications to deliver the mime type to the input panel.
+ * @remarks @a mime_type is valid only in the callback. To use outside the callback, make a copy.
+ * This function is used by the applications to deliver the MIME type to the input panel.
  *
- * @param[in] mime_type The mime type to be set to the input panel
+ * @param[in] mime_type The MIME type to be set to the input panel
  * @param[in] user_data User data to be passed to the callback function
  *
- * @pre The callback can be registered using ime_event_set_mime_type_cb() function.
+ * @pre The callback can be registered using ime_event_set_mime_type_set_cb() function.
  *
- * @see ime_event_set_mime_type_cb()
+ * @see ime_event_set_mime_type_set_cb()
  */
 typedef void (*ime_mime_type_set_cb)(const char *mime_type, void *user_data);
 
@@ -2198,7 +2199,8 @@ int ime_event_set_prediction_hint_set_cb(ime_prediction_hint_set_cb callback_fun
  *
  * @privilege %http://tizen.org/privilege/ime
  *
- * @remarks The ime_mime_type_set_cb() callback function is called to set the mime type to deliver to the input panel.
+ * @remarks The ime_mime_type_set_cb() callback function is called when an associated text input
+ * UI control requests the text entry to set the MIME type.
  *
  * @param[in] callback_func @c mime_type_set event callback function
  * @param[in] user_data User data to be passed to the callback function
@@ -2213,7 +2215,7 @@ int ime_event_set_prediction_hint_set_cb(ime_prediction_hint_set_cb callback_fun
  * @see ime_mime_type_set_cb()
  * @see ime_run()
  */
-int ime_event_set_mime_type_cb(ime_mime_type_set_cb callback_func, void *user_data);
+int ime_event_set_mime_type_set_cb(ime_mime_type_set_cb callback_func, void *user_data);
 
 /**
  * @brief Sends a private command to the associated text input UI control.
@@ -2237,7 +2239,7 @@ int ime_event_set_mime_type_cb(ime_mime_type_set_cb callback_func, void *user_da
 int ime_send_private_command(const char *command);
 
 /**
- * @brief Commit a content such as image to the associated text input UI control.
+ * @brief Commits contents such as image to the associated text input UI control.
  *
  * @since_tizen 4.0
  *
@@ -2247,14 +2249,17 @@ int ime_send_private_command(const char *command);
  *
  * @param[in] content The content URI to be sent
  * @param[in] description The content description
- * @param[in] mime_types The MIME types
+ * @param[in] mime_type The MIME type received from the ime_mime_type_set_cb()
  *
  * @return 0 on success, otherwise a negative error value
  * @retval #IME_ERROR_NONE No error
  * @retval #IME_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
  * @retval #IME_ERROR_NOT_RUNNING IME main loop isn't started yet
+ *
+ * @see ime_mime_type_set_cb()
+ * @see ime_event_set_mime_type_set_cb()
  */
-int ime_commit_content(const char *content, const char *description, const char *mime_types);
+int ime_commit_content(const char *content, const char *description, const char *mime_type);
 
 /**
  * @brief Request to set floating mode or not.
index d9b4a39acbb9ffb1d057d20f1bacbca15fa81e3b..c6ff40883561605ed036f0d1c98465c2d7854ff6 100644 (file)
@@ -1564,11 +1564,11 @@ EXPORT_API int ime_send_private_command(const char *command)
     return IME_ERROR_NONE;
 }
 
-EXPORT_API int ime_commit_content(const char *content, const char *description, const char *mime_types)
+EXPORT_API int ime_commit_content(const char *content, const char *description, const char *mime_type)
 {
     ime_error_e retVal = IME_ERROR_NONE;
 
-    if (!content || !description || !mime_types) {
+    if (!content || !description || !mime_type) {
         LOGW("IME_ERROR_INVALID_PARAMETER");
         return IME_ERROR_INVALID_PARAMETER;
     }
@@ -1584,7 +1584,7 @@ EXPORT_API int ime_commit_content(const char *content, const char *description,
         return retVal;
     }
 
-    g_core.commit_content(content, description, mime_types);
+    g_core.commit_content(content, description, mime_type);
 
     return IME_ERROR_NONE;
 }
@@ -2065,7 +2065,7 @@ EXPORT_API int ime_event_set_prediction_hint_set_cb(ime_prediction_hint_set_cb c
     return IME_ERROR_NONE;
 }
 
-EXPORT_API int ime_event_set_mime_type_cb(ime_mime_type_set_cb callback_func, void *user_data)
+EXPORT_API int ime_event_set_mime_type_set_cb(ime_mime_type_set_cb callback_func, void *user_data)
 {
     ime_error_e retVal = IME_ERROR_NONE;