mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-03 11:54:30 -04:00
Merge pull request #1829 from G10h4ck/rsfiles_links
RsFiles links support in libretroshare + a bunch of fixes
This commit is contained in:
commit
2b44492cb6
77 changed files with 2949 additions and 1667 deletions
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************************
|
||||
* util/RsGxsUpdateBroadcast.cpp *
|
||||
* *
|
||||
* Copyright (c) 2014 Retroshare Team <retroshare.project@gmail.com> *
|
||||
* Copyright (C) 2014-2020 Retroshare Team <contact@retroshare.cc> *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Affero General Public License as *
|
||||
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "RsGxsUpdateBroadcast.h"
|
||||
#include "gui/notifyqt.h"
|
||||
#include "util/qtthreadsutils.h"
|
||||
|
||||
#include <retroshare/rsgxsifacehelper.h>
|
||||
|
||||
|
@ -32,17 +33,20 @@
|
|||
// now the update notify works through rsnotify and notifyqt
|
||||
// so the single instance per service is not really needed anymore
|
||||
|
||||
QMap<RsGxsIfaceHelper*, RsGxsUpdateBroadcast*> updateBroadcastMap;
|
||||
static QMap<RsGxsIfaceHelper*, RsGxsUpdateBroadcast*> updateBroadcastMap;
|
||||
|
||||
RsGxsUpdateBroadcast::RsGxsUpdateBroadcast(RsGxsIfaceHelper *ifaceImpl) :
|
||||
QObject(NULL), mIfaceImpl(ifaceImpl)
|
||||
QObject(nullptr), mIfaceImpl(ifaceImpl), mEventHandlerId(0)
|
||||
{
|
||||
mEventHandlerId = 0; // forces initialization in registerEventsHandler()
|
||||
|
||||
rsEvents->registerEventsHandler(RsEventType::GXS_CHANGES, [this](std::shared_ptr<const RsEvent> event)
|
||||
{
|
||||
onChangesReceived(*dynamic_cast<const RsGxsChanges*>(event.get()));
|
||||
}, mEventHandlerId );
|
||||
rsEvents->registerEventsHandler(
|
||||
[this](std::shared_ptr<const RsEvent> event)
|
||||
{
|
||||
RsQThreadUtils::postToObject(
|
||||
[=]()
|
||||
{ onChangesReceived(*dynamic_cast<const RsGxsChanges*>(event.get())); },
|
||||
this );
|
||||
},
|
||||
mEventHandlerId, RsEventType::GXS_CHANGES );
|
||||
}
|
||||
|
||||
RsGxsUpdateBroadcast::~RsGxsUpdateBroadcast()
|
||||
|
|
|
@ -31,7 +31,7 @@ struct RsGxsChanges;
|
|||
|
||||
typedef uint32_t TurtleRequestId ;
|
||||
|
||||
class RsGxsUpdateBroadcast : public QObject
|
||||
class RS_DEPRECATED RsGxsUpdateBroadcast : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue