mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-15 10:54:22 -05:00
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:
parent
7fc84d7ceb
commit
cf6d69c66e
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@ CONFIG += static release
|
|||||||
TARGET = retroshare
|
TARGET = retroshare
|
||||||
|
|
||||||
DEFINES -= PQI_USE_XPGP
|
DEFINES -= PQI_USE_XPGP
|
||||||
DEFINES += RS_USE_PGPSSL
|
DEFINES += RS_USE_PGPSSL P3DISC_DEBUG RSSERIAL_DEBUG DEBUG_PQISTREAMER SSL_DEBUG
|
||||||
|
|
||||||
profiling {
|
profiling {
|
||||||
QMAKE_CXXFLAGS -= -fomit-frame-pointer
|
QMAKE_CXXFLAGS -= -fomit-frame-pointer
|
||||||
@ -201,6 +201,7 @@ HEADERS += dbase/cachestrapper.h \
|
|||||||
rsiface/rspeers.h \
|
rsiface/rspeers.h \
|
||||||
rsiface/rsphoto.h \
|
rsiface/rsphoto.h \
|
||||||
rsiface/rsQblog.h \
|
rsiface/rsQblog.h \
|
||||||
|
rsiface/rsblogs.h \
|
||||||
rsiface/rsrank.h \
|
rsiface/rsrank.h \
|
||||||
rsiface/rsstatus.h \
|
rsiface/rsstatus.h \
|
||||||
rsiface/rstypes.h \
|
rsiface/rstypes.h \
|
||||||
@ -223,6 +224,7 @@ HEADERS += dbase/cachestrapper.h \
|
|||||||
serialiser/rsmsgitems.h \
|
serialiser/rsmsgitems.h \
|
||||||
serialiser/rsphotoitems.h \
|
serialiser/rsphotoitems.h \
|
||||||
serialiser/rsqblogitems.h \
|
serialiser/rsqblogitems.h \
|
||||||
|
serialiser/rsblogitems.h \
|
||||||
serialiser/rsrankitems.h \
|
serialiser/rsrankitems.h \
|
||||||
serialiser/rsserial.h \
|
serialiser/rsserial.h \
|
||||||
serialiser/rsserviceids.h \
|
serialiser/rsserviceids.h \
|
||||||
@ -245,6 +247,7 @@ HEADERS += dbase/cachestrapper.h \
|
|||||||
services/p3photoservice.h \
|
services/p3photoservice.h \
|
||||||
services/p3portservice.h \
|
services/p3portservice.h \
|
||||||
services/p3Qblog.h \
|
services/p3Qblog.h \
|
||||||
|
services/p3blogs.h \
|
||||||
services/p3ranking.h \
|
services/p3ranking.h \
|
||||||
services/p3service.h \
|
services/p3service.h \
|
||||||
services/p3status.h \
|
services/p3status.h \
|
||||||
@ -304,6 +307,7 @@ SOURCES += \
|
|||||||
services/p3portservice.cc \
|
services/p3portservice.cc \
|
||||||
services/p3channels.cc \
|
services/p3channels.cc \
|
||||||
services/p3forums.cc \
|
services/p3forums.cc \
|
||||||
|
services/p3blogs.cc \
|
||||||
services/p3Qblog.cc \
|
services/p3Qblog.cc \
|
||||||
services/p3status.cc \
|
services/p3status.cc \
|
||||||
services/p3distrib.cc \
|
services/p3distrib.cc \
|
||||||
@ -347,6 +351,7 @@ SOURCES += \
|
|||||||
pqi/pqiloopback.cc \
|
pqi/pqiloopback.cc \
|
||||||
pqi/pqinetwork.cc \
|
pqi/pqinetwork.cc \
|
||||||
pqi/pqisecurity.cc \
|
pqi/pqisecurity.cc \
|
||||||
|
serialiser/rsblogitems.cc \
|
||||||
serialiser/rsqblogitems.cc \
|
serialiser/rsqblogitems.cc \
|
||||||
serialiser/rsstatusitems.cc \
|
serialiser/rsstatusitems.cc \
|
||||||
serialiser/rschannelitems.cc \
|
serialiser/rschannelitems.cc \
|
||||||
|
@ -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_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_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_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_MESSAGE = RS_FEED_TYPE_MSG | 0x0001;
|
||||||
const uint32_t RS_FEED_ITEM_FILES_NEW = RS_FEED_TYPE_FILES | 0x0001;
|
const uint32_t RS_FEED_ITEM_FILES_NEW = RS_FEED_TYPE_FILES | 0x0001;
|
||||||
|
35
libretroshare/src/rsserver/diff.c
Normal file
35
libretroshare/src/rsserver/diff.c
Normal 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;
|
@ -43,6 +43,8 @@
|
|||||||
#include "services/p3chatservice.h"
|
#include "services/p3chatservice.h"
|
||||||
#include "services/p3ranking.h"
|
#include "services/p3ranking.h"
|
||||||
#include "services/p3Qblog.h"
|
#include "services/p3Qblog.h"
|
||||||
|
#include "services/p3blogs.h"
|
||||||
|
|
||||||
|
|
||||||
/* The Main Interface Class - for controlling the server */
|
/* The Main Interface Class - for controlling the server */
|
||||||
|
|
||||||
|
@ -1676,6 +1676,7 @@ RsTurtle *rsTurtle = NULL ;
|
|||||||
#include "services/p3channels.h"
|
#include "services/p3channels.h"
|
||||||
#include "services/p3status.h"
|
#include "services/p3status.h"
|
||||||
#include "services/p3Qblog.h"
|
#include "services/p3Qblog.h"
|
||||||
|
#include "services/p3blogs.h"
|
||||||
#include "turtle/p3turtle.h"
|
#include "turtle/p3turtle.h"
|
||||||
#include "services/p3tunnel.h"
|
#include "services/p3tunnel.h"
|
||||||
|
|
||||||
@ -1850,6 +1851,7 @@ int RsServer::StartupRetroShare()
|
|||||||
std::string localcachedir = config_dir + "/cache/local";
|
std::string localcachedir = config_dir + "/cache/local";
|
||||||
std::string remotecachedir = config_dir + "/cache/remote";
|
std::string remotecachedir = config_dir + "/cache/remote";
|
||||||
std::string channelsdir = config_dir + "/channels";
|
std::string channelsdir = config_dir + "/channels";
|
||||||
|
std::string blogsdir = config_dir + "/blogs";
|
||||||
|
|
||||||
|
|
||||||
//mRanking = NULL;
|
//mRanking = NULL;
|
||||||
@ -1876,6 +1878,14 @@ int RsServer::StartupRetroShare()
|
|||||||
mCacheStrapper -> addCachePair(cp5);
|
mCacheStrapper -> addCachePair(cp5);
|
||||||
pqih -> addService(mChannels); /* This must be also ticked as a service */
|
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
|
#ifndef RS_RELEASE
|
||||||
|
|
||||||
@ -1933,7 +1943,7 @@ int RsServer::StartupRetroShare()
|
|||||||
mConfigMgr->addConfiguration("msgs.cfg", msgSrv);
|
mConfigMgr->addConfiguration("msgs.cfg", msgSrv);
|
||||||
mConfigMgr->addConfiguration("chat.cfg", chatSrv);
|
mConfigMgr->addConfiguration("chat.cfg", chatSrv);
|
||||||
mConfigMgr->addConfiguration("cache.cfg", mCacheStrapper);
|
mConfigMgr->addConfiguration("cache.cfg", mCacheStrapper);
|
||||||
|
mConfigMgr->addConfiguration("blogs.cfg", mBlogs);
|
||||||
mConfigMgr->addConfiguration("ranklink.cfg", mRanking);
|
mConfigMgr->addConfiguration("ranklink.cfg", mRanking);
|
||||||
mConfigMgr->addConfiguration("forums.cfg", mForums);
|
mConfigMgr->addConfiguration("forums.cfg", mForums);
|
||||||
mConfigMgr->addConfiguration("channels.cfg", mChannels);
|
mConfigMgr->addConfiguration("channels.cfg", mChannels);
|
||||||
@ -2050,6 +2060,7 @@ int RsServer::StartupRetroShare()
|
|||||||
rsForums = mForums;
|
rsForums = mForums;
|
||||||
rsChannels = mChannels;
|
rsChannels = mChannels;
|
||||||
rsRanks = new p3Rank(mRanking);
|
rsRanks = new p3Rank(mRanking);
|
||||||
|
rsBlogs = mBlogs;
|
||||||
|
|
||||||
#ifndef RS_RELEASE
|
#ifndef RS_RELEASE
|
||||||
rsGameLauncher = gameLauncher;
|
rsGameLauncher = gameLauncher;
|
||||||
|
@ -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 */
|
#endif /* RS_SERVICE_ITEMS_H */
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user