diff options
author | Patrick Griffis <pgriffis@igalia.com> | 2020-03-25 03:59:41 -0700 |
---|---|---|
committer | Patrick Griffis <pgriffis@igalia.com> | 2020-09-19 15:41:24 -0700 |
commit | 4e39dbad76cbe672cf4a68afe2eb35e0ad0c67bc (patch) | |
tree | 53ce6ae75af42ecba2326997a3333fb52c35bb93 /libsoup/cookies/soup-cookie-jar.h | |
parent | 55d928b6cab01a96295e7d3da86942a3bfb29847 (diff) | |
download | libsoup-4e39dbad76cbe672cf4a68afe2eb35e0ad0c67bc.tar.gz |
Modernize GObject declarations
Diffstat (limited to 'libsoup/cookies/soup-cookie-jar.h')
-rw-r--r-- | libsoup/cookies/soup-cookie-jar.h | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/libsoup/cookies/soup-cookie-jar.h b/libsoup/cookies/soup-cookie-jar.h index 793e503c..32c0a15e 100644 --- a/libsoup/cookies/soup-cookie-jar.h +++ b/libsoup/cookies/soup-cookie-jar.h @@ -3,26 +3,17 @@ * Copyright (C) 2008 Red Hat, Inc. */ -#ifndef __SOUP_COOKIE_JAR_H__ -#define __SOUP_COOKIE_JAR_H__ 1 +#pragma once #include "soup-types.h" G_BEGIN_DECLS #define SOUP_TYPE_COOKIE_JAR (soup_cookie_jar_get_type ()) -#define SOUP_COOKIE_JAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_COOKIE_JAR, SoupCookieJar)) -#define SOUP_COOKIE_JAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_COOKIE_JAR, SoupCookieJarClass)) -#define SOUP_IS_COOKIE_JAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_COOKIE_JAR)) -#define SOUP_IS_COOKIE_JAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_COOKIE_JAR)) -#define SOUP_COOKIE_JAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_COOKIE_JAR, SoupCookieJarClass)) - -struct _SoupCookieJar { - GObject parent; - -}; +SOUP_AVAILABLE_IN_2_24 +G_DECLARE_DERIVABLE_TYPE (SoupCookieJar, soup_cookie_jar, SOUP, COOKIE_JAR, GObject) -typedef struct { +struct _SoupCookieJarClass { GObjectClass parent_class; void (*save) (SoupCookieJar *jar); @@ -34,9 +25,8 @@ typedef struct { SoupCookie *new_cookie); /* Padding for future expansion */ - void (*_libsoup_reserved1) (void); - void (*_libsoup_reserved2) (void); -} SoupCookieJarClass; + gpointer padding[6]; +}; #define SOUP_COOKIE_JAR_READ_ONLY "read-only" #define SOUP_COOKIE_JAR_ACCEPT_POLICY "accept-policy" @@ -49,8 +39,6 @@ typedef enum { } SoupCookieJarAcceptPolicy; SOUP_AVAILABLE_IN_2_24 -GType soup_cookie_jar_get_type (void); -SOUP_AVAILABLE_IN_2_24 SoupCookieJar * soup_cookie_jar_new (void); SOUP_AVAILABLE_IN_2_24 char * soup_cookie_jar_get_cookies (SoupCookieJar *jar, @@ -104,5 +92,3 @@ SOUP_AVAILABLE_IN_2_40 gboolean soup_cookie_jar_is_persistent (SoupCookieJar *jar); G_END_DECLS - -#endif /* __SOUP_COOKIE_JAR_H__ */ |