24
|
1 |
// Copyright (c) 2000-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 |
//
|
|
15 |
|
|
16 |
#ifndef __INDICATORWATCHER_H__
|
|
17 |
#define __INDICATORWATCHER_H__
|
|
18 |
|
|
19 |
// System includes
|
|
20 |
#include <e32base.h>
|
|
21 |
|
|
22 |
// Base include
|
|
23 |
#include "watcherbase.h"
|
|
24 |
|
|
25 |
// Local include
|
|
26 |
#include "callstatewatcher.h"
|
|
27 |
|
|
28 |
//
|
|
29 |
// ------> CIndicatorWatcher (header)
|
|
30 |
//
|
|
31 |
class CIndicatorWatcher : public CPhoneWatcher
|
|
32 |
/**
|
|
33 |
@internalComponent
|
|
34 |
*/
|
|
35 |
{
|
|
36 |
//
|
|
37 |
public: // STATIC CONSTRUCT / DESTRUCT
|
|
38 |
//
|
|
39 |
static CIndicatorWatcher* NewL(TAny* aWatcherParams);
|
|
40 |
~CIndicatorWatcher();
|
|
41 |
|
|
42 |
//
|
|
43 |
private: // CONSTRUCT
|
|
44 |
//
|
|
45 |
CIndicatorWatcher();
|
|
46 |
void ConstructL();
|
|
47 |
|
|
48 |
//
|
|
49 |
private: // FROM CPhoneWatcher
|
|
50 |
//
|
|
51 |
|
|
52 |
void HandlePhoneStateEventL(TInt aCompletionCode);
|
|
53 |
void HandleCancel();
|
|
54 |
void ReleasePhoneResources();
|
|
55 |
|
|
56 |
//
|
|
57 |
private: // INTERNAL
|
|
58 |
//
|
|
59 |
enum TIndicatorState
|
|
60 |
{
|
|
61 |
EIndicatorNotYetInitialised = 0,
|
|
62 |
EIndicatorRequestInitialIndicator,
|
|
63 |
EIndicatorWaitingForInitialIndicator,
|
|
64 |
EIndicatorIssuingIndicatorChangeNotification
|
|
65 |
};
|
|
66 |
inline TIndicatorState& IndicatorState();
|
|
67 |
void HandleIndicatorUpdateL(TInt aCompletionCode);
|
|
68 |
|
|
69 |
TInt GetCallInProgressInfo();
|
|
70 |
void IndicatorPanic(TWatcherPanic aPanicNumber);
|
|
71 |
|
|
72 |
//
|
|
73 |
private: // MEMBER DATA
|
|
74 |
//
|
|
75 |
TIndicatorState iState;
|
|
76 |
TUint32 iIndicatorInfo;
|
|
77 |
CCallStateWatcher* iCallStateWatcher;
|
|
78 |
RProperty iCurrentCallProperty;
|
|
79 |
RProperty iChargerStatusProperty;
|
|
80 |
RProperty iNetworkStatusProperty;
|
|
81 |
};
|
|
82 |
|
|
83 |
|
|
84 |
inline CIndicatorWatcher::TIndicatorState& CIndicatorWatcher::IndicatorState() { return iState; }
|
|
85 |
|
|
86 |
#endif
|