mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-03 03:36:58 -04:00
added infrastructure for gathering statistics about GxsTransport. Unfinished.
This commit is contained in:
parent
b341fea170
commit
fbeb6ff98d
9 changed files with 741 additions and 12 deletions
42
libretroshare/src/retroshare/rsgxstrans.h
Normal file
42
libretroshare/src/retroshare/rsgxstrans.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
#include "retroshare/rstokenservice.h"
|
||||
#include "retroshare/rsgxsifacehelper.h"
|
||||
#include "retroshare/rsgxscommon.h"
|
||||
|
||||
class RsGxsTransGroup
|
||||
{
|
||||
public:
|
||||
RsGroupMetaData mMeta;
|
||||
};
|
||||
|
||||
class RsGxsTransMsg
|
||||
{
|
||||
public:
|
||||
RsGxsTransMsg() : size(0),data(NULL) {}
|
||||
virtual ~RsGxsTransMsg() { free(data) ; }
|
||||
|
||||
public:
|
||||
RsMsgMetaData mMeta;
|
||||
|
||||
uint32_t size ;
|
||||
uint8_t *data ;
|
||||
};
|
||||
|
||||
class RsGxsTrans: public RsGxsIfaceHelper
|
||||
{
|
||||
public:
|
||||
struct GxsTransStatistics
|
||||
{
|
||||
RsGxsGroupId prefered_group_id ;
|
||||
};
|
||||
|
||||
RsGxsTrans(RsGxsIface *gxs) : RsGxsIfaceHelper(gxs) {}
|
||||
|
||||
virtual ~RsGxsTrans() {}
|
||||
|
||||
virtual bool getStatistics(GxsTransStatistics& stats)=0;
|
||||
|
||||
// virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsTransGroup> &groups) = 0;
|
||||
// virtual bool getPostData(const uint32_t &token, std::vector<RsGxsTransMsg> &posts) = 0;
|
||||
};
|
||||
|
||||
extern RsGxsTrans *rsgxstrans ;
|
Loading…
Add table
Add a link
Reference in a new issue