44
|
1 |
// Copyright (c) 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 "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// @file notifybatteryandsignal.h
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
#ifndef __NOTIFYBATTERYANDSIGNAL_H__
|
|
19 |
#define __NOTIFYBATTERYANDSIGNAL_H__
|
|
20 |
|
|
21 |
//user include
|
|
22 |
#include <callbacktimer.h>
|
|
23 |
#include "atcommandcontrolbase.h"
|
|
24 |
#include "globalphonemanager.h"
|
|
25 |
|
|
26 |
// forward class
|
|
27 |
class CATGetBattery;
|
|
28 |
class CATGetSignal;
|
|
29 |
|
|
30 |
/**
|
|
31 |
* CNotifyBatteryAndSignal inherits from the CATCommandControlBase class.
|
|
32 |
*
|
|
33 |
*/
|
|
34 |
class CNotifyBatteryAndSignal : public CATCommandControlBase,
|
|
35 |
public MTimerObserver
|
|
36 |
{
|
|
37 |
public:
|
|
38 |
/**
|
|
39 |
* Two-phased constructor.
|
|
40 |
* @param aGloblePhone
|
|
41 |
* @param aCtsyDispatcherCallback
|
|
42 |
*/
|
|
43 |
static CNotifyBatteryAndSignal* NewL(CGlobalPhonemanager& aGloblePhone,
|
|
44 |
CCtsyDispatcherCallback& aCtsyDispatcherCallback);
|
|
45 |
|
|
46 |
/**
|
|
47 |
* Destructor
|
|
48 |
*
|
|
49 |
*/
|
|
50 |
~CNotifyBatteryAndSignal();
|
|
51 |
|
|
52 |
virtual void AtCommandExecuteComplete(TAtEventSource aEventSource, TInt aStatus);
|
|
53 |
void StartRequest();
|
|
54 |
void StartTimer(TInt aSecond);
|
|
55 |
protected:
|
|
56 |
/**
|
|
57 |
* Constructor
|
|
58 |
*
|
|
59 |
* @param aGloblePhone
|
|
60 |
* @param aCtsyDispatcherCallback
|
|
61 |
*/
|
|
62 |
CNotifyBatteryAndSignal(CGlobalPhonemanager& aGloblePhone,
|
|
63 |
CCtsyDispatcherCallback& aCtsyDispatcherCallback);
|
|
64 |
/**
|
|
65 |
* 2nd Constructor
|
|
66 |
*/
|
|
67 |
void ConstructL();
|
|
68 |
private:
|
|
69 |
//From MTimerObserver
|
|
70 |
virtual void TimerRun(TInt aError);
|
|
71 |
|
|
72 |
private:
|
|
73 |
RMobilePhone::TMobilePhoneBatteryInfoV1 iBatteryInfo;
|
|
74 |
TTsySignalInfo iSignalInfo;
|
|
75 |
CATGetBattery* iATGetBattery;
|
|
76 |
CATGetSignal* iATGetSignal;
|
|
77 |
/**
|
|
78 |
*
|
|
79 |
*/
|
|
80 |
CCallbackTimer* iCallbackTimer;
|
|
81 |
enum
|
|
82 |
{
|
|
83 |
EATNone,
|
|
84 |
EATGetBattery,
|
|
85 |
EATGetSignal
|
|
86 |
} iATCommandName;
|
|
87 |
|
|
88 |
};
|
|
89 |
#endif //__NOTIFYBATTERYANDSIGNAL_H__
|