72 lines
1.9 KiB
C++
72 lines
1.9 KiB
C++
// -*- C++ -*-
|
|
/*
|
|
* File: JoinAnnounce.h
|
|
* Author: jgaebler
|
|
*
|
|
* Created on February 1, 2011, 10:03 AM
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#ifndef JOINANNOUNCE_H
|
|
#define JOINANNOUNCE_H
|
|
|
|
#include "common/Defines.h"
|
|
#include "app/PeerDescription.h"
|
|
#include "common/transport/TransportAddress.h"
|
|
#include "ms/MemberDescription.h"
|
|
#include "mt/msg/MulticastMessage.h"
|
|
|
|
namespace ubeeme {
|
|
namespace moversight {
|
|
|
|
class Dispatcher;
|
|
|
|
/**
|
|
* @brief Defines a join announce message.
|
|
* @class JoinAnnounce
|
|
* @ingroup Moversight
|
|
* @author Jan Gäbler, Robert Noack
|
|
*/
|
|
class JoinAnnounce : public MulticastMessage {
|
|
public:
|
|
JoinAnnounce();
|
|
JoinAnnounce(const JoinAnnounce & other);
|
|
|
|
virtual ~JoinAnnounce();
|
|
|
|
JoinAnnounce * dup() const;
|
|
JoinAnnounce & operator=(const JoinAnnounce& other);
|
|
|
|
void handleReceive(Dispatcher & dis);
|
|
void handleDeliver(Dispatcher & dis, const PeerIDList & missedPeers);
|
|
|
|
virtual void set(Archive & archive);
|
|
|
|
// field getter/setter methods
|
|
virtual const TransportAddress& getJoinedPeerTA() const;
|
|
virtual void setJoinedPeerTA(const TransportAddress& joinedPeerTA);
|
|
|
|
virtual const PeerDescription& getPeerDescription() const ;
|
|
virtual void setPeerDescription(const PeerDescription& peerDescription);
|
|
|
|
virtual const PeerResources & getPeerResources() const;
|
|
virtual void setPeerResources(const PeerResources & res);
|
|
|
|
protected:
|
|
|
|
// protected and unimplemented operator==(), to prevent accidental usage
|
|
bool operator==(const JoinAnnounce&);
|
|
|
|
private:
|
|
|
|
TransportAddress joinedPeerTA;
|
|
PeerDescription peerDescription;
|
|
PeerResources peerResources;
|
|
|
|
};
|
|
}
|
|
}
|
|
|
|
#endif /* JOINANNOUNCE_H */
|