Ignore:
Timestamp:
Jul 9, 2009, 1:50:37 PM (16 years ago)
Author:
Christoph Mayer
Message:

einige avahi fixes und ablauf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/utility/bootstrap/BootstrapManager.cpp

    r4758 r4836  
    5050
    5151BootstrapManager::~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         }
    5952}
    6053
     
    9689}
    9790
    98 BootstrapManager::RegistrationResult BootstrapManager::unregisterModule(BootstrapManager::BootstrapType type){
     91BootstrapManager::RegistrationResult BootstrapManager::unregisterModule(
     92                BootstrapManager::BootstrapType type){
    9993
    10094        boost::mutex::scoped_lock lock( modulesMutex );
     
    113107}
    114108
    115 void BootstrapManager::onBootstrapServiceFound(string name, string info){
     109BootstrapManager::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
     126BootstrapManager::RegistrationResult BootstrapManager::unregisterAllModules(){
     127        unregisterModule(BootstrapTypeMulticastDns);
     128        /*  todo  ...  */
     129
     130        return RegistrationSucceeded;
     131}
     132
     133void BootstrapManager::onBootstrapServiceFound(string name, string info1, string info2, string info3){
    116134
    117135        BOOST_FOREACH( BootstrapInformationCallback* callback, callbacks ){
    118                 callback->onBootstrapServiceFound(name, info);
     136                callback->onBootstrapServiceFound(name, info1, info2, info3);
    119137        }
    120138}
     
    132150}
    133151
    134 void BootstrapManager::publish(string name, string info){
     152void BootstrapManager::publish(string name, string info1, string info2, string info3){
    135153        boost::mutex::scoped_lock lock( modulesMutex );
    136154
     
    141159                logging_info("bootstrap manager publishing service "
    142160                                << name << " on module " << i->second->getName());
    143                 i->second->publishService(name, info);
     161                i->second->publishService(name, info1, info2, info3);
    144162        }
    145163}
    146164
    147165void BootstrapManager::revoke(string name){
     166        boost::mutex::scoped_lock lock( modulesMutex );
     167
    148168        ModuleMap::iterator i = modules.begin();
    149169        ModuleMap::iterator iend = modules.end();
Note: See TracChangeset for help on using the changeset viewer.