committing missing part of rev. 7928

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7930 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-02-08 21:06:36 +00:00
parent 140ef988a5
commit baccdd58df
5 changed files with 13 additions and 6 deletions

View file

@ -905,7 +905,7 @@ RsGxsId DistantChatService::gxsIdFromHash(const TurtleFileHash& hash)
return RsGxsId(hash.toByteArray());
}
bool DistantChatService::getDistantChatStatus(const RsGxsId& gxs_id,uint32_t& status)
bool DistantChatService::getDistantChatStatus(const RsGxsId& gxs_id,uint32_t& status, RsGxsId *from_gxs_id)
{
RsStackMutex stack(mDistantChatMtx); /********** STACK LOCKED MTX ******/
@ -914,10 +914,15 @@ bool DistantChatService::getDistantChatStatus(const RsGxsId& gxs_id,uint32_t& st
if(it != _distant_chat_contacts.end())
{
status = it->second.status ;
if(from_gxs_id != NULL)
*from_gxs_id = it->second.own_gxs_id ;
return true ;
}
status = RS_DISTANT_CHAT_STATUS_UNKNOWN ;
return false ;
}

View file

@ -52,7 +52,7 @@ public:
//
bool initiateDistantChatConnexion(const RsGxsId& to_gxs_id,const RsGxsId &from_gxs_id, uint32_t &error_code) ;
bool closeDistantChatConnexion(const RsGxsId& pid) ;
virtual bool getDistantChatStatus(const RsGxsId &gxs_id,uint32_t &status) ;
virtual bool getDistantChatStatus(const RsGxsId &gxs_id,uint32_t &status, RsGxsId *from_gxs_id=NULL) ;
// derived in p3ChatService
virtual void handleIncomingItem(RsItem *) = 0;