[libgrss] Added "GRSS" namespace also to GObject macros Corrected small bug in update of managed feeds by Grss
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgrss] Added "GRSS" namespace also to GObject macros Corrected small bug in update of managed feeds by Grss
- Date: Tue, 27 Dec 2011 23:12:10 +0000 (UTC)
commit 04242007ff3384d0c91426f6b3171fcdf9c243c7
Author: Roberto Guido <bob4mail gmail com>
Date: Mon Jan 31 15:39:41 2011 +0100
Added "GRSS" namespace also to GObject macros
Corrected small bug in update of managed feeds by GrssFeedsPool
NEWS | 5 +--
examples/parse-outlines.c | 69 +++++++++++++++++++++++++++++++++++++++++++++
src/feed-channel.c | 10 +++---
src/feed-channel.h | 12 ++++----
src/feed-enclosure.c | 6 ++--
src/feed-enclosure.h | 12 ++++----
src/feed-item.c | 6 ++--
src/feed-item.h | 12 ++++----
src/feed-parser.c | 6 ++--
src/feed-parser.h | 12 ++++----
src/feeds-pool.c | 10 ++++--
src/feeds-pool.h | 12 ++++----
src/feeds-publisher.c | 4 +-
src/feeds-store.c | 10 +++---
src/feeds-store.h | 12 ++++----
src/feeds-subscriber.c | 6 ++--
src/feeds-subscriber.h | 12 ++++----
17 files changed, 143 insertions(+), 73 deletions(-)
---
diff --git a/NEWS b/NEWS
index 50df4f0..62392a5 100644
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,9 @@
libgrss 0.5 (UNRELEASED)
==============================================================================
- Complete API break: all object and function names moved to "grss" namespace
-- Added XOXO files parser
-- Added XBEL files parser
+- Added XOXO and XBEL files parsers
- Added FeedsPublisher to expose feeds contents as files or by local server
-- First test implementation of PubSubHub hub
+- PubSubHub subscriber
- Added functions feed_channel_fetch_async() and feed_channel_new_from_file()
libgrss 0.4
diff --git a/examples/parse-outlines.c b/examples/parse-outlines.c
new file mode 100644
index 0000000..208c258
--- /dev/null
+++ b/examples/parse-outlines.c
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010, Roberto Guido <rguido src gnome org>
+ * Michele Tameni <michele amdplanet it>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include <libgrss.h>
+
+static void print_usage (gchar *program_name)
+{
+ printf ("%s - sample OPML and XOXO parser\n", program_name);
+ printf ("Usage: %s <file>\n", program_name);
+ printf ("\t<file>\tan OPML or XOXO file\n");
+ printf ("\n");
+}
+
+int
+main (int argc, char **argv)
+{
+ GList *iter;
+ GList *list;
+ GError *error;
+ GrssFeedChannel *channel;
+ GrssFeedsGroup *parser;
+
+ if (argc < 2) {
+ print_usage (argv [0]);
+ exit (1);
+ }
+
+ g_type_init ();
+ g_thread_init (NULL);
+
+ parser = grss_feeds_group_new ();
+
+ error = NULL;
+ list = grss_feeds_group_parse_file (parser, argv [1], &error);
+
+ if (list == NULL && error != NULL) {
+ printf ("Unable to parse file %s: %s\n", argv [1], error->message);
+ g_error_free (error);
+ exit (1);
+ }
+
+ for (iter = list; iter; iter = iter->next) {
+ channel = iter->data;
+ printf ("\t%s - %s\n", grss_feed_channel_get_title (channel), grss_feed_channel_get_source (channel));
+ g_object_unref (channel);
+ }
+
+ g_list_free (list);
+
+ g_object_unref (parser);
+ exit (0);
+}
diff --git a/src/feed-channel.c b/src/feed-channel.c
index 555f9f3..a06e2b1 100644
--- a/src/feed-channel.c
+++ b/src/feed-channel.c
@@ -22,7 +22,7 @@
#include "feed-channel.h"
#include "feed-parser.h"
-#define FEED_CHANNEL_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), FEED_CHANNEL_TYPE, GrssFeedChannelPrivate))
+#define FEED_CHANNEL_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GRSS_FEED_CHANNEL_TYPE, GrssFeedChannelPrivate))
/**
* SECTION: feed-channel
@@ -79,7 +79,7 @@ grss_feed_channel_finalize (GObject *obj)
GList *iter;
GrssFeedChannel *chan;
- chan = FEED_CHANNEL (obj);
+ chan = GRSS_FEED_CHANNEL (obj);
FREE_STRING (chan->priv->title);
FREE_STRING (chan->priv->homepage);
FREE_STRING (chan->priv->description);
@@ -129,7 +129,7 @@ grss_feed_channel_init (GrssFeedChannel *node)
GrssFeedChannel*
grss_feed_channel_new ()
{
- return g_object_new (FEED_CHANNEL_TYPE, NULL);
+ return g_object_new (GRSS_FEED_CHANNEL_TYPE, NULL);
}
/**
@@ -162,7 +162,7 @@ grss_feed_channel_new_from_file (const gchar *path)
doc = file_to_xml (path);
if (doc != NULL) {
- ret = g_object_new (FEED_CHANNEL_TYPE, NULL);
+ ret = g_object_new (GRSS_FEED_CHANNEL_TYPE, NULL);
parser = grss_feed_parser_new ();
items = grss_feed_parser_parse (parser, ret, doc, NULL);
@@ -769,7 +769,7 @@ feed_downloaded (SoupSession *session, SoupMessage *msg, gpointer user_data) {
GrssFeedChannel *channel;
result = user_data;
- channel = FEED_CHANNEL (g_async_result_get_source_object (G_ASYNC_RESULT (result)));
+ channel = GRSS_FEED_CHANNEL (g_async_result_get_source_object (G_ASYNC_RESULT (result)));
g_object_get (msg, "status-code", &status, NULL);
if (status >= 200 && status <= 299) {
diff --git a/src/feed-channel.h b/src/feed-channel.h
index 411eb37..dd69617 100644
--- a/src/feed-channel.h
+++ b/src/feed-channel.h
@@ -23,12 +23,12 @@
#include "libgrss.h"
-#define FEED_CHANNEL_TYPE (grss_feed_channel_get_type())
-#define FEED_CHANNEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), FEED_CHANNEL_TYPE, GrssFeedChannel))
-#define FEED_CHANNEL_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), FEED_CHANNEL_TYPE, GrssFeedChannelClass))
-#define IS_FEED_CHANNEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), FEED_CHANNEL_TYPE))
-#define IS_FEED_CHANNEL_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), FEED_CHANNEL_TYPE))
-#define FEED_CHANNEL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), FEED_CHANNEL_TYPE, GrssFeedChannelClass))
+#define GRSS_FEED_CHANNEL_TYPE (grss_feed_channel_get_type())
+#define GRSS_FEED_CHANNEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GRSS_FEED_CHANNEL_TYPE, GrssFeedChannel))
+#define FEED_CHANNEL_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GRSS_FEED_CHANNEL_TYPE, GrssFeedChannelClass))
+#define GRSS_IS_FEED_CHANNEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GRSS_FEED_CHANNEL_TYPE))
+#define GRSS_IS_FEED_CHANNEL_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GRSS_FEED_CHANNEL_TYPE))
+#define GRSS_FEED_CHANNEL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GRSS_FEED_CHANNEL_TYPE, GrssFeedChannelClass))
typedef struct _GrssFeedChannel GrssFeedChannel;
typedef struct _GrssFeedChannelPrivate GrssFeedChannelPrivate;
diff --git a/src/feed-enclosure.c b/src/feed-enclosure.c
index c666cea..c68d488 100644
--- a/src/feed-enclosure.c
+++ b/src/feed-enclosure.c
@@ -21,7 +21,7 @@
#include "utils.h"
#include "feed-enclosure.h"
-#define FEED_ENCLOSURE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), FEED_ENCLOSURE_TYPE, GrssFeedEnclosurePrivate))
+#define FEED_ENCLOSURE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GRSS_FEED_ENCLOSURE_TYPE, GrssFeedEnclosurePrivate))
/**
* SECTION: feed-enclosure
@@ -44,7 +44,7 @@ static void grss_feed_enclosure_finalize (GObject *obj)
{
GrssFeedEnclosure *enclosure;
- enclosure = FEED_ENCLOSURE (obj);
+ enclosure = GRSS_FEED_ENCLOSURE (obj);
FREE_STRING (enclosure->priv->url);
FREE_STRING (enclosure->priv->type);
}
@@ -77,7 +77,7 @@ GrssFeedEnclosure* grss_feed_enclosure_new (gchar *url)
{
GrssFeedEnclosure *ret;
- ret = g_object_new (FEED_ENCLOSURE_TYPE, NULL);
+ ret = g_object_new (GRSS_FEED_ENCLOSURE_TYPE, NULL);
ret->priv->url = g_strdup (url);
return ret;
}
diff --git a/src/feed-enclosure.h b/src/feed-enclosure.h
index d928259..3dcb307 100644
--- a/src/feed-enclosure.h
+++ b/src/feed-enclosure.h
@@ -23,12 +23,12 @@
#include "libgrss.h"
-#define FEED_ENCLOSURE_TYPE (grss_feed_enclosure_get_type())
-#define FEED_ENCLOSURE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), FEED_ENCLOSURE_TYPE, GrssFeedEnclosure))
-#define FEED_ENCLOSURE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), FEED_ENCLOSURE_TYPE, GrssFeedEnclosureClass))
-#define IS_FEED_ENCLOSURE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), FEED_ENCLOSURE_TYPE))
-#define IS_FEED_ENCLOSURE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), FEED_ENCLOSURE_TYPE))
-#define FEED_ENCLOSURE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), FEED_ENCLOSURE_TYPE, GrssFeedEnclosureClass))
+#define GRSS_FEED_ENCLOSURE_TYPE (grss_feed_enclosure_get_type())
+#define GRSS_FEED_ENCLOSURE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GRSS_FEED_ENCLOSURE_TYPE, GrssFeedEnclosure))
+#define GRSS_FEED_ENCLOSURE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GRSS_FEED_ENCLOSURE_TYPE, GrssFeedEnclosureClass))
+#define GRSS_IS_FEED_ENCLOSURE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GRSS_FEED_ENCLOSURE_TYPE))
+#define GRSS_IS_FEED_ENCLOSURE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GRSS_FEED_ENCLOSURE_TYPE))
+#define GRSS_FEED_ENCLOSURE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GRSS_FEED_ENCLOSURE_TYPE, GrssFeedEnclosureClass))
typedef struct _GrssFeedEnclosure GrssFeedEnclosure;
typedef struct _GrssFeedEnclosurePrivate GrssFeedEnclosurePrivate;
diff --git a/src/feed-item.c b/src/feed-item.c
index 59e3c6d..ccd27f8 100644
--- a/src/feed-item.c
+++ b/src/feed-item.c
@@ -22,7 +22,7 @@
#include "feed-item.h"
#include "feed-channel.h"
-#define FEED_ITEM_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), FEED_ITEM_TYPE, GrssFeedItemPrivate))
+#define FEED_ITEM_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GRSS_FEED_ITEM_TYPE, GrssFeedItemPrivate))
/**
* SECTION: feed-item
@@ -72,7 +72,7 @@ grss_feed_item_finalize (GObject *obj)
GList *iter;
GrssFeedItem *item;
- item = FEED_ITEM (obj);
+ item = GRSS_FEED_ITEM (obj);
FREE_STRING (item->priv->id);
FREE_STRING (item->priv->title);
FREE_STRING (item->priv->description);
@@ -134,7 +134,7 @@ grss_feed_item_new (GrssFeedChannel *parent)
{
GrssFeedItem *item;
- item = FEED_ITEM (g_object_new (FEED_ITEM_TYPE, NULL));
+ item = GRSS_FEED_ITEM (g_object_new (GRSS_FEED_ITEM_TYPE, NULL));
item->priv->parent = parent;
item->priv->pub_time = time (NULL);
return item;
diff --git a/src/feed-item.h b/src/feed-item.h
index 7a4e06d..fbc9ea3 100644
--- a/src/feed-item.h
+++ b/src/feed-item.h
@@ -23,12 +23,12 @@
#include "libgrss.h"
-#define FEED_ITEM_TYPE (grss_feed_item_get_type())
-#define FEED_ITEM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), FEED_ITEM_TYPE, GrssFeedItem))
-#define FEED_ITEM_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), FEED_ITEM_TYPE, GrssFeedItemClass))
-#define IS_FEED_ITEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), FEED_ITEM_TYPE))
-#define IS_FEED_ITEM_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), FEED_ITEM_TYPE))
-#define FEED_ITEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), FEED_ITEM_TYPE, GrssFeedItemClass))
+#define GRSS_FEED_ITEM_TYPE (grss_feed_item_get_type())
+#define GRSS_FEED_ITEM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GRSS_FEED_ITEM_TYPE, GrssFeedItem))
+#define GRSS_FEED_ITEM_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GRSS_FEED_ITEM_TYPE, GrssFeedItemClass))
+#define GRSS_IS_FEED_ITEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GRSS_FEED_ITEM_TYPE))
+#define GRSS_IS_FEED_ITEM_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GRSS_FEED_ITEM_TYPE))
+#define GRSS_FEED_ITEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GRSS_FEED_ITEM_TYPE, GrssFeedItemClass))
typedef struct _GrssFeedItem GrssFeedItem;
typedef struct _GrssFeedItemPrivate GrssFeedItemPrivate;
diff --git a/src/feed-parser.c b/src/feed-parser.c
index d6a908b..37f5d5d 100644
--- a/src/feed-parser.c
+++ b/src/feed-parser.c
@@ -33,7 +33,7 @@
#include "feed-atom-handler.h"
#include "feed-pie-handler.h"
-#define FEED_PARSER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FEED_PARSER_TYPE, GrssFeedParserPrivate))
+#define FEED_PARSER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GRSS_FEED_PARSER_TYPE, GrssFeedParserPrivate))
/**
* SECTION: feed-parser
@@ -67,7 +67,7 @@ grss_feed_parser_finalize (GObject *object)
{
GrssFeedParser *parser;
- parser = FEED_PARSER (object);
+ parser = GRSS_FEED_PARSER (object);
G_OBJECT_CLASS (grss_feed_parser_parent_class)->finalize (object);
}
@@ -127,7 +127,7 @@ grss_feed_parser_new ()
{
GrssFeedParser *parser;
- parser = g_object_new (FEED_PARSER_TYPE, NULL);
+ parser = g_object_new (GRSS_FEED_PARSER_TYPE, NULL);
return parser;
}
diff --git a/src/feed-parser.h b/src/feed-parser.h
index eb1dea2..fdd45a4 100644
--- a/src/feed-parser.h
+++ b/src/feed-parser.h
@@ -23,12 +23,12 @@
#include "libgrss.h"
-#define FEED_PARSER_TYPE (grss_feed_parser_get_type())
-#define FEED_PARSER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), FEED_PARSER_TYPE, GrssFeedParser))
-#define FEED_PARSER_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), FEED_PARSER_TYPE, GrssFeedParserClass))
-#define IS_FEED_PARSER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), FEED_PARSER_TYPE))
-#define IS_FEED_PARSER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), FEED_PARSER_TYPE))
-#define FEED_PARSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), FEED_PARSER_TYPE, GrssFeedParserClass))
+#define GRSS_FEED_PARSER_TYPE (grss_feed_parser_get_type())
+#define GRSS_FEED_PARSER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GRSS_FEED_PARSER_TYPE, GrssFeedParser))
+#define GRSS_FEED_PARSER_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GRSS_FEED_PARSER_TYPE, GrssFeedParserClass))
+#define GRSS_IS_FEED_PARSER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GRSS_FEED_PARSER_TYPE))
+#define GRSS_IS_FEED_PARSER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GRSS_FEED_PARSER_TYPE))
+#define GRSS_FEED_PARSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GRSS_FEED_PARSER_TYPE, GrssFeedParserClass))
typedef struct _GrssFeedParser GrssFeedParser;
typedef struct _GrssFeedParserPrivate GrssFeedParserPrivate;
diff --git a/src/feeds-pool.c b/src/feeds-pool.c
index 3ddfa7e..d3233bf 100644
--- a/src/feeds-pool.c
+++ b/src/feeds-pool.c
@@ -23,7 +23,7 @@
#include "feed-parser.h"
#include "feed-marshal.h"
-#define FEEDS_POOL_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), FEEDS_POOL_TYPE, GrssFeedsPoolPrivate))
+#define FEEDS_POOL_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GRSS_FEEDS_POOL_TYPE, GrssFeedsPoolPrivate))
/**
* SECTION: feeds-pool
@@ -65,6 +65,8 @@ remove_currently_listened (GrssFeedsPool *pool)
GList *iter;
GrssFeedChannelWrap *wrap;
+ soup_session_abort (pool->priv->soupsession);
+
if (pool->priv->feeds_list != NULL) {
for (iter = pool->priv->feeds_list; iter; iter = g_list_next (iter)) {
wrap = (GrssFeedChannelWrap*) iter->data;
@@ -93,7 +95,7 @@ grss_feeds_pool_finalize (GObject *obj)
{
GrssFeedsPool *pool;
- pool = FEEDS_POOL (obj);
+ pool = GRSS_FEEDS_POOL (obj);
grss_feeds_pool_switch (pool, FALSE);
remove_currently_listened (pool);
g_object_unref (pool->priv->parser);
@@ -160,7 +162,7 @@ grss_feeds_pool_init (GrssFeedsPool *node)
GrssFeedsPool*
grss_feeds_pool_new ()
{
- return g_object_new (FEEDS_POOL_TYPE, NULL);
+ return g_object_new (GRSS_FEEDS_POOL_TYPE, NULL);
}
static void
@@ -174,7 +176,7 @@ create_listened (GrssFeedsPool *pool, GList *feeds)
list = NULL;
for (iter = feeds; iter; iter = g_list_next (iter)) {
- feed = FEED_CHANNEL (iter->data);
+ feed = GRSS_FEED_CHANNEL (iter->data);
wrap = g_new0 (GrssFeedChannelWrap, 1);
g_object_ref (feed);
diff --git a/src/feeds-pool.h b/src/feeds-pool.h
index f8a24be..d503961 100644
--- a/src/feeds-pool.h
+++ b/src/feeds-pool.h
@@ -23,12 +23,12 @@
#include "libgrss.h"
-#define FEEDS_POOL_TYPE (grss_feeds_pool_get_type())
-#define FEEDS_POOL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), FEEDS_POOL_TYPE, GrssFeedsPool))
-#define FEEDS_POOL_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), FEEDS_POOL_TYPE, GrssFeedsPoolClass))
-#define IS_FEEDS_POOL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), FEEDS_POOL_TYPE))
-#define IS_FEEDS_POOL_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), FEEDS_POOL_TYPE))
-#define FEEDS_POOL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), FEEDS_POOL_TYPE, GrssFeedsPoolClass))
+#define GRSS_FEEDS_POOL_TYPE (grss_feeds_pool_get_type())
+#define GRSS_FEEDS_POOL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GRSS_FEEDS_POOL_TYPE, GrssFeedsPool))
+#define GRSS_FEEDS_POOL_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GRSS_FEEDS_POOL_TYPE, GrssFeedsPoolClass))
+#define GRSS_IS_FEEDS_POOL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GRSS_FEEDS_POOL_TYPE))
+#define GRSS_IS_FEEDS_POOL_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GRSS_FEEDS_POOL_TYPE))
+#define GRSS_FEEDS_POOL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GRSS_FEEDS_POOL_TYPE, GrssFeedsPoolClass))
typedef struct _GrssFeedsPool GrssFeedsPool;
typedef struct _GrssFeedsPoolPrivate GrssFeedsPoolPrivate;
diff --git a/src/feeds-publisher.c b/src/feeds-publisher.c
index c2036a7..35bcd6d 100644
--- a/src/feeds-publisher.c
+++ b/src/feeds-publisher.c
@@ -173,7 +173,7 @@ grss_feeds_publisher_class_init (GrssFeedsPublisherClass *klass)
*/
signals [SUBSCRIPTION_ADDED] = g_signal_new ("new-subscription", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0,
NULL, NULL, feed_marshal_VOID__OBJECT_STRING,
- G_TYPE_NONE, 2, FEED_CHANNEL_TYPE, G_TYPE_STRING);
+ G_TYPE_NONE, 2, GRSS_FEED_CHANNEL_TYPE, G_TYPE_STRING);
/**
* GrssFeedsSubscriber::new_subscription:
@@ -185,7 +185,7 @@ grss_feeds_publisher_class_init (GrssFeedsPublisherClass *klass)
*/
signals [SUBSCRIPTION_DELETED] = g_signal_new ("delete-subscription", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0,
NULL, NULL, feed_marshal_VOID__OBJECT_STRING,
- G_TYPE_NONE, 2, FEED_CHANNEL_TYPE, G_TYPE_STRING);
+ G_TYPE_NONE, 2, GRSS_FEED_CHANNEL_TYPE, G_TYPE_STRING);
}
static void
diff --git a/src/feeds-store.c b/src/feeds-store.c
index 9f33d5a..136198f 100644
--- a/src/feeds-store.c
+++ b/src/feeds-store.c
@@ -21,7 +21,7 @@
#include "utils.h"
#include "feeds-pool.h"
-#define FEEDS_STORE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), FEEDS_STORE_TYPE, GrssFeedsStorePrivate))
+#define FEEDS_STORE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GRSS_FEEDS_STORE_TYPE, GrssFeedsStorePrivate))
/**
* SECTION: feeds-store
@@ -65,7 +65,7 @@ grss_feeds_store_init (GrssFeedsStore *node)
GList*
grss_feeds_store_get_channels (GrssFeedsStore *store)
{
- return FEEDS_STORE_GET_CLASS (store)->get_channels (store);
+ return GRSS_FEEDS_STORE_GET_CLASS (store)->get_channels (store);
}
/**
@@ -82,7 +82,7 @@ grss_feeds_store_get_channels (GrssFeedsStore *store)
GList*
grss_feeds_store_get_items_by_channel (GrssFeedsStore *store, GrssFeedChannel *channel)
{
- return FEEDS_STORE_GET_CLASS (store)->get_items_by_channel (store, channel);
+ return GRSS_FEEDS_STORE_GET_CLASS (store)->get_items_by_channel (store, channel);
}
/**
@@ -98,7 +98,7 @@ grss_feeds_store_get_items_by_channel (GrssFeedsStore *store, GrssFeedChannel *c
gboolean
grss_feeds_store_has_item (GrssFeedsStore *store, GrssFeedChannel *channel, const gchar *id)
{
- return FEEDS_STORE_GET_CLASS (store)->has_item (store, channel, id);
+ return GRSS_FEEDS_STORE_GET_CLASS (store)->has_item (store, channel, id);
}
/**
@@ -114,7 +114,7 @@ void
grss_feeds_store_add_item_in_channel (GrssFeedsStore *store, GrssFeedChannel *channel, GrssFeedItem *item)
{
if (grss_feeds_store_has_item (store, channel, grss_feed_item_get_id (item)) == FALSE)
- FEEDS_STORE_GET_CLASS (store)->add_item_in_channel (store, channel, item);
+ GRSS_FEEDS_STORE_GET_CLASS (store)->add_item_in_channel (store, channel, item);
}
static void
diff --git a/src/feeds-store.h b/src/feeds-store.h
index ab940fc..2abe3fa 100644
--- a/src/feeds-store.h
+++ b/src/feeds-store.h
@@ -22,12 +22,12 @@
#include "libgrss.h"
-#define FEEDS_STORE_TYPE (grss_feeds_store_get_type())
-#define FEEDS_STORE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), FEEDS_STORE_TYPE, GrssFeedsStore))
-#define FEEDS_STORE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), FEEDS_STORE_TYPE, GrssFeedsStoreClass))
-#define IS_FEEDS_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), FEEDS_STORE_TYPE))
-#define IS_FEEDS_STORE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), FEEDS_STORE_TYPE))
-#define FEEDS_STORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), FEEDS_STORE_TYPE, GrssFeedsStoreClass))
+#define GRSS_FEEDS_STORE_TYPE (grss_feeds_store_get_type())
+#define GRSS_FEEDS_STORE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GRSS_FEEDS_STORE_TYPE, GrssFeedsStore))
+#define GRSS_FEEDS_STORE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GRSS_FEEDS_STORE_TYPE, GrssFeedsStoreClass))
+#define GRSS_IS_FEEDS_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GRSS_FEEDS_STORE_TYPE))
+#define GRSS_IS_FEEDS_STORE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GRSS_FEEDS_STORE_TYPE))
+#define GRSS_FEEDS_STORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GRSS_FEEDS_STORE_TYPE, GrssFeedsStoreClass))
typedef struct _GrssFeedsStore GrssFeedsStore;
typedef struct _GrssFeedsStorePrivate GrssFeedsStorePrivate;
diff --git a/src/feeds-subscriber.c b/src/feeds-subscriber.c
index 60c192d..3aef7c2 100644
--- a/src/feeds-subscriber.c
+++ b/src/feeds-subscriber.c
@@ -25,7 +25,7 @@
#define DEFAULT_SERVER_PORT 8444
-#define FEEDS_SUBSCRIBER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), FEEDS_SUBSCRIBER_TYPE, GrssFeedsSubscriberPrivate))
+#define FEEDS_SUBSCRIBER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GRSS_FEEDS_SUBSCRIBER_TYPE, GrssFeedsSubscriberPrivate))
/**
* SECTION: feeds-subscriber
@@ -140,7 +140,7 @@ grss_feeds_subscriber_finalize (GObject *obj)
{
GrssFeedsSubscriber *sub;
- sub = FEEDS_SUBSCRIBER (obj);
+ sub = GRSS_FEEDS_SUBSCRIBER (obj);
grss_feeds_subscriber_switch (sub, FALSE);
remove_currently_listened (sub);
FREE_STRING (sub->priv->hub);
@@ -192,7 +192,7 @@ grss_feeds_subscriber_init (GrssFeedsSubscriber *node)
GrssFeedsSubscriber*
grss_feeds_subscriber_new ()
{
- return g_object_new (FEEDS_SUBSCRIBER_TYPE, NULL);
+ return g_object_new (GRSS_FEEDS_SUBSCRIBER_TYPE, NULL);
}
static gboolean
diff --git a/src/feeds-subscriber.h b/src/feeds-subscriber.h
index 90557c6..bbb39c1 100644
--- a/src/feeds-subscriber.h
+++ b/src/feeds-subscriber.h
@@ -23,12 +23,12 @@
#include "libgrss.h"
-#define FEEDS_SUBSCRIBER_TYPE (grss_feeds_subscriber_get_type())
-#define FEEDS_SUBSCRIBER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), FEEDS_SUBSCRIBER_TYPE, GrssFeedsSubscriber))
-#define FEEDS_SUBSCRIBER_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), FEEDS_SUBSCRIBER_TYPE, GrssFeedsSubscriberClass))
-#define IS_FEEDS_SUBSCRIBER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), FEEDS_SUBSCRIBER_TYPE))
-#define IS_FEEDS_SUBSCRIBER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), FEEDS_SUBSCRIBER_TYPE))
-#define FEEDS_SUBSCRIBER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), FEEDS_SUBSCRIBER_TYPE, GrssFeedsSubscriberClass))
+#define GRSS_FEEDS_SUBSCRIBER_TYPE (grss_feeds_subscriber_get_type())
+#define GRSS_FEEDS_SUBSCRIBER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GRSS_FEEDS_SUBSCRIBER_TYPE, GrssFeedsSubscriber))
+#define GRSS_FEEDS_SUBSCRIBER_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GRSS_FEEDS_SUBSCRIBER_TYPE, GrssFeedsSubscriberClass))
+#define GRSS_IS_FEEDS_SUBSCRIBER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GRSS_FEEDS_SUBSCRIBER_TYPE))
+#define GRSS_IS_FEEDS_SUBSCRIBER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GRSS_FEEDS_SUBSCRIBER_TYPE))
+#define GRSS_FEEDS_SUBSCRIBER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GRSS_FEEDS_SUBSCRIBER_TYPE, GrssFeedsSubscriberClass))
typedef struct _GrssFeedsSubscriber GrssFeedsSubscriber;
typedef struct _GrssFeedsSubscriberPrivate GrssFeedsSubscriberPrivate;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]