mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 21:40:36 -04:00
added some minor feature to channels
- clean up of channels old (> storeperiod) cache file downloads called at rsglobal shutdown - added extrafilehash and extra-remove to rschannels, so it chooses appropriate way to add files (correct book-keeping) - added extra files not copied to chan dir if over 100mb (high overhead) - added limit to channels auto-download (1gig) git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2866 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
03d0058ca4
commit
e1c4992680
6 changed files with 241 additions and 19 deletions
|
@ -33,7 +33,12 @@
|
|||
#include "serialiser/rstlvtypes.h"
|
||||
#include "serialiser/rschannelitems.h"
|
||||
|
||||
|
||||
//! Channels is a distributed 'feed' service
|
||||
/*!
|
||||
* The channels service allows peers to subscirbe to each feeds published by
|
||||
* their peers. Using the p3groupdistrib class to enable management of
|
||||
* publication and viewing keys
|
||||
*/
|
||||
class p3Channels: public p3GroupDistrib, public RsChannels
|
||||
{
|
||||
public:
|
||||
|
@ -42,6 +47,12 @@ class p3Channels: public p3GroupDistrib, public RsChannels
|
|||
std::string srcdir, std::string storedir, std::string channelsdir);
|
||||
virtual ~p3Channels();
|
||||
|
||||
/*!
|
||||
* cleans up local info and dowloaded files older than one month,
|
||||
* should be called during shutdown of rs
|
||||
*/
|
||||
void cleanUpOldFiles();
|
||||
|
||||
/****************************************/
|
||||
/********* rsChannels Interface ***********/
|
||||
|
||||
|
@ -57,6 +68,8 @@ virtual bool getChannelMessage(std::string cId, std::string mId, ChannelMsgInfo
|
|||
virtual bool ChannelMessageSend(ChannelMsgInfo &info);
|
||||
|
||||
virtual bool channelSubscribe(std::string cId, bool subscribe);
|
||||
virtual bool channelExtraFileHash(std::string path, std::string chId, FileInfo& fInfo);
|
||||
virtual bool channelExtraFileRemove(std::string hash, std::string chId);
|
||||
|
||||
/***************************************************************************************/
|
||||
/****************** Event Feedback (Overloaded form p3distrib) *************************/
|
||||
|
@ -82,6 +95,8 @@ virtual RsDistribGrp *locked_createPrivateDistribGrp(GroupInfo &info);
|
|||
|
||||
private:
|
||||
|
||||
bool cpyMsgFileToChFldr(std::string path, std::string fname, std::string chId, bool& fileTooLarge);
|
||||
|
||||
RsFiles *mRsFiles;
|
||||
std::string mChannelsDir;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue