[libsoup/carlosgc/session-derivable] Make SoupSession a derivable class
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/carlosgc/session-derivable] Make SoupSession a derivable class
- Date: Thu, 10 Jun 2021 04:22:09 +0000 (UTC)
commit 1b1ca4c1eebaaf2f41ee72755ec9b5c4c7e24631
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Thu Jun 10 06:21:17 2021 +0200
Make SoupSession a derivable class
libsoup/soup-session.c | 12 ++++--------
libsoup/soup-session.h | 20 +++++++++++++++++++-
2 files changed, 23 insertions(+), 9 deletions(-)
---
diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c
index 37e3e5ea..d1df9226 100644
--- a/libsoup/soup-session.c
+++ b/libsoup/soup-session.c
@@ -87,10 +87,6 @@ typedef struct {
static guint soup_host_uri_hash (gconstpointer key);
static gboolean soup_host_uri_equal (gconstpointer v1, gconstpointer v2);
-struct _SoupSession {
- GObject parent;
-};
-
typedef struct {
gboolean disposed;
@@ -2626,8 +2622,8 @@ soup_session_class_init (SoupSessionClass *session_class)
signals[REQUEST_QUEUED] =
g_signal_new ("request-queued",
G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- 0, /* FIXME? */
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (SoupSessionClass, request_queued),
NULL, NULL,
NULL,
G_TYPE_NONE, 1,
@@ -2647,8 +2643,8 @@ soup_session_class_init (SoupSessionClass *session_class)
signals[REQUEST_UNQUEUED] =
g_signal_new ("request-unqueued",
G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- 0, /* FIXME? */
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (SoupSessionClass, request_unqueued),
NULL, NULL,
NULL,
G_TYPE_NONE, 1,
diff --git a/libsoup/soup-session.h b/libsoup/soup-session.h
index 624f580a..e8457aaa 100644
--- a/libsoup/soup-session.h
+++ b/libsoup/soup-session.h
@@ -13,7 +13,25 @@ G_BEGIN_DECLS
#define SOUP_TYPE_SESSION soup_session_get_type ()
SOUP_AVAILABLE_IN_ALL
-G_DECLARE_FINAL_TYPE (SoupSession, soup_session, SOUP, SESSION, GObject)
+G_DECLARE_DERIVABLE_TYPE (SoupSession, soup_session, SOUP, SESSION, GObject)
+
+struct _SoupSessionClass {
+ GObjectClass parent_class;
+
+ void (* request_queued) (SoupSession *session,
+ SoupMessage *msg);
+ void (* request_unqueued) (SoupSession *session,
+ SoupMessage *msg);
+
+ void (*_soup_reserved1) (void);
+ void (*_soup_reserved2) (void);
+ void (*_soup_reserved3) (void);
+ void (*_soup_reserved4) (void);
+ void (*_soup_reserved5) (void);
+ void (*_soup_reserved6) (void);
+ void (*_soup_reserved7) (void);
+ void (*_soup_reserved8) (void);
+};
SOUP_AVAILABLE_IN_ALL
GQuark soup_session_error_quark (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]