- added history parameters for chat lobbies

- added max storage time for items in chat history. Avoids filling up the history with chat from volatile peers.
- worked out the layout in config->ChatPage in a more compact design and added help
- set the max size of chat messages to 6000 bytes instead of 2000 which was a bit too low
- default max number of lobby messages saved in each lobby is 20. Avoids flooding for peers who havn't configured it yet.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6770 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-09-27 21:18:44 +00:00
parent f25f46dffb
commit e21d869006
11 changed files with 544 additions and 218 deletions

View file

@ -36,6 +36,14 @@ p3History::~p3History()
{
}
void p3History::setMaxStorageDuration(uint32_t seconds)
{
mHistoryMgr->setMaxStorageDuration(seconds) ;
}
uint32_t p3History::getMaxStorageDuration()
{
return mHistoryMgr->getMaxStorageDuration() ;
}
bool p3History::getMessages(const std::string &chatPeerId, std::list<HistoryMsg> &msgs, const uint32_t loadCount)
{
return mHistoryMgr->getMessages(chatPeerId, msgs, loadCount);
@ -56,22 +64,22 @@ void p3History::clear(const std::string &chatPeerId)
mHistoryMgr->clear(chatPeerId);
}
bool p3History::getEnable(bool ofPublic)
bool p3History::getEnable(uint32_t chat_type)
{
return mHistoryMgr->getEnable(ofPublic);
return mHistoryMgr->getEnable(chat_type);
}
void p3History::setEnable(bool forPublic, bool enable)
void p3History::setEnable(uint32_t chat_type, bool enable)
{
mHistoryMgr->setEnable(forPublic, enable);
mHistoryMgr->setEnable(chat_type, enable);
}
uint32_t p3History::getSaveCount(bool ofPublic)
uint32_t p3History::getSaveCount(uint32_t chat_type)
{
return mHistoryMgr->getSaveCount(ofPublic);
return mHistoryMgr->getSaveCount(chat_type);
}
void p3History::setSaveCount(bool forPublic, uint32_t count)
void p3History::setSaveCount(uint32_t chat_type, uint32_t count)
{
mHistoryMgr->setSaveCount(forPublic, count);
mHistoryMgr->setSaveCount(chat_type, count);
}

View file

@ -45,10 +45,12 @@ public:
virtual bool getMessage(uint32_t msgId, HistoryMsg &msg);
virtual void removeMessages(const std::list<uint32_t> &msgIds);
virtual void clear(const std::string &chatPeerId);
virtual bool getEnable(bool ofPublic);
virtual void setEnable(bool forPublic, bool enable);
virtual uint32_t getSaveCount(bool ofPublic);
virtual void setSaveCount(bool forPublic, uint32_t count);
virtual bool getEnable(uint32_t chat_type);
virtual void setEnable(uint32_t chat_type, bool enable);
virtual uint32_t getSaveCount(uint32_t chat_type);
virtual void setSaveCount(uint32_t chat_type, uint32_t count);
virtual void setMaxStorageDuration(uint32_t seconds) ;
virtual uint32_t getMaxStorageDuration() ;
private:
p3HistoryMgr* mHistoryMgr;