Added api for news feeds to the plugin interface.

Added news feeds to the FeedReader plugin.
Recompile needed.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6066 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2013-01-08 22:07:52 +00:00
parent f12473f7f7
commit a60422069c
21 changed files with 1080 additions and 99 deletions

View file

@ -27,7 +27,9 @@
#include "FeedReaderPlugin.h"
#include "gui/FeedReaderDialog.h"
#include "gui/FeedReaderNotify.h"
#include "gui/FeedReaderConfig.h"
#include "gui/FeedReaderFeedNotify.h"
#include "services/p3FeedReader.h"
#define IMAGE_FEEDREADER ":/images/FeedReader.png"
@ -77,6 +79,8 @@ FeedReaderPlugin::FeedReaderPlugin()
mIcon = NULL ;
mPlugInHandler = NULL;
mFeedReader = NULL;
mNotify = NULL;
mFeedNotify = NULL;
}
void FeedReaderPlugin::setInterfaces(RsPlugInInterfaces &/*interfaces*/)
@ -91,17 +95,28 @@ ConfigPage *FeedReaderPlugin::qt_config_page() const
MainPage *FeedReaderPlugin::qt_page() const
{
if (mainpage == NULL) {
mainpage = new FeedReaderDialog(mFeedReader);
mainpage = new FeedReaderDialog(mFeedReader, mNotify);
}
return mainpage;
}
FeedNotify *FeedReaderPlugin::qt_feedNotify()
{
if (!mFeedNotify) {
mFeedNotify = new FeedReaderFeedNotify(mFeedReader, mNotify);
}
return mFeedNotify;
}
RsPQIService *FeedReaderPlugin::rs_pqi_service() const
{
if (mFeedReader == NULL) {
mFeedReader = new p3FeedReader(mPlugInHandler);
rsFeedReader = mFeedReader;
mNotify = new FeedReaderNotify();
mFeedReader->setNotify(mNotify);
}
return mFeedReader;
@ -110,8 +125,17 @@ RsPQIService *FeedReaderPlugin::rs_pqi_service() const
void FeedReaderPlugin::stop()
{
if (mFeedReader) {
mFeedReader->setNotify(NULL);
mFeedReader->stop();
}
if (mNotify) {
delete(mNotify);
mNotify = NULL;
}
if (mFeedNotify) {
delete mFeedNotify;
mFeedNotify = NULL;
}
}
void FeedReaderPlugin::setPlugInHandler(RsPluginHandler *pgHandler)