sapi_sysinfo/tsrc/testing/tsysbattery/inc/tsysbatterynot.h
changeset 0 14df0fbfcc4e
equal deleted inserted replaced
-1:000000000000 0:14df0fbfcc4e
       
     1 /*
       
     2 * Copyright (c) 2002 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 the License "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:   Tests battery notifications
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __CTBATTERY_NOT_H__
       
    20 #define __CTBATTERY_NOT_H__
       
    21 
       
    22 #include "watchtimer.h"
       
    23 #include "sysinfoservice.h"
       
    24 
       
    25 
       
    26 class CBatteryNot : public CActive ,public ISystemObserver, public MTimeOutCallBack
       
    27 {
       
    28 public:
       
    29 	static CBatteryNot* NewL(CStifLogger* aLog, TInt aCmdId);
       
    30 	~CBatteryNot();
       
    31 	void Start();
       
    32 	TInt Result();
       
    33 
       
    34 	 void HandleResponseL(const TDesC& aEntity,const TDesC& aKey,
       
    35 	 					CSysData* aOutput, TInt32 aTransID, TSysRequest::TRequestType aType, TInt aError);
       
    36 	 
       
    37 	 void HandleTimeOut	();
       
    38      enum TTestId
       
    39      {
       
    40      EWrongData, 
       
    41      EWrongKey,	
       
    42      };
       
    43      
       
    44 private:
       
    45 	void ConstructL() ;
       
    46 	CBatteryNot(CStifLogger* aLog, TInt aCmdId) ;
       
    47 	
       
    48 	virtual void DoCancel() ;
       
    49 	virtual void RunL();
       
    50 	void TestFuncL() ;
       
    51 	void TestFunc1L() ;
       
    52 
       
    53 private:	
       
    54     CWatchTimer*			iTimer;
       
    55 	CActiveSchedulerWait* 	iWaitScheduler;
       
    56 	CSysInfoService*		iSysInfoService;
       
    57 	TInt                    iResult;
       
    58 	TInt                    iError;
       
    59 	TInt                    iCount;
       
    60 	TInt                    iCmdId ;
       
    61 	CStifLogger*			iLog;
       
    62 };
       
    63 
       
    64 #endif __CTBATTERY_NOT_H__