mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-08 00:55:13 -04:00
added grouter as a msg sending service. Not enable yet. Added serialisation for grouter items and test methods in tests/serialiser/. Added saveList/loadList for grouter. set connectToTurtleRouter() and connectToGRouter() to be mandatory methods
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6970 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
da1b6ac845
commit
5c52890ad5
17 changed files with 784 additions and 80 deletions
|
@ -43,32 +43,8 @@
|
|||
static const uint32_t CONFIG_TYPE_GROUTER = 0x0016 ;
|
||||
|
||||
class p3LinkMgr ;
|
||||
|
||||
class GRouterPublishedKeyInfo
|
||||
{
|
||||
public:
|
||||
GRouterServiceId service_id ;
|
||||
std::string description_string ;
|
||||
time_t last_published_time ;
|
||||
time_t validity_time ;
|
||||
};
|
||||
|
||||
struct FriendTrialRecord
|
||||
{
|
||||
SSLIdType friend_id ; // id of the friend
|
||||
time_t time_stamp ; // time of the last tried
|
||||
};
|
||||
|
||||
class GRouterRoutingInfo
|
||||
{
|
||||
public:
|
||||
RsGRouterGenericDataItem *data_item ;
|
||||
|
||||
uint32_t status_flags ; // pending, waiting, etc.
|
||||
std::list<FriendTrialRecord> tried_friends ; // list of friends to which the item was sent ordered with time.
|
||||
SSLIdType origin ; // which friend sent us that item
|
||||
time_t received_time ; // time at which the item was received
|
||||
};
|
||||
class RsGRouterPublishKeyItem ;
|
||||
class RsGRouterACKItem ;
|
||||
|
||||
class p3GRouter: public RsGRouter, public p3Service, public p3Config
|
||||
{
|
||||
|
@ -149,6 +125,7 @@ class p3GRouter: public RsGRouter, public p3Service, public p3Config
|
|||
void handleIncoming() ;
|
||||
void publishKeys() ;
|
||||
void debugDump() ;
|
||||
void locked_forwardKey(const RsGRouterPublishKeyItem&) ;
|
||||
|
||||
//===================================================//
|
||||
// p3Config methods //
|
||||
|
@ -157,7 +134,7 @@ class p3GRouter: public RsGRouter, public p3Service, public p3Config
|
|||
// Load/save the routing info, the pending items in transit, and the config variables.
|
||||
//
|
||||
virtual bool loadList(std::list<RsItem*>& items) ;
|
||||
virtual bool saveList(bool&,std::list<RsItem*>& items) ;
|
||||
virtual bool saveList(bool& cleanup,std::list<RsItem*>& items) ;
|
||||
|
||||
virtual RsSerialiser *setupSerialiser() ;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue