mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-31 17:53:28 -05:00
329050a9c2
Avoid problems to serialization on different platforms, without breaking nested STL containers serialization. The conversion have been made with sed, and checked with grep, plus kdiff3 visual ispection, plus rutime tests, so it should be fine.
60 lines
2.3 KiB
C++
60 lines
2.3 KiB
C++
/*******************************************************************************
|
|
* libretroshare/src/services: p3heartbeat.h *
|
|
* *
|
|
* libretroshare: retroshare core library *
|
|
* *
|
|
* Copyright 2004-2013 Robert Fernie <retroshare@lunamutt.com> *
|
|
* *
|
|
* This program is free software: you can redistribute it and/or modify *
|
|
* it under the terms of the GNU Lesser 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/>. *
|
|
* *
|
|
*******************************************************************************/
|
|
#ifndef MRK_SERVICES_HEARTBEAT_H
|
|
#define MRK_SERVICES_HEARTBEAT_H
|
|
|
|
// Moved Heartbeat to a seperate service.
|
|
|
|
#include "services/p3service.h"
|
|
|
|
class p3ServiceControl;
|
|
class pqipersongrp;
|
|
|
|
class p3heartbeat: public p3Service
|
|
{
|
|
public:
|
|
|
|
p3heartbeat(p3ServiceControl *sc, pqipersongrp *pqipg);
|
|
virtual ~p3heartbeat();
|
|
|
|
virtual RsServiceInfo getServiceInfo();
|
|
|
|
int tick();
|
|
|
|
private:
|
|
|
|
void sendHeartbeat(const RsPeerId &toId);
|
|
void recvHeartbeat(const RsPeerId &fromId);
|
|
|
|
private:
|
|
|
|
p3ServiceControl *mServiceCtrl;
|
|
pqipersongrp *mPqiPersonGrp;
|
|
|
|
/* data */
|
|
RsMutex mHeartMtx;
|
|
|
|
rstime_t mLastHeartbeat;
|
|
};
|
|
|
|
#endif // MRK_SERVICES_HEARTBEAT_H
|