Changeset 4836 for source/ariba/utility/bootstrap/BootstrapManager.cpp
- Timestamp:
- Jul 9, 2009, 1:50:37 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/bootstrap/BootstrapManager.cpp
r4758 r4836 50 50 51 51 BootstrapManager::~BootstrapManager(){ 52 53 boost::mutex::scoped_lock lock( modulesMutex );54 55 while( modules.size() > 0 ){56 ModuleMap::iterator i = modules.begin();57 unregisterModule( i->first );58 }59 52 } 60 53 … … 96 89 } 97 90 98 BootstrapManager::RegistrationResult BootstrapManager::unregisterModule(BootstrapManager::BootstrapType type){ 91 BootstrapManager::RegistrationResult BootstrapManager::unregisterModule( 92 BootstrapManager::BootstrapType type){ 99 93 100 94 boost::mutex::scoped_lock lock( modulesMutex ); … … 113 107 } 114 108 115 void BootstrapManager::onBootstrapServiceFound(string name, string info){ 109 BootstrapManager::RegistrationResult BootstrapManager::registerAllModules(){ 110 RegistrationResult result = RegistrationSucceeded; 111 112 { // multicast dns 113 RegistrationResult resone = RegistrationSucceeded; 114 resone = registerModule(BootstrapTypeMulticastDns); 115 if(resone != RegistrationSucceeded) 116 result = resone; 117 } 118 119 { // todo 120 /* ... */ 121 } 122 123 return result; 124 } 125 126 BootstrapManager::RegistrationResult BootstrapManager::unregisterAllModules(){ 127 unregisterModule(BootstrapTypeMulticastDns); 128 /* todo ... */ 129 130 return RegistrationSucceeded; 131 } 132 133 void BootstrapManager::onBootstrapServiceFound(string name, string info1, string info2, string info3){ 116 134 117 135 BOOST_FOREACH( BootstrapInformationCallback* callback, callbacks ){ 118 callback->onBootstrapServiceFound(name, info );136 callback->onBootstrapServiceFound(name, info1, info2, info3); 119 137 } 120 138 } … … 132 150 } 133 151 134 void BootstrapManager::publish(string name, string info ){152 void BootstrapManager::publish(string name, string info1, string info2, string info3){ 135 153 boost::mutex::scoped_lock lock( modulesMutex ); 136 154 … … 141 159 logging_info("bootstrap manager publishing service " 142 160 << name << " on module " << i->second->getName()); 143 i->second->publishService(name, info );161 i->second->publishService(name, info1, info2, info3); 144 162 } 145 163 } 146 164 147 165 void BootstrapManager::revoke(string name){ 166 boost::mutex::scoped_lock lock( modulesMutex ); 167 148 168 ModuleMap::iterator i = modules.begin(); 149 169 ModuleMap::iterator iend = modules.end();
Note:
See TracChangeset
for help on using the changeset viewer.