devicediagnostics/diagplugins/diagdatanetworkplugin/src/diagdatanetworktestpdpengine.cpp
changeset 18 7d11f9a6646f
parent 4 75a71fdb4c92
child 21 c707676bf59f
equal deleted inserted replaced
4:75a71fdb4c92 18:7d11f9a6646f
     1 /*
       
     2 * Copyright (c) 2007 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:  This is the module for the Diagnostics Data Network Test PDP-Engine
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDES
       
    20 
       
    21 // Class Declaration 
       
    22 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    23 #include <logfilterandeventconstants.hrh>
       
    24 #endif
       
    25 #include "diagdatanetworktestpdpengine.h"   // CDiagDataNetworkTestPDPEngine
       
    26 
       
    27 // System includes
       
    28 #include <centralrepository.h>              // CRepository
       
    29 #include <logcli.h>                         // CLogFilter   
       
    30 #include <DiagNetworkRegStatusWatcher.h>    // CDiagNetworkRegStatusWatcher
       
    31 #include <DiagFrameworkDebug.h>             // LOGSTRING
       
    32 #include <diaglogeventeraser.h>             // CDiagLogEventEraser
       
    33 
       
    34 // User includes
       
    35 #include "diagdatanetworkprivatecrkeys.h"
       
    36 #include <devdiagdatanetworktestpluginrsc.rsg>
       
    37 #include	"diagdatanetworktestplugin.hrh"
       
    38 
       
    39 // EXTERNAL DATA STRUCTURES
       
    40 
       
    41 // EXTERNAL FUNCTION PROTOTYPES
       
    42 
       
    43 // CONSTANTS
       
    44 
       
    45 // MACROS
       
    46 
       
    47 // LOCAL CONSTANTS AND MACROS
       
    48 
       
    49 // MODULE DATA STRUCTURES
       
    50 
       
    51 // LOCAL FUNCTION PROTOTYPES
       
    52 
       
    53 // FORWARD DECLARATIONS
       
    54 
       
    55 // ============================= LOCAL FUNCTIONS ==============================
       
    56 
       
    57 // ========================= MEMBER FUNCTIONS ================================
       
    58 
       
    59 // ---------------------------------------------------------------------------
       
    60 // Symbian OS default constructor
       
    61 // ---------------------------------------------------------------------------   
       
    62 CDiagDataNetworkTestPDPEngine* CDiagDataNetworkTestPDPEngine::NewL(
       
    63     MDiagDataNetworkTestCallBackInterface& aInterface)
       
    64     {
       
    65     LOGSTRING("CDiagDataNetworkTestPDPEngine::NewL()")
       
    66     
       
    67     CDiagDataNetworkTestPDPEngine* self = 
       
    68                         new (ELeave) CDiagDataNetworkTestPDPEngine(aInterface);
       
    69     CleanupStack::PushL( self );
       
    70     self->ConstructL();
       
    71     CleanupStack::Pop( self );
       
    72     return self;    
       
    73     }
       
    74 
       
    75 
       
    76 // ----------------------------------------------------------------------------
       
    77 // Standard C++ Constructor
       
    78 // NOTE that CActive(CActive::EPriorityUserInput) is called in 
       
    79 // CDiagPDPTestEngine::CDiagPDPTestEngine()
       
    80 // ----------------------------------------------------------------------------
       
    81 //
       
    82 CDiagDataNetworkTestPDPEngine::CDiagDataNetworkTestPDPEngine(
       
    83                     MDiagDataNetworkTestCallBackInterface& aInterface) 
       
    84     :iInterface(aInterface)
       
    85     {
       
    86     LOGSTRING("CDiagDataNetworkTestPDPEngine::CDiagDataNetworkTestPDPEngine()")
       
    87     
       
    88     // Add this object to active scheduler
       
    89     CActiveScheduler::Add( this );         
       
    90     }
       
    91     
       
    92 // ---------------------------------------------------------------------------
       
    93 // Symbian OS second phase constructor
       
    94 // ---------------------------------------------------------------------------    
       
    95 void CDiagDataNetworkTestPDPEngine::ConstructL()
       
    96     {
       
    97     LOGSTRING("CDiagDataNetworkTestPDPEngine::ConstructL()")
       
    98     SetStateL( EStateUnknown );
       
    99     idialogOn = EFalse;
       
   100 	idialogDismissed = EFalse;
       
   101     }
       
   102     
       
   103 
       
   104 // ----------------------------------------------------------------------------
       
   105 // Destructor
       
   106 // ----------------------------------------------------------------------------    
       
   107 CDiagDataNetworkTestPDPEngine::~CDiagDataNetworkTestPDPEngine()
       
   108     {
       
   109     LOGSTRING("CDiagDataNetworkTestPDPEngine::~CDiagDataNetworkTestPDPEngine()")
       
   110             
       
   111     // call CActive::DoCancel() to stop any ongoing async request
       
   112     Cancel();
       
   113     
       
   114     delete iLogEventEraser;
       
   115     iLogEventEraser = NULL;
       
   116     
       
   117     delete iNetRegStatusWatcher;
       
   118     iNetRegStatusWatcher = NULL;        
       
   119         
       
   120     iPrimaryAPNIapIdArray.Close();
       
   121     iSecondaryAPNIapIdArray.Close();    
       
   122       
       
   123     iConnection.Close();
       
   124     iSocketServ.Close();     
       
   125     if ( iWaitDialog )
       
   126     delete iWaitDialog;   
       
   127     }
       
   128 
       
   129 
       
   130 // ----------------------------------------------------------------------------
       
   131 // This function reports the total steps of the engine class
       
   132 // ----------------------------------------------------------------------------    
       
   133 TUint CDiagDataNetworkTestPDPEngine::TotalSteps()
       
   134     {
       
   135     return EStateMax;
       
   136     }    
       
   137 
       
   138 
       
   139 // ---------------------------------------------------------------------------
       
   140 // CDiagDataNetworkTestPDPEngine::RunDataNetworkTestL()
       
   141 //
       
   142 // This function is the entry point to Data Network Test.
       
   143 // --------------------------------------------------------------------------- 
       
   144 void CDiagDataNetworkTestPDPEngine::RunDataNetworkTestL()
       
   145     {
       
   146     LOGSTRING("CDiagDataNetworkTestPDPEngine::RunDataNetworkTestL()")
       
   147     
       
   148     delete iNetRegStatusWatcher;
       
   149     iNetRegStatusWatcher = NULL;    
       
   150     
       
   151     iNetRegStatusWatcher = CDiagNetworkRegStatusWatcher::NewL(*this);
       
   152     
       
   153     // start the network registration status observer
       
   154     // the initial network registration status wiil be obtained via
       
   155     // callback interface InitialNetworkRegistrationStatusL()
       
   156     SetStateL( EStateWaitForInitialNetworkRegStatus );
       
   157     iNetRegStatusWatcher->StartObserver();
       
   158     }
       
   159     
       
   160     
       
   161 // ----------------------------------------------------------------------------
       
   162 // This function is used to inform the intial network registration status
       
   163 // ----------------------------------------------------------------------------
       
   164 void CDiagDataNetworkTestPDPEngine::InitialNetworkRegistrationStatusL( 
       
   165     const TBool& aRegistered )
       
   166     {    
       
   167     if( aRegistered )
       
   168         {
       
   169         LOGSTRING("CDiagDataNetworkTestPDPEngine::InitialNetworkRegistrationStatusL() aRegistered == ETrue")
       
   170         
       
   171         StartPdpEstablishmentL();
       
   172         }
       
   173     else
       
   174         {
       
   175         LOGSTRING("CDiagDataNetworkTestPDPEngine::InitialNetworkRegistrationStatusL() aRegistered == EFalse")
       
   176         
       
   177         // intial registration status is not registered
       
   178         // report the test result as Failed
       
   179         ReportResultToPluginL( EFalse );        
       
   180         }
       
   181     }
       
   182     
       
   183 // ----------------------------------------------------------------------------
       
   184 // This interface is used to inform the clients of any changes in the network 
       
   185 // registration
       
   186 // ----------------------------------------------------------------------------
       
   187 void CDiagDataNetworkTestPDPEngine::NetworkRegistrationStatusChangeL( 
       
   188     const TBool& aRegistered )
       
   189     {
       
   190     if(!aRegistered)
       
   191         {
       
   192         // device has lost network coverage, 
       
   193         LOGSTRING("CDiagDataNetworkTestPDPEngine::NetworkRegistrationStatusChangeL() aRegistered == EFalse")
       
   194         LOGSTRING("device has lost network coverage")
       
   195         
       
   196         // stop the observer and fail the test
       
   197         iNetRegStatusWatcher->StopObserver();
       
   198         
       
   199         // cancel any ongoing asynchronous request
       
   200         Cancel();
       
   201         
       
   202         ReportResultToPluginL(CDiagResultsDatabaseItem::EFailed);
       
   203         }
       
   204     else
       
   205         {
       
   206         // continue the test, device is still registered
       
   207         LOGSTRING("CDiagDataNetworkTestPDPEngine::NetworkRegistrationStatusChangeL() aRegistered == ETrue")
       
   208         }        
       
   209     }
       
   210     
       
   211     
       
   212 // ----------------------------------------------------------------------------
       
   213 // This function is used to start checking if connection parameters exist
       
   214 // and then connection establishment, if necessary
       
   215 // ----------------------------------------------------------------------------  
       
   216 void CDiagDataNetworkTestPDPEngine::StartPdpEstablishmentL()
       
   217     {
       
   218     LOGSTRING("CDiagDataNetworkTestPDPEngine::StartPdpEstablishmentL()");
       
   219         
       
   220     SetStateL( EStateCheckingConnecitonParams );
       
   221     
       
   222     //TInt err = KErrGeneral;
       
   223     User::LeaveIfError(iSocketServ.Connect());
       
   224     User::LeaveIfError(iConnection.Open(iSocketServ));
       
   225     
       
   226     LOGSTRING("CDiagDataNetworkTestPDPEngine : socket server session opened OK ");  
       
   227     
       
   228     // Check for Active Connections 
       
   229     
       
   230     TUint connectionCount = 0;
       
   231     TPckgBuf<TConnectionInfo> connectionInfo;
       
   232     User::LeaveIfError(iConnection.EnumerateConnections(connectionCount));
       
   233     LOGSTRING("iConnection.EnumerateConnections");
       
   234     // if connection active report pass.
       
   235     if(connectionCount > 0)
       
   236     ReportResultToPluginL( ETrue );
       
   237     else
       
   238                 EstablishPDPContextL();
       
   239 
       
   240     }    
       
   241 
       
   242 // ---------------------------------------------------------------------------
       
   243 // This function is the concrete implementation of pure virtual function
       
   244 // CDiagPDPTestEngine::ReadAPNsFromCenrepL(). Here the primary and secondary APNs
       
   245 // are read from the central repository. The function sets the reference argument
       
   246 // aError as KErrNone if both APNs are found in the cenrep.
       
   247 // ---------------------------------------------------------------------------    
       
   248     
       
   249 void CDiagDataNetworkTestPDPEngine::ReadAPNsFromCenrepL(TInt& aError)
       
   250     {      
       
   251     LOGSTRING("CDiagDataNetworkTestPDPEngine::ReadAPNsFromCenrepL()");
       
   252          
       
   253     TInt errPrimary = KErrGeneral;
       
   254     TInt errSeondary = KErrGeneral;
       
   255            
       
   256     CRepository  *cenRep;
       
   257     cenRep = CRepository::NewL( KCRUidDiagDataNetworkTestPlugin );    
       
   258     CleanupStack::PushL( cenRep );        
       
   259     iCenrepPrimaryAPN.Zero();
       
   260     iCenrepSecondaryAPN.Zero();
       
   261     errPrimary = cenRep->Get( KDiagDataNetworkTestPluginPrimaryAPN,iCenrepPrimaryAPN );
       
   262     errSeondary = cenRep->Get( KDiagDataNetworkTestPluginSecondaryAPN,iCenrepSecondaryAPN);
       
   263     
       
   264     // check both APNs exist in Cenrep
       
   265     if(errPrimary == KErrNone && errSeondary == KErrNone  )
       
   266         {
       
   267         aError = KErrNone;
       
   268         }        
       
   269     else
       
   270         {
       
   271         aError = KErrGeneral;
       
   272         }
       
   273     CleanupStack::PopAndDestroy(cenRep);  
       
   274     cenRep = NULL; 
       
   275     
       
   276     
       
   277     LOGSTRING("CDiagDataNetworkTestPDPEngine::ReadAPNsFromCenrepL()  Primary APN = ");
       
   278     LOGTEXT(iCenrepPrimaryAPN)
       
   279 
       
   280     LOGSTRING("CDiagDataNetworkTestPDPEngine::ReadAPNsFromCenrepL()  Secondary APN = ");
       
   281     LOGTEXT(iCenrepSecondaryAPN)
       
   282     }
       
   283     
       
   284 // ----------------------------------------------------------------------------
       
   285 // CDiagDataNetworkTestPDPEngine::EstablishPDPContextL
       
   286 //
       
   287 // This the entry point to start establishing PDP context
       
   288 // ----------------------------------------------------------------------------       
       
   289 void CDiagDataNetworkTestPDPEngine::EstablishPDPContextL()
       
   290     {   
       
   291     LOGSTRING("CDiagDataNetworkTestPDPEngine::EstablishPDPContextL()")
       
   292  
       
   293         SetStateL( EStateWaitForConnectionCompletion );
       
   294 
       
   295         iPref.SetDialogPreference(ECommDbDialogPrefPrompt);
       
   296         //iPref.SetDialogPreference( ECommDbDialogPrefDoNotPrompt );
       
   297         iPref.SetDirection( ECommDbConnectionDirectionOutgoing );   
       
   298         //TConnPref iPref(TConnPref::EConnPrefCommDb);
       
   299         iConnection.Start(iPref, iStatus);
       
   300         SetActive();
       
   301         TInt userResponse;
       
   302         ShowProgressNoteL( userResponse );
       
   303     } 
       
   304 
       
   305 
       
   306 // ----------------------------------------------------------------------------
       
   307 // CDiagDataNetworkTestPDPEngine::ShowVibrationNoteL
       
   308 //
       
   309 // Progress Note
       
   310 // ----------------------------------------------------------------------------
       
   311 
       
   312 TBool CDiagDataNetworkTestPDPEngine::ShowProgressNoteL(TInt aUserResponse)
       
   313     {
       
   314 	if ( iWaitDialog )
       
   315 	{
       
   316 	delete iWaitDialog;
       
   317 	iWaitDialog = NULL;
       
   318 	}
       
   319 
       
   320 
       
   321 	// WAIT NOTE DIALOG
       
   322 	iWaitDialog = new (ELeave) CAknWaitDialog(
       
   323 							(REINTERPRET_CAST(CEikDialog**, &iWaitDialog)), 
       
   324 							ETrue);
       
   325 
       
   326 	iWaitDialog->PrepareLC(R_DATANW_PLUGIN_WAIT_NOTE);
       
   327 	iWaitDialog->SetCallback(this);
       
   328 	TBool isDialogDismissedByUser = iWaitDialog->RunLD();
       
   329 	idialogOn = ETrue;
       
   330 	return isDialogDismissedByUser;
       
   331     }
       
   332     
       
   333     
       
   334 //*********************************************************
       
   335 //*********************************************************
       
   336 // CallBack from AKnWaitDialog when Cancel is pressed
       
   337 //*********************************************************
       
   338 //*********************************************************
       
   339 
       
   340 void CDiagDataNetworkTestPDPEngine::DialogDismissedL( TInt aButtonId )
       
   341 {
       
   342 	LOGSTRING2("CDiagDataNetworkTestPDPEngine::DialogDismissedL() = %d",aButtonId);
       
   343 
       
   344 	 
       
   345 	if(aButtonId == EDataNetworkTestCancel)
       
   346 	{
       
   347 	
       
   348 	
       
   349 	if (idialogOn)
       
   350 		{
       
   351 		iConnection.Stop(RConnection::EStopAuthoritative);
       
   352 	//	delete iWaitDilaog;
       
   353 	//	iWaitDialog = NULL;
       
   354 		idialogOn = EFalse; 
       
   355 		idialogDismissed = ETrue;
       
   356 		}
       
   357 		
       
   358 	 TInt   cancelButtonId;
       
   359      TBool  cancelResult = EFalse;
       
   360      iPrevState = iEngineState;
       
   361      SetStateL(EStateWaitDialogOn);
       
   362 	 cancelResult= iInterface.DisplayDialog(cancelButtonId);
       
   363 	 
       
   364 	 iWaitDialog = NULL;
       
   365 	 
       
   366 	 if ( !cancelResult )
       
   367 	 {
       
   368 	 SetStateL(iPrevState);
       
   369 	 return;
       
   370 	 }
       
   371 	 
       
   372 	if(cancelButtonId == -2)
       
   373 		{
       
   374 		
       
   375 		SetStateL(EStateCancelTest);
       
   376 		TRequestStatus* status = &iStatus;
       
   377 		// Complete own request
       
   378 		User::RequestComplete( status, KErrNone );
       
   379 		SetActive();
       
   380 		
       
   381 		//ReportResultToPluginL( CDiagResultsDatabaseItem::ECancelled );
       
   382 		//HandleOngoingConnectionRequestL();
       
   383 		
       
   384 		}
       
   385      else
       
   386 		{	 
       
   387 		SetStateL(EStateDialogDismissed);
       
   388 		TRequestStatus* status = &iStatus;
       
   389 		// since this is a Cancel to start the test again
       
   390 		// lets start believing that the DialogDismiss Cancel was never pressed
       
   391 		idialogDismissed = EFalse;
       
   392 		// Complete own request
       
   393 		User::RequestComplete( status, KErrNone );
       
   394 		SetActive();
       
   395 		}
       
   396 	 }
       
   397 }
       
   398 // ---------------------------------------------------------------------------
       
   399 // CDiagDataNetworkTestPDPEngine::RunL()
       
   400 //
       
   401 // Concrete implementation of CActive::DoCancel(). This function handles the asynchronous events.
       
   402 // ---------------------------------------------------------------------------     
       
   403 void CDiagDataNetworkTestPDPEngine::RunL()
       
   404     {
       
   405     switch(iEngineState)
       
   406         {   
       
   407         case EStateWaitForConnectionCompletion:
       
   408             {
       
   409             HandleOngoingConnectionRequestL();
       
   410             }
       
   411             break;
       
   412         case EStateWaitDialogOn:
       
   413         	break;
       
   414         case EStateCancelTest:
       
   415         	ReportResultToPluginL( CDiagResultsDatabaseItem::ECancelled );
       
   416         	break;
       
   417         case EStateDialogDismissed:
       
   418         	EstablishPDPContextL();
       
   419         	break;
       
   420         default:
       
   421             break;
       
   422         };      
       
   423     LOGSTRING("CDiagDataNetworkTestPDPEngine::RunL()");  
       
   424     }   
       
   425     
       
   426 // ---------------------------------------------------------------------------
       
   427 // CDiagDataNetworkTestPDPEngine::DoCancel()
       
   428 //
       
   429 // This function handles cancel request from CActive
       
   430 // ---------------------------------------------------------------------------     
       
   431 void CDiagDataNetworkTestPDPEngine::DoCancel()
       
   432     {
       
   433     if( iNetRegStatusWatcher )
       
   434         {        
       
   435         iNetRegStatusWatcher->StopObserver();
       
   436         }
       
   437     if (iEngineState != EStateCancelTest)    
       
   438     iConnection.Stop();
       
   439     }
       
   440     
       
   441   
       
   442 // ---------------------------------------------------------------------------
       
   443 // CDiagDataNetworkTestPDPEngine::HandleOngoingConnectionRequestL()
       
   444 //
       
   445 // This function handles ongoing asynchronous connection request and issues
       
   446 // new request if required.
       
   447 // ---------------------------------------------------------------------------     
       
   448 void CDiagDataNetworkTestPDPEngine::HandleOngoingConnectionRequestL()
       
   449     {
       
   450     LOGSTRING("CDiagDataNetworkTestPDPEngine::HandleOngoingConnectionRequestL()")
       
   451     
       
   452     if( iStatus == KErrNone || iStatus == KErrAlreadyExists )
       
   453         {        
       
   454         // connection established, report SUCCESS to the plugin        
       
   455         LOGSTRING("Connection established")
       
   456         LOGSTRING2("current IAP id = %d", iIAPiddefault)
       
   457         StartLogEraseOperationL( ETrue ); // ETrue means the test has Passed
       
   458         }
       
   459     else
       
   460         ReportResultToPluginL( EFalse );
       
   461       
       
   462     }    
       
   463     
       
   464 // ----------------------------------------------------------------------------
       
   465 // This function starts the log event erase process
       
   466 // ----------------------------------------------------------------------------    
       
   467 void CDiagDataNetworkTestPDPEngine::StartLogEraseOperationL(TBool aTestResult)
       
   468     {
       
   469     LOGSTRING("CDiagDataNetworkTestPDPEngine::StartLogEraseOperationL()")
       
   470 
       
   471     iTestResult = aTestResult;
       
   472     SetStateL( EStateWaitForLogErase );
       
   473     
       
   474     TUid PacketEventType = { KLogPacketDataEventType };
       
   475     
       
   476     delete iLogEventEraser;
       
   477     iLogEventEraser = NULL;
       
   478     iLogEventEraser = CDiagLogEventEraser::NewL(*this);
       
   479     
       
   480     CLogFilter& LogFilter = iLogEventEraser->Filter();
       
   481     LogFilter.SetEventType(PacketEventType);
       
   482     LogFilter.SetStartTime(iStartTime);
       
   483     
       
   484     // start the log erasing process
       
   485     iLogEventEraser->StartAsyncEraseLogsL();
       
   486     }
       
   487     
       
   488 // ----------------------------------------------------------------------------    
       
   489 // This callback interface is used to determine if the log event is to be 
       
   490 // deleted or not
       
   491 // ----------------------------------------------------------------------------
       
   492 TBool CDiagDataNetworkTestPDPEngine::IsEventToBeDeleted( const CLogEvent& aEvent )
       
   493     {
       
   494     LOGSTRING("CDiagDataNetworkTestPDPEngine::IsEventToBeDeleted()")
       
   495     
       
   496     TBool isEntryDeleted = EFalse;
       
   497     
       
   498     TBuf<KCommsDbSvrMaxFieldLength> eventAPNName;
       
   499     eventAPNName.Zero();
       
   500     eventAPNName.Copy(aEvent.RemoteParty()); 
       
   501     
       
   502     LOGSTRING("Log event APN name = ")  
       
   503     LOGTEXT(eventAPNName)  
       
   504     
       
   505     if( (eventAPNName.Compare( iCenrepPrimaryAPN )==0) || 
       
   506         (eventAPNName.Compare( iCenrepSecondaryAPN )==0) )    
       
   507         {
       
   508         // APN is matched, delete the log event entry
       
   509         isEntryDeleted = ETrue;
       
   510                  
       
   511         }
       
   512 
       
   513     LOGSTRING2("Log event deleted = %d", isEntryDeleted )        
       
   514     return isEntryDeleted;      
       
   515     }
       
   516 
       
   517 
       
   518 // ----------------------------------------------------------------------------    
       
   519 // This callback interface is used to notify that log events are erased
       
   520 // ----------------------------------------------------------------------------
       
   521 void CDiagDataNetworkTestPDPEngine::CompleteEventEraseL( TInt /*aError*/)
       
   522     {
       
   523     ReportResultToPluginL(iTestResult);
       
   524     }
       
   525 
       
   526 
       
   527 // ---------------------------------------------------------------------------
       
   528 // This function is sets the state of the engine and also reports the progress
       
   529 // step
       
   530 // --------------------------------------------------------------------------- 
       
   531 void CDiagDataNetworkTestPDPEngine::SetStateL(TPDPEngineState aState)
       
   532     {
       
   533     LOGSTRING2("CDiagDataNetworkTestPDPEngine::SetStateL(), aState = %d", aState)
       
   534     
       
   535     iEngineState = aState;
       
   536     iInterface.ReportTestProgL( iEngineState );
       
   537     }
       
   538 
       
   539 // ---------------------------------------------------------------------------
       
   540 // This function is used to report the result of the test back to the plug-in
       
   541 // class
       
   542 // --------------------------------------------------------------------------- 
       
   543 void CDiagDataNetworkTestPDPEngine::ReportResultToPluginL(TBool aResult)
       
   544     {
       
   545     LOGSTRING2("CDiagDataNetworkTestPDPEngine::ReportResultToPluginL(), aResult = %d", aResult)
       
   546     // Remove the waitDialog
       
   547     if(idialogOn)
       
   548     iWaitDialog->ProcessFinishedL(); 
       
   549     
       
   550     // Dialog dismissed by cancel
       
   551     if (idialogDismissed)
       
   552     {
       
   553     	iInterface.ReportTestResultL( CDiagResultsDatabaseItem::ESkipped );
       
   554     	return;
       
   555     }
       
   556     if(aResult)
       
   557         {
       
   558         iInterface.ReportTestResultL( CDiagResultsDatabaseItem::ESuccess );
       
   559         }        
       
   560     else
       
   561         {
       
   562         iInterface.ReportTestResultL( CDiagResultsDatabaseItem::EFailed ); 
       
   563         }               
       
   564     }
       
   565 
       
   566 
       
   567 // End of File
       
   568