started implementation of new Global Router model. Switched msg service to use it (much simpler now!), and updated GUI. Implemented half the tunnel management logic.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-NewGRouterModel@7838 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-01-11 22:18:28 +00:00
parent 41a5c48243
commit e8f5f44318
22 changed files with 1091 additions and 1488 deletions

View file

@ -27,8 +27,9 @@
#include "util/rsdir.h"
#include "retroshare/rsids.h"
#include "retroshare/rsgxsifacetypes.h"
typedef GRouterKeyIdType GRouterKeyId ; // we use SSLIds, so that it's easier in the GUI to mix up peer ids with grouter ids.
typedef RsGxsId GRouterKeyId ; // we use SSLIds, so that it's easier in the GUI to mix up peer ids with grouter ids.
typedef uint32_t GRouterServiceId ;
typedef uint64_t GRouterMsgPropagationId ;
@ -52,8 +53,9 @@ class RsGRouter
struct GRouterPublishedKeyInfo
{
std::string description_string ;
uint32_t service_id ;
std::string description_string ;
RsGxsId authentication_key ;
uint32_t service_id ;
};
struct GRouterRoutingMatrixInfo
@ -85,8 +87,14 @@ class RsGRouter
// Communication to other services. //
//===================================================//
virtual void sendData(const GRouterKeyId& destination, const GRouterServiceId& client_id, RsGRouterGenericDataItem *item,GRouterMsgPropagationId& id) =0;
virtual bool registerKey(const GRouterKeyId& key,const GRouterServiceId& client_id,const std::string& description_string) =0;
virtual bool sendData( const RsGxsId& destination,
const GRouterServiceId& client_id,
uint8_t *data,
uint32_t data_size,
const RsGxsId& signing_id,
GRouterMsgPropagationId& id) =0;
virtual bool registerKey(const RsGxsId& authentication_id, const GRouterServiceId& client_id,const std::string& description_string)=0 ;
//===================================================//
// Routage feedback from other services //

View file

@ -219,7 +219,7 @@ static const uint32_t RS_GENERIC_ID_GXS_CIRCLE_ID_TYPE = 0x0008 ;
static const uint32_t RS_GENERIC_ID_GROUTER_ID_TYPE = 0x0009 ;
typedef t_RsGenericIdType< SSL_ID_SIZE , false, RS_GENERIC_ID_SSL_ID_TYPE> SSLIdType ;
typedef t_RsGenericIdType< SSL_ID_SIZE , false, RS_GENERIC_ID_GROUTER_ID_TYPE> GRouterKeyIdType ;
//typedef t_RsGenericIdType< SSL_ID_SIZE , false, RS_GENERIC_ID_GROUTER_ID_TYPE> GRouterKeyIdType ;
typedef t_RsGenericIdType< PGP_KEY_ID_SIZE , true, RS_GENERIC_ID_PGP_ID_TYPE> PGPIdType ;
typedef t_RsGenericIdType< SHA1_SIZE , false, RS_GENERIC_ID_SHA1_ID_TYPE> Sha1CheckSum ;
typedef t_RsGenericIdType< PGP_KEY_FINGERPRINT_SIZE, true, RS_GENERIC_ID_PGP_FINGERPRINT_TYPE> PGPFingerprintType ;

View file

@ -90,12 +90,12 @@
const ChatLobbyFlags RS_CHAT_LOBBY_FLAGS_AUTO_SUBSCRIBE( 0x00000001 ) ;
typedef uint64_t ChatLobbyId ;
typedef uint64_t ChatLobbyMsgId ;
typedef uint64_t ChatLobbyId ;
typedef uint64_t ChatLobbyMsgId ;
typedef std::string ChatLobbyNickName ;
typedef RsPeerId DistantChatPeerId ;
typedef GRouterKeyIdType DistantMsgPeerId ;
typedef RsPeerId DistantChatPeerId ;
//typedef GRouterKeyId DistantMsgPeerId ;
typedef uint64_t MessageId ;
@ -368,14 +368,6 @@ std::ostream &operator<<(std::ostream &out, const MessageInfo &info);
class RsMsgs;
extern RsMsgs *rsMsgs;
struct DistantOfflineMessengingInvite
{
RsPgpId issuer_pgp_id ;
DistantMsgPeerId peer_id ;
time_t time_of_validity ;
};
class RsMsgs
{
public:
@ -390,7 +382,6 @@ virtual ~RsMsgs() { return; }
virtual bool getMessageSummaries(std::list<MsgInfoSummary> &msgList) = 0;
virtual bool getMessage(const std::string &mId, MessageInfo &msg) = 0;
virtual void getMessageCount(unsigned int *pnInbox, unsigned int *pnInboxNew, unsigned int *pnOutbox, unsigned int *pnDraftbox, unsigned int *pnSentbox, unsigned int *pnTrashbox) = 0;
virtual bool decryptMessage(const std::string& mId) = 0 ;
virtual bool MessageSend(MessageInfo &info) = 0;
virtual bool SystemMessage(const std::string &title, const std::string &message, uint32_t systemFlag) = 0;