Ignore:
Timestamp:
Mar 22, 2011, 4:05:57 PM (13 years ago)
Author:
mies
Message:

almost forgot to commit: doxygen modules :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/communication/BaseCommunication.h

    r6941 r9684  
    131131
    132132        /// Establishes a link to another end-point.
    133         const LinkID establishLink(const EndpointDescriptor& descriptor,
    134                 const LinkID& linkid = LinkID::UNSPECIFIED, const QoSParameterSet& qos =
    135                                 QoSParameterSet::DEFAULT, const SecurityParameterSet& sec =
    136                                 SecurityParameterSet::DEFAULT);
     133        const LinkID establishLink(const EndpointDescriptor& descriptor );
    137134
    138135        /// Drops a link
    139         void dropLink(const LinkID link);
     136        void dropLink( LinkID link );
    140137
    141138        /**
     
    146143         * @return A sequence number for this message
    147144         */
    148         seqnum_t sendMessage(const LinkID lid, const Message* message);
     145        seqnum_t sendMessage( LinkID lid, const Message* message );
    149146
    150147        /**
     
    154151         * @return The end-point descriptor of the link's end-point
    155152         */
    156         const EndpointDescriptor& getEndpointDescriptor(const LinkID link =
    157                         LinkID::UNSPECIFIED) const;
     153        const EndpointDescriptor& getEndpointDescriptor(
     154                        LinkID link = LinkID::UNSPECIFIED) const;
    158155
    159156        /**
     
    212209        class LinkDescriptor {
    213210        public:
    214 
    215211                /// default constructor
    216                 LinkDescriptor() :
    217                         localLink(LinkID::UNSPECIFIED), localLocator(NULL),
    218                         remoteLink(LinkID::UNSPECIFIED), remoteLocator(NULL),
    219                         up(false) {
    220                 }
     212                LinkDescriptor() : up(false), id(), localLocator(NULL), remoteLocator(NULL) {}
    221213
    222214                ~LinkDescriptor() {
     
    226218
    227219                bool isUnspecified() const {
    228                         return (this == &UNSPECIFIED());
     220                        return id.isUnspecified();
    229221                }
    230222
    231                 static LinkDescriptor& UNSPECIFIED(){
    232                         static LinkDescriptor* unspec = NULL;
    233                         if(unspec == NULL) unspec = new LinkDescriptor();
    234                         return *unspec;
    235                 }
    236 
    237                 bool unspecified;
    238 
    239                 /// link identifiers
    240                 LinkID localLink;
     223                /// flag, whether this link is up
     224                bool up;
     225
     226                /// link identifier
     227                LinkID id;
     228
     229                /// locators
    241230                const address_v* localLocator;
    242 
    243                 /// used underlay addresses for the link
    244                 LinkID remoteLink;
    245231                const address_v* remoteLocator;
    246232
    247233                /// the remote end-point descriptor
    248234                EndpointDescriptor remoteEndpoint;
    249 
    250                 /// flag, whether this link is up
    251                 bool up;
    252235        };
    253236
     
    259242
    260243        /// Link management: add a link
    261         void addLink( LinkDescriptor* link );
     244        LinkDescriptor& addLink( LinkID link );
    262245
    263246        /// Link management: remove a link
    264         void removeLink(const LinkID& localLink);
     247        void removeLink( LinkID link);
    265248
    266249        /// Link management: get link information using the local link
    267         LinkDescriptor& queryLocalLink(const LinkID& localLink) const;
    268 
    269         /// Link management: get link information using the remote link
    270         LinkDescriptor& queryRemoteLink(const LinkID& remoteLink) const;
     250        LinkDescriptor& queryLink( LinkID link) const;
    271251
    272252        /// The local end-point descriptor
     
    307287        /// convenience: send message to peer
    308288        void send( Message* message, const EndpointDescriptor& endpoint );
     289
    309290        void send( Message* message, const LinkDescriptor& descriptor );
    310291
    311292        /// state of the base communication
    312293        bool started;
    313 
    314294};
    315295
Note: See TracChangeset for help on using the changeset viewer.