Index: source/ariba/overlay/BaseOverlay.cpp
===================================================================
--- source/ariba/overlay/BaseOverlay.cpp	(revision 3055)
+++ source/ariba/overlay/BaseOverlay.cpp	(revision 3056)
@@ -148,6 +148,6 @@
 	// inform all registered services of the event
 	BOOST_FOREACH( NodeListener* i, nodeListeners ){
-		if( ret ) i->onLeaveSuccess( spovnetId );
-		else      i->onLeaveFail( spovnetId );
+		if( ret ) i->onLeaveCompleted( spovnetId );
+		else      i->onLeaveFailed( spovnetId );
 	}
 }
@@ -178,5 +178,5 @@
 	overlayInterface->joinOverlay();
 	BOOST_FOREACH( NodeListener* i, nodeListeners ){
-		i->onJoinSuccess( spovnetId );
+		i->onJoinCompleted( spovnetId );
 	}
 
@@ -252,5 +252,5 @@
 
 	if( item.interface != NULL )
-		item.interface->onLinkDown( spovnetId, nodeId, item.node );
+		item.interface->onLinkDown( link, item.node );
 }
 
@@ -310,19 +310,18 @@
 
 void BaseOverlay::bind(CommunicationListener* listener, const ServiceID& sid){
-	logging_debug( "binding communication listener " << listener 
+	logging_debug( "binding communication listener " << listener
 		<< " on serviceid " << sid.toString() );
 
 	if( communicationListeners.contains( sid ) ){
-		logging_error( "some listener already registered for service id " 
+		logging_error( "some listener already registered for service id "
 			<< sid.toString() );
-		return false;
+		return;
 	}
 
 	communicationListeners.registerItem( listener, sid );
-	return true;
 }
 
 void BaseOverlay::unbind(CommunicationListener* listener, const ServiceID& sid){
-	logging_debug( "unbinding listener " << listener 
+	logging_debug( "unbinding listener " << listener
 		<< " from serviceid " << sid.toString() );
 
@@ -333,5 +332,5 @@
 
 	if( communicationListeners.get(sid) != listener ){
-		logging_warn( "listener bound to service id " << sid.toString() 
+		logging_warn( "listener bound to service id " << sid.toString()
 			<< " is different than listener trying to unbind" );
 		return;
@@ -344,10 +343,10 @@
 	logging_debug( "binding node listener " << listener );
 
-	NodeListenerVector::iterator i = nodeListeners.find( listener );
+	NodeListenerVector::iterator i = find( nodeListeners.begin(), nodeListeners.end(), listener );
 	if( i != nodeListeners.end() ){
 		logging_warn( "node listener " << listener << " is already bound, cannot bind" );
 		return;
 	}
-	
+
 	nodeListeners.push_back( listener );
 }
@@ -356,10 +355,10 @@
 	logging_debug( "unbinding node listener " << listener );
 
-	NodeListenerVector::iterator i = nodeListeners.find( listener );
+	NodeListenerVector::iterator i = find( nodeListeners.begin(), nodeListeners.end(), listener );
 	if( i == nodeListeners.end() ){
 		logging_warn( "node listener " << listener << " is not bound, cannot unbind" );
 		return;
 	}
-	
+
 	nodeListeners.erase( i );
 }
@@ -451,5 +450,5 @@
 
 	if( i->second.interface != NULL )
-		i->second.interface->onLinkDown( id, nodeId, i->second.node );
+		i->second.interface->onLinkDown( id, i->second.node );
 
 	linkMapping.erase( i );
@@ -468,5 +467,5 @@
 
 	if( i->second.interface != NULL )
-		i->second.interface->onLinkChanged( id, nodeId, i->second.node );
+		i->second.interface->onLinkChanged( id, i->second.node );
 
 	i->second.markused();
@@ -485,5 +484,5 @@
 
 	if( i->second.interface != NULL )
-		i->second.interface->onLinkFail( id, nodeId, i->second.node );
+		i->second.interface->onLinkFail( id, i->second.node );
 
 	i->second.markused();
@@ -501,6 +500,7 @@
 	if( i == linkMapping.end() ) return;
 
+	// TODO: convert QoSParameterSet to the LinkProperties properties
 	if( i->second.interface != NULL )
-		i->second.interface->onLinkQoSChanged( id, nodeId, i->second.node, qos );
+		i->second.interface->onLinkQoSChanged( id, i->second.node, LinkProperties::DEFAULT );
 
 	i->second.markused();
@@ -535,5 +535,5 @@
 
 		if( serviceListener != NULL )
-			serviceListener->receiveMessage( overlayMsg, link, overlayMsg->getSourceNode() );
+			serviceListener->onMessage( overlayMsg, overlayMsg->getSourceNode(), link );
 
 		return true;
@@ -571,9 +571,6 @@
 		//
 
+		// TODO: here you can implement mechanisms to deny joining of a node
 		bool allow = true;
-
-		BOOST_FOREACH( NodeListener* i, nodeListeners ){
-			allow &= i->isJoinAllowed( overlayMsg->getSourceNode(), spovnetId );
-		}
 
 		logging_info( "sending back join reply for spovnet " <<
@@ -644,6 +641,6 @@
 
 			// inform all registered services of the event
-			BOOST_FOREACH( NodeListener* i, nodeListeners{
-				i->onJoinFail( spovnetId );
+			BOOST_FOREACH( NodeListener* i, nodeListeners ){
+				i->onJoinFailed( spovnetId );
 			}
 
@@ -670,5 +667,5 @@
 			// inform all registered services of the event
 			BOOST_FOREACH( NodeListener* i, nodeListeners ){
-				i->onJoinFail( spovnetId );
+				i->onJoinFailed( spovnetId );
 			}
 
@@ -692,5 +689,5 @@
 		// inform all registered services of the event
 		BOOST_FOREACH( NodeListener* i, nodeListeners ){
-			i->onJoinSuccess( spovnetId );
+			i->onJoinCompleted( spovnetId );
 		}
 
@@ -758,5 +755,5 @@
 
 		i->second.interface = iface;
-		iface->onLinkUp( link, nodeId, sourcenode );
+		iface->onLinkUp( link, sourcenode );
 		i->second.markused();
 
@@ -792,5 +789,5 @@
 			// inform all registered services of the event
 			BOOST_FOREACH( NodeListener* i, nodeListeners ){
-				i->onLeaveFail( spovnetId );
+				i->onLeaveFailed( spovnetId );
 			}
 
@@ -802,8 +799,4 @@
 			logging_info( "node left " << overlayMsg->getSourceNode() );
 
-			// inform all registered services of the event
-			BOOST_FOREACH( NodeListener* i, nodeListeners ){
-				i->onNodeLeave( overlayMsg->getSourceNode(), spovnetId );
-			}
 		}
 
@@ -908,8 +901,4 @@
 				<< node.toString() );
 
-	BOOST_FOREACH( NodeListener* i, nodeListeners ){
-		i->onNodeJoin( node, spovnetId );
-	}
-
 	joiningNodes.erase( i );
 }
