diff options
author | Dan Winship <danw@gnome.org> | 2012-07-04 13:12:38 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2012-07-13 14:18:36 -0400 |
commit | 7b916078d6e1f3bc54124a9433295a8c3d825c22 (patch) | |
tree | c52907dc24c47386596151aff3a8bdb2baf6593f /libsoup/soup-cookie-jar-text.c | |
parent | 0d0b2f7717f88c8e837399548bfa2ebfc12c8587 (diff) | |
download | libsoup-7b916078d6e1f3bc54124a9433295a8c3d825c22.tar.gz |
Reorganize files to need fewer forward declarations
Also, prefix virtual method implementation names with the class name,
to be consistent with other code.
Diffstat (limited to 'libsoup/soup-cookie-jar-text.c')
-rw-r--r-- | libsoup/soup-cookie-jar-text.c | 91 |
1 files changed, 41 insertions, 50 deletions
diff --git a/libsoup/soup-cookie-jar-text.c b/libsoup/soup-cookie-jar-text.c index 259431f0..64f03dc2 100644 --- a/libsoup/soup-cookie-jar-text.c +++ b/libsoup/soup-cookie-jar-text.c @@ -41,16 +41,7 @@ typedef struct { G_DEFINE_TYPE (SoupCookieJarText, soup_cookie_jar_text, SOUP_TYPE_COOKIE_JAR) -static void load (SoupCookieJar *jar); -static void changed (SoupCookieJar *jar, - SoupCookie *old_cookie, - SoupCookie *new_cookie); -static gboolean is_persistent (SoupCookieJar *jar); - -static void set_property (GObject *object, guint prop_id, - const GValue *value, GParamSpec *pspec); -static void get_property (GObject *object, guint prop_id, - GValue *value, GParamSpec *pspec); +static void load (SoupCookieJar *jar); static void soup_cookie_jar_text_init (SoupCookieJarText *text) @@ -58,7 +49,7 @@ soup_cookie_jar_text_init (SoupCookieJarText *text) } static void -finalize (GObject *object) +soup_cookie_jar_text_finalize (GObject *object) { SoupCookieJarTextPrivate *priv = SOUP_COOKIE_JAR_TEXT_GET_PRIVATE (object); @@ -69,39 +60,8 @@ finalize (GObject *object) } static void -soup_cookie_jar_text_class_init (SoupCookieJarTextClass *text_class) -{ - SoupCookieJarClass *cookie_jar_class = - SOUP_COOKIE_JAR_CLASS (text_class); - GObjectClass *object_class = G_OBJECT_CLASS (text_class); - - g_type_class_add_private (text_class, sizeof (SoupCookieJarTextPrivate)); - - cookie_jar_class->is_persistent = is_persistent; - cookie_jar_class->changed = changed; - - object_class->finalize = finalize; - object_class->set_property = set_property; - object_class->get_property = get_property; - - /** - * SOUP_COOKIE_JAR_TEXT_FILENAME: - * - * Alias for the #SoupCookieJarText:filename property. (The - * cookie-storage filename.) - **/ - g_object_class_install_property ( - object_class, PROP_FILENAME, - g_param_spec_string (SOUP_COOKIE_JAR_TEXT_FILENAME, - "Filename", - "Cookie-storage filename", - NULL, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); -} - -static void -set_property (GObject *object, guint prop_id, - const GValue *value, GParamSpec *pspec) +soup_cookie_jar_text_set_property (GObject *object, guint prop_id, + const GValue *value, GParamSpec *pspec) { SoupCookieJarTextPrivate *priv = SOUP_COOKIE_JAR_TEXT_GET_PRIVATE (object); @@ -118,8 +78,8 @@ set_property (GObject *object, guint prop_id, } static void -get_property (GObject *object, guint prop_id, - GValue *value, GParamSpec *pspec) +soup_cookie_jar_text_get_property (GObject *object, guint prop_id, + GValue *value, GParamSpec *pspec) { SoupCookieJarTextPrivate *priv = SOUP_COOKIE_JAR_TEXT_GET_PRIVATE (object); @@ -316,9 +276,9 @@ delete_cookie (const char *filename, SoupCookie *cookie) } static void -changed (SoupCookieJar *jar, - SoupCookie *old_cookie, - SoupCookie *new_cookie) +soup_cookie_jar_text_changed (SoupCookieJar *jar, + SoupCookie *old_cookie, + SoupCookie *new_cookie) { FILE *out; SoupCookieJarTextPrivate *priv = @@ -367,7 +327,38 @@ changed (SoupCookieJar *jar, } static gboolean -is_persistent (SoupCookieJar *jar) +soup_cookie_jar_text_is_persistent (SoupCookieJar *jar) { return TRUE; } + +static void +soup_cookie_jar_text_class_init (SoupCookieJarTextClass *text_class) +{ + SoupCookieJarClass *cookie_jar_class = + SOUP_COOKIE_JAR_CLASS (text_class); + GObjectClass *object_class = G_OBJECT_CLASS (text_class); + + g_type_class_add_private (text_class, sizeof (SoupCookieJarTextPrivate)); + + cookie_jar_class->is_persistent = soup_cookie_jar_text_is_persistent; + cookie_jar_class->changed = soup_cookie_jar_text_changed; + + object_class->finalize = soup_cookie_jar_text_finalize; + object_class->set_property = soup_cookie_jar_text_set_property; + object_class->get_property = soup_cookie_jar_text_get_property; + + /** + * SOUP_COOKIE_JAR_TEXT_FILENAME: + * + * Alias for the #SoupCookieJarText:filename property. (The + * cookie-storage filename.) + **/ + g_object_class_install_property ( + object_class, PROP_FILENAME, + g_param_spec_string (SOUP_COOKIE_JAR_TEXT_FILENAME, + "Filename", + "Cookie-storage filename", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); +} |