mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-10 01:55:19 -04:00
Merged branch v0.5-GenericTunneling into trunk (Rev. 6284 to 6410).
- adds turtle router as a generic tunneling service - made ftServer a client of the service. Now turtle file items are handled in ftServer - added new client: p3MsgService to send/recv pgp-encrypted distant messages - added new client: p3ChatService to perform private (AES-encrypted) distant chat through tunnels. - The GUI is disabled for now, since it needs some polishing before being fully usable. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6411 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
commit
dc2521cf71
62 changed files with 5031 additions and 1989 deletions
|
@ -96,6 +96,20 @@ bool p3Msgs::MessageSend(MessageInfo &info)
|
|||
return mMsgSrv->MessageSend(info);
|
||||
}
|
||||
|
||||
bool p3Msgs::decryptMessage(const std::string& mId)
|
||||
{
|
||||
return mMsgSrv->decryptMessage(mId);
|
||||
}
|
||||
bool p3Msgs::createDistantOfflineMessengingInvite(time_t ts, std::string& hash)
|
||||
{
|
||||
return mMsgSrv->createDistantOfflineMessengingInvite(ts,hash) ;
|
||||
}
|
||||
bool p3Msgs::getDistantOfflineMessengingInvites(std::vector<DistantOfflineMessengingInvite>& invites)
|
||||
{
|
||||
return mMsgSrv->getDistantOfflineMessengingInvites(invites);
|
||||
}
|
||||
|
||||
|
||||
bool p3Msgs::SystemMessage(const std::wstring &title, const std::wstring &message, uint32_t systemFlag)
|
||||
{
|
||||
return mMsgSrv->SystemMessage(title, message, systemFlag);
|
||||
|
@ -330,5 +344,20 @@ void p3Msgs::getPendingChatLobbyInvites(std::list<ChatLobbyInvite>& invites)
|
|||
{
|
||||
mChatSrv->getPendingChatLobbyInvites(invites) ;
|
||||
}
|
||||
|
||||
bool p3Msgs::createDistantChatInvite(const std::string& pgp_id,time_t time_of_validity,std::string& encrypted_string)
|
||||
{
|
||||
return mChatSrv->createDistantChatInvite(pgp_id,time_of_validity,encrypted_string) ;
|
||||
}
|
||||
bool p3Msgs::getDistantChatInviteList(std::vector<DistantChatInviteInfo>& invites)
|
||||
{
|
||||
return mChatSrv->getDistantChatInviteList(invites) ;
|
||||
}
|
||||
bool p3Msgs::initiateDistantChatConnexion(const std::string& encrypted_str,std::string& hash,uint32_t& error_code)
|
||||
{
|
||||
return mChatSrv->initiateDistantChatConnexion(encrypted_str,hash,error_code) ;
|
||||
}
|
||||
bool p3Msgs::getDistantChatStatus(const std::string& hash,uint32_t& status,std::string& pgp_id)
|
||||
{
|
||||
return mChatSrv->getDistantChatStatus(hash,status,pgp_id) ;
|
||||
}
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@ class p3Msgs: public RsMsgs
|
|||
virtual void getMessageCount(unsigned int *pnInbox, unsigned int *pnInboxNew, unsigned int *pnOutbox, unsigned int *pnDraftbox, unsigned int *pnSentbox, unsigned int *pnTrashbox);
|
||||
|
||||
virtual bool MessageSend(MessageInfo &info);
|
||||
virtual bool decryptMessage(const std::string& mid);
|
||||
virtual bool SystemMessage(const std::wstring &title, const std::wstring &message, uint32_t systemFlag);
|
||||
virtual bool MessageToDraft(MessageInfo &info, const std::string &msgParentId);
|
||||
virtual bool MessageToTrash(const std::string &mid, bool bTrash);
|
||||
|
@ -78,6 +79,9 @@ class p3Msgs: public RsMsgs
|
|||
|
||||
virtual bool resetMessageStandardTagTypes(MsgTagType& tags);
|
||||
|
||||
virtual bool createDistantOfflineMessengingInvite(time_t, std::string&) ;
|
||||
virtual bool getDistantOfflineMessengingInvites(std::vector<DistantOfflineMessengingInvite>&);
|
||||
|
||||
/*!
|
||||
* gets avatar from peer, image data in jpeg format
|
||||
*/
|
||||
|
@ -183,6 +187,11 @@ class p3Msgs: public RsMsgs
|
|||
virtual bool getDefaultNickNameForChatLobby(std::string& nick) ;
|
||||
virtual ChatLobbyId createChatLobby(const std::string& lobby_name,const std::string& lobby_topic,const std::list<std::string>& invited_friends,uint32_t privacy_type) ;
|
||||
|
||||
virtual bool createDistantChatInvite(const std::string& pgp_id,time_t time_of_validity,std::string& encrypted_string) ;
|
||||
virtual bool getDistantChatInviteList(std::vector<DistantChatInviteInfo>& invites);
|
||||
virtual bool initiateDistantChatConnexion(const std::string& encrypted_string,std::string& hash,uint32_t& error_code) ;
|
||||
virtual bool getDistantChatStatus(const std::string& hash,uint32_t& status,std::string& pgp_id) ;
|
||||
|
||||
private:
|
||||
|
||||
p3MsgService *mMsgSrv;
|
||||
|
|
|
@ -2230,10 +2230,13 @@ int RsServer::StartupRetroShare()
|
|||
mConnMgr->setP3tunnel(tn);
|
||||
#endif
|
||||
|
||||
p3turtle *tr = new p3turtle(mLinkMgr,ftserver) ;
|
||||
p3turtle *tr = new p3turtle(mLinkMgr) ;
|
||||
rsTurtle = tr ;
|
||||
pqih -> addService(tr);
|
||||
|
||||
ftserver->connectToTurtleRouter(tr) ;
|
||||
chatSrv->connectToTurtleRouter(tr) ;
|
||||
msgSrv->connectToTurtleRouter(tr) ;
|
||||
|
||||
pqih -> addService(ad);
|
||||
pqih -> addService(msgSrv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue