Files
resiprocate/p2p/DestinationId.hxx
Jason Fischl 1d24393a69 implement more Message ops
git-svn-id: https://svn.resiprocate.org/rep/resiprocate/main@8072 ddefafc4-47db-0310-ae44-fa13212b10f2
2008-06-19 01:42:39 +00:00

37 lines
832 B
C++

#ifndef __P2P_DESTINATION_ID_HXX
#define __P2P_DESTINATION_ID_HXX
#include "p2p/MessageStructsGen.hxx"
#include "p2p/NodeId.hxx"
#include "p2p/ResourceId.hxx"
namespace p2p
{
// Either a CompressedId, NodeId or ResourceId
class DestinationId : private s2c::DestinationStruct
{
public:
DestinationId(s2c::DestinationStruct);
DestinationId(const NodeId& nid);
DestinationId(const ResourceId& rid);
bool isNodeId() const;
NodeId asNodeId() const;
bool isCompressedId() const;
CompressedId asCompressedId() const;
bool isResourceId() const;
ResourceId asResourceId() const;
bool operator==(const NodeId& nid) const;
bool operator==(const DestinationId& nid) const;
s2c::DestinationStruct* copyDestinationStruct() const;
};
}
#endif