Merge pull request #1555 from G10h4ck/purge_deadcode

Purge deadcode
This commit is contained in:
csoler 2019-05-06 23:16:05 +02:00 committed by GitHub
commit 0a541667a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 27 additions and 378 deletions

View file

@ -40,7 +40,7 @@
* #define DEBUG_CIRCLES 1
****/
RsGxsCircles *rsGxsCircles = NULL;
/*extern*/ RsGxsCircles* rsGxsCircles = nullptr;
/******
*
@ -1858,47 +1858,6 @@ void p3GxsCircles::generateDummyCircle()
createGroup(dummyToken, group);
}
/************************************************************************************/
/************************************************************************************/
/************************************************************************************/
/************************************************************************************/
std::ostream &operator<<(std::ostream &out, const RsGxsCircleGroup &grp)
{
out << "RsGxsCircleGroup: Meta: " << grp.mMeta;
out << "InvitedMembers: ";
out << std::endl;
std::set<RsGxsId>::const_iterator it;
std::set<RsGxsCircleId>::const_iterator sit;
for(it = grp.mInvitedMembers.begin();
it != grp.mInvitedMembers.begin(); ++it)
{
out << "\t" << *it;
out << std::endl;
}
for(sit = grp.mSubCircles.begin();
sit != grp.mSubCircles.begin(); ++sit)
{
out << "\t" << *it;
out << std::endl;
}
return out;
}
std::ostream &operator<<(std::ostream &out, const RsGxsCircleMsg &msg)
{
out << "RsGxsCircleMsg: Meta: " << msg.mMeta;
out << std::endl;
return out;
}
// Overloaded from GxsTokenQueue for Request callbacks.
void p3GxsCircles::handleResponse(uint32_t token, uint32_t req_type)
{
@ -1921,22 +1880,13 @@ void p3GxsCircles::handleResponse(uint32_t token, uint32_t req_type)
case CIRCLEREQ_CACHELOAD:
cache_load_for_token(token);
break;
#if 0
case CIRCLEREQ_CACHETEST:
cachetest_handlerequest(token);
break;
#endif
default:
/* error */
std::cerr << "p3GxsCircles::handleResponse() Unknown Request Type: " << req_type;
std::cerr << std::endl;
break;
default:
RsErr() << __PRETTY_FUNCTION__ << " Unknown Request Type: "
<< req_type << std::endl;
break;
}
}
// Overloaded from RsTickEvent for Event callbacks.
void p3GxsCircles::handle_event(uint32_t event_type, const std::string &elabel)
{
@ -1960,14 +1910,7 @@ void p3GxsCircles::handle_event(uint32_t event_type, const std::string &elabel)
cache_reloadids(RsGxsCircleId(elabel));
break;
#if 0
case CIRCLE_EVENT_CACHETEST:
cachetest_getlist();
break;
#endif
case CIRCLE_EVENT_DUMMYSTART:
case CIRCLE_EVENT_DUMMYSTART:
generateDummyData();
break;
@ -1979,11 +1922,10 @@ void p3GxsCircles::handle_event(uint32_t event_type, const std::string &elabel)
generateDummyCircle();
break;
default:
/* error */
std::cerr << "p3GxsCircles::handle_event() Unknown Event Type: " << event_type;
std::cerr << std::endl;
break;
default:
RsErr() << __PRETTY_FUNCTION__ << " Unknown Event Type: " << event_type
<< std::endl;
break;
}
}

View file

@ -4542,65 +4542,6 @@ std::string rsIdTypeToString(uint32_t idtype)
*
*/
/************************************************************************************/
/*
* Scoring system.
* -100 to 100 is expected range.
*
*
* Each Lobby has a publish threshold.
* - As part of Lobby definition. ???
* - Locally Set.
*
* Threshold:
* 50 VIP List.
* 20 Dress Code
* 10 Limit Riffraff.
* 0 Accept All.
*
* Implicit Scores:
* +50 for known PGP
* +10 for unknown PGP (want to encourage usage).
* +5 for Anon ID.
*
* Own Scores:
* +1000 Accepted
* +50 Friend
* +10 Interesting
* 0 Mostly Harmless
* -10 Annoying.
* -50 Troll
* -1000 Total Banned
*
*
*
Processing Algorithm:
* - Grab all Groups which have received messages.
* (opt 1)-> grab latest msgs for each of these and process => score.
* (opt 2)-> try incremental system (people probably won't change opinions often -> just set them once)
* --> if not possible, fallback to full calculation.
*
*
*/
std::ostream &operator<<(std::ostream &out, const RsGxsIdGroup &grp)
{
out << "RsGxsIdGroup: Meta: " << grp.mMeta;
out << " PgpIdHash: " << grp.mPgpIdHash;
out << " PgpIdSign: [binary]"; // << grp.mPgpIdSign;
out << std::endl;
return out;
}
void p3IdService::checkPeerForIdentities()
{
RsStackMutex stack(mIdMtx);