mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
140ef988a5
commit
baccdd58df
@ -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 ;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -272,6 +272,8 @@ public:
|
||||
bool operator<(const ChatId& other) const;
|
||||
bool isSameEndpoint(const ChatId& other) const;
|
||||
|
||||
bool operator==(const ChatId& other) const { return isSameEndpoint(other) ; }
|
||||
|
||||
bool isNotSet() const;
|
||||
bool isPeerId() const;
|
||||
bool isGxsId() const;
|
||||
@ -465,7 +467,7 @@ virtual ChatLobbyId createChatLobby(const std::string& lobby_name,const std::str
|
||||
/****************************************/
|
||||
|
||||
virtual bool initiateDistantChatConnexion(const RsGxsId& to_pid,const RsGxsId& from_pid,uint32_t& error_code) = 0;
|
||||
virtual bool getDistantChatStatus(const RsGxsId& gxs_id,uint32_t& status) = 0;
|
||||
virtual bool getDistantChatStatus(const RsGxsId& gxs_id,uint32_t& status, RsGxsId *from_gxs_id = NULL) = 0;
|
||||
virtual bool closeDistantChatConnexion(const RsGxsId& pid) = 0;
|
||||
|
||||
};
|
||||
|
@ -521,9 +521,9 @@ bool p3Msgs::initiateDistantChatConnexion(const RsGxsId& to_gxs_id,const RsGxsId
|
||||
{
|
||||
return mChatSrv->initiateDistantChatConnexion(to_gxs_id,from_gxs_id,error_code) ;
|
||||
}
|
||||
bool p3Msgs::getDistantChatStatus(const RsGxsId &gxs_id,uint32_t &status)
|
||||
bool p3Msgs::getDistantChatStatus(const RsGxsId &gxs_id,uint32_t &status,RsGxsId *from_gxs_id)
|
||||
{
|
||||
return mChatSrv->getDistantChatStatus(gxs_id,status) ;
|
||||
return mChatSrv->getDistantChatStatus(gxs_id,status,from_gxs_id) ;
|
||||
}
|
||||
bool p3Msgs::closeDistantChatConnexion(const RsGxsId& pid)
|
||||
{
|
||||
|
@ -155,7 +155,7 @@ class p3Msgs: public RsMsgs
|
||||
virtual ChatLobbyId createChatLobby(const std::string& lobby_name,const std::string& lobby_topic,const std::list<RsPeerId>& invited_friends,uint32_t privacy_type) ;
|
||||
|
||||
virtual bool initiateDistantChatConnexion(const RsGxsId& to_gxs_id,const RsGxsId& from_gxs_id,uint32_t& error_code) ;
|
||||
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) ;
|
||||
virtual bool closeDistantChatConnexion(const RsGxsId &pid) ;
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user