new API : download_get_http_header_field_list
authorBang Kwang-Min <justine.bang@samsung.com>
Mon, 18 Mar 2013 10:28:27 +0000 (19:28 +0900)
committerBang Kwang-Min <justine.bang@samsung.com>
Tue, 19 Mar 2013 11:29:59 +0000 (20:29 +0900)
Change-Id: I0a6451c703179e1605f9f7bc1983121b6c63ca5c

include/download.h
src/download-wrapping.c

index 8006958..3a137de 100755 (executable)
@@ -510,6 +510,23 @@ int download_add_http_header_field(int download_id, const char *field, const cha
  */
 int download_get_http_header_field(int download_id, const char *field, char **value);
 
+/**
+ * @brief Gets all of the field added to the download request
+ *
+ * @remarks The @a value must be released with free() by you.
+ * @param [in] download The download id
+ * @param [out] the array of the HTTP header fields
+ * @param [out] the number of the HTTP header fields
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #DOWNLOAD_ERROR_NONE Successful
+ * @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #DOWNLOAD_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #DOWNLOAD_ERROR_INVALID_STATE Invalid state
+ * @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No Download ID
+ * @see download_add_http_header_field()
+ * @see download_remove_http_header_field()
+ */
+int download_get_http_header_field_list(int download_id, char ***fields, int *length);
 
 /**
  * @brief Removes the given HTTP header field from the download
index aa54426..94b7fd2 100755 (executable)
@@ -196,6 +196,14 @@ int download_get_http_header_field(int download_id,
                dp_interface_get_http_header_field(download_id, field, value);
 }
 
+int download_get_http_header_field_list(int download_id, char ***fields,
+       int *length)
+{
+       TRACE_INFO("");
+       return dp_interface_get_http_header_field_list(download_id, fields,
+               length);
+}
+
 int download_remove_http_header_field(int download_id,
        const char *field)
 {