mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-11 23:05:49 -05:00
removed TokenQueue from GxsTransportStatistics
This commit is contained in:
parent
72a22bcc88
commit
4653f18dd1
6 changed files with 171 additions and 166 deletions
|
|
@ -85,8 +85,7 @@ public:
|
|||
* @param groupIds the ids return for given request token
|
||||
* @return false if request token is invalid, check token status for error report
|
||||
*/
|
||||
bool getGroupList(const uint32_t &token,
|
||||
std::list<RsGxsGroupId> &groupIds)
|
||||
bool getGroupList(const uint32_t &token, std::list<RsGxsGroupId> &groupIds)
|
||||
{
|
||||
return mGxs.getGroupList(token, groupIds);
|
||||
}
|
||||
|
|
@ -119,8 +118,7 @@ public:
|
|||
* @param groupInfo the ids returned for given request token
|
||||
* @return false if request token is invalid, check token status for error report
|
||||
*/
|
||||
bool getGroupSummary(const uint32_t &token,
|
||||
std::list<RsGroupMetaData> &groupInfo)
|
||||
bool getGroupSummary(const uint32_t &token, std::list<RsGroupMetaData> &groupInfo)
|
||||
{
|
||||
return mGxs.getGroupMeta(token, groupInfo);
|
||||
}
|
||||
|
|
@ -130,8 +128,7 @@ public:
|
|||
* @param msgInfo the message metadata returned for given request token
|
||||
* @return false if request token is invalid, check token status for error report
|
||||
*/
|
||||
bool getMsgSummary(const uint32_t &token,
|
||||
GxsMsgMetaMap &msgInfo)
|
||||
bool getMsgSummary(const uint32_t &token, GxsMsgMetaMap &msgInfo)
|
||||
{
|
||||
return mGxs.getMsgMeta(token, msgInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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