summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoone Hur <joone.hur@intel.com>2013-07-11 16:17:52 -0700
committerJoone Hur <joone.hur@intel.com>2013-07-12 10:42:40 -0700
commitc1ae001371020648eab25642a4c0b0bb89bc09a3 (patch)
tree049c0e0af36c51e60eaec8cad894060b445488d0
parent5d69b28f1fa308e638dff68587bfe9783eb6d34a (diff)
downloadlibsoup-c1ae001371020648eab25642a4c0b0bb89bc09a3.tar.gz
libsoup-c1ae001371020648eab25642a4c0b0bb89bc09a3.tar.bz2
libsoup-c1ae001371020648eab25642a4c0b0bb89bc09a3.zip
Add the authenticate signal to SoupMessage
We are getting the following error message while browsing the Web on MiniBrowser because Tizen webkit2-efl needs the authenticate signal of SoupMessage, but this signal was added to Tizen2.1. "(WebProcess:441): GLib-GObject-WARNING **: gsignal.c:2475: signal `authenticate' is invalid for instance `0xc399e70' of type `SoupMessage'"
-rw-r--r--libsoup/soup-message.c29
-rw-r--r--libsoup/soup-message.h2
2 files changed, 31 insertions, 0 deletions
diff --git a/libsoup/soup-message.c b/libsoup/soup-message.c
index d30fd372..4aaae88f 100644
--- a/libsoup/soup-message.c
+++ b/libsoup/soup-message.c
@@ -113,6 +113,8 @@ enum {
NETWORK_EVENT,
+ AUTHENTICATE,
+
LAST_SIGNAL
};
@@ -643,6 +645,27 @@ soup_message_class_init (SoupMessageClass *message_class)
G_TYPE_SOCKET_CLIENT_EVENT,
G_TYPE_IO_STREAM);
+ /**
+ * SoupMessage::authenticate:
+ * @msg: the message
+ * @auth: the SoupAuth to authenticate
+ * @retrying: TRUE if this is the second (or later) attempt
+ *
+ * Emitted when the message requires authentication.
+ * This signal was added in Tizen 2.1.
+ *
+ **/
+ signals[AUTHENTICATE] =
+ g_signal_new ("authenticate",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (SoupMessageClass, authenticate),
+ NULL, NULL,
+ _soup_marshal_NONE__OBJECT_BOOLEAN,
+ G_TYPE_NONE, 2,
+ SOUP_TYPE_AUTH,
+ G_TYPE_BOOLEAN);
+
/* properties */
/**
* SOUP_MESSAGE_METHOD:
@@ -1063,6 +1086,12 @@ soup_message_network_event (SoupMessage *msg,
event, connection);
}
+void
+soup_message_authenticate (SoupMessage *msg, SoupAuth *auth, gboolean retrying)
+{
+ g_signal_emit (msg, signals[AUTHENTICATE], 0, auth, retrying);
+}
+
static void
header_handler_free (gpointer header_name, GClosure *closure)
{
diff --git a/libsoup/soup-message.h b/libsoup/soup-message.h
index 23ec024a..2cc0880a 100644
--- a/libsoup/soup-message.h
+++ b/libsoup/soup-message.h
@@ -50,6 +50,7 @@ typedef struct {
void (*got_body) (SoupMessage *msg);
void (*restarted) (SoupMessage *msg);
void (*finished) (SoupMessage *msg);
+ void (*authenticate) (SoupMessage *msg, SoupAuth *auth, gboolean retrying);
/* Padding for future expansion */
void (*_libsoup_reserved1) (void);
@@ -198,6 +199,7 @@ void soup_message_got_body (SoupMessage *msg);
void soup_message_content_sniffed (SoupMessage *msg, const char *content_type, GHashTable *params);
void soup_message_restarted (SoupMessage *msg);
void soup_message_finished (SoupMessage *msg);
+void soup_message_authenticate (SoupMessage *msg, SoupAuth *auth, gboolean retrying);
G_END_DECLS