48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
#ifndef ROLESWITCHANOUNCE_H
|
|
#define ROLESWITCHANOUNCE_H
|
|
|
|
#include "mt/msg/MulticastMessage.h"
|
|
|
|
namespace ubeeme {
|
|
namespace moversight {
|
|
|
|
class Dispatcher;
|
|
class PeerIDList;
|
|
|
|
/**
|
|
* @brief Message for role switches
|
|
* @class RoleSwitchAnounce
|
|
* @author Felix Stubbe
|
|
* @ingroup Moversight
|
|
*/
|
|
class RoleSwitchAnounce : public MulticastMessage {
|
|
public:
|
|
|
|
RoleSwitchAnounce(PeerID peerSwitchId);
|
|
|
|
virtual ~RoleSwitchAnounce();
|
|
|
|
RoleSwitchAnounce(const RoleSwitchAnounce& other);
|
|
|
|
RoleSwitchAnounce& operator=(const RoleSwitchAnounce& other);
|
|
|
|
RoleSwitchAnounce * dup() const;
|
|
|
|
void handleReceive(Dispatcher & dis);
|
|
|
|
void handleDeliver(Dispatcher & dis, const PeerIDList & missedPeers);
|
|
|
|
protected:
|
|
|
|
// protected and unimplemented operator==(), to prevent accidental usage
|
|
bool operator==(const RoleSwitchAnounce&);
|
|
|
|
private:
|
|
|
|
PeerID roleSwitchId;
|
|
};
|
|
}
|
|
}
|
|
|
|
#endif // ROLESWITCHANOUNCE_H
|