accessoryservices/remotecontrolfw/server/src/server.cpp
branchRCL_3
changeset 23 66ecddbca914
parent 0 4e1aa6a622a0
child 56 1ddbe54d0645
child 70 653a8b91b95e
--- a/accessoryservices/remotecontrolfw/server/src/server.cpp	Tue Apr 27 17:57:16 2010 +0300
+++ b/accessoryservices/remotecontrolfw/server/src/server.cpp	Tue May 11 17:23:24 2010 +0300
@@ -449,6 +449,10 @@
 
 	ASSERT_DEBUG(iBearerManager);
 	iBearerManager->TargetClientAvailable(aSession.Id(), aSession.PlayerType(), aSession.PlayerSubType(), aSession.Name());
+	if(iTspIf5)
+		{
+		iTspIf5->TargetClientAvailable(aSession.ClientInfo());
+		}
 
 	LOGSESSIONS;
 	}
@@ -523,7 +527,13 @@
 			// 1. Remove the session from our array.
 			iSessions.Remove(ii);
 
-			// 2. Tell the bearers about the session going away, if it was the 
+			// 2a. Tell the TSP if the session that has gone away is a target
+			if((aSession.Type() == ERemConClientTypeTarget) && iTspIf5)
+				{
+				iTspIf5->TargetClientUnavailable(aSession.ClientInfo());
+				}
+			
+			// 2b. Tell the bearers about the session going away, if it was the 
 			// last controller or last target.
 			// If the session hasn't already set its type, then it doesn't 
 			// count (we won't have told the bearers about it to begin with).
@@ -1998,6 +2008,10 @@
 			iTsp->GetInterface(TUid::Uid(KRemConTargetSelectorInterface4))
 		);
 	
+	iTspIf5 = reinterpret_cast<MRemConTargetSelectorPluginInterfaceV5*>(
+			iTsp->GetInterface(TUid::Uid(KRemConTargetSelectorInterface5))
+		);
+	
 	// If the TSP doesn't implement the required interface, panic server 
 	// startup.
 	ASSERT_ALWAYS(iTspIf);
@@ -3385,6 +3399,16 @@
 	iTspIf4->SetRemoteAddressedClient(aBearerUid, *clientInfo);
 	}
 
+TInt CRemConServer::RegisterLocalAddressedClientObserver(const TUid& aBearerUid)
+	{
+	return iTspIf5 ? iTspIf5->RegisterLocalAddressedClientObserver(aBearerUid) : KErrNotSupported;
+	}
+
+TInt CRemConServer::UnregisterLocalAddressedClientObserver(const TUid& aBearerUid)
+	{
+	return iTspIf5 ? iTspIf5->UnregisterLocalAddressedClientObserver(aBearerUid) : KErrNotSupported;
+	}
+
 TRemConClientId CRemConServer::ClientIdByProcessId(TProcessId aProcessId)
 	{
 	LOG_FUNC