|
1 /* |
|
2 * Copyright (c) 2009 - 2010 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: |
|
15 * |
|
16 */ |
|
17 #ifndef VMBXUIENGINE_H |
|
18 #define VMBXUIENGINE_H |
|
19 |
|
20 // System includes |
|
21 #include <QObject> |
|
22 #include <mvoicemailboxobserver.h> |
|
23 #include <voicemailboxdefs.h> |
|
24 |
|
25 // Forward declarations |
|
26 class CVoiceMailbox; |
|
27 class TVoiceMailboxParams; |
|
28 |
|
29 // Class declaration |
|
30 class VmbxUiEngine : public QObject, public MVoiceMailboxObserver |
|
31 { |
|
32 Q_OBJECT |
|
33 |
|
34 public: |
|
35 |
|
36 /*! |
|
37 Constructor. |
|
38 */ |
|
39 VmbxUiEngine(); |
|
40 |
|
41 /*! |
|
42 Destructor |
|
43 */ |
|
44 ~VmbxUiEngine(); |
|
45 |
|
46 public: |
|
47 |
|
48 /*! |
|
49 Getter method for primary voice number of Voice Mailbox. |
|
50 @param aValue Retrieved number. |
|
51 */ |
|
52 void getCsVoiceNumber(QString &aValue); |
|
53 |
|
54 /*! |
|
55 Getter method for primary video number of Voice Mailbox. |
|
56 @param aValue Retrieved number. |
|
57 */ |
|
58 void getCsVideoNumber(QString &aValue); |
|
59 |
|
60 /*! |
|
61 Set number when cs voice number has been edited on UI. |
|
62 @param aValue New value. |
|
63 */ |
|
64 void setCsVoiceNumber( const QString &aValue ); |
|
65 |
|
66 /*! |
|
67 Set number when cs voice number has been edited on UI. |
|
68 @param aValue New value. |
|
69 */ |
|
70 void setCsVideoNumber( const QString &aValue ); |
|
71 |
|
72 /*! |
|
73 If video mailbox supported. |
|
74 */ |
|
75 bool isVideoSupport(); |
|
76 |
|
77 /*! |
|
78 If voice mailbox is writable. |
|
79 */ |
|
80 bool isVoiceWritable(); |
|
81 |
|
82 /*! |
|
83 If video mailbox is writable. |
|
84 */ |
|
85 bool isVideoWritable(); |
|
86 |
|
87 |
|
88 // Add new Getter methods for other voice mailbox types |
|
89 |
|
90 /*! |
|
91 From MVoiceMailboxObserver |
|
92 Observer callback for number/address change notification |
|
93 from voice mailbox engine. |
|
94 The UI should be notified to update the number. |
|
95 @param aVmbxEntry New voicemailbox entry. |
|
96 */ |
|
97 void HandleNotifyL(const CVoiceMailboxEntry &aVmbxEntry); |
|
98 |
|
99 /*! |
|
100 Query number when cs voice number has been edited on UI. |
|
101 @param aValue New value. |
|
102 */ |
|
103 int queryVoiceNumber(QString &aValue); |
|
104 |
|
105 /*! |
|
106 Query number when cs video number has been edited on UI. |
|
107 @param aValue New value. |
|
108 */ |
|
109 int queryVideoNumber(QString &aValue); |
|
110 |
|
111 /*! |
|
112 Request notify when VMBX number changed |
|
113 @param aNotifyOnActiveLineOnly Only active line or NOT |
|
114 */ |
|
115 void notifyVmbxNumberChange(bool aNotifyOnActiveLineOnly); |
|
116 |
|
117 signals: |
|
118 |
|
119 /*! |
|
120 Signal emitted when voice mailbox data has been updated. |
|
121 */ |
|
122 void voiceMailboxEngineEntriesUpdated(const TVmbxType vmbxType); |
|
123 |
|
124 |
|
125 private: // New Method |
|
126 |
|
127 /*! |
|
128 Initialize vmbx ui engine. |
|
129 */ |
|
130 void init(); |
|
131 |
|
132 /*! |
|
133 Getter method for primary voice number of Voice Mailbox. |
|
134 @param aValue Retrieved number. |
|
135 */ |
|
136 void getCsVoicePrimaryNumber(QString &aValue); |
|
137 |
|
138 /*! |
|
139 Getter method for primary video number of Voice Mailbox. |
|
140 @param aValue Retrieved number. |
|
141 */ |
|
142 void getCsVideoPrimaryNumber(QString &aValue); |
|
143 |
|
144 /*! |
|
145 Getter method for voice mailbox number. |
|
146 @param aParam Identify voice mailbox type |
|
147 @param aValue Retrieved number. |
|
148 */ |
|
149 void getNumber(const TVoiceMailboxParams &aParam, |
|
150 QString &aValue); |
|
151 |
|
152 /*! |
|
153 Setter method for voice mailbox number. |
|
154 @param aParam Identify voice mailbox type |
|
155 @param aValue Retrieved number. |
|
156 */ |
|
157 void setNumber(const TVoiceMailboxParams &aParam, |
|
158 const QString &aValue); |
|
159 |
|
160 /*! |
|
161 Query method for voice mailbox number. |
|
162 @param aParam Identify voice mailbox type |
|
163 @param aValue Retrieved number. |
|
164 */ |
|
165 int queryNumber(const TVoiceMailboxParams &aParam, QString &aValue); |
|
166 |
|
167 |
|
168 private: |
|
169 |
|
170 /*! |
|
171 Symbian voice mailbox engine which offers basic entry retrieval, |
|
172 saving, querying etc. services. |
|
173 Own. |
|
174 */ |
|
175 CVoiceMailbox *mVmbxEngine; |
|
176 /*! |
|
177 Cs voice number |
|
178 */ |
|
179 QString mCsVoiceNumber; |
|
180 |
|
181 /*! |
|
182 Cs video number |
|
183 */ |
|
184 QString mCsVideoNumber; |
|
185 |
|
186 }; |
|
187 |
|
188 #endif // VMBXUIENGINE_H |