Pogger/src/Feed.h

64 lines
1.2 KiB
C
Raw Normal View History

#ifndef FEED_H
#define FEED_H
2020-06-19 17:03:19 -05:00
#include <tinyxml2.h>
2020-06-18 02:02:44 -05:00
#include <DateTime.h>
#include <String.h>
#include <List.h>
#include <Url.h>
2020-08-14 01:59:15 -05:00
#include "Entry.h"
2020-06-18 02:02:44 -05:00
class Feed {
2020-06-18 02:02:44 -05:00
public:
Feed ( BString );
Feed ( );
virtual void Parse ( );
bool IsRemote ( );
bool IsUpdated ( );
bool IsRss ( );
bool IsAtom ( );
bool AddEntry ( Entry* );
BList GetEntries ( );
bool SetTitle ( const char* );
bool SetTitle ( tinyxml2::XMLElement* );
BString GetTitle ( );
bool SetDesc ( const char* );
bool SetDesc ( tinyxml2::XMLElement* );
BString GetDesc ( );
bool SetHomeUrl ( const char* );
bool SetHomeUrl ( tinyxml2::XMLElement* );
BString GetHomeUrl ( );
bool SetDate ( const char* );
bool SetDate ( tinyxml2::XMLElement* );
BDateTime GetDate ( );
BString SetCachePath ( BString );
BString GetCachePath ( );
protected:
void EnsureCached ( );
BString FetchRemoteFeed ( );
2020-07-13 12:31:52 -05:00
int xmlCountSiblings ( tinyxml2::XMLElement*, const char* );
BString title;
BString description;
BDateTime date;
BDateTime lastDate;
BDateTime minDate;
BDateTime maxDate;
BString homeUrl;
BString inputPath;
BString xmlUrl;
BString cachePath;
BString outputDir;
BList entries;
bool fetched;
bool updated;
2020-06-18 02:02:44 -05:00
};
2020-06-19 17:03:19 -05:00
#endif