Changeset 2473 for source/ariba/overlay
- Timestamp:
- Feb 23, 2009, 2:21:49 PM (16 years ago)
- Location:
- source/ariba/overlay
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/overlay/BaseOverlay.cpp
r2472 r2473 273 273 bool BaseOverlay::bind(ServiceInterface* service, const ServiceID& sid) { 274 274 275 logging_debug( "binding service on serviceid " << sid.toString() );275 logging_debug( "binding service " << service << " on serviceid " << sid.toString() ); 276 276 277 277 if( listenerMux.contains( sid ) ){ … … 284 284 } 285 285 286 bool BaseOverlay::unbind(ServiceInterface* service,const ServiceID& sid){287 288 logging_debug( "unbinding service onserviceid " << sid.toString() );286 ServiceInterface* BaseOverlay::unbind(const ServiceID& sid){ 287 288 logging_debug( "unbinding service from serviceid " << sid.toString() ); 289 289 290 290 if( !listenerMux.contains( sid ) ){ 291 291 logging_warn( "cannot unbind service. no service registered on service id " << sid.toString() ); 292 return false; 293 } 294 295 listenerMux.unregisterItem( service ); 296 return true; 292 return NULL; 293 } 294 295 ServiceInterface* iface = listenerMux.get( sid ); 296 listenerMux.unregisterItem( sid ); 297 298 return NULL; //iface; 297 299 } 298 300 -
source/ariba/overlay/BaseOverlay.h
r2472 r2473 185 185 * Unregister a receiver. 186 186 * 187 * @param receiver An implementation of the receiver interface188 */ 189 bool unbind( ServiceInterface* service,const ServiceID& sid );187 * @param sid The service id to unregister 188 */ 189 ServiceInterface* unbind( const ServiceID& sid ); 190 190 191 191 /** … … 271 271 * to deliver upcoming messages to the correct service. 272 272 */ 273 Demultiplexer<ServiceInterface*, constServiceID> listenerMux;273 Demultiplexer<ServiceInterface*, ServiceID> listenerMux; 274 274 275 275 /** -
source/ariba/overlay/modules/OverlayInterface.cpp
r2472 r2473 53 53 eventsReceiver( _eventsReceiver ) { 54 54 55 ServiceInterface::initialize( &_baseoverlay, OVERLAY_SERVICE_ID );55 _baseoverlay.bind( this, OVERLAY_SERVICE_ID ); 56 56 } 57 57 58 58 OverlayInterface::~OverlayInterface(){ 59 baseoverlay.unbind( OVERLAY_SERVICE_ID ); 59 60 } 60 61
Note:
See TracChangeset
for help on using the changeset viewer.