2018-11-04 15:17:22 -05:00
|
|
|
/*******************************************************************************
|
|
|
|
* unittests/libretroshare/gxs/nxs_test/nxsmsgsync_test.h *
|
|
|
|
* *
|
|
|
|
* Copyright (C) 2014, Crispy <retroshare.team@gmailcom> *
|
|
|
|
* *
|
|
|
|
* 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 Lesser General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU Lesser General Public License *
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
|
|
* *
|
|
|
|
******************************************************************************/
|
2014-04-13 17:52:53 -04:00
|
|
|
|
|
|
|
#ifndef NXSMSGSYNC_TEST_H_
|
|
|
|
#define NXSMSGSYNC_TEST_H_
|
|
|
|
|
2014-04-26 06:07:25 -04:00
|
|
|
#include "nxsmsgtestscenario.h"
|
2014-04-13 17:52:53 -04:00
|
|
|
|
2014-04-26 06:07:25 -04:00
|
|
|
namespace rs_nxs_test {
|
2014-04-13 17:52:53 -04:00
|
|
|
|
2014-04-26 06:07:25 -04:00
|
|
|
class NxsMsgSync : public NxsMsgTestScenario
|
2014-04-13 17:52:53 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2014-04-26 06:07:25 -04:00
|
|
|
NxsMsgSync();
|
2017-07-24 18:07:53 -04:00
|
|
|
virtual ~NxsMsgSync();
|
2014-04-25 18:02:34 -04:00
|
|
|
void getPeers(std::list<RsPeerId>& peerIds);
|
|
|
|
RsGeneralDataService* getDataService(const RsPeerId& peerId);
|
|
|
|
RsNxsNetMgr* getDummyNetManager(const RsPeerId& peerId);
|
|
|
|
RsGcxs* getDummyCircles(const RsPeerId& peerId);
|
|
|
|
RsGixsReputation* getDummyReputations(const RsPeerId& peerId);
|
2014-04-13 17:52:53 -04:00
|
|
|
uint16_t getServiceType();
|
2014-04-25 18:02:34 -04:00
|
|
|
RsServiceInfo getServiceInfo();
|
2014-05-27 17:14:05 -04:00
|
|
|
PgpAuxUtils* getDummyPgpUtils();
|
2014-04-13 17:52:53 -04:00
|
|
|
|
2014-04-26 06:07:25 -04:00
|
|
|
protected:
|
|
|
|
|
|
|
|
const ExpectedMap& getExpectedMap();
|
|
|
|
|
2014-04-25 18:02:34 -04:00
|
|
|
private:
|
2014-04-13 17:52:53 -04:00
|
|
|
|
2014-04-25 18:02:34 -04:00
|
|
|
std::list<RsPeerId> mPeerIds;
|
|
|
|
typedef std::map<RsPeerId, RsGeneralDataService*> DataMap;
|
2014-04-13 17:52:53 -04:00
|
|
|
|
2014-04-25 18:02:34 -04:00
|
|
|
DataMap mDataServices;
|
|
|
|
std::map<RsPeerId, RsNxsNetMgr*> mNxsNetMgrs;
|
|
|
|
RsGixsReputation* mRep;
|
|
|
|
RsGcxs* mCircles;
|
|
|
|
RsServiceInfo mServInfo;
|
2014-05-27 17:14:05 -04:00
|
|
|
PgpAuxUtils* mPgpUtils;
|
2014-04-13 17:52:53 -04:00
|
|
|
|
2014-04-26 06:07:25 -04:00
|
|
|
NxsMsgTestScenario::ExpectedMap mExpectedResult;
|
2014-04-13 17:52:53 -04:00
|
|
|
|
|
|
|
uint16_t mServType;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2014-04-26 06:07:25 -04:00
|
|
|
}
|
2014-04-13 17:52:53 -04:00
|
|
|
|
|
|
|
|
|
|
|
#endif /* NXSMSGSYNC_TEST_H_ */
|