Add description 76/236776/11
authorHyunsoo Park <hance.park@samsung.com>
Mon, 22 Jun 2020 05:24:08 +0000 (14:24 +0900)
committerHyunsoo Park <hance.park@samsung.com>
Tue, 23 Jun 2020 02:20:28 +0000 (02:20 +0000)
Description is added for 'mm_wfd_sink_set_attribute' api.

Change-Id: I9c922778eb35321751837a91cbc5aed6cc77e382
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
packaging/libmm-wfd.spec
src/include/mm_wfd_sink.h

index e93da21a566e8e69e4162a5bcee0031dc41736f8..bdcae8d488e3a6bb2f23737579dc376ceb131c0f 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-wfd
 Summary:    Multimedia Framework Wifi-Display Library
-Version:    0.3.7
+Version:    0.3.8
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index 64c10e4c79cf373f8e9521648dd7472839c08203..6e6f12a0e535ea542d390f7d177c66f865699dcf 100644 (file)
@@ -292,7 +292,7 @@ int mm_wfd_sink_destroy(MMHandleType wfd_sink_handle);
 
 /**
  * This function sets callback function for receiving messages from wi-fi display sink. \n
- * So, player can notify warning, error and normal cases to application. \n
+ * So, wi-fi display sink can notify warning, error and normal cases to application. \n
  *
  * @param      wfd_sink_handle         [in]    Handle of wi-fi display sink
  * @param      callback                        [in]    Message callback function.
@@ -343,7 +343,36 @@ mm_wfd_sink_set_message_callback(g_wfd_sink_handle, msg_callback, (void*)g_wfd_s
  */
 int mm_wfd_sink_set_message_callback(MMHandleType wfd_sink_handle, MMWFDMessageCallback callback, void *user_param);
 
-int mm_wfd_sink_set_attribute(MMHandleType wfd_sink_handle,  char **err_attr_name, const char *first_attribute_name, ...);
+/**
+ * This function is to set attributes into screen mirroring sink handle. Multiple attributes can be set simultaneously. \n
+ * If one of attribute fails, this function will stop at the point and let you know the name which is failed. \n
+ *
+ * @param      wfd_sink_handle                 [in]    Handle of screen mirroring sink handle.
+ * @param      err_attr_name                   [out]   Name of attribute which is failed to set
+ * @param      first_attr_name                 [in]    Name of the first attribute to set
+ * @param      ...                                             [in]    Value for the first attribute, followed optionally by more name/value pairs, terminated by NULL.
+ *                                                                                     But, in the case of data or string type, it should be name/value/size.
+ *
+ * @return     This function returns zero on success, or negative value with error code.
+ *
+ * @remark     This function must be terminated by NULL argument.
+ *                     And, if this function is failed, err_attr_name param must be free.
+ * @par        Example
+ * @code
+char *g_err_attr_name = NULL;
+
+if (mm_wfd_sink_set_attribute(g_scmirroring,
+                        &g_err_attr_name,
+                        "display_overlay", display_surface, sizeof(void *),
+                        "display_surface_type", type,
+                        NULL) != MM_ERROR_NONE) {
+    LOGW("failed to set %s attribute\n", g_err_attr_name);
+    free(g_err_attr_name);
+}
+
+ * @endcode
+ */
+int mm_wfd_sink_set_attribute(MMHandleType wfd_sink_handle,  char **err_attr_name, const char *first_attr_name, ...);
 
 /**
  * This function gets the width and height of video which is played by wi-fi display sink\n