|
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: Provides engine implementation for CallUI. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __CAUIDIALOGS_H__ |
|
20 #define __CAUIDIALOGS_H__ |
|
21 |
|
22 // Includes |
|
23 |
|
24 #include "PhCltTypes.h" |
|
25 #include "CaUiVoIPExtension.h" |
|
26 // Forward declarations |
|
27 |
|
28 class CCaUiEngine; |
|
29 class MCaUiReconnectQueryObserver; |
|
30 class CPhCntMatcher; |
|
31 class CAknGlobalListQuery; |
|
32 class CCaUiGlnActiveObject; |
|
33 class CCaUiReConQueryInformation; |
|
34 class CAknGlobalNote; |
|
35 class CCaUiNoteActiveObject; |
|
36 |
|
37 |
|
38 // Contants |
|
39 |
|
40 // The first item in list query (CCaUiQuery). |
|
41 const TInt KCallUiVoiceCall = 0; |
|
42 |
|
43 // The second item in list query (CCaUiQuery). |
|
44 const TInt KCallUiVideoCall = 1; |
|
45 |
|
46 // The third item in list query (CCaUiQuery). |
|
47 const TInt KCallUiInternetCall = 2; |
|
48 |
|
49 // Priority of the note |
|
50 const TInt KNoVideoSupportNotePriority = 3500; |
|
51 |
|
52 // Timeout for note launch. |
|
53 const TInt KCaUiEngNoteTimeout = 3000000; // 3s |
|
54 |
|
55 NONSHARABLE_CLASS( CCaUiDialogs ) |
|
56 : public CBase |
|
57 { |
|
58 |
|
59 public: |
|
60 |
|
61 /** |
|
62 * Two-phased constructor. |
|
63 * @return an instance of CCaUiDialogs. |
|
64 */ |
|
65 static CCaUiDialogs* NewL( CCaUiEngine& aCaUiEngine ); |
|
66 |
|
67 /** |
|
68 * Destructor. |
|
69 */ |
|
70 virtual ~CCaUiDialogs(); |
|
71 |
|
72 /** |
|
73 * Launch a query whether video call will be created with long |
|
74 * press of Send key |
|
75 * |
|
76 * @return The selection user made |
|
77 */ |
|
78 TInt QueryVideoCallDefaultActionL(); |
|
79 |
|
80 /** |
|
81 * Launch a list query asking what type of call the caller wants |
|
82 * to make. |
|
83 * |
|
84 * @param aCallType The call type chosen by user in query. |
|
85 * @return ETrue if query was successful, EFalse otherwise. |
|
86 */ |
|
87 TBool LaunchCreateListQueryL( TPhCltCallType& aCallType ); |
|
88 |
|
89 /** |
|
90 * Launch the qtn.tel.no.video.network information note. |
|
91 * |
|
92 * @see CCaUiEngApi::LaunchNoNetSupNoteL(). |
|
93 */ |
|
94 void LaunchNoNetSupNoteL(); |
|
95 |
|
96 /** |
|
97 * Launch reconnect confirmation query. |
|
98 * |
|
99 * @see CCaUiEngApi::LaunchReconConfQueryL(). |
|
100 * @param aAlias The alias corresponding the number. Can be empty TPtrC. |
|
101 */ |
|
102 void LaunchReconConfQueryL( |
|
103 MCaUiReconnectQueryObserver& aObserver, |
|
104 CPhCntMatcher* aPhCntMatcher, |
|
105 const TPtrC aPhoneNumber, |
|
106 const TBool aIncludeVideoCallOption, |
|
107 const TPtrC aAlias ); |
|
108 |
|
109 /** |
|
110 * Cancel reconnect query. |
|
111 * |
|
112 * @see CCaUiEngApi::CancelReconConfQuery(). |
|
113 */ |
|
114 void CancelReconConfQuery(); |
|
115 |
|
116 /** |
|
117 * Cancel note and reconnect query. |
|
118 * |
|
119 * @see CCaUiEngApi::CancelNoteAndReconConfQuery(). |
|
120 */ |
|
121 void CancelNoteAndReconConfQuery(); |
|
122 |
|
123 /** |
|
124 * Launch note and reconnect confirmation query. |
|
125 * |
|
126 * @see CCaUiEngApi::LaunchNoteAndReconConfQueryL(). |
|
127 * @param aAlias The alias corresponding the number. Can be empty TPtrC. |
|
128 */ |
|
129 void LaunchNoteAndReconConfQueryL( |
|
130 MCaUiReconnectQueryObserver& aObserver, |
|
131 CPhCntMatcher* aPhCntMatcher, |
|
132 const TPtrC aPhoneNumber, |
|
133 const TBool aIncludeVideoCallOption, |
|
134 const TPtrC aNoteText, |
|
135 const TPtrC aAlias ); |
|
136 |
|
137 /** |
|
138 * Check if reconfigure query is ongoing. |
|
139 * @since 3.2 |
|
140 * @return TBool, ETrue if query is ongoing |
|
141 * EFalse if not ongoing. |
|
142 */ |
|
143 TBool IsReconfQueryOngoing(); |
|
144 |
|
145 /** |
|
146 * Set reconfigure query is ongoing. |
|
147 * @since 5.0 |
|
148 */ |
|
149 void SetReconfQueryOngoing( TBool aOngoing ); |
|
150 |
|
151 private: |
|
152 |
|
153 /** |
|
154 * C++ default constructor. |
|
155 */ |
|
156 CCaUiDialogs( CCaUiEngine& aCaUiEngine ); |
|
157 |
|
158 /** |
|
159 * Symbian 2nd phase constructor |
|
160 */ |
|
161 void ConstructL(); |
|
162 |
|
163 /** |
|
164 * Fill list query items |
|
165 * |
|
166 * @since 5.0 |
|
167 * @param aTextArray |
|
168 * @param aMappingList |
|
169 */ |
|
170 void FillListQueryItemsL( |
|
171 CDesCArray& aTextArray, |
|
172 CListMappingArray& aMappingList ); |
|
173 |
|
174 /** |
|
175 * Handle note expiration call back. |
|
176 * |
|
177 * @param aAny This pointer. |
|
178 * @return KErrNone if successful, Symbian error code otherwise. |
|
179 */ |
|
180 static TInt DoPerformNoteLaunchCallBackL( TAny* aAny ); |
|
181 |
|
182 public: // data |
|
183 |
|
184 // tkuuva, create getter/setter |
|
185 //TBool iReconfQueryOngoing; |
|
186 |
|
187 private: //data |
|
188 |
|
189 // The reconnect global list query. |
|
190 CAknGlobalListQuery* iReconListQuery; |
|
191 |
|
192 // The active object to handle reconnect query results. |
|
193 CCaUiGlnActiveObject* iReconActObject; |
|
194 |
|
195 CCaUiEngine& iCaUiEngine; |
|
196 |
|
197 // Owned timer for note launch time-out. |
|
198 CPeriodic* iNoteTimer; |
|
199 |
|
200 // Storage for Reconnect query information. |
|
201 CCaUiReConQueryInformation* iReConQueryInformation; |
|
202 |
|
203 // The qtn.tel.no.video.network note shown to the user. |
|
204 CAknInformationNote* iInfoNote; |
|
205 |
|
206 // ReconfQuery ongoing flag |
|
207 TBool iReconfQueryOngoing; |
|
208 |
|
209 }; |
|
210 |
|
211 #endif // __CAUIDIALOGS_H__ |