mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-01 18:56:23 -04:00
moved GxsChanges to rsEvents
This commit is contained in:
parent
e402630095
commit
27793627e3
8 changed files with 14 additions and 21 deletions
|
@ -422,6 +422,7 @@ void NotifyQt::notifyPeerStatusChangedSummary()
|
|||
emit peerStatusChangedSummary();
|
||||
}
|
||||
|
||||
#ifdef TO_REMOVE
|
||||
void NotifyQt::notifyGxsChange(const RsGxsChanges& changes)
|
||||
{
|
||||
{
|
||||
|
@ -436,6 +437,7 @@ void NotifyQt::notifyGxsChange(const RsGxsChanges& changes)
|
|||
|
||||
emit gxsChange(changes);
|
||||
}
|
||||
#endif
|
||||
|
||||
void NotifyQt::notifyOwnStatusMessageChanged()
|
||||
{
|
||||
|
|
|
@ -82,8 +82,6 @@ class NotifyQt: public QObject, public NotifyClient
|
|||
/* one or more peers has changed the states */
|
||||
virtual void notifyPeerStatusChangedSummary();
|
||||
|
||||
virtual void notifyGxsChange(const RsGxsChanges& change);
|
||||
|
||||
virtual void notifyHistoryChanged(uint32_t msgId, int type);
|
||||
|
||||
virtual void notifyDiscInfoChanged() ;
|
||||
|
|
|
@ -37,7 +37,14 @@ QMap<RsGxsIfaceHelper*, RsGxsUpdateBroadcast*> updateBroadcastMap;
|
|||
RsGxsUpdateBroadcast::RsGxsUpdateBroadcast(RsGxsIfaceHelper *ifaceImpl) :
|
||||
QObject(NULL), mIfaceImpl(ifaceImpl)
|
||||
{
|
||||
connect(NotifyQt::getInstance(), SIGNAL(gxsChange(RsGxsChanges)), this, SLOT(onChangesReceived(RsGxsChanges)));
|
||||
mEventHandlerId = 0; // forces initialization in registerEventsHandler()
|
||||
|
||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> event)
|
||||
{
|
||||
if(event->mType == RsEventType::GXS_CHANGES)
|
||||
onChangesReceived(*dynamic_cast<const RsGxsChanges*>(event.get()));
|
||||
|
||||
}, mEventHandlerId );
|
||||
}
|
||||
|
||||
void RsGxsUpdateBroadcast::cleanup()
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <QObject>
|
||||
|
||||
#include <retroshare/rsgxsifacetypes.h>
|
||||
#include <retroshare/rsevents.h>
|
||||
|
||||
struct RsGxsIfaceHelper;
|
||||
struct RsGxsChanges;
|
||||
|
@ -53,6 +54,7 @@ private:
|
|||
|
||||
private:
|
||||
RsGxsIfaceHelper* mIfaceImpl;
|
||||
RsEventsHandlerId_t mEventHandlerId ;
|
||||
};
|
||||
|
||||
#endif // RSGXSUPDATEBROADCAST_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue