added blogs

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2182 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2010-02-03 22:53:35 +00:00
parent 7fc84d7ceb
commit cf6d69c66e
7 changed files with 2830 additions and 68 deletions

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@ CONFIG += static release
TARGET = retroshare
DEFINES -= PQI_USE_XPGP
DEFINES += RS_USE_PGPSSL
DEFINES += RS_USE_PGPSSL P3DISC_DEBUG RSSERIAL_DEBUG DEBUG_PQISTREAMER SSL_DEBUG
profiling {
QMAKE_CXXFLAGS -= -fomit-frame-pointer
@ -201,6 +201,7 @@ HEADERS += dbase/cachestrapper.h \
rsiface/rspeers.h \
rsiface/rsphoto.h \
rsiface/rsQblog.h \
rsiface/rsblogs.h \
rsiface/rsrank.h \
rsiface/rsstatus.h \
rsiface/rstypes.h \
@ -223,6 +224,7 @@ HEADERS += dbase/cachestrapper.h \
serialiser/rsmsgitems.h \
serialiser/rsphotoitems.h \
serialiser/rsqblogitems.h \
serialiser/rsblogitems.h \
serialiser/rsrankitems.h \
serialiser/rsserial.h \
serialiser/rsserviceids.h \
@ -245,6 +247,7 @@ HEADERS += dbase/cachestrapper.h \
services/p3photoservice.h \
services/p3portservice.h \
services/p3Qblog.h \
services/p3blogs.h \
services/p3ranking.h \
services/p3service.h \
services/p3status.h \
@ -304,6 +307,7 @@ SOURCES += \
services/p3portservice.cc \
services/p3channels.cc \
services/p3forums.cc \
services/p3blogs.cc \
services/p3Qblog.cc \
services/p3status.cc \
services/p3distrib.cc \
@ -347,6 +351,7 @@ SOURCES += \
pqi/pqiloopback.cc \
pqi/pqinetwork.cc \
pqi/pqisecurity.cc \
serialiser/rsblogitems.cc \
serialiser/rsqblogitems.cc \
serialiser/rsstatusitems.cc \
serialiser/rschannelitems.cc \

View File

@ -74,7 +74,10 @@ const uint32_t RS_FEED_ITEM_FORUM_NEW = RS_FEED_TYPE_FORUM | 0x0001;
const uint32_t RS_FEED_ITEM_FORUM_UPDATE = RS_FEED_TYPE_FORUM | 0x0002;
const uint32_t RS_FEED_ITEM_FORUM_MSG = RS_FEED_TYPE_FORUM | 0x0003;
const uint32_t RS_FEED_ITEM_BLOG_MSG = RS_FEED_TYPE_BLOG | 0x0001;
const uint32_t RS_FEED_ITEM_BLOG_NEW = RS_FEED_TYPE_BLOG | 0x0001;
const uint32_t RS_FEED_ITEM_BLOG_UPDATE = RS_FEED_TYPE_BLOG | 0x0002;
const uint32_t RS_FEED_ITEM_BLOG_MSG = RS_FEED_TYPE_BLOG | 0x0003;
const uint32_t RS_FEED_ITEM_CHAT_NEW = RS_FEED_TYPE_CHAT | 0x0001;
const uint32_t RS_FEED_ITEM_MESSAGE = RS_FEED_TYPE_MSG | 0x0001;
const uint32_t RS_FEED_ITEM_FILES_NEW = RS_FEED_TYPE_FILES | 0x0001;

View File

@ -0,0 +1,35 @@
832c832
< AuthGPG::getAuthGPG()->GeneratePGPCertificate(name, email, passwd, pgpId, errString);
---
> return AuthGPG::getAuthGPG()->GeneratePGPCertificate(name, email, passwd, pgpId, errString);
958c958
< /* Move directory to correct id */
---
> /* Move directory to correct id */
1619a1620,1626
> std::string RsInit::RsProfileConfigDirectory()
> {
> std::string dir = RsInitConfig::basedir + RsInitConfig::dirSeperator + RsInitConfig::preferedId;
> std::cerr << "RsInit::RsProfileConfigDirectory() returning : " << dir << std::endl;
> return dir;
> }
>
1671a1679
> #include "services/p3blogs.h"
1845a1854
> std::string blogsdir = config_dir + "/blogs";
1870a1880,1887
>
> p3Blogs *mBlogs = new p3Blogs(RS_SERVICE_TYPE_QBLOG,
> mCacheStrapper, mCacheTransfer, rsFiles,
> localcachedir, remotecachedir, blogsdir);
>
> CachePair cp6(mBlogs, mBlogs, CacheId(RS_SERVICE_TYPE_QBLOG, 0));
> mCacheStrapper -> addCachePair(cp6);
> pqih -> addService(mBlogs); /* This must be also ticked as a service */
1929c1946
<
---
> mConfigMgr->addConfiguration("blogs.cfg", mBlogs);
2045a2063
> rsBlogs = mBlogs;

View File

@ -43,6 +43,8 @@
#include "services/p3chatservice.h"
#include "services/p3ranking.h"
#include "services/p3Qblog.h"
#include "services/p3blogs.h"
/* The Main Interface Class - for controlling the server */

View File

@ -1676,6 +1676,7 @@ RsTurtle *rsTurtle = NULL ;
#include "services/p3channels.h"
#include "services/p3status.h"
#include "services/p3Qblog.h"
#include "services/p3blogs.h"
#include "turtle/p3turtle.h"
#include "services/p3tunnel.h"
@ -1850,6 +1851,7 @@ int RsServer::StartupRetroShare()
std::string localcachedir = config_dir + "/cache/local";
std::string remotecachedir = config_dir + "/cache/remote";
std::string channelsdir = config_dir + "/channels";
std::string blogsdir = config_dir + "/blogs";
//mRanking = NULL;
@ -1876,6 +1878,14 @@ int RsServer::StartupRetroShare()
mCacheStrapper -> addCachePair(cp5);
pqih -> addService(mChannels); /* This must be also ticked as a service */
p3Blogs *mBlogs = new p3Blogs(RS_SERVICE_TYPE_QBLOG,
mCacheStrapper, mCacheTransfer, rsFiles,
localcachedir, remotecachedir, blogsdir);
CachePair cp6(mBlogs, mBlogs, CacheId(RS_SERVICE_TYPE_QBLOG, 0));
mCacheStrapper -> addCachePair(cp6);
pqih -> addService(mBlogs); /* This must be also ticked as a service */
#ifndef RS_RELEASE
@ -1933,7 +1943,7 @@ int RsServer::StartupRetroShare()
mConfigMgr->addConfiguration("msgs.cfg", msgSrv);
mConfigMgr->addConfiguration("chat.cfg", chatSrv);
mConfigMgr->addConfiguration("cache.cfg", mCacheStrapper);
mConfigMgr->addConfiguration("blogs.cfg", mBlogs);
mConfigMgr->addConfiguration("ranklink.cfg", mRanking);
mConfigMgr->addConfiguration("forums.cfg", mForums);
mConfigMgr->addConfiguration("channels.cfg", mChannels);
@ -2050,6 +2060,7 @@ int RsServer::StartupRetroShare()
rsForums = mForums;
rsChannels = mChannels;
rsRanks = new p3Rank(mRanking);
rsBlogs = mBlogs;
#ifndef RS_RELEASE
rsGameLauncher = gameLauncher;

View File

@ -171,6 +171,40 @@ virtual RsItem * deserialise(void *data, uint32_t *size);
/**************************************************************************/
/**************************************************************************/
class RsBlogMsg: public RsItem
{
public:
RsBlogMsg()
:RsItem(RS_PKT_VERSION_SERVICE, RS_SERVICE_TYPE_QBLOG,
RS_PKT_SUBTYPE_DEFAULT)
{ return; }
virtual ~RsBlogMsg();
virtual void clear();
RsTlvBinaryData cert; /* Mandatory */
RsTlvFileSet files; /* Mandatory */
RsTlvBinaryData sign; /* Mandatory */
};
class RsBlogMsgSerialiser: public RsSerialType
{
public:
RsBlogMsgSerialiser()
:RsSerialType(RS_PKT_VERSION_SERVICE, RS_SERVICE_TYPE_QBLOG)
{ return; }
virtual ~RsBlogMsgSerialiser();
virtual uint32_t size(RsItem *);
virtual bool serialise (RsItem *item, void *data, uint32_t *size);
virtual RsItem * deserialise(void *data, uint32_t *size);
};
/**************************************************************************/
#endif /* RS_SERVICE_ITEMS_H */