X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Frssclient%2Frss_atom_parser.h;h=da02808a2dfa14862505b699e555310932021df5;hb=c855d497545dad80942a194624c111a54cd1fdc7;hp=2af7c9fdb3953091710ebbdadbae946409aac719;hpb=625e1bfcc04e978f18e02b54395b542da9f99a3a;p=citadel.git diff --git a/citadel/modules/rssclient/rss_atom_parser.h b/citadel/modules/rssclient/rss_atom_parser.h index 2af7c9fdb..da02808a2 100644 --- a/citadel/modules/rssclient/rss_atom_parser.h +++ b/citadel/modules/rssclient/rss_atom_parser.h @@ -24,9 +24,25 @@ #define RSS_ATOM (1<<2) #define RSS_REQUIRE_BUF (1<<3) -typedef struct _rss_item { - char *roomlist; - int done_parsing; +typedef struct rss_aggregator rss_aggregator; +typedef struct rss_item rss_item; +typedef struct rss_room_counter rss_room_counter; + +typedef void (*rss_handler_func)(StrBuf *CData, + rss_item *ri, + rss_aggregator *Cfg, + const char** Attr); + + +typedef struct __rss_xml_handler { + int Flags; + rss_handler_func Handler; +}rss_xml_handler; + +struct rss_item { + int done_parsing; + int item_tag_nesting; + time_t pubdate; StrBuf *guid; StrBuf *title; StrBuf *link; @@ -34,50 +50,53 @@ typedef struct _rss_item { StrBuf *reLink; StrBuf *reLinkTitle; StrBuf *description; - time_t pubdate; StrBuf *channel_title; - int item_tag_nesting; StrBuf *author_or_creator; StrBuf *author_url; StrBuf *author_email; -}rss_item; - +}; -typedef struct rssnetcfg rssnetcfg; -struct rssnetcfg { - rssnetcfg *next; - StrBuf* Url; - char *rooms; - time_t last_error_when; - int ItemType; - time_t next_poll; +struct rss_room_counter { + int count; + long QRnumber; }; -typedef void (*rss_handler_func)(StrBuf *CData, - rss_item *ri, - rssnetcfg *Cfg, - const char** Attr); +typedef struct __networker_save_message { + struct CtdlMessage Msg; + StrBuf *MsgGUID; + StrBuf *Message; + struct UseTable ut; +} networker_save_message; -typedef struct __rss_xml_handler { - int Flags; - rss_handler_func Handler; -}rss_xml_handler; +struct rss_aggregator { + AsyncIO IO; + XML_Parser xp; -typedef struct _rsscollection { - AsyncIO IO; - XML_Parser xp; + int ItemType; + int roomlist_parts; - StrBuf *CData; - StrBuf *Key; + time_t last_error_when; + time_t next_poll; + StrBuf *Url; + StrBuf *rooms; + long QRnumber; + HashList *OtherQRnumbers; + + StrBuf *CData; + StrBuf *Key; + + rss_item *Item; + struct recptypes recp; + HashPos *Pos; + HashList *Messages; + networker_save_message *ThisMsg; + const rss_xml_handler *Current; +}; - rss_item *Item; - rssnetcfg *Cfg; - - rss_xml_handler *Current; -} rsscollection; +eNextState RSSAggregator_ParseReply(AsyncIO *IO); -eNextState ParseRSSReply(AsyncIO *IO); +void rss_save_item(rss_item *ri, rss_aggregator *Cfg); -void rss_save_item(rss_item *ri); +eNextState RSS_FetchNetworkUsetableEntry(AsyncIO *IO);