mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-27 19:10:41 -05:00
removed TokenQueue from GxsTransportStatistics
This commit is contained in:
parent
72a22bcc88
commit
4653f18dd1
6 changed files with 171 additions and 166 deletions
|
|
@ -70,10 +70,8 @@ enum class GxsTransSendStatus : uint8_t
|
|||
|
||||
typedef uint64_t RsGxsTransId;
|
||||
|
||||
class RsGxsTransGroup
|
||||
class RsGxsTransGroup: public RsGxsGenericGroupData
|
||||
{
|
||||
public:
|
||||
RsGroupMetaData mMeta;
|
||||
};
|
||||
|
||||
class RsGxsTransMsg
|
||||
|
|
@ -103,7 +101,34 @@ struct RsGxsTransOutgoingRecord
|
|||
RsGxsGroupId group_id ;
|
||||
};
|
||||
|
||||
class RsGxsTransGroupStatistics: public GxsGroupStatistic
|
||||
{
|
||||
public:
|
||||
RsGxsTransGroupStatistics()
|
||||
{
|
||||
last_publish_TS = 0;
|
||||
popularity = 0;
|
||||
subscribed = false;
|
||||
}
|
||||
|
||||
void addMessageMeta(const RsGxsGroupId& grp,const RsMsgMetaData& meta)
|
||||
{
|
||||
messages_metas[meta.mMsgId] = meta ;
|
||||
last_publish_TS = std::max(last_publish_TS,meta.mPublishTs) ;
|
||||
mGrpId = grp ;
|
||||
}
|
||||
|
||||
bool subscribed ;
|
||||
int popularity ;
|
||||
|
||||
rstime_t last_publish_TS;
|
||||
|
||||
std::map<RsGxsMessageId,RsMsgMetaData> messages_metas ;
|
||||
};
|
||||
|
||||
|
||||
/// RetroShare GxsTrans asyncronous redundant small mail trasport on top of GXS
|
||||
///
|
||||
class RsGxsTrans: public RsGxsIfaceHelper
|
||||
{
|
||||
public:
|
||||
|
|
@ -120,10 +145,8 @@ public:
|
|||
|
||||
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;
|
||||
virtual bool getDataStatistics(GxsTransStatistics& stats)=0;
|
||||
virtual bool getGroupStatistics(std::map<RsGxsGroupId,RsGxsTransGroupStatistics>& stats) =0;
|
||||
};
|
||||
|
||||
extern RsGxsTrans *rsGxsTrans ;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue