- 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

@ -38,6 +38,10 @@ extern RsHistory *rsHistory;
/*!
* data object used for message history
*/
static const uint32_t RS_HISTORY_TYPE_PUBLIC = 0 ;
static const uint32_t RS_HISTORY_TYPE_PRIVATE = 1 ;
static const uint32_t RS_HISTORY_TYPE_LOBBY = 2 ;
class HistoryMsg
{
public:
@ -72,12 +76,14 @@ public:
virtual void removeMessages(const std::list<uint32_t> &msgIds) = 0;
virtual void clear(const std::string &chatPeerId) = 0;
virtual bool getEnable(bool ofPublic) = 0;
virtual void setEnable(bool forPublic, bool enable) = 0;
virtual bool getEnable(uint32_t chat_type) = 0;
virtual void setEnable(uint32_t chat_type, bool enable) = 0;
virtual uint32_t getMaxStorageDuration() = 0 ;
virtual void setMaxStorageDuration(uint32_t seconds) = 0 ;
// 0 = no limit, >0 count of saved messages
virtual uint32_t getSaveCount(bool ofPublic) = 0;
virtual void setSaveCount(bool forPublic, uint32_t count) = 0;
virtual uint32_t getSaveCount(uint32_t chat_type) = 0;
virtual void setSaveCount(uint32_t chat_type, uint32_t count) = 0;
};
#endif