Changeset 2473 for source/ariba/overlay


Ignore:
Timestamp:
Feb 23, 2009, 2:21:49 PM (16 years ago)
Author:
Christoph Mayer
Message:

-einige fixes im ablauf des neuen interface
-einige fehlende funktionalität implementiert

Location:
source/ariba/overlay
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/overlay/BaseOverlay.cpp

    r2472 r2473  
    273273bool BaseOverlay::bind(ServiceInterface* service, const ServiceID& sid) {
    274274
    275         logging_debug( "binding service on serviceid " << sid.toString() );
     275        logging_debug( "binding service " << service << " on serviceid " << sid.toString() );
    276276
    277277        if( listenerMux.contains( sid ) ){
     
    284284}
    285285
    286 bool BaseOverlay::unbind(ServiceInterface* service, const ServiceID& sid){
    287 
    288         logging_debug( "unbinding service on serviceid " << sid.toString() );
     286ServiceInterface* BaseOverlay::unbind(const ServiceID& sid){
     287
     288        logging_debug( "unbinding service from serviceid " << sid.toString() );
    289289
    290290        if( !listenerMux.contains( sid ) ){
    291291                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;
    297299}
    298300
  • source/ariba/overlay/BaseOverlay.h

    r2472 r2473  
    185185         * Unregister a receiver.
    186186         *
    187          * @param receiver An implementation of the receiver interface
    188          */
    189         bool unbind( ServiceInterface* service, const ServiceID& sid );
     187         * @param sid The service id to unregister
     188         */
     189        ServiceInterface* unbind( const ServiceID& sid );
    190190
    191191        /**
     
    271271         * to deliver upcoming messages to the correct service.
    272272         */
    273         Demultiplexer<ServiceInterface*, const ServiceID> listenerMux;
     273        Demultiplexer<ServiceInterface*, ServiceID> listenerMux;
    274274
    275275        /**
  • source/ariba/overlay/modules/OverlayInterface.cpp

    r2472 r2473  
    5353                eventsReceiver( _eventsReceiver ) {
    5454
    55         ServiceInterface::initialize( &_baseoverlay, OVERLAY_SERVICE_ID );
     55        _baseoverlay.bind( this, OVERLAY_SERVICE_ID );
    5656}
    5757
    5858OverlayInterface::~OverlayInterface(){
     59        baseoverlay.unbind( OVERLAY_SERVICE_ID );
    5960}
    6061
Note: See TracChangeset for help on using the changeset viewer.