[libsoup] Temporarily re-add SoupSession::request-started
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] Temporarily re-add SoupSession::request-started
- Date: Sat, 19 Sep 2020 22:41:56 +0000 (UTC)
commit 536036c282fbe6abac7482b26d713dfc7e6c1079
Author: Patrick Griffis <pgriffis igalia com>
Date: Sun Feb 16 17:21:59 2020 -0800
Temporarily re-add SoupSession::request-started
Some tests deeply depend on this so we'll tackle it at a later time.
libsoup/soup-session.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
---
diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c
index bc2adc8a..74e83ac5 100644
--- a/libsoup/soup-session.c
+++ b/libsoup/soup-session.c
@@ -172,6 +172,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (SoupSession, soup_session, G_TYPE_OBJECT)
enum {
REQUEST_QUEUED,
REQUEST_UNQUEUED,
+ REQUEST_STARTED,
AUTHENTICATE,
CONNECTION_CREATED,
TUNNELING,
@@ -1224,6 +1225,8 @@ soup_session_send_queue_item (SoupSession *session,
"Connection", "Keep-Alive");
}
+ g_signal_emit (session, signals[REQUEST_STARTED], 0,
+ item->msg, soup_connection_get_socket (item->conn));
soup_message_starting (item->msg);
if (item->state == SOUP_MESSAGE_RUNNING)
soup_connection_send_request (item->conn, item, completion_cb, item);
@@ -2919,6 +2922,29 @@ soup_session_class_init (SoupSessionClass *session_class)
G_TYPE_NONE, 1,
SOUP_TYPE_MESSAGE);
+ /**
+ * SoupSession::request-started:
+ * @session: the session
+ * @msg: the request being sent
+ * @socket: the socket the request is being sent on
+ *
+ * Emitted just before a request is sent. See
+ * #SoupSession::request_queued for a detailed description of
+ * the message lifecycle within a session.
+ *
+ * Deprecated: 2.50. Use #SoupMessage::starting instead.
+ **/
+ signals[REQUEST_STARTED] =
+ g_signal_new ("request-started",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (SoupSessionClass, request_started),
+ NULL, NULL,
+ NULL,
+ G_TYPE_NONE, 2,
+ SOUP_TYPE_MESSAGE,
+ SOUP_TYPE_SOCKET);
+
/**
* SoupSession::request-unqueued:
* @session: the session
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]