[libsoup/carlosgc/set-method-public: 1/2] message: make soup_message_set_method public




commit a90c442df5f980dd9a8108c9def3b06607662fc8
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Mon Jun 7 19:06:41 2021 +0200

    message: make soup_message_set_method public
    
    It's a public readwrite property, so there no reason for the getter to
    be private.

 docs/reference/libsoup-3.0-sections.txt | 1 +
 libsoup/soup-message-private.h          | 3 ---
 libsoup/soup-message.c                  | 7 +++++++
 libsoup/soup-message.h                  | 4 ++++
 4 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/docs/reference/libsoup-3.0-sections.txt b/docs/reference/libsoup-3.0-sections.txt
index 2b9d922c..9e339e07 100644
--- a/docs/reference/libsoup-3.0-sections.txt
+++ b/docs/reference/libsoup-3.0-sections.txt
@@ -20,6 +20,7 @@ soup_message_get_http_version
 soup_message_get_uri
 soup_message_set_uri
 soup_message_get_method
+soup_message_set_method
 soup_message_get_status
 soup_message_get_reason_phrase
 <SUBSECTION>
diff --git a/libsoup/soup-message-private.h b/libsoup/soup-message-private.h
index 1d458011..82bf7d89 100644
--- a/libsoup/soup-message-private.h
+++ b/libsoup/soup-message-private.h
@@ -116,9 +116,6 @@ GInputStream       *soup_message_get_request_body_stream (SoupMessage        *ms
 void                soup_message_set_reason_phrase       (SoupMessage        *msg,
                                                           const char         *reason_phrase);
 
-void                soup_message_set_method              (SoupMessage        *msg,
-                                                          const char         *method);
-
 void                soup_message_set_http_version        (SoupMessage       *msg,
                                                          SoupHTTPVersion    version);
 
diff --git a/libsoup/soup-message.c b/libsoup/soup-message.c
index 33e93bd6..d3004825 100644
--- a/libsoup/soup-message.c
+++ b/libsoup/soup-message.c
@@ -2682,6 +2682,13 @@ soup_message_set_reason_phrase (SoupMessage *msg, const char *reason_phrase)
         g_object_notify_by_pspec (G_OBJECT (msg), properties[PROP_REASON_PHRASE]);
 }
 
+/**
+ * soup_message_set_method:
+ * @msg: a #SoupMessage
+ * @method: the value to set
+ *
+ * Set @msg's HTTP method to @method.
+ */
 void
 soup_message_set_method (SoupMessage *msg,
                          const char  *method)
diff --git a/libsoup/soup-message.h b/libsoup/soup-message.h
index a67d10ad..9208ec24 100644
--- a/libsoup/soup-message.h
+++ b/libsoup/soup-message.h
@@ -158,6 +158,10 @@ SoupMessagePriority soup_message_get_priority   (SoupMessage        *msg);
 SOUP_AVAILABLE_IN_ALL
 const char         *soup_message_get_method     (SoupMessage        *msg);
 
+SOUP_AVAILABLE_IN_ALL
+void                soup_message_set_method     (SoupMessage        *msg,
+                                                 const char         *method);
+
 SOUP_AVAILABLE_IN_ALL
 SoupStatus          soup_message_get_status     (SoupMessage        *msg);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]