mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-13 16:45:49 -04:00
Changes to support the new NewsFeed.
* added interface to rsnotify/p3notify/pqinotify * added getForumInfo() to forum interface. * added virtual functions to p3distrib for event feedback. New NewsFeed Notification. * Peer Connection/Disconnection. * Failed Certificate connection. * New/Updated Forums and Forum Msgs. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@616 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
971ad4fe9b
commit
9f024eaee7
12 changed files with 192 additions and 16 deletions
|
@ -354,6 +354,7 @@ void p3GroupDistrib::loadGroup(RsDistribGrp *newGrp)
|
|||
|
||||
/* look for duplicate */
|
||||
bool checked = false;
|
||||
bool isNew = false;
|
||||
std::map<std::string, GroupInfo>::iterator it;
|
||||
it = mGroups.find(gid);
|
||||
|
||||
|
@ -383,6 +384,8 @@ void p3GroupDistrib::loadGroup(RsDistribGrp *newGrp)
|
|||
mGroups[gid] = gi;
|
||||
|
||||
it = mGroups.find(gid);
|
||||
|
||||
isNew = true;
|
||||
}
|
||||
|
||||
/* at this point - always in the map */
|
||||
|
@ -428,6 +431,9 @@ void p3GroupDistrib::loadGroup(RsDistribGrp *newGrp)
|
|||
}
|
||||
else
|
||||
{
|
||||
/* Callback for any derived classes */
|
||||
locked_eventUpdateGroup(&(it->second), isNew);
|
||||
|
||||
locked_notifyGroupChanged(it->second);
|
||||
}
|
||||
|
||||
|
@ -608,6 +614,9 @@ void p3GroupDistrib::loadMsg(RsDistribSignedMsg *newMsg, std::string src, bool l
|
|||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
/* Callback for any derived classes to play with */
|
||||
locked_eventNewMsg(msg);
|
||||
|
||||
/* else if group = subscribed | listener -> publish */
|
||||
/* if it has come from us... then it has been published already */
|
||||
if ((!local) && (git->second.flags & (RS_DISTRIB_SUBSCRIBED)))
|
||||
|
@ -2464,6 +2473,14 @@ bool p3GroupDistrib::locked_checkDistribMsg(
|
|||
#ifdef DISTRIB_DEBUG
|
||||
std::cerr << "p3GroupDistrib::locked_checkDistribMsg() TS out of range";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "p3GroupDistrib::locked_checkDistribMsg() msg->timestamp: " << msg->timestamp;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "p3GroupDistrib::locked_checkDistribMsg() = " << now - msg->timestamp << " secs ago";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "p3GroupDistrib::locked_checkDistribMsg() max TS: " << max;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "p3GroupDistrib::locked_checkDistribMsg() min TS: " << min;
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
/* if outside range -> remove */
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue