27
|
1 |
/*
|
|
2 |
* Copyright (c) 2004 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: Handles the notifications for voice mail messages
|
|
15 |
* : Keeps track about the number of voice mail messages
|
|
16 |
* : Has support for alternative line (ALS)
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
#ifndef NCNVOICEMAILMANAGER_H
|
|
23 |
#define NCNVOICEMAILMANAGER_H
|
|
24 |
|
|
25 |
// INCLUDES
|
|
26 |
#include "NcnSubscribeHandler.h"
|
|
27 |
#include "MNcnMsgWaitingManager.h"
|
|
28 |
|
|
29 |
// FORWARD DECLARATIONS
|
|
30 |
class CNcnSubscriber;
|
|
31 |
class CNcnCRHandler;
|
|
32 |
class MNcnNotifier;
|
|
33 |
|
|
34 |
// CLASS DECLARATION
|
|
35 |
|
|
36 |
/**
|
|
37 |
* Class implementing a voice mail management responsibility
|
|
38 |
* All the methods since 3.1 if other not specified
|
|
39 |
* @since Series60 3.1
|
|
40 |
*/
|
|
41 |
class CVoiceMailManager : public CBase, public MNcnSubscribeHandler
|
|
42 |
{
|
|
43 |
public:
|
|
44 |
|
|
45 |
/**
|
|
46 |
* Voice mail count can be a number telling the exact count of the messages
|
|
47 |
* if the exact count is not known ECountNotKnown is used.
|
|
48 |
* ENoVoiceMails is used to signify that no voice mails exists.
|
|
49 |
*/
|
|
50 |
enum TVoiceMailCount
|
|
51 |
{
|
|
52 |
/* No voice mails exist */
|
|
53 |
ENoVoiceMails = 0,
|
|
54 |
|
|
55 |
/* Maximum number of voice mails */
|
|
56 |
EVMMaximumNumber = 0xfe,
|
|
57 |
|
|
58 |
/* Voice mails exist but the exact count is not known */
|
|
59 |
EVMExistsButCountNotKnown = 0xff
|
|
60 |
};
|
|
61 |
|
|
62 |
/**
|
|
63 |
* Two-phased constructor.
|
|
64 |
*/
|
|
65 |
static CVoiceMailManager* NewL( CNcnModelBase& aModel );
|
|
66 |
|
|
67 |
/**
|
|
68 |
* Destructor.
|
|
69 |
*/
|
|
70 |
~CVoiceMailManager();
|
|
71 |
|
|
72 |
/**
|
|
73 |
* Received a voice mail message to line 1
|
|
74 |
* Messages are SET(default) and CLEAR message. There is three ways
|
|
75 |
* how voice mail messages can arrive. CPHS, DCS and "special SMS"
|
|
76 |
* these messages are handled by NCN session observer.
|
|
77 |
* Use TVoiceMailCount values in case the message is a clear message or
|
|
78 |
* the amount is not exactly know. Otherwise give the exact count.
|
|
79 |
* @param aAmount How many voice mails we received to line 1
|
|
80 |
*/
|
|
81 |
void VMMessageReceived( MNcnMsgWaitingManager::TNcnMessageType aLineType, TUint aAmount );
|
|
82 |
|
|
83 |
/**
|
|
84 |
* Check the SIM status at the boot up phase. If the SIM contains
|
|
85 |
* voice mails the PS key has been updated by some other component.
|
|
86 |
* The internal number that we maintain about the voice message count
|
|
87 |
* is now over written by a general notification about "New voice mail(s)"
|
|
88 |
* Reason for this is that SIM card does not apparantly hold the exact amount
|
|
89 |
* of received voice mails so only a general notification is desired.
|
|
90 |
* @return True if SIM contains voice mail messages
|
|
91 |
*/
|
|
92 |
TBool CheckForSIMVoiceMailMessages();
|
|
93 |
|
|
94 |
/**
|
|
95 |
* SIM has changed so we will need to erase old notes.
|
|
96 |
* Model uses this method to notify voice mail manager
|
|
97 |
* We also use this in the constructL if we notice that
|
|
98 |
* the SIM has changed in boot-up
|
|
99 |
*/
|
|
100 |
void NotifyAboutSIMChange();
|
|
101 |
|
|
102 |
/**
|
|
103 |
* Check the KMuiuSupressAllNotificationConfiguration value
|
|
104 |
*/
|
|
105 |
TBool CheckSupressNotificationSettingL();
|
|
106 |
|
|
107 |
private:
|
|
108 |
|
|
109 |
/**
|
|
110 |
* C++ default constructor.
|
|
111 |
*/
|
|
112 |
CVoiceMailManager( CNcnModelBase& aModel );
|
|
113 |
|
|
114 |
/**
|
|
115 |
* By default Symbian 2nd phase constructor is private.
|
|
116 |
*/
|
|
117 |
void ConstructL();
|
|
118 |
|
|
119 |
public: //from MNcnSubscribeHandler
|
|
120 |
|
|
121 |
/**
|
|
122 |
* Through this method the Property subscribers notify of Property changes
|
|
123 |
* @param aCategory The category of the property to be observed
|
|
124 |
* @param aKey The subkey of the property to be observed
|
|
125 |
*/
|
|
126 |
void HandlePropertyChangedL( const TUid& aCategory, TInt aKey );
|
|
127 |
|
|
128 |
/**
|
|
129 |
* ALS indication and note update
|
|
130 |
*
|
|
131 |
* Indication and note must be updated for line 1 and line 2
|
|
132 |
* whenever state for either of the line changes.
|
|
133 |
*
|
|
134 |
*/
|
|
135 |
void UpdateNoteAndIndicationWithALS( TInt aMsgOnLine1, TInt aMsgOnLine2 );
|
|
136 |
|
|
137 |
/**
|
|
138 |
* Update soft notification and trigger icon drawing to
|
|
139 |
* reflect the current state of the lines
|
|
140 |
*/
|
|
141 |
void UpdateVMNotifications();
|
|
142 |
|
|
143 |
|
|
144 |
private: // Own methods
|
|
145 |
|
|
146 |
/**
|
|
147 |
* Clear existing voice mail notes
|
|
148 |
*/
|
|
149 |
void ClearVoiceMailSoftNotes();
|
|
150 |
|
|
151 |
/**
|
|
152 |
* Find out is alternative line subscription active in the terminal
|
|
153 |
*/
|
|
154 |
TBool UpdateALSStatus();
|
|
155 |
|
|
156 |
private: // data
|
|
157 |
|
|
158 |
/**
|
|
159 |
* The current state of the ALS support
|
|
160 |
*/
|
|
161 |
TBool iIsALSSupported;
|
|
162 |
|
|
163 |
|
|
164 |
/* 107-18696: Handling of EF-CFIS and EF-MWIS in telephony area
|
|
165 |
* No need to keep voice mail count anymore. ETEL MM will take
|
|
166 |
* care of that.
|
|
167 |
*/
|
|
168 |
/**
|
|
169 |
* Number of voice mails we have active in line 1
|
|
170 |
*/
|
|
171 |
//TUint iVoiceMailCountInLine1;
|
|
172 |
|
|
173 |
/**
|
|
174 |
* Number of voice mails we have active in line 2
|
|
175 |
*/
|
|
176 |
//TUint iVoiceMailCountInLine2;
|
|
177 |
|
|
178 |
/**
|
|
179 |
* Value of the PS key KNcnVoiceMailStatusValue, which
|
|
180 |
* is currently mapped to KPSUidVoiceMailStatusValue
|
|
181 |
*/
|
|
182 |
//TInt iPSKeyForVoiceMailStatus;
|
|
183 |
|
|
184 |
/**
|
|
185 |
* CR keys are updated through the ncn CR handler
|
|
186 |
* Not owned only referenced.
|
|
187 |
*/
|
|
188 |
//CNcnCRHandler& iNcnCRHandler;
|
|
189 |
|
|
190 |
/**
|
|
191 |
* Used to display soft notification
|
|
192 |
* Not owned only referenced.
|
|
193 |
*/
|
|
194 |
//MNcnNotifier& iNcnNotifier;
|
|
195 |
|
|
196 |
/**
|
|
197 |
* Reference to model which is used to display
|
|
198 |
* soft notes and manage indicators and message counts.
|
|
199 |
*/
|
|
200 |
CNcnModelBase& iModel;
|
|
201 |
};
|
|
202 |
|
|
203 |
|
|
204 |
#endif // NCNVOICEMAILMANAGER_H
|
|
205 |
|
|
206 |
// End of File
|