Merge pull request #1829 from G10h4ck/rsfiles_links

RsFiles links support in libretroshare + a bunch of fixes
This commit is contained in:
G10h4ck 2020-04-20 17:12:04 +02:00 committed by GitHub
commit 2b44492cb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
77 changed files with 2949 additions and 1667 deletions

View file

@ -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()

View file

@ -31,7 +31,7 @@ struct RsGxsChanges;
typedef uint32_t TurtleRequestId ;
class RsGxsUpdateBroadcast : public QObject
class RS_DEPRECATED RsGxsUpdateBroadcast : public QObject
{
Q_OBJECT