1
#if !defined(P2P_JOIN_HXX)
4
#include "p2p/Message.hxx"
5
#include "p2p/EventWrapper.hxx"
12
class JoinAns : public Message, private s2c::JoinAnsStruct
17
JoinAns(p2p::JoinReq *request, const resip::Data &overlaySpecific = resip::Data::Empty);
18
virtual MessageType getType() const { return Message::JoinAnsType; }
20
virtual void getEncodedPayload(resip::DataStream &data);
21
virtual resip::Data brief() const { return "JoinAns Message"; }
23
std::auto_ptr<Event> event() {return wrap(this);}
26
virtual void decodePayload(resip::DataStream &dataStream);
30
class JoinReq : public Message, private s2c::JoinReqStruct
33
JoinReq(const DestinationId &dest, const NodeId &nodeId, const resip::Data &overlaySpecific=resip::Data::Empty);
35
virtual MessageType getType() const { return Message::JoinReqType; }
36
NodeId getNodeId() const;
38
virtual void getEncodedPayload(resip::DataStream &data);
39
virtual resip::Data brief() const { return "JoinReq Message"; }
41
std::auto_ptr<Event> event() {return wrap(this);}
44
virtual void decodePayload(resip::DataStream &dataStream);
48
resip::Data mOverlaySpecific;
58
/* ======================================================================
59
* Copyright (c) 2008, Various contributors to the Resiprocate project
60
* All rights reserved.
62
* Redistribution and use in source and binary forms, with or without
63
* modification, are permitted provided that the following conditions
66
* - Redistributions of source code must retain the above copyright
67
* notice, this list of conditions and the following disclaimer.
69
* - Redistributions in binary form must reproduce the above
70
* copyright notice, this list of conditions and the following
71
* disclaimer in the documentation and/or other materials
72
* provided with the distribution.
74
* - The names of the project's contributors may not be used to
75
* endorse or promote products derived from this software without
76
* specific prior written permission.
78
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
79
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
80
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
81
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
82
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
83
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
84
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
85
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
86
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
87
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
88
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
89
* THE POSSIBILITY OF SUCH DAMAGE.
90
*====================================================================== */