Changeset 7532 for source/ariba/AribaModule.h
- Timestamp:
- Feb 4, 2010, 5:29:37 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/AribaModule.h
r5767 r7532 44 44 #include <ctime> 45 45 #include <cstdlib> 46 #include "ariba/utility/logging/Logging.h"46 #include <algorithm> 47 47 48 48 using std::vector; … … 156 156 157 157 private: 158 159 // bootstrap mechanisms 160 enum BootstrapMechanism { 161 BootstrapMechanismInvalid = 0, 162 BootstrapMechanismStatic = 1, 163 BootstrapMechanismBroadcast = 2, 164 BootstrapMechanismMulticastDNS = 3, 165 BootstrapMechanismSDP = 4, 166 }; 167 static const string BootstrapMechanismNames[5]; 168 158 169 // bootstrap node 159 170 class BootstrapNode { 160 171 public: 161 172 inline BootstrapNode() : 162 timestamp(0), desc(NULL) {173 timestamp(0), desc(NULL), mechanism(BootstrapMechanismInvalid), info("") { 163 174 164 175 } 165 176 inline BootstrapNode(const BootstrapNode& copy) : 166 timestamp(copy.timestamp), desc(copy.desc) { 167 } 168 inline BootstrapNode(uint32_t timestamp, 169 communication::EndpointDescriptor* desc) : 170 timestamp(timestamp), desc(desc) { 177 timestamp(copy.timestamp), desc(copy.desc), mechanism(copy.mechanism), info(copy.info) { 178 } 179 inline BootstrapNode( 180 uint32_t timestamp, 181 communication::EndpointDescriptor* desc, 182 BootstrapMechanism mechanism, string info) : 183 timestamp(timestamp), desc(desc), mechanism(mechanism), info(info) { 171 184 } 172 185 uint32_t timestamp; 173 186 communication::EndpointDescriptor* desc; 187 BootstrapMechanism mechanism; 188 string info; 174 189 }; 175 190 … … 192 207 protected: 193 208 // members 194 string bootstrapFile; //< file with bootstrap information 195 string endpoints; 209 string endpoints; //< local endpoints the ariba module is bound to 196 210 bool started; //< flag, if module has been started 197 211 198 212 // bootstrap node management 199 void addBootstrapNode(const Name& spovnet, 200 communication::EndpointDescriptor* desc); 213 void addBootstrapNode( 214 const Name& spovnet, 215 communication::EndpointDescriptor* desc, 216 const string& info, 217 const BootstrapMechanism& mechanism 218 ); 219 void addBootstrapNode( 220 const Name& spovnet, 221 const BootstrapNode& node 222 ); 223 224 vector<AribaModule::BootstrapMechanism> getBootstrapMechanisms( 225 const Name& spovnet 226 ) const; 227 201 228 const communication::EndpointDescriptor* getBootstrapNode( 202 const Name& spovnet) const; 229 const Name& spovnet, 230 const BootstrapMechanism mechanism 231 ) const; 232 233 string getBootstrapInfo( 234 const Name& spovnet, 235 const BootstrapMechanism mechanism 236 ) const; 203 237 204 238 communication::BaseCommunication* base_comm;
Note:
See TracChangeset
for help on using the changeset viewer.