Splitted queue of chat messages in chat service into public and private queue.

Reworked the interface of the chat service. So full recomile is needed.
With disabled flags for private chat (RS_CHAT_OPEN_NEW and RS_CHAT_REOPEN), the incoming private chat messages are queued (only for the runtime) until the user shows the private chat dialog.
When a new chat message is available, the icon of the gpg and ssl contact changed in MessengerWindow and PeersDialog and a new tray icon is shown.
Fixed compiler warning.


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3421 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-09-01 17:56:15 +00:00
parent 7dd99a0c35
commit 7f837e9778
17 changed files with 597 additions and 329 deletions

View file

@ -135,19 +135,16 @@ bool p3Msgs::resetMessageStandardTagTypes(MsgTagType& tags)
/****************************************/
/****************************************/
bool p3Msgs::ChatSend(ChatInfo &ci)
bool p3Msgs::sendPublicChat(std::wstring msg)
{
/* send a message to all for now */
if (ci.chatflags & RS_CHAT_PRIVATE)
{
mChatSrv -> sendPrivateChat(ci.msg, ci.rsid);
}
else
{
/* global */
mChatSrv -> sendChat(ci.msg);
}
return true;
return mChatSrv -> sendPublicChat(msg);
}
bool p3Msgs::sendPrivateChat(std::string id, std::wstring msg)
{
/* send a message to peer */
return mChatSrv -> sendPrivateChat(id, msg);
}
void p3Msgs::sendGroupChatStatusString(const std::string& status_string)
@ -159,9 +156,24 @@ void p3Msgs::sendStatusString(const std::string& peer_id,const std::string& stat
mChatSrv->sendStatusString(peer_id,status_string);
}
bool p3Msgs::getNewChat(std::list<ChatInfo> &chats)
int p3Msgs::getChatQueueCount(bool privateQueue)
{
return mChatSrv->getChatQueue(chats);
return mChatSrv->getChatQueueCount(privateQueue);
}
bool p3Msgs::getPublicChatQueue(std::list<ChatInfo> &chats)
{
return mChatSrv->getPublicChatQueue(chats);
}
bool p3Msgs::getPrivateChatQueueIds(std::list<std::string> &ids)
{
return mChatSrv->getPrivateChatQueueIds(ids);
}
bool p3Msgs::getPrivateChatQueue(std::string id, std::list<ChatInfo> &chats)
{
return mChatSrv->getPrivateChatQueue(id, chats);
}
void p3Msgs::getOwnAvatarData(unsigned char *& data,int& size)