mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-14 09:29:30 -04:00
added some backend for reputation system
This commit is contained in:
parent
c17dddb79c
commit
317e7ea5ab
7 changed files with 54 additions and 26 deletions
|
@ -380,7 +380,13 @@ bool p3GxsReputation::updateLatestUpdate(RsPeerId peerid, time_t ts)
|
|||
* Opinion
|
||||
****/
|
||||
|
||||
bool p3GxsReputation::updateOpinion(const RsGxsId& gxsid, int opinion)
|
||||
bool p3GxsReputation::getReputationInfo(const RsGxsId& gxsid, RsReputations::ReputationInfo& info)
|
||||
{
|
||||
std::cerr << __PRETTY_FUNCTION__ << ": not implemented yet!" << std::endl;
|
||||
return true ;
|
||||
}
|
||||
|
||||
bool p3GxsReputation::setOwnOpinion(const RsGxsId& gxsid, const RsReputations::Opinion& opinion)
|
||||
{
|
||||
RsStackMutex stack(mReputationMtx); /****** LOCKED MUTEX *******/
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "serialiser/rsgxsreputationitems.h"
|
||||
|
||||
#include "retroshare/rsidentity.h"
|
||||
#include "retroshare/rsreputations.h"
|
||||
#include "services/p3service.h"
|
||||
|
||||
|
||||
|
@ -80,14 +81,16 @@ int32_t CalculateReputation();
|
|||
*
|
||||
*/
|
||||
|
||||
class p3GxsReputation: public p3Service, public p3Config /* , public pqiMonitor */
|
||||
class p3GxsReputation: public p3Service, public p3Config, public RsReputations /* , public pqiMonitor */
|
||||
{
|
||||
public:
|
||||
p3GxsReputation(p3LinkMgr *lm);
|
||||
virtual RsServiceInfo getServiceInfo();
|
||||
|
||||
/***** Interface for p3idservice *****/
|
||||
|
||||
/***** Interface for RsReputations *****/
|
||||
virtual bool setOwnOpinion(const RsGxsId& key_id, const Opinion& op) ;
|
||||
virtual bool getReputationInfo(const RsGxsId& id,ReputationInfo& info) ;
|
||||
|
||||
virtual bool updateOpinion(const RsGxsId& gxsid, int opinion);
|
||||
|
||||
/***** overloaded from p3Service *****/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue