2018-12-27 08:39:10 -05:00
|
|
|
/*******************************************************************************
|
|
|
|
* util/RsGxsUpdateBroadcast.h *
|
|
|
|
* *
|
|
|
|
* Copyright (c) 2014 Retroshare Team <retroshare.project@gmail.com> *
|
|
|
|
* *
|
|
|
|
* This program is free software: you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU Affero General Public License as *
|
|
|
|
* published by the Free Software Foundation, either version 3 of the *
|
|
|
|
* License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU Affero General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU Affero General Public License *
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
|
|
* *
|
|
|
|
*******************************************************************************/
|
|
|
|
|
2012-12-18 17:25:00 -05:00
|
|
|
#ifndef RSGXSUPDATEBROADCAST_H
|
|
|
|
#define RSGXSUPDATEBROADCAST_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
2013-07-14 14:48:40 -04:00
|
|
|
#include <retroshare/rsgxsifacetypes.h>
|
|
|
|
|
2019-02-14 16:48:33 -05:00
|
|
|
struct RsGxsIfaceHelper;
|
2019-02-14 16:41:19 -05:00
|
|
|
struct RsGxsChanges;
|
2012-12-18 17:25:00 -05:00
|
|
|
|
2018-06-23 16:25:36 -04:00
|
|
|
typedef uint32_t TurtleRequestId ;
|
|
|
|
|
2012-12-18 17:25:00 -05:00
|
|
|
class RsGxsUpdateBroadcast : public QObject
|
|
|
|
{
|
2013-07-14 14:48:40 -04:00
|
|
|
Q_OBJECT
|
|
|
|
|
2012-12-18 17:25:00 -05:00
|
|
|
public:
|
2013-07-14 14:48:40 -04:00
|
|
|
static void cleanup();
|
2012-12-18 17:25:00 -05:00
|
|
|
|
2013-07-14 14:48:40 -04:00
|
|
|
static RsGxsUpdateBroadcast *get(RsGxsIfaceHelper* ifaceImpl);
|
2012-12-18 17:25:00 -05:00
|
|
|
|
|
|
|
signals:
|
2013-07-14 14:48:40 -04:00
|
|
|
void changed();
|
2018-06-21 09:46:59 -04:00
|
|
|
void msgsChanged(const std::map<RsGxsGroupId, std::set<RsGxsMessageId> >& msgIds, const std::map<RsGxsGroupId, std::set<RsGxsMessageId> >& msgIdsMeta);
|
2014-07-04 17:51:17 -04:00
|
|
|
void grpsChanged(const std::list<RsGxsGroupId>& grpIds, const std::list<RsGxsGroupId>& grpIdsMeta);
|
2018-06-23 16:25:36 -04:00
|
|
|
void distantSearchResultsChanged(const std::list<TurtleRequestId>& reqs);
|
2012-12-18 17:25:00 -05:00
|
|
|
|
2013-07-14 14:48:40 -04:00
|
|
|
private slots:
|
2015-03-20 06:39:17 -04:00
|
|
|
void onChangesReceived(const RsGxsChanges& changes);
|
2012-12-18 17:25:00 -05:00
|
|
|
|
|
|
|
private:
|
2013-07-14 14:48:40 -04:00
|
|
|
explicit RsGxsUpdateBroadcast(RsGxsIfaceHelper* ifaceImpl);
|
2012-12-18 17:25:00 -05:00
|
|
|
|
2013-07-14 14:48:40 -04:00
|
|
|
private:
|
|
|
|
RsGxsIfaceHelper* mIfaceImpl;
|
2012-12-18 17:25:00 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // RSGXSUPDATEBROADCAST_H
|