show gxs message store period in gui, set forums store period to one year

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8206 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
electron128 2015-05-02 18:48:10 +00:00
parent e663fa608c
commit 451718660a
7 changed files with 28 additions and 5 deletions

View File

@ -583,6 +583,11 @@ public:
*/ */
void setGroupReputationCutOff(uint32_t& token, const RsGxsGroupId& grpId, int CutOff); void setGroupReputationCutOff(uint32_t& token, const RsGxsGroupId& grpId, int CutOff);
/*!
* @return storage time of messages in months
*/
int getStoragePeriod(){ return MESSAGE_STORE_PERIOD/(60*60*24*31);}
/*! /*!
* sets the msg status flag * sets the msg status flag
* @param token this is set to token value associated to this request * @param token this is set to token value associated to this request

View File

@ -170,6 +170,11 @@ public:
* @param CutOff The cut off value to set * @param CutOff The cut off value to set
*/ */
virtual void setGroupReputationCutOff(uint32_t& token, const RsGxsGroupId& grpId, int CutOff) = 0; virtual void setGroupReputationCutOff(uint32_t& token, const RsGxsGroupId& grpId, int CutOff) = 0;
/*!
* @return storage time of messages in months
*/
virtual int getStoragePeriod() = 0;
}; };

View File

@ -208,6 +208,14 @@ public:
return mGxs->setGroupReputationCutOff(token, grpId, CutOff); return mGxs->setGroupReputationCutOff(token, grpId, CutOff);
} }
/*!
* @return storage time of messages in months
*/
int getStoragePeriod()
{
return mGxs->getStoragePeriod();
}
private: private:
RsGxsIface* mGxs; RsGxsIface* mGxs;

View File

@ -44,6 +44,7 @@
RsGxsForums *rsGxsForums = NULL; RsGxsForums *rsGxsForums = NULL;
const uint32_t GXSFORUMS_MSG_STORE_PERIOD = 60*60*24*31*12; // 12 months / 1 year
#define FORUM_TESTEVENT_DUMMYDATA 0x0001 #define FORUM_TESTEVENT_DUMMYDATA 0x0001
#define DUMMYDATA_PERIOD 60 // long enough for some RsIdentities to be generated. #define DUMMYDATA_PERIOD 60 // long enough for some RsIdentities to be generated.
@ -53,7 +54,7 @@ RsGxsForums *rsGxsForums = NULL;
/********************************************************************************/ /********************************************************************************/
p3GxsForums::p3GxsForums(RsGeneralDataService *gds, RsNetworkExchangeService *nes, RsGixs* gixs) p3GxsForums::p3GxsForums(RsGeneralDataService *gds, RsNetworkExchangeService *nes, RsGixs* gixs)
: RsGenExchange(gds, nes, new RsGxsForumSerialiser(), RS_SERVICE_GXS_TYPE_FORUMS, gixs, forumsAuthenPolicy()), RsGxsForums(this) : RsGenExchange(gds, nes, new RsGxsForumSerialiser(), RS_SERVICE_GXS_TYPE_FORUMS, gixs, forumsAuthenPolicy(), GXSFORUMS_MSG_STORE_PERIOD), RsGxsForums(this)
{ {
// For Dummy Msgs. // For Dummy Msgs.
mGenActive = false; mGenActive = false;

View File

@ -63,7 +63,9 @@ QString PostedDialog::getHelpString() const
channels</p> \ channels</p> \
<p>Links can be commented by subscribed users. A promotion system also gives the opportunity to \ <p>Links can be commented by subscribed users. A promotion system also gives the opportunity to \
enlight important links.</p> \ enlight important links.</p> \
<p>There is no restriction on which links are shared. Be careful when clicking on them.</p>") ; <p>There is no restriction on which links are shared. Be careful when clicking on them.</p>\
<p>Posted links get deleted after %1 months.</p>\
").arg(QString::number(rsPosted->getStoragePeriod()));
return hlp_str ; return hlp_str ;
} }

View File

@ -60,7 +60,8 @@ QString GxsChannelDialog::getHelpString() const
the posting rights or the reading rights with friend Retroshare nodes.</p>\ the posting rights or the reading rights with friend Retroshare nodes.</p>\
<p>Channels can be made anonymous, or attached to a Retroshare identity so that readers can contact you if needed.\ <p>Channels can be made anonymous, or attached to a Retroshare identity so that readers can contact you if needed.\
Enable \"Allow Comments\" if you want to let users comment on your posts.</p>\ Enable \"Allow Comments\" if you want to let users comment on your posts.</p>\
") ; <p>Channel posts get deleted after %1 months.</p>\
").arg(QString::number(rsGxsChannels->getStoragePeriod()));
return hlp_str ; return hlp_str ;
} }

View File

@ -54,7 +54,8 @@ QString GxsForumsDialog::getHelpString() const
<p>Retroshare Forums look like internet forums, but they work in a decentralized way</p> \ <p>Retroshare Forums look like internet forums, but they work in a decentralized way</p> \
<p>You see forums your friends are subscribed to, and you forward subscribed forums to \ <p>You see forums your friends are subscribed to, and you forward subscribed forums to \
your friends. This automatically promotes interesting forums in the network.</p> \ your friends. This automatically promotes interesting forums in the network.</p> \
"); <p>Forum messages get deleted after %1 months.</p>\
").arg(QString::number(rsGxsForums->getStoragePeriod()));
// not true anymore in v0.6 // not true anymore in v0.6
/* /*