networkcontrol/ipcprshim/src/connectionSelectorShim.cpp
branchRCL_3
changeset 58 8d540f55e491
parent 57 abbed5a4b42a
child 59 e36178c55292
child 63 425d8f4f7fa5
equal deleted inserted replaced
57:abbed5a4b42a 58:8d540f55e491
     1 
       
     2 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 // All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:
       
    15 // Implementation file for the CConnectionSelectorShim
       
    16 // 
       
    17 //
       
    18 
       
    19 /**
       
    20  @file
       
    21  @internalComponent
       
    22 */
       
    23 
       
    24 
       
    25 #include <nifman.h>
       
    26 #include <ss_glob.h>
       
    27 #ifndef SYMBIAN_NETWORKING_UMTSR5
       
    28 #include <comms-infras/nifif.h>
       
    29 #endif //SYMBIAN_NETWORKING_UMTSR5
       
    30 #include <connpref.h>
       
    31 #include <cdblen.h>
       
    32 #include <esockmessages.h>
       
    33 #include "shimcprfactory.h"
       
    34 #include "connectionSelectorShim.h"
       
    35 #include "shimcpr.h"
       
    36 
       
    37 using namespace ESock;
       
    38 
       
    39 //PREQ399_REMOVE
       
    40 #ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
       
    41 #include <nullagtprog.h>
       
    42 #endif
       
    43 //SYMBIAN_NETWORKING_3GPPDEFAULTQOS //PREQ399_REMOVE
       
    44 
       
    45 TInt CConnectionSelectorShim::AsyncDestructorCb(TAny* aInstance)
       
    46 	{
       
    47 	CConnectionSelectorShim* selector = reinterpret_cast<CConnectionSelectorShim*>(aInstance);
       
    48 	delete selector;
       
    49 	return KErrNone;
       
    50 	}
       
    51 
       
    52 CConnectionSelectorShim::CConnectionSelectorShim(ISelectionNotify& aNotify) : 
       
    53  iNotify(aNotify), 
       
    54  iAsyncDestructor(CActive::EPriorityStandard + 1),
       
    55  iConnProvider(NULL)
       
    56 /** 
       
    57 C'tor.
       
    58 
       
    59 The priority of the async destructor is specifically set one higher than normal
       
    60 to cater for the case whereby an RConnection is started asynchronously and
       
    61 immediately closed.  This ensures that the async destructor is called before
       
    62 NetCon begins the selection procedure, and hence can cancel the NetCon request
       
    63 before it starts.  This causes immediate cancellation of the connection start
       
    64 procedure.  Otherwise, NetCon gets in first, the connection comes all the way
       
    65 and then times out in the short timer.
       
    66 
       
    67 @param aNotify the ISelectionNotify that should be notified about the
       
    68 selection progress.
       
    69 */
       
    70     { 
       
    71     __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tCConnectionSelectorShim"), this));   
       
    72     iAsyncDestructor.Set(TCallBack(AsyncDestructorCb, this));
       
    73     }        
       
    74     
       
    75 CConnectionSelectorShim::~CConnectionSelectorShim()
       
    76     {
       
    77 	__CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\t~CConnectionSelectorShim"), this));
       
    78 
       
    79 	iNotify.Detach(); //"PrevLayer"::Detach() will be called only once.
       
    80 
       
    81 	delete iSelectorSession;
       
    82 
       
    83 	iSelectionInfo.Close();
       
    84     }
       
    85 
       
    86 
       
    87 void CConnectionSelectorShim::DeleteAsync()
       
    88 	{
       
    89 	if (!iAsyncDestructor.IsActive())
       
    90 		{
       
    91 		if (iConnProvider)
       
    92 			{
       
    93 			__CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tDeleteAsync() RelaseRef(this)"), this));
       
    94 			iConnProvider->ReleaseRef(this);
       
    95 			}
       
    96 		iAsyncDestructor.CallBack();
       
    97 		}
       
    98     }
       
    99 
       
   100 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   101 void CConnectionSelectorShim::SetFactoryIface(MIAPLockInfo * aFactoryIface)
       
   102 	{
       
   103 	iFactoryIface = aFactoryIface;
       
   104 	}
       
   105 
       
   106 #endif // #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   107 
       
   108 TInt CConnectionSelectorShim::Cancel()
       
   109 	{
       
   110 	return Cancel(KErrCancel,NULL);
       
   111 	}
       
   112 	
       
   113 TInt CConnectionSelectorShim::Cancel(TInt aReason, const RMessage2* aMessage)
       
   114 	{
       
   115 	__CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tCancel(aReason %d)"), this, aReason));
       
   116 	TInt error = KErrNone;
       
   117 	if (iSelectorSession)
       
   118 		{
       
   119 		error = iSelectorSession->Stop(aReason, aMessage);
       
   120 		delete iSelectorSession;
       
   121 		iSelectorSession = NULL;
       
   122 		}
       
   123 	
       
   124 	//"PrevLayer"::Detach() will be called only once.
       
   125 	//It is important to call iNotify.Detach() after all progress notifications
       
   126 	//resulting from NifSession::Stop() have been passed up towards the CConnection.
       
   127 	iNotify.Detach();
       
   128 	DeleteAsync();
       
   129 	return error;
       
   130 	}
       
   131 	
       
   132 TInt CConnectionSelectorShim::Select(Meta::SMetaData& aPreferences, const RMessagePtr2* aMessage)
       
   133 /** Implements CConnectorSelector::Select (async). The shim layer (this layer)
       
   134 delegates the selection to NIFMAN. NIFMAN cannot be asked just to perform the
       
   135 selection, as the selection is tighly coupled with starting connection provider.
       
   136 
       
   137 @param aPreferences connection preferences.
       
   138 */
       
   139     {
       
   140     //Assume this is a TConnStart (as defined in ss_connprov.h)
       
   141     STypeId type = aPreferences.GetTypeId();
       
   142     ASSERT(type.iUid.iUid == KESockMessagesImplementationUid);
       
   143 	ASSERT(type.iType == EESockMessageConnStart);
       
   144 
       
   145    	const TConnPref* connPrefs = NULL;
       
   146    	TConnStartType stype = EConnStartImplicit;
       
   147    	
       
   148    	if (type.iType == EESockMessageConnStart)
       
   149  		{
       
   150  		connPrefs = reinterpret_cast<CConnStart&>(aPreferences).ConnPrefs();
       
   151  		stype = reinterpret_cast<CConnStart&>(aPreferences).StartType();
       
   152 	    if (connPrefs && connPrefs->ExtensionId() == TConnPref::EConnPrefSnap)
       
   153 	    	{
       
   154 			__CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tSelect() with not supported preferences EConnPrefSnap"), this));
       
   155 	    	iNotify.SelectComplete(NULL, KErrNotSupported);
       
   156 	   	    DeleteAsync();
       
   157 	   	    return KErrNotSupported;
       
   158 	    	}
       
   159  		}
       
   160 
       
   161 #ifdef SYMBIAN_NETWORKING_UMTSR5 
       
   162      	
       
   163 		// The code here will check the secure ID of the application which is expected with the aMessage Ptr.
       
   164 		// The logic used here is that if a General purpose application locks an IAP then no other application
       
   165 		// should be allowed to start the connection ans should return with KErrAccessDenied.
       
   166 	    if(aMessage!=NULL)
       
   167 	       {
       
   168 	       iAppSecureId = aMessage->SecureId();
       
   169 	       }
       
   170  #endif   //SYMBIAN_NETWORKING_UMTSR5 
       
   171     
       
   172     TRAPD(ret,
       
   173 	iSelectorSession = Nif::NewConnectionL(this, 0);
       
   174     if (connPrefs)
       
   175     	{
       
   176 		__CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tSelect() with preferences, iSelectorSession %x"), this, iSelectorSession));
       
   177 	    iSelectorSession->StartL(stype, *connPrefs, aMessage );		
       
   178     	}
       
   179     else
       
   180     	{
       
   181 		__CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tSelect() no preferences, iSelectorSession %x"), this, iSelectorSession));
       
   182 	    iSelectorSession->StartL(stype, aMessage );		
       
   183     	}
       
   184     );
       
   185     if (ret != KErrNone)
       
   186     	{
       
   187     	iNotify.SelectComplete(NULL, ret);
       
   188    	    DeleteAsync();
       
   189     	}
       
   190     return ret;
       
   191     }
       
   192     
       
   193 
       
   194 void CConnectionSelectorShim::SelectionComplete(TInt aError, const TDesC8& aSelectionInfo)
       
   195 /** Called by NIFMAN when the selection (previously triggered by CConnectionSelectorShim::SelectL)
       
   196 completes the selection. There are two methods NIFMAN will use to indicate progress to its client. This
       
   197 method and the generic ::ProgressNotification. This method forwards selection complete to
       
   198 this->ProgressNotification(KFinishedSelection).
       
   199 
       
   200 @param aError operation result.
       
   201 @param aSelectionInfo selection info (to be converted to TSoIfConnectionInfo {iIAPId; iNetworkId;})
       
   202 */
       
   203     {
       
   204     __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tSelectionComplete(), aError: %d"), this, aError));
       
   205     iSelectionInfo.Close();
       
   206     TInt err;
       
   207     if((err = iSelectionInfo.Create(aSelectionInfo)) != KErrNone)
       
   208     	{
       
   209     	aError = err;
       
   210     	}
       
   211 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   212     // The following line will extract connection information which is sent by nifman after agent selection.The information contains IAP , iNetworkId
       
   213 	//and connection information.
       
   214 
       
   215     Mem::Copy(&iConnectionInfo, aSelectionInfo.Ptr(),sizeof(iConnectionInfo));
       
   216 #endif
       
   217     ProgressNotification(KFinishedSelection, aError);
       
   218     }
       
   219 
       
   220 void CConnectionSelectorShim::CreateProviderL()
       
   221 	{
       
   222 	ASSERT(iSelectionInfo.Length());//this should only happen after the agent's been selected
       
   223 	__CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tCreateProviderL() iConnProvider %x"), this, iConnProvider));
       
   224  	if (iConnProvider) 
       
   225  		{
       
   226 		__CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tCreateProviderL() iConnProvider->GetNifSession() %x"), this, iConnProvider->GetNifSession()));	
       
   227 		__CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tCreateProviderL() iConnProvider->ConnectionInfo() %S"), this, &iConnProvider->ConnectionInfo()));
       
   228  		}
       
   229 	//if we have a provider already and it's the existing one we have to check whether the conn info still matches since there could've been
       
   230 	//a reconnection
       
   231 	if ( iConnProvider && iConnProvider->GetNifSession() && iConnProvider->ConnectionInfo() != iSelectionInfo )
       
   232 		{
       
   233         __CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tCreateProviderL() -> ReleaseRef()"), this));
       
   234 	    iConnProvider->ReleaseRef(this);
       
   235 	    iConnProvider = NULL;
       
   236 		}
       
   237 	if ( !iConnProvider )
       
   238 		{
       
   239 	    TSockManData* sockManData = SockManGlobals::Get();
       
   240 		ASSERT(sockManData);
       
   241 		
       
   242 		CConnectionFactoryContainer* connectionFactories = sockManData->iConnectionFactories;
       
   243 		ASSERT(connectionFactories);
       
   244 		
       
   245 		CConnectionProviderFactoryBase* factory = connectionFactories->FindFactory(KShimConnectionProviderFactoryId);
       
   246 		ASSERT(factory);
       
   247 		if (IsConnectionStoppingL())
       
   248 			{
       
   249 			// We must force the creation of a new provider because the old one is on its way out.
       
   250 			// This is required to ensure that we do not receive progresses generated as the connection
       
   251 			// comes down.  We are only interested in progresses generated when the connection subsequently
       
   252 			// starts coming up again.  Upper layers starting a connection just as it is coming down will
       
   253 			// otherwise receive these progresses.  In particular, progresses with an error will otherwise
       
   254 			// be mistaken for an indication that the connection startup failed.
       
   255 	    		iConnProvider = (CConnectionProviderShim*)factory->CreateProviderL();
       
   256 			__CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tCreateProviderL() - connection stopping, iConnProvider %x"), this, iConnProvider));
       
   257 			}
       
   258 		else
       
   259 			{
       
   260 			XConnectionFactoryQueryInfo query(NULL, iSelectionInfo);
       
   261 			iConnProvider = (CConnectionProviderShim*)factory->FindOrCreateProviderL(query);
       
   262 			__CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tCreateProviderL() - found/created iConnProvider %x"), this, iConnProvider));
       
   263 			}
       
   264 	    //and keep provider up during the selection
       
   265 	    iConnProvider->AddRefL(this);
       
   266 		}
       
   267 	}
       
   268 
       
   269 TBool CConnectionSelectorShim::IsConnectionStoppingL()
       
   270 	{
       
   271 	TPckg<TBool> stopping(EFalse);
       
   272 	iSelectorSession->ControlL(KCOLProvider, KNifSessionGetStopping, stopping, NULL);
       
   273 	return stopping();
       
   274 	}
       
   275 
       
   276 void CConnectionSelectorShim::HandleSelectionL()
       
   277 	{
       
   278 	// HandleSelection will set up the provider
       
   279 
       
   280 	// Set default factory as the CConnectionProviderFactoryShim
       
   281 	CreateProviderL();
       
   282 	if (iSelectorSession && !iConnProvider->GetNifSession())
       
   283 		{			
       
   284 		iConnProvider->SetConnectionInfo(iSelectionInfo);
       
   285 		//
       
   286 		// The factory didn't find an existing provider that matched the query.
       
   287 		// It's returned a brand new instance of CConnectionProviderShim.
       
   288 		// Hence we'll call Initialise. this will do 2 things:
       
   289 		//
       
   290 		// 1. Create a secure nif(man) session for the provider
       
   291 		// 2. Call ConnectionControlActivity for the provider so that
       
   292 		//			
       
   293 		iConnProvider->InitialiseL(iSelectorSession);
       
   294 		iConnProvider->SetBlockProgressesL(iSelectorSession);
       
   295 		iSetProviderNull = ETrue;
       
   296 		}
       
   297 	}
       
   298 
       
   299 
       
   300 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   301 void CConnectionSelectorShim::MaybeLockIapL()
       
   302 	{
       
   303 	//The value of Secure ID is fetched from DataBase againt IAP.Iap is taken agent selection is over.This will look 
       
   304 	//into the database if secureID feild is NULL or not if it is NULL then IAP will not be locked
       
   305 	CMDBSession* cmdbSession;
       
   306 	CCDIAPRecord* ptrIapRecord;
       
   307 	ptrIapRecord = static_cast<CCDIAPRecord*>(CCDRecordBase::RecordFactoryL(KCDTIdIAPRecord));
       
   308 	CleanupStack::PushL(ptrIapRecord);
       
   309 	
       
   310 	// Create a new CMDB session Object
       
   311 	cmdbSession = CMDBSession::NewL(KCDVersion1_1);
       
   312 	// If successm Get and Load the record.
       
   313 	CleanupStack::PushL(cmdbSession);
       
   314 
       
   315 	ptrIapRecord->SetRecordId(iConnectionInfo.iIAPId);
       
   316 	ptrIapRecord->LoadL(*cmdbSession);
       
   317 	// Although the SecureID of the application is numerical, we have to take it into the string buffer
       
   318 	// because of the limitations of the CommsDat, which dont support hexadeciaml values, and truncate 
       
   319 	// decimal values after 8 digits, for some unknown reasons.
       
   320 	// Because of the current project schedule, its not feasible to rectify commsdat as of now, so decided
       
   321 	// to take on string Buffers to be used for Secure Ids from commsdat 
       
   322 	TUint32 secureId;
       
   323 	secureId=ptrIapRecord->iAppSid;
       
   324  	
       
   325 	if(secureId==iAppSecureId.iId && iAppSecureId.iId!=NULL)
       
   326 		{
       
   327 		// Inform the Factory that the Ids match so IAP will be locked. The IAP number is also given to 
       
   328 		// the factory so that the application can start connection on other IAPs which are not locked
       
   329 		// by the program
       
   330 		iFactoryIface->SetIAPLockStatus(ETrue,iConnectionInfo.iIAPId);
       
   331 		}
       
   332 	    
       
   333         CleanupStack::Pop(cmdbSession);
       
   334 	delete cmdbSession;
       
   335 	CleanupStack::Pop(ptrIapRecord);
       
   336 	delete ptrIapRecord;
       
   337 	       
       
   338 	}
       
   339 #endif
       
   340 
       
   341 void CConnectionSelectorShim::ProgressNotification(TInt aStage, TInt aError)
       
   342 /** 
       
   343 
       
   344 @param 
       
   345 */  
       
   346     {
       
   347 	__CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tProgressNotification(%d, %d)"), 
       
   348 					 this, aStage, aError));
       
   349 	
       
   350 	// In all cases we must pass the new progress up the chain of selectors
       
   351 	if (aError == KErrNone)
       
   352 		{
       
   353 		aError = iError;
       
   354 		}
       
   355 	//	
       
   356 	// Depending on the progress and the progress error, we need to handle situations differently
       
   357 	// 
       
   358 	// Normally, if progress has reached KFinishedSelection, we stop propogating the progress
       
   359 	// up, because, we would have already setup the provide (iProvider) with a new nif session
       
   360 	// pointing to the same agent as iSelectorSession, hence further messages from agent and
       
   361 	// nifman will be forwared to the provider.
       
   362 	//
       
   363 	// However, there are two exceptions to this situation:
       
   364 	// We have a provider that's already been initialized with a nif session
       
   365 	// signified by !iSetProviderNull, in which case, we forward the message up 
       
   366 	// whether or not we have finished selection. Same goes for situations when 
       
   367 	// we have progress error, instead of waiting for the provider to propogate the 
       
   368 	// message upwards, we use iNotify to do that, since the client would expect the
       
   369 	// message (e.g. Stop) to be completed with error immidiately
       
   370 	// 
       
   371 
       
   372 	// Any error means that the selection (and startup of the interface) will be abandoned and reported to the client.
       
   373 	if (aError != KErrNone)
       
   374 		{
       
   375 		iNotify.ProgressNotification(aStage, aError);
       
   376 		iNotify.SelectComplete(NULL, aError);
       
   377 		DeleteAsync();
       
   378 		}
       
   379 	else if (aStage <= KFinishedSelection || !iSetProviderNull)
       
   380 		{
       
   381 		iNotify.ProgressNotification(aStage, aError);
       
   382 		}
       
   383 
       
   384 	if (aStage == KFinishedSelection && aError == KErrNone)
       
   385 		{
       
   386 		// The selection is complete so we want to reach the situation where the selector (this object) is 
       
   387 		// joined by the appropriate provider. The provider will be set up with a pointer to the CNifSession 
       
   388 		// allowing the calls to methods such as EnumerateSubConnections to work between KFinishedSelection and
       
   389 		// KLinkLayerOpen. The provider will be accessible from the selector until KLinkLayerOpen is reached
       
   390 		// (when the selector will be destroyed).
       
   391 		TRAP(aError,HandleSelectionL());
       
   392 		if (aError == KErrNone)
       
   393 			{
       
   394 			iNotify.SelectComplete(iConnProvider, aError);
       
   395 			}
       
   396 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   397 
       
   398 		// First Check IAP Locked, if yes Return,
       
   399 		TBool  IapLocked = EFalse;
       
   400 		TInt	IapNumber = -1;
       
   401 	
       
   402 		iFactoryIface->GetIAPLockStatus(IapLocked, IapNumber);
       
   403 	
       
   404 		if (IapLocked && IapNumber == iConnectionInfo.iIAPId)
       
   405 			{
       
   406 			//iNotify.ProgressNotification(aStage, KErrPermissionDenied);
       
   407 			iNotify.SelectComplete(iConnProvider, KErrPermissionDenied);
       
   408 			DeleteAsync();	
       
   409 			return;
       
   410 			}
       
   411 #endif //SYMBIAN_NETWORKING_UMTSR5  
       
   412 
       
   413 		}
       
   414 	else if (aStage == KConnectionUninitialised)
       
   415 		{
       
   416 		//KConnectionUninitialised means that the interface has been stopped.
       
   417 		DeleteAsync();
       
   418 		}
       
   419 	else if (aStage == KLinkLayerOpen && !iIsLinkLayerOpen)
       
   420 		{
       
   421 		// Calling iNotify.LayerUp when we have a provider setup with a nif session already
       
   422 		// follows from the logic above justifying propogating progress up when we have a 
       
   423 		// provider setup with a nif session
       
   424 		iNotify.LayerUp(aError);
       
   425 		DeleteAsync(); // The interface has successfully started and all responsibility should be taken over by the the provider.
       
   426 		}
       
   427 
       
   428 #ifdef SYMBIAN_NETWORKING_3GPPDEFAULTQOS
       
   429     else if ( aStage == ENullAgtConnecting && aError == KErrNone )
       
   430     	{
       
   431 #ifdef SYMBIAN_NETWORKING_UMTSR5
       
   432 
       
   433 	TRAPD(ret,MaybeLockIapL());
       
   434 #ifdef __CFLOG_ACTIVE	
       
   435 	if(ret!=KErrNone)
       
   436 		{
       
   437 		__CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tMaybeLockIap left with  %d"), 
       
   438 					 this, ret));
       
   439 		}
       
   440 #endif
       
   441 	(void)ret; //TRAP is safe to ignore becuase if MaybeLockIapL: leave the correct behaviour is to leave Iap unlocked.
       
   442 	//We can safely ignore the trap because the function will only lock IAP. One should not be effected if someth
       
   443 #endif //SYMBIAN_NETWORKING_UMTSR5  
       
   444     	}
       
   445     	
       
   446 #endif //SYMBIAN_NETWORKING_3GPPDEFAULTQOS //PREQ399_REMOVE
       
   447     }
       
   448 
       
   449 
       
   450 void CConnectionSelectorShim::SubConnectionEvent(const TSubConnectionEvent& /*aSubConnectionEvent*/)
       
   451 /** 
       
   452 
       
   453 @param 
       
   454 */
       
   455    {		
       
   456    }
       
   457 
       
   458 void CConnectionSelectorShim::ServiceChangeNotification(TUint32 aId, const TDesC& aType)
       
   459 /** 
       
   460 
       
   461 @param 
       
   462 */
       
   463    {
       
   464    iNotify.ServiceChangeNotification(aId, aType);
       
   465    }
       
   466 
       
   467 void CConnectionSelectorShim::LinkLayerOpen(TInt aError)
       
   468 /** 
       
   469 
       
   470 @param 
       
   471 */
       
   472 	{
       
   473 	__CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tLinkLayerOpen(aError %d)"), 
       
   474 					 this, aError));
       
   475 	iIsLinkLayerOpen = ETrue;
       
   476 	if (aError == KErrNone)
       
   477 		{
       
   478 		if (iSetProviderNull)
       
   479 			{
       
   480 			ASSERT(iConnProvider->GetNifSession());
       
   481 			iConnProvider->ReleaseRef(this);
       
   482 			iConnProvider = NULL;
       
   483 			iSetProviderNull = EFalse;
       
   484 			}		
       
   485 		
       
   486 		DeleteAsync();
       
   487 		}
       
   488 	else
       
   489 		{
       
   490 		iNotify.SelectComplete(NULL, aError);
       
   491 		}
       
   492     }
       
   493     
       
   494 void CConnectionSelectorShim::SetProviderNull()
       
   495 	{
       
   496 	__CFLOG_VAR((KShimCprTag, KShimCprSubTag, _L8("CConnectionSelectorShim %08x:\tSetProviderNull() iConnProvider %x"), this, iConnProvider));
       
   497 	iConnProvider = NULL;
       
   498 	}
       
   499 
       
   500 void CConnectionSelectorShim::ConnectionError(TInt /*aError*/)
       
   501 /** 
       
   502 
       
   503 @param 
       
   504 */
       
   505     {
       
   506     //ignore the event
       
   507     }
       
   508 
       
   509 
       
   510 void CConnectionSelectorShim::LinkLayerClosed(TInt /*aError*/)
       
   511 /** 
       
   512 
       
   513 @param 
       
   514 */
       
   515     {
       
   516     //ignore the event
       
   517     }
       
   518 
       
   519 
       
   520 
       
   521 void CConnectionSelectorShim::ProgressNotification(TSubConnectionUniqueId /*aSubConnectionUniqueId*/, TInt /*aStage*/, TInt /*aError*/)
       
   522 /** 
       
   523 
       
   524 @param 
       
   525 */
       
   526     {
       
   527     }
       
   528 
       
   529 void CConnectionSelectorShim::InterfaceStateChangeNotification(TDesC8& /*aInfo*/)
       
   530 /** 
       
   531 
       
   532 @param 
       
   533 */
       
   534     {
       
   535     //ignore the event
       
   536     }
       
   537 
       
   538 
       
   539 void CConnectionSelectorShim::NotifyDataSent(TSubConnectionUniqueId /*aSubConnectionUniqueId*/, TUint /*aUplinkVolume*/)
       
   540 /** 
       
   541 
       
   542 @param 
       
   543 */
       
   544     {
       
   545     //ignore the event
       
   546     }
       
   547 
       
   548 
       
   549 void CConnectionSelectorShim::NotifyDataReceived(TSubConnectionUniqueId /*aSubConnectionUniqueId*/, TUint /*aDownlinkVolume*/)
       
   550 /** 
       
   551 
       
   552 @param 
       
   553 */
       
   554     {
       
   555     //ignore the event
       
   556     }
       
   557