[rhythmbox] podcast: register boxed types for podcast parser structs



commit 7c176bb5e23aafd3f6852780dcafc98f0a04e543
Author: Jonathan Matthew <jonathan d14n org>
Date:   Thu Jul 4 19:14:35 2013 +1000

    podcast: register boxed types for podcast parser structs

 podcast/rb-podcast-parse.c |   24 ++++++++++++++++++++++++
 podcast/rb-podcast-parse.h |    5 +++++
 2 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/podcast/rb-podcast-parse.c b/podcast/rb-podcast-parse.c
index e81e513..0c2879a 100644
--- a/podcast/rb-podcast-parse.c
+++ b/podcast/rb-podcast-parse.c
@@ -322,3 +322,27 @@ rb_podcast_parse_item_free (RBPodcastItem *item)
 
        g_free (item);
 }
+
+GType
+rb_podcast_channel_get_type (void)
+{
+       static GType type = 0;
+       if (G_UNLIKELY (type == 0)) {
+               type = g_boxed_type_register_static ("RBPodcastChannel",
+                                                    (GBoxedCopyFunc)rb_podcast_parse_channel_copy,
+                                                    (GBoxedFreeFunc)rb_podcast_parse_channel_free);
+       }
+       return type;
+}
+
+GType
+rb_podcast_item_get_type (void)
+{
+       static GType type = 0;
+       if (G_UNLIKELY (type == 0)) {
+               type = g_boxed_type_register_static ("RBPodcastItem",
+                                                    (GBoxedCopyFunc)rb_podcast_parse_item_copy,
+                                                    (GBoxedFreeFunc)rb_podcast_parse_item_free);
+       }
+       return type;
+}
diff --git a/podcast/rb-podcast-parse.h b/podcast/rb-podcast-parse.h
index 136dea4..abe85a5 100644
--- a/podcast/rb-podcast-parse.h
+++ b/podcast/rb-podcast-parse.h
@@ -70,6 +70,11 @@ typedef struct
        int num_posts;
 } RBPodcastChannel;
 
+GType  rb_podcast_channel_get_type (void);
+GType  rb_podcast_item_get_type (void);
+#define RB_TYPE_PODCAST_CHANNEL        (rb_podcast_channel_get_type ())
+#define RB_TYPE_PODCAST_ITEM (rb_podcast_item_get_type ())
+
 gboolean rb_podcast_parse_load_feed    (RBPodcastChannel *data,
                                         const char *url,
                                         gboolean existing_feed,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]