AwasuFeedParser.h File Reference

This header file defines the main interface to the Awasu Feed Parser SDK. More...


Defines

#define AFPRC_OK   0
 The operation was completed successfully.
#define AFPRC_NOTINITIALIZED   1
 The SDK was not initialized.
#define AFPRC_INVALIDPARAM   2
 An invalid parameter was specified.
#define AFPRC_SDKERROR   3
 An internal SDK error has occured.
#define AFPRC_BADINDEX   4
 An invalid index was specified for a indexed field.
#define AFPRC_PARSEFAILED   5
 The feed document could not be parsed.
#define AFPRC_XMLREDIRECT   6
 The feed has been redirected.
#define AFPOPT_PERMALINK_PSEUDORELTYPE   1000
 Permalink pseudo-reltype.
#define AFPOPT_ENCLOSURE_PSEUDORELTYPE   1001
 Enclosure pseudo-reltype.
#define AFPOPT_TRANSLATE_INVALID_AMPERSANDS   2000
 Translates invalid ampersands in feed content.
#define AFPOPT_TRANSLATE_RELATIVE_LINKS   2001
 Translates relative links in feed content.
#define AFPOPT_REPEAT_SGML_ENTITY_DECODING   2002
 Requests that SGML entities be decoded multiple times.
#define AFPOPT_ENCODING_OVERRIDE   2003
 Forces the feed to be parsed using the specified encoding.
#define AFPOPT_FEED_TYPE_OVERRIDE   2004
 Forces the feed to be parsed as the specified format.
#define AFPFID_FEED_EXTERNALID   1000
 Used to retrieve the external ID of a feed.
#define AFPFID_FEED_TITLE   1001
 Used to retrieve the title of a feed.
#define AFPFID_FEED_HOMEURL   1002
 Used to retrieve the home URL of a feed.
#define AFPFID_FEED_DESCRIPTION   1003
 Used to retrieve the description/tagline of a feed.
#define AFPFID_FEED_AUTHORNAME   1004
 Used to retrieve the name of a feed's author.
#define AFPFID_FEED_AUTHORURL   1005
 Used to retrieve the home URL of a feed's author.
#define AFPFID_FEED_AUTHOREMAIL   1006
 Used to retrieve the email address of a feed's author.
#define AFPFID_FEED_EDITOREMAIL   1007
 Used to retrieve the email address of a feed's editor.
#define AFPFID_FEED_WEBMASTEREMAIL   1008
 Used to retrieve the email address of a feed's webmaster.
#define AFPFID_FEED_IMAGEURL   1009
 Used to retrieve the URL of a feed's image.
#define AFPFID_FEED_IMAGEWIDTH   1010
 Used to retrieve the width of a feed's image.
#define AFPFID_FEED_IMAGEHEIGHT   1011
 Used to retrieve the height of a feed's image.
#define AFPFID_FEED_PUBDATE   1012
 Used to retrieve the published timestamp of a feed.
#define AFPFID_FEED_MODIFIEDTIME   1013
 Used to retrieve the modified timestamp of a feed.
#define AFPFID_FEED_COPYRIGHT   1014
 Used to retrieve the copyright information of a feed.
#define AFPFID_FEED_LANGUAGE   1015
 Used to retrieve the language used by a feed.
#define AFPFID_FEED_SKIPDAYS   1016
 Used to retrieve the skip-days schedule of a feed.
#define AFPFID_FEED_SKIPHOURS   1017
 Used to retrieve the skip-hours schedule of a feed.
#define AFPFID_FEED_LINKURL   1100
 Used to retrieve the URL of a feed link.
#define AFPFID_FEED_LINKTITLE   1101
 Used to retrieve the title of a feed link.
#define AFPFID_FEED_LINKRELTYPE   1102
 Used to retrieve the reltype of a feed link.
#define AFPFID_FEED_LINKMEDIATYPE   1103
 Used to retrieve the media type of a feed link.
#define AFPFID_FEED_LINKSIZE   1104
 Used to retrieve the size of a feed link.
#define AFPFID_FEED_CONTRIBUTORNAME   1110
 Used to retrieve the name of a feed contributor.
#define AFPFID_FEED_CONTRIBUTORURL   1111
 Used to retrieve the home URL of a feed contributor.
#define AFPFID_FEED_CONTRIBUTOREMAIL   1112
 Used to retrieve the email address of a feed contributor.
#define AFPFID_ITEM_EXTERNALID   2000
 Used to retrieve the external ID of a feed item.
#define AFPFID_ITEM_TITLE   2001
 Used to retrieve the title of a feed item.
#define AFPFID_ITEM_URL   2002
 Used to retrieve the URL of a feed item.
#define AFPFID_ITEM_AUTHORNAME   2003
 Used to retrieve the name of a feed item's author.
#define AFPFID_ITEM_AUTHORURL   2004
 Used to retrieve the home URL of a feed item's author.
#define AFPFID_ITEM_AUTHOREMAIL   2005
 Used to retrieve the email address of a feed item's author.
#define AFPFID_ITEM_PUBDATE   2006
 Used to retrieve the published timestamp of a feed item.
#define AFPFID_ITEM_MODIFIEDTIME   2007
 Used to retrieve the modified timestamp of a feed item.
#define AFPFID_ITEM_COMMENTSURL   2008
 Used to retrieve the comments URL for a feed item.
#define AFPFID_ITEM_SOURCEURL   2009
 Used to retrieve the source URL for a feed item.
#define AFPFID_ITEM_SOURCENAME   2010
 Used to retrieve the source name for a feed item.
#define AFPFID_ITEM_FINGERPRINT   2100
 Used to retrieve the feed item's fingerprint.
#define AFPFID_ITEM_CONTENT   2100
 Used to retrieve a content node for a feed item.
#define AFPFID_ITEM_CONTENTMEDIATYPE   2101
 Used to retrieve the media type of a feed item's content node.
#define AFPFID_ITEM_CONTENTLANGUAGE   2102
 Used to retrieve the language used by a feed item's content node.
#define AFPFID_ITEM_SUMMARY   2110
 Used to retrieve a summary node for a feed item.
#define AFPFID_ITEM_SUMMARYMEDIATYPE   2111
 Used to retrieve the media type of a feed item's summary node.
#define AFPFID_ITEM_SUMMARYLANGUAGE   2112
 Used to retrieve the language used by a feed item's summary node.
#define AFPFID_ITEM_LINKURL   2120
 Used to retrieve the URL of a feed item link.
#define AFPFID_ITEM_LINKTITLE   2121
 Used to retrieve the title of a feed item link.
#define AFPFID_ITEM_LINKRELTYPE   2122
 Used to retrieve the reltype of a feed item link.
#define AFPFID_ITEM_LINKMEDIATYPE   2123
 Used to retrieve the media type of a feed item link.
#define AFPFID_ITEM_LINKSIZE   2124
 Used to retrieve the size of a feed item link.
#define AFPFID_ITEM_CONTRIBUTORNAME   2130
 Used to retrieve the name of a feed item contributor.
#define AFPFID_ITEM_CONTRIBUTORURL   2131
 Used to retrieve the home URL of a feed item contributor.
#define AFPFID_ITEM_CONTRIBUTOREMAIL   2132
 Used to retrieve the email address of a feed item contributor.

Typedefs

typedef void * AFP_HFEEDPARSER
 Handle to an AFP parser object.
typedef void * AFP_HFEEDDOC
 Handle to an AFP document object.
typedef int AFP_RETCODE
 SDK return code.
typedef int AFP_CONFIGOPTION
 SDK configuration option.
typedef int AFP_FIELDID
 Feed and feed item field ID.

Functions

AFP_RETCODE AFP_Init (void *pReserved, AFP_ErrorInfo *pErrorInfo)
 Initializes the SDK.
AFP_RETCODE AFP_Shutdown (AFP_ErrorInfo *pErrorInfo)
 Cleans up and shuts down the SDK.
AFP_RETCODE AFP_GetConfigOption (AFP_CONFIGOPTION configOption, void **ppOptionVal, AFP_ErrorInfo *pErrorInfo)
 Retrieves a library configuration option.
const char * AFP_GetBuildDate ()
 Returns the date/time the SDK was built.
AFP_RETCODE AFP_AllocFeedParser (AFP_HFEEDPARSER *phFeedParser, AFP_ErrorInfo *pErrorInfo)
 Allocates and initializes a new AFP parser object.
AFP_RETCODE AFP_FreeFeedParser (AFP_HFEEDPARSER hFeedParser, AFP_ErrorInfo *pErrorInfo)
 Frees an AFP feed parser object.
AFP_RETCODE AFP_SetFeedParserOption (AFP_HFEEDPARSER hFeedParser, AFP_CONFIGOPTION configOption, void *pOptionVal, AFP_ErrorInfo *pErrorInfo)
 Configures an AFP parser object.
AFP_RETCODE AFP_ParseFeed (AFP_HFEEDPARSER hFeedParser, const char *pFeedDoc, size_t feedDocSize, const char *pBaseUrl, AFP_HFEEDDOC *phFeedDoc, AFP_ErrorInfo *pErrorInfo)
 Parses a feed and returns a handle for an AFP document object that represents the parsed feed. This document object can then be queried about the various elements that were found in the feed.
AFP_RETCODE AFP_FreeFeedDoc (AFP_HFEEDDOC hFeedDoc, AFP_ErrorInfo *pErrorInfo)
 Frees an AFP document object.
AFP_RETCODE AFP_GetFeedDocField (AFP_HFEEDDOC hFeedDoc, AFP_FIELDID fieldId, const wchar_t **ppFieldVal, AFP_ErrorInfo *pErrorInfo)
 Retrieves a field value from a parsed feed document.
AFP_RETCODE AFP_GetIndexedFeedDocField (AFP_HFEEDDOC hFeedDoc, AFP_FIELDID fieldId, int indexNo, const wchar_t **ppFieldVal, AFP_ErrorInfo *pErrorInfo)
 Retrieves a field value from a parsed feed document.
AFP_RETCODE AFP_GetFeedDocItemCount (AFP_HFEEDDOC hFeedDoc, int *pNItems, AFP_ErrorInfo *pErrorInfo)
 Returns the number of items found in a parsed feed.
AFP_RETCODE AFP_GetFeedItemField (AFP_HFEEDDOC hFeedDoc, int itemNo, AFP_FIELDID fieldId, const wchar_t **ppFieldVal, AFP_ErrorInfo *pErrorInfo)
 Retrieves a field value from a feed item.
AFP_RETCODE AFP_GetIndexedFeedItemField (AFP_HFEEDDOC hFeedDoc, int itemNo, AFP_FIELDID fieldId, int indexNo, const wchar_t **ppFieldVal, AFP_ErrorInfo *pErrorInfo)
 Retrieves a field value from a parsed feed document.


Detailed Description

This header file defines the main interface to the Awasu Feed Parser SDK.

Author:
Awasu Pty. Ltd.
Copyright:
Awasu Pty. Ltd. 2001-2005 (all rights reserved). Unauthorized use is prohibited.

Typedef Documentation

typedef void* AFP_HFEEDPARSER
 

Handle to an AFP parser object.

AFP parser objects are used to parse an XML feed and manage the process of extracting the various elements from it.

See also:
AFP_AllocFeedParser()

typedef void* AFP_HFEEDDOC
 

Handle to an AFP document object.

AFP document objects are returned by an AFP parser after it has parsed an XML feed. It can then be queried about the various elements that were found in the feed.

See also:
AFP_ParseFeed()