Last change
on this file since 4620 was 4618, checked in by Christoph Mayer, 15 years ago |
alle uint_8 auf uint_16 welche an serialisierung beteiligt sind
|
File size:
1.2 KB
|
Rev | Line | |
---|
| 1 | #ifndef ARIBA_OVERLAY_LINKREQUEST_H_
|
---|
| 2 | #define ARIBA_OVERLAY_LINKREQUEST_H_
|
---|
| 3 |
|
---|
| 4 | #include "ariba/utility/messages.h"
|
---|
| 5 | #include "ariba/utility/serialization.h"
|
---|
| 6 | #include "ariba/communication/EndpointDescriptor.h"
|
---|
| 7 |
|
---|
| 8 | using ariba::communication::EndpointDescriptor;
|
---|
| 9 |
|
---|
| 10 | namespace ariba {
|
---|
| 11 | namespace overlay {
|
---|
| 12 |
|
---|
| 13 | using_serialization;
|
---|
| 14 |
|
---|
| 15 | using ariba::utility::Message;
|
---|
| 16 |
|
---|
| 17 | /**
|
---|
| 18 | * This message is sent to another overlay node to request a new link.
|
---|
| 19 | *
|
---|
| 20 | * @author Sebastian Mies <mies@tm.uka.de>
|
---|
| 21 | */
|
---|
| 22 | class LinkRequest : public Message {
|
---|
| 23 | VSERIALIZEABLE;
|
---|
| 24 | private:
|
---|
| 25 | bool free_endpoint_;
|
---|
| 26 | uint16_t flags; //TODO: was uint8_t
|
---|
| 27 | uint32_t nonce;
|
---|
| 28 | const EndpointDescriptor* endpoint;
|
---|
| 29 |
|
---|
| 30 | public:
|
---|
| 31 | LinkRequest();
|
---|
| 32 |
|
---|
| 33 | LinkRequest( uint32_t nonce, const EndpointDescriptor* endpoint,
|
---|
| 34 | bool reply = false );
|
---|
| 35 |
|
---|
| 36 | virtual ~LinkRequest();
|
---|
| 37 |
|
---|
| 38 | const EndpointDescriptor* getEndpoint() const {
|
---|
| 39 | return endpoint;
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | bool isReply() const {
|
---|
| 43 | return flags & 1;
|
---|
| 44 | }
|
---|
| 45 |
|
---|
| 46 | uint32_t getNonce() const {
|
---|
| 47 | return nonce;
|
---|
| 48 | }
|
---|
| 49 | };
|
---|
| 50 |
|
---|
| 51 | }} // ariba::overlay
|
---|
| 52 |
|
---|
| 53 | sznBeginDefault( ariba::overlay::LinkRequest, X ) {
|
---|
| 54 | if (X.isDeserializer()) endpoint = new EndpointDescriptor();
|
---|
| 55 | X && flags && nonce && reinterpret_cast<VSerializeable*>(const_cast<EndpointDescriptor*>(endpoint));
|
---|
| 56 | } sznEnd();
|
---|
| 57 |
|
---|
| 58 | #endif /* ARIBA_OVERLAY_LINKREQUEST_H_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.