lbs/lbsclient/src/ctlbsclientpostp194.cpp
branchSymbian2
changeset 1 8758140453c0
child 6 c108117318cb
equal deleted inserted replaced
0:e8c1ea2c6496 1:8758140453c0
       
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 
       
    18 // INCLUDE FILES
       
    19 #include "ctlbsclientpostp194.h"
       
    20 #include "ctlbsclientperiodictester.h"
       
    21 
       
    22 // CONSTANTS
       
    23 _LIT(KServiceName1, " aaaaaaaaaaa");
       
    24 _LIT(KServiceName2, " bbbbbbbbbbb");
       
    25 
       
    26 // ================= MEMBER FUNCTIONS =======================
       
    27 
       
    28 
       
    29 // ---------------------------------------------------------
       
    30 // Constructor.
       
    31 // ---------------------------------------------------------
       
    32 CT_LbsClientPosTp194::CT_LbsClientPosTp194(CT_LbsServer& aParent): CT_LbsPortedStepBase(aParent)
       
    33 	{  
       
    34 	_LIT(KTestName, "TP194 - Periodic Updates, Duration test");
       
    35 	SetTestStepName(KTestName); 
       
    36 	}
       
    37 
       
    38 // ---------------------------------------------------------
       
    39 // Destructor.
       
    40 // ---------------------------------------------------------
       
    41 CT_LbsClientPosTp194::~CT_LbsClientPosTp194()
       
    42 	{
       
    43 	}
       
    44 
       
    45 // ---------------------------------------------------------
       
    46 // CT_LbsClientPosTp194::StartL
       
    47 //
       
    48 // (other items were commented in a header).
       
    49 // ---------------------------------------------------------
       
    50 //
       
    51 void CT_LbsClientPosTp194::StartL()
       
    52     {
       
    53     
       
    54 	SetupPsyL(iUidMultiPsy);
       
    55 
       
    56 	TInt numberOfRuns = 100;
       
    57 	TTimeIntervalMicroSeconds interval5 = TTimeIntervalMicroSeconds(4000000);
       
    58 	TUid uid = iUidMultiPsy;
       
    59 	
       
    60 	CT_LbsClientPeriodicTester* periodicTester1 = CT_LbsClientPeriodicTester::NewL(interval5, KServiceName1, iLog, uid, numberOfRuns);
       
    61 	CleanupStack::PushL(periodicTester1);
       
    62 
       
    63 	CT_LbsClientPeriodicTester* periodicTester2 = CT_LbsClientPeriodicTester::NewL(interval5, KServiceName2, iLog, uid, numberOfRuns);
       
    64 	CleanupStack::PushL(periodicTester2);
       
    65 
       
    66 	periodicTester1->RequestNotification();
       
    67 	periodicTester2->RequestNotification();
       
    68 	
       
    69 	// Active scheduler is stopped two times.
       
    70 	CActiveScheduler::Start();
       
    71 	CActiveScheduler::Start();
       
    72 
       
    73     //check for errors
       
    74     TBool test1 = periodicTester1 -> IsCompletedOK(); 
       
    75     TBool test2 = periodicTester2 -> IsCompletedOK();
       
    76 
       
    77     CleanupStack::PopAndDestroy(2,periodicTester1);
       
    78     
       
    79     if (!test1 || !test2)
       
    80         {
       
    81         _LIT(KError, "Test did not complete with no error, check log file");
       
    82         LogErrorAndLeaveL(KError);
       
    83         }
       
    84 
       
    85 	}
       
    86 
       
    87 // End of File