FeedReader plugin

- reserved service id
- reworked error codes
- added xpath manipulation and basic gui elements in preview dialog

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5514 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-09-04 23:53:04 +00:00
parent 08904bf82f
commit c7ed9c6df7
23 changed files with 1595 additions and 430 deletions

View file

@ -25,13 +25,10 @@
#include "retroshare/rsplugin.h"
#include "plugins/rspqiservice.h"
#include "interface/rsFeedReader.h"
#include "p3FeedReaderThread.h"
class RsFeedReaderFeed;
//TODO: get new id's
const uint8_t RS_PKT_TYPE_FEEDREADER_CONFIG = 0xf0;
const uint32_t CONFIG_TYPE_FEEDREADER = 0x0001;
class RsFeedReaderMsg;
class p3FeedReaderThread;
class p3FeedReader : public RsPQIService, public RsFeedReader
{
@ -66,16 +63,18 @@ public:
virtual bool processFeed(const std::string &feedId);
virtual bool setMessageRead(const std::string &feedId, const std::string &msgId, bool read);
virtual RsFeedReaderErrorState processXPath(const std::list<std::string> &xpathsToUse, const std::list<std::string> &xpathsToRemove, std::string &description, std::string &errorString);
/****************** p3Service STUFF ******************/
virtual int tick();
/****************** internal STUFF *******************/
bool getFeedToDownload(RsFeedReaderFeed &feed, const std::string &neededFeedId);
void onDownloadSuccess(const std::string &feedId, const std::string &content, std::string &icon);
void onDownloadError(const std::string &feedId, p3FeedReaderThread::DownloadResult result, const std::string &errorString);
bool onProcessSuccess_filterMsg(const std::string &feedId, std::list<RsFeedReaderMsg*> &msgs);
void onProcessSuccess_addMsgs(const std::string &feedId, bool result, std::list<RsFeedReaderMsg*> &msgs, bool single);
void onProcessError(const std::string &feedId, p3FeedReaderThread::ProcessResult result, const std::string &errorString);
void onDownloadError(const std::string &feedId, RsFeedReaderErrorState result, const std::string &errorString);
void onProcessSuccess_filterMsg(const std::string &feedId, std::list<RsFeedReaderMsg*> &msgs);
void onProcessSuccess_addMsgs(const std::string &feedId, std::list<RsFeedReaderMsg*> &msgs, bool single);
void onProcessError(const std::string &feedId, RsFeedReaderErrorState result, const std::string &errorString);
bool getFeedToProcess(RsFeedReaderFeed &feed, const std::string &neededFeedId);