summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiscomfitor <michael.blumenkrantz@gmail.com>2013-03-23 00:21:46 +0000
committerdiscomfitor <michael.blumenkrantz@gmail.com>2013-03-23 00:21:46 +0000
commit7e8cd1d02adce5e6c55d20612988da9454a5a743 (patch)
tree38440ace4410fd54b8e74be18d09445558cbdb42
parent1e691dba52dfb1275cec0828e5c57c80d7a29194 (diff)
add accessor for guid permalink attribute
-rw-r--r--src/include/azy/Azy.h1
-rw-r--r--src/lib/azy/azy_rss_item.c13
2 files changed, 13 insertions, 1 deletions
diff --git a/src/include/azy/Azy.h b/src/include/azy/Azy.h
index dff09b6..75b6565 100644
--- a/src/include/azy/Azy.h
+++ b/src/include/azy/Azy.h
@@ -581,6 +581,7 @@ EAPI Eina_Stringshare *azy_rss_item_link_get(const Azy_Rss_Item *i
581EAPI Eina_Stringshare *azy_rss_item_desc_get(const Azy_Rss_Item *item); 581EAPI Eina_Stringshare *azy_rss_item_desc_get(const Azy_Rss_Item *item);
582EAPI time_t azy_rss_item_date_get(const Azy_Rss_Item *item); 582EAPI time_t azy_rss_item_date_get(const Azy_Rss_Item *item);
583EAPI Eina_Stringshare *azy_rss_item_guid_get(const Azy_Rss_Item *item); 583EAPI Eina_Stringshare *azy_rss_item_guid_get(const Azy_Rss_Item *item);
584EAPI Eina_Bool azy_rss_item_guid_is_permalink(const Azy_Rss_Item *item);
584EAPI Eina_Stringshare *azy_rss_item_comment_url_get(const Azy_Rss_Item *item); 585EAPI Eina_Stringshare *azy_rss_item_comment_url_get(const Azy_Rss_Item *item);
585EAPI Eina_Stringshare *azy_rss_item_author_get(const Azy_Rss_Item *item); 586EAPI Eina_Stringshare *azy_rss_item_author_get(const Azy_Rss_Item *item);
586EAPI Eina_Stringshare *azy_rss_item_rights_get(const Azy_Rss_Item *rss); 587EAPI Eina_Stringshare *azy_rss_item_rights_get(const Azy_Rss_Item *rss);
diff --git a/src/lib/azy/azy_rss_item.c b/src/lib/azy/azy_rss_item.c
index 0342e68..0b149b8 100644
--- a/src/lib/azy/azy_rss_item.c
+++ b/src/lib/azy/azy_rss_item.c
@@ -213,6 +213,17 @@ azy_rss_item_categories_get(const Azy_Rss_Item *item)
213 return item->categories; 213 return item->categories;
214} 214}
215 215
216Eina_Bool
217azy_rss_item_guid_is_permalink(const Azy_Rss_Item *item)
218{
219 if (!AZY_MAGIC_CHECK(item, AZY_MAGIC_RSS_ITEM))
220 {
221 AZY_MAGIC_FAIL(item, AZY_MAGIC_RSS_ITEM);
222 return EINA_FALSE;
223 }
224 return item->permalink;
225}
226
216#define DEF(NAME) \ 227#define DEF(NAME) \
217/** 228/**
218 @brief Retrieve the NAME of an rss item object 229 @brief Retrieve the NAME of an rss item object
@@ -222,7 +233,7 @@ azy_rss_item_categories_get(const Azy_Rss_Item *item)
222 @return The NAME, or NULL on failure 233 @return The NAME, or NULL on failure
223 */ \ 234 */ \
224 Eina_Stringshare * \ 235 Eina_Stringshare * \
225 azy_rss_item_##NAME##_get(const Azy_Rss_Item * item) \ 236 azy_rss_item_##NAME##_get(const Azy_Rss_Item *item) \
226 { \ 237 { \
227 if (!AZY_MAGIC_CHECK(item, AZY_MAGIC_RSS_ITEM)) \ 238 if (!AZY_MAGIC_CHECK(item, AZY_MAGIC_RSS_ITEM)) \
228 { \ 239 { \