|
1 /* |
|
2 * Copyright (c) 2008 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 "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: Defines the CWaitingObserver class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CWAITINGOBSERVER_H |
|
22 #define CWAITINGOBSERVER_H |
|
23 |
|
24 #include <etelmm.h> // RMobilePhone |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CMsgIndicatorPluginImplementation; |
|
28 |
|
29 enum TIndicatorMessageType |
|
30 { |
|
31 EIndicatorMessageTypeFax, |
|
32 EIndicatorMessageTypeVMLine1, |
|
33 EIndicatorMessageTypeVMLine2, |
|
34 }; // TIndicatorMessageType |
|
35 |
|
36 class CWaitingObserver: |
|
37 public CActive |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 */ |
|
44 static CWaitingObserver* NewL( RMobilePhone &aMobilePhone, CMsgIndicatorPluginImplementation& iIndicatorPlugin ); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 virtual ~CWaitingObserver(); |
|
50 |
|
51 TInt GetMsgCount(const TIndicatorMessageType aMsgType); |
|
52 /** |
|
53 * Check the KMuiuSupressAllNotificationConfiguration value |
|
54 */ |
|
55 TBool CheckSupressNotificationSettingL(); |
|
56 |
|
57 public: // From CActive |
|
58 |
|
59 /** |
|
60 * RunL |
|
61 */ |
|
62 void RunL(); |
|
63 |
|
64 /** |
|
65 * DoCancel |
|
66 */ |
|
67 void DoCancel(); |
|
68 |
|
69 private: // Constructors and destructor |
|
70 |
|
71 /** |
|
72 * C++ default constructor. |
|
73 */ |
|
74 CWaitingObserver( RMobilePhone &aMobilePhone, CMsgIndicatorPluginImplementation& iIndicatorPlugin ); |
|
75 |
|
76 /** |
|
77 * 2nd. phase constructor. |
|
78 */ |
|
79 void ConstructL( ); |
|
80 |
|
81 private: |
|
82 |
|
83 /** |
|
84 * Update indicator status |
|
85 */ |
|
86 void UpdateIndicatorStatusL(); |
|
87 |
|
88 private: // Data |
|
89 |
|
90 TBool iChangeNotifySubscribed; |
|
91 |
|
92 // Needed to initialize iMobilePhone |
|
93 RTelServer iTelServer; |
|
94 |
|
95 // Needed to initialize iMobilePhone |
|
96 RTelServer::TPhoneInfo iPhoneInfo; |
|
97 |
|
98 RMobilePhone &iMobilePhone; |
|
99 |
|
100 // Struct is a container for indicator flags and message counts |
|
101 RMobilePhone::TMobilePhoneMessageWaitingV1 iMsgWaiting; |
|
102 |
|
103 // Package for iMsgWaitingV1 |
|
104 RMobilePhone::TMobilePhoneMessageWaitingV1Pckg iMsgWaitingPckg; |
|
105 |
|
106 CMsgIndicatorPluginImplementation &iIndicatorPlugin; |
|
107 |
|
108 }; // CWaitingObserver |
|
109 |
|
110 #endif //CWAITINGOBSERVER_H |