Expose libresapi for distant chat

Added macro to deprecate symbols usage in a crossplatform way.
Deprecated Request::mMethod and related stuff that make implementation
 more complex without advantage.
Added /chat/{initiate_distant_chat, distant_chat_status,
 close_distant_chat} to libresapi.
Solved subtle bug in ChatId::ChatId(std::string str) that caused zeroed
 DistantChatPeerId being created.
This commit is contained in:
Gio 2016-12-07 20:09:14 +01:00
parent f8de12d3d3
commit 9eef412b44
9 changed files with 179 additions and 82 deletions

View file

@ -11,9 +11,10 @@ class RsIdentity;
namespace resource_api
{
class UnreadMsgNotify{
class UnreadMsgNotify
{
public:
virtual void notifyUnreadMsgCountChanged(const RsPeerId& peer, uint32_t count) = 0;
virtual void notifyUnreadMsgCountChanged(const RsPeerId& peer, uint32_t count) = 0;
};
class ChatHandler: public ResourceRouter, NotifyClient, Tickable
@ -128,6 +129,9 @@ private:
ResponseTask *handleReceiveStatus(Request& req, Response& resp);
void handleSendStatus(Request& req, Response& resp);
void handleUnreadMsgs(Request& req, Response& resp);
void handleInitiateDistantChatConnexion(Request& req, Response& resp);
void handleDistantChatStatus(Request& req, Response& resp);
void handleCloseDistantChatConnexion(Request& req, Response& resp);
void getPlainText(const std::string& in, std::string &out, std::vector<Triple> &links);
// last parameter is only used for lobbies!