fixed compilation

This commit is contained in:
csoler 2015-10-06 22:39:14 -04:00
parent 9f6bc0c3fc
commit b0940890cd
3 changed files with 12 additions and 8 deletions

View File

@ -80,7 +80,7 @@ class RsGxsReputationSetItem: public RsReputationItem
public: public:
RsGxsReputationSetItem() :RsReputationItem(RS_PKT_SUBTYPE_GXS_REPUTATION_SET_ITEM) {} RsGxsReputationSetItem() :RsReputationItem(RS_PKT_SUBTYPE_GXS_REPUTATION_SET_ITEM) {}
virtual ~RsGxsReputationSetItem(); virtual ~RsGxsReputationSetItem() {}
virtual void clear(); virtual void clear();
std::ostream &print(std::ostream &out, uint16_t indent = 0); std::ostream &print(std::ostream &out, uint16_t indent = 0);
@ -99,7 +99,7 @@ class RsGxsReputationUpdateItem: public RsReputationItem
public: public:
RsGxsReputationUpdateItem() :RsReputationItem(RS_PKT_SUBTYPE_GXS_REPUTATION_UPDATE_ITEM) {} RsGxsReputationUpdateItem() :RsReputationItem(RS_PKT_SUBTYPE_GXS_REPUTATION_UPDATE_ITEM) {}
virtual ~RsGxsReputationUpdateItem(); virtual ~RsGxsReputationUpdateItem() {}
virtual void clear(); virtual void clear();
std::ostream &print(std::ostream &out, uint16_t indent = 0); std::ostream &print(std::ostream &out, uint16_t indent = 0);
@ -115,7 +115,7 @@ class RsGxsReputationRequestItem: public RsReputationItem
public: public:
RsGxsReputationRequestItem() :RsReputationItem(RS_PKT_SUBTYPE_GXS_REPUTATION_REQUEST_ITEM) {} RsGxsReputationRequestItem() :RsReputationItem(RS_PKT_SUBTYPE_GXS_REPUTATION_REQUEST_ITEM) {}
virtual ~RsGxsReputationRequestItem(); virtual ~RsGxsReputationRequestItem() {}
virtual void clear() {} virtual void clear() {}
std::ostream &print(std::ostream &out, uint16_t indent = 0); std::ostream &print(std::ostream &out, uint16_t indent = 0);

View File

@ -684,4 +684,10 @@ int p3GxsReputation::sendReputationRequest(RsPeerId peerid)
return 1; return 1;
} }
float Reputation::CalculateReputation()
{
// the calculation of reputation makes the whole thing
std::cerr << __PRETTY_FUNCTION__ << ": not implemented yet!" << std::endl;
return 0.0 ;
}

View File

@ -64,14 +64,14 @@ public:
Reputation(const RsGxsId& about) Reputation(const RsGxsId& about)
:mGxsId(about), mOwnOpinion(0), mOwnOpinionTs(0), mReputation(0) { return; } :mGxsId(about), mOwnOpinion(0), mOwnOpinionTs(0), mReputation(0) { return; }
int32_t CalculateReputation(); float CalculateReputation();
RsGxsId mGxsId; RsGxsId mGxsId;
std::map<RsPeerId, int32_t> mOpinions; std::map<RsPeerId, int32_t> mOpinions;
int32_t mOwnOpinion; int32_t mOwnOpinion;
time_t mOwnOpinionTs; time_t mOwnOpinionTs;
int32_t mReputation; float mReputation;
}; };
@ -91,8 +91,6 @@ class p3GxsReputation: public p3Service, public p3Config, public RsReputations /
virtual bool setOwnOpinion(const RsGxsId& key_id, const Opinion& op) ; virtual bool setOwnOpinion(const RsGxsId& key_id, const Opinion& op) ;
virtual bool getReputationInfo(const RsGxsId& id,ReputationInfo& info) ; virtual bool getReputationInfo(const RsGxsId& id,ReputationInfo& info) ;
virtual bool updateOpinion(const RsGxsId& gxsid, int opinion);
/***** overloaded from p3Service *****/ /***** overloaded from p3Service *****/
/*! /*!
* This retrieves all chat msg items and also (important!) * This retrieves all chat msg items and also (important!)