common/tools/ats/smoketest/email/framework/src/T_RecordCurrentTime.cpp
changeset 719 d5603c08781b
child 872 17498133d9ad
equal deleted inserted replaced
718:b18be44be852 719:d5603c08781b
       
     1 // Copyright (c) 2007-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 // @file 
       
    15 // [TestStep Name]
       
    16 // RecordCurrentTime
       
    17 // [Paramaters]
       
    18 // EventCode		:	Event code defined in TInstrumentationPoint.
       
    19 // Creates a logging statement in EventLog server with the time, and
       
    20 // event code information.
       
    21 // [APIs Used]
       
    22 // 
       
    23 //
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 /* User includes */
       
    29 #include "T_RecordCurrentTime.h"
       
    30 #include "t_utilsenumconverter.h"
       
    31 #include "t_testinstrumentation.h"
       
    32 
       
    33 /* Epoc Include */
       
    34 //#include <systemmonitor/instrumentationhandler.h>
       
    35 
       
    36 
       
    37 /* Literals Used*/
       
    38 _LIT(KEventCode, "EventCode");
       
    39 
       
    40 /**
       
    41   Function : CT_MsgRecordCurrentTime
       
    42   Description : Constructor
       
    43   @return : none
       
    44 */
       
    45 CT_MsgRecordCurrentTime::CT_MsgRecordCurrentTime()
       
    46 	{
       
    47 	SetTestStepName(KRecordCurrentTime);
       
    48 	}
       
    49 
       
    50 
       
    51 /**
       
    52   Function : doTestStepL
       
    53   Description : This function is responsible for generating a log statement in EventLog server
       
    54   				by providing the event code to instrumentationhandler API.
       
    55   @return : TVerdict Test result
       
    56 */
       
    57 TVerdict CT_MsgRecordCurrentTime::doTestStepL()
       
    58 	{
       
    59 	INFO_PRINTF1(_L("TestStep : RecordCurrentTime"));
       
    60 	TPtrC eventCodeFromIni;
       
    61 	if(!GetStringFromConfig(ConfigSection(), KEventCode, eventCodeFromIni))
       
    62 		{
       
    63 		ERR_PRINTF1(_L("Event code is not specified"));
       
    64 		SetTestStepResult(EFail);
       
    65 		}
       
    66 	else
       
    67 		{
       
    68 //		TInstrumentationPoint eventcode = CT_MsgUtilsEnumConverter::ConvertDesToEventCode(eventCodeFromIni);
       
    69 	
       
    70 //		CInstrumentationHandler *handler = CInstrumentationHandler::NewL();
       
    71 //		CleanupStack::PushL(handler);
       
    72 //		handler->RaiseEventNotification(eventcode);
       
    73 //		CleanupStack::PopAndDestroy(handler);
       
    74 		}
       
    75 	return TestStepResult();
       
    76 	}