71 lines
1.8 KiB
C++
71 lines
1.8 KiB
C++
/*
|
|
* File: Invitation.h
|
|
* Author: jgaebler
|
|
*
|
|
* Created on July 23, 2010, 4:00 PM
|
|
*/
|
|
#pragma once
|
|
|
|
#ifndef INVITATION_H
|
|
#define INVITATION_H
|
|
|
|
#include "app/PeerDescription.h"
|
|
#include "common/Defines.h"
|
|
#include "common/transport/TransportAddress.h"
|
|
|
|
namespace ubeeme {
|
|
namespace moversight {
|
|
|
|
/**
|
|
* @brief Defines an invitation abstraction, used to store invitation related information (according join request and join confirm messages).
|
|
* @author Jan Gäbler, Robert Noack
|
|
* @class Invitation
|
|
* @ingroup Moversight
|
|
*/
|
|
class MOV_EXPORT Invitation {
|
|
public:
|
|
|
|
Invitation();
|
|
Invitation( const InvitationID& aInvitationId, const PeerID& aInviter, const TransportAddress& aInviterTa, const PeerDescription& aInviterPDesc, const TransportAddress & aInviteeTa);
|
|
Invitation( const Invitation & other);
|
|
|
|
virtual ~Invitation();
|
|
|
|
const InvitationID & getInvitationID() const;
|
|
|
|
const PeerID & getInviterID() const;
|
|
|
|
const TransportAddress & getInviteeAddress() const;
|
|
|
|
const TransportAddress & getInviterAddress() const;
|
|
|
|
const PeerDescription & getInviterPeerDescription() const;
|
|
|
|
Invitation & operator=(const Invitation & other);
|
|
|
|
bool operator==(const Invitation & inv) const;
|
|
|
|
bool operator==(const InvitationID & i) const;
|
|
|
|
private:
|
|
|
|
InvitationID invId;
|
|
PeerID inviter;
|
|
TransportAddress inviterTa;
|
|
PeerDescription inviterPDesc;
|
|
TransportAddress inviteeTa;
|
|
|
|
#if ! OMNETPP
|
|
protected:
|
|
virtual void set(Archive & archive);
|
|
#endif
|
|
|
|
};
|
|
|
|
std::ostream & operator<<(std::ostream & s, const Invitation & inv);
|
|
}
|
|
}
|
|
|
|
#endif /* INVITATION_H */
|
|
|