author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 15 Sep 2010 11:52:37 +0300 | |
branch | RCL_3 |
changeset 73 | c8382f7b54ef |
parent 70 | 968773a0b6ef |
child 80 | 726fba06891a |
permissions | -rw-r--r-- |
64 | 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: Implementation of the class CFscActionUtils. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
// INCLUDES |
|
20 |
#include "emailtrace.h" |
|
21 |
#include <e32std.h> |
|
22 |
#include <e32property.h> |
|
23 |
#include <StringLoader.h> |
|
24 |
#include <commonphoneparser.h> |
|
25 |
#include <featmgr.h> |
|
26 |
#include <aknnotewrappers.h> |
|
27 |
#include <AknsSkinInstance.h> |
|
28 |
#include <AknsUtils.h> |
|
29 |
#include <eikapp.h> |
|
30 |
#include <apgcli.h> |
|
31 |
#include <centralrepository.h> |
|
32 |
#include <CoreApplicationUIsSDKCRKeys.h> |
|
33 |
#include <settingsinternalcrkeys.h> |
|
34 |
#include <crcseprofileregistry.h> |
|
35 |
#include <NetworkHandlingDomainPSKeys.h> |
|
36 |
#include <MVPbkStoreContact.h> |
|
37 |
#include <MVPbkStoreContactFieldCollection.h> |
|
38 |
#include <MVPbkStoreContactField.h> |
|
39 |
#include <MVPbkFieldType.h> |
|
40 |
#include <TVPbkFieldVersitProperty.h> |
|
41 |
#include <MVPbkContactFieldData.h> |
|
42 |
#include <MVPbkContactFieldTextData.h> |
|
43 |
#include "fscactionplugincrkeys.h" |
|
44 |
#include "fsccontactactionservicedefines.h" |
|
45 |
#include <FscActionUtils.rsg> |
|
46 |
#include <barsread.h> |
|
47 |
#include <Pbk2ContactNameFormatterFactory.h> |
|
48 |
#include <MPbk2ContactNameFormatter.h> |
|
49 |
#include <CPbk2SortOrderManager.h> |
|
50 |
#include <CVPbkContactManager.h> |
|
51 |
#include <MPbk2FieldProperty.h> |
|
52 |
#include <CVPbkFieldTypeSelector.h> |
|
53 |
#include <CVPbkFieldFilter.h> |
|
54 |
#include <commonphoneparser.h> |
|
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
55 |
#include <bautils.h> |
64 | 56 |
#include <data_caging_path_literals.hrh> |
57 |
#include "cfscactionutils.h" |
|
58 |
#include "cfsccontactaction.h" |
|
59 |
#include "mfscreasoncallback.h" |
|
60 |
#include <VPbkFieldType.hrh> |
|
61 |
#include "FscPresentationUtils.h" |
|
62 |
#include "CFscFieldPropertyArray.h" |
|
63 |
#include "TFscAddressSelectParams.h" |
|
64 |
#include "CFscAddressSelect.h" |
|
65 |
||
66 |
||
67 |
// CONSTANTS DECLARATIONS |
|
68 |
const TUid KPoCOmaServerUid = |
|
69 |
{ |
|
70 |
0x102071C4 |
|
71 |
}; |
|
72 |
||
73 |
// Unnamed namespace |
|
74 |
namespace { |
|
75 |
// These values come from cfsccallpluginimpl.cpp |
|
76 |
const TInt KMaxConfIdLen = 32; |
|
77 |
const TInt KMaxConfPinLen = 32; |
|
78 |
} |
|
79 |
||
80 |
const TUint32 KPoCDefaultSettings = 0x199; |
|
81 |
||
82 |
const TInt KMaxLengthOfNumber = 100; |
|
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
83 |
const TInt KMaxLengthOfAddrData = 255; |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
84 |
const TInt KMaxLengthOfName = 256; // same as max addr len + extra whitespace |
64 | 85 |
|
86 |
_LIT( KSpace, " " ); |
|
87 |
_LIT( KFscRscFileName, "fscactionutils.rsc" ); |
|
88 |
||
89 |
// ======== MEMBER FUNCTIONS ======== |
|
90 |
||
91 |
// --------------------------------------------------------------------------- |
|
92 |
// CFscActionUtils::NewL |
|
93 |
// --------------------------------------------------------------------------- |
|
94 |
// |
|
95 |
CFscActionUtils* CFscActionUtils::NewL( CVPbkContactManager& aContactManager ) |
|
96 |
{ |
|
97 |
FUNC_LOG; |
|
98 |
CFscActionUtils* self = CFscActionUtils::NewLC( aContactManager ); |
|
99 |
CleanupStack::Pop( self ); |
|
100 |
return self; |
|
101 |
} |
|
102 |
||
103 |
// --------------------------------------------------------------------------- |
|
104 |
// CFscActionUtils::NewLC |
|
105 |
// --------------------------------------------------------------------------- |
|
106 |
// |
|
107 |
CFscActionUtils* CFscActionUtils::NewLC( |
|
108 |
CVPbkContactManager& aContactManager ) |
|
109 |
{ |
|
110 |
FUNC_LOG; |
|
111 |
CFscActionUtils* self = new ( ELeave ) CFscActionUtils( aContactManager ); |
|
112 |
CleanupStack::PushL( self ); |
|
113 |
self->ConstructL(); |
|
114 |
return self; |
|
115 |
} |
|
116 |
||
117 |
// --------------------------------------------------------------------------- |
|
118 |
// CFscActionUtils::~CFscActionUtils |
|
119 |
// --------------------------------------------------------------------------- |
|
120 |
// |
|
121 |
CFscActionUtils::~CFscActionUtils() |
|
122 |
{ |
|
123 |
FUNC_LOG; |
|
124 |
delete iRep; |
|
125 |
if ( iRCSEProfileRegistry != NULL ) |
|
126 |
{ |
|
127 |
delete iRCSEProfileRegistry; |
|
128 |
} |
|
129 |
} |
|
130 |
||
131 |
// --------------------------------------------------------------------------- |
|
132 |
// CFscActionUtils::ContactManager |
|
133 |
// --------------------------------------------------------------------------- |
|
134 |
// |
|
135 |
CVPbkContactManager& CFscActionUtils::ContactManager() |
|
136 |
{ |
|
137 |
FUNC_LOG; |
|
138 |
return iContactManager; |
|
139 |
} |
|
140 |
||
141 |
// --------------------------------------------------------------------------- |
|
142 |
// CFscActionUtils::ShowInfoNoteL |
|
143 |
// --------------------------------------------------------------------------- |
|
144 |
// |
|
145 |
void CFscActionUtils::ShowInfoNoteL( TInt aNote, const HBufC* aContactName ) |
|
146 |
{ |
|
147 |
FUNC_LOG; |
|
148 |
HBufC* noteText = NULL; |
|
149 |
||
150 |
TInt offset = FindAndAddResourceFileL(); |
|
151 |
||
152 |
if ( aContactName ) |
|
153 |
{ |
|
154 |
noteText = StringLoader::LoadL( aNote, *aContactName ); |
|
155 |
} |
|
156 |
else |
|
157 |
{ |
|
158 |
noteText = StringLoader::LoadL( aNote ); |
|
159 |
} |
|
160 |
||
161 |
CleanupStack::PushL( noteText ); |
|
162 |
CAknInformationNote* infoNote = |
|
163 |
new ( ELeave ) CAknInformationNote( ETrue ); |
|
164 |
infoNote->ExecuteLD( *noteText ); |
|
165 |
CleanupStack::PopAndDestroy( noteText ); |
|
166 |
CCoeEnv::Static()->DeleteResourceFile( offset ); |
|
167 |
} |
|
168 |
||
169 |
// --------------------------------------------------------------------------- |
|
170 |
// CFscActionUtils::ShowInfoNoteL |
|
171 |
// --------------------------------------------------------------------------- |
|
172 |
// |
|
173 |
void CFscActionUtils::ShowInfoNoteL( TInt aNote, TInt aCounter ) |
|
174 |
{ |
|
175 |
FUNC_LOG; |
|
176 |
HBufC* noteText = NULL; |
|
177 |
||
178 |
TInt offset = FindAndAddResourceFileL(); |
|
179 |
||
180 |
noteText = StringLoader::LoadL( aNote, aCounter ); |
|
181 |
||
182 |
CleanupStack::PushL( noteText ); |
|
183 |
CAknInformationNote* infoNote = |
|
184 |
new ( ELeave ) CAknInformationNote( ETrue ); |
|
185 |
infoNote->ExecuteLD( *noteText ); |
|
186 |
CleanupStack::PopAndDestroy( noteText ); |
|
187 |
CCoeEnv::Static()->DeleteResourceFile( offset ); |
|
188 |
} |
|
189 |
||
190 |
// --------------------------------------------------------------------------- |
|
191 |
// CFscActionUtils::ShowCnfNoteL |
|
192 |
// --------------------------------------------------------------------------- |
|
193 |
// |
|
194 |
void CFscActionUtils::ShowCnfNoteL( TInt aNote, const HBufC* aName ) |
|
195 |
{ |
|
196 |
FUNC_LOG; |
|
197 |
||
198 |
TInt offset = FindAndAddResourceFileL(); |
|
199 |
||
200 |
HBufC* noteText = NULL; |
|
201 |
||
202 |
if ( aName ) |
|
203 |
{ |
|
204 |
noteText = StringLoader::LoadL( aNote, *aName ); |
|
205 |
} |
|
206 |
else |
|
207 |
{ |
|
208 |
noteText = StringLoader::LoadL( aNote ); |
|
209 |
} |
|
210 |
||
211 |
CleanupStack::PushL( noteText ); |
|
212 |
CAknConfirmationNote* cnfNote = |
|
213 |
new ( ELeave ) CAknConfirmationNote( ETrue ); |
|
214 |
cnfNote->ExecuteLD( *noteText ); |
|
215 |
CleanupStack::PopAndDestroy( noteText ); |
|
216 |
||
217 |
CCoeEnv::Static()->DeleteResourceFile( offset ); |
|
218 |
||
219 |
} |
|
220 |
||
221 |
// --------------------------------------------------------------------------- |
|
222 |
// CFscActionUtils::ShowNumberMissingDialogL |
|
223 |
// --------------------------------------------------------------------------- |
|
224 |
// |
|
225 |
TInt CFscActionUtils::ShowNumberMissingNoteL( TInt aMissingCount, |
|
226 |
TInt aTotalCount, TInt aNote, TInt aDialog ) |
|
227 |
{ |
|
228 |
FUNC_LOG; |
|
229 |
||
230 |
// Add two numbers aMissingCount and aTotalCount to queryText |
|
231 |
CArrayFix<TInt>* numbers = new( ELeave ) CArrayFixFlat<TInt>( 2 ); |
|
232 |
CleanupStack::PushL( numbers ); |
|
233 |
numbers->AppendL( aMissingCount ); |
|
234 |
numbers->AppendL( aTotalCount ); |
|
235 |
||
236 |
HBufC* queryText = StringLoader::LoadLC( aNote, *numbers ); |
|
237 |
||
238 |
CAknQueryDialog *queryDlg = new ( ELeave ) CAknQueryDialog(); |
|
239 |
CleanupStack::PushL( queryDlg ); |
|
240 |
queryDlg->SetPromptL( *queryText ); |
|
241 |
CleanupStack::Pop( queryDlg ); |
|
242 |
CleanupStack::PopAndDestroy( queryText ); |
|
243 |
CleanupStack::PopAndDestroy( numbers ); |
|
244 |
||
245 |
TInt ret = queryDlg->ExecuteLD( aDialog ); |
|
246 |
||
247 |
return ret; |
|
248 |
} |
|
249 |
||
250 |
// --------------------------------------------------------------------------- |
|
251 |
// CFscActionUtils::GetContactNameL |
|
252 |
// --------------------------------------------------------------------------- |
|
253 |
HBufC* CFscActionUtils::GetContactNameL( MVPbkStoreContact& aStoreContact ) |
|
254 |
{ |
|
255 |
FUNC_LOG; |
|
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
256 |
|
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
257 |
TBuf<KMaxLengthOfName> contactName; |
64 | 258 |
|
259 |
TInt offset = FindAndAddResourceFileL(); |
|
260 |
||
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
261 |
TInt err( KErrNone ); |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
262 |
TRAP( err, AppendFieldToContactL( |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
263 |
contactName, R_FSC_FIRST_NAME_SELECTOR, aStoreContact ) ); |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
264 |
if ( err == KErrNone ) |
64 | 265 |
{ |
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
266 |
TRAP( err, AppendFieldToContactL( |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
267 |
contactName, R_FSC_LAST_NAME_SELECTOR, aStoreContact, |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
268 |
ETrue ) ); |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
269 |
} |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
270 |
if ( err == KErrNone && contactName.Length() <= 0 ) |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
271 |
{ |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
272 |
// If no first or last name was found, try to append company name |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
273 |
TRAP_IGNORE( AppendFieldToContactL( |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
274 |
contactName, R_FSC_COMPANY_NAME_SELECTOR, aStoreContact ) ); |
64 | 275 |
} |
276 |
||
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
277 |
// If there was an error or the contact name is zero length, use |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
278 |
// pre-defined unnamed string instead.. |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
279 |
if ( err != KErrNone || contactName.Length() <= 0 ) |
64 | 280 |
{ |
281 |
HBufC* unnamed = StringLoader::LoadL( R_QTN_FS_UNNAMED ); |
|
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
282 |
contactName.Zero(); |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
283 |
contactName.Append( *unnamed ); |
64 | 284 |
delete unnamed; |
285 |
} |
|
286 |
CCoeEnv::Static()->DeleteResourceFile( offset ); |
|
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
287 |
return contactName.AllocL(); |
64 | 288 |
} |
289 |
||
290 |
// --------------------------------------------------------------------------- |
|
291 |
// CFscActionUtils::OpenSelectDialogL |
|
292 |
// --------------------------------------------------------------------------- |
|
293 |
// |
|
294 |
MVPbkStoreContactField* CFscActionUtils::OpenSelectDialogL( TInt aResourceId, |
|
295 |
MVPbkStoreContact& aStoreContact ) |
|
296 |
{ |
|
297 |
FUNC_LOG; |
|
298 |
// Create sort order manager |
|
299 |
CPbk2SortOrderManager* sortOrderManager = |
|
300 |
CPbk2SortOrderManager::NewL( iContactManager.FieldTypes() ); |
|
301 |
CleanupStack::PushL( sortOrderManager ); |
|
302 |
||
303 |
// Create name formatter |
|
304 |
MPbk2ContactNameFormatter* nameFormatter = |
|
305 |
Pbk2ContactNameFormatterFactory::CreateL( |
|
306 |
iContactManager.FieldTypes(), *sortOrderManager ); |
|
307 |
||
308 |
CFscFieldPropertyArray* fieldProperties = |
|
309 |
CFscFieldPropertyArray::NewL( iContactManager.FieldTypes() ); |
|
310 |
||
311 |
TInt offset = FindAndAddResourceFileL(); |
|
312 |
||
313 |
// Create resource reader for new resource |
|
314 |
TResourceReader resReader; |
|
315 |
||
316 |
CCoeEnv::Static()->CreateResourceReaderLC( resReader, |
|
317 |
aResourceId ); |
|
318 |
||
319 |
TFscAddressSelectParams params( aStoreContact, iContactManager, |
|
320 |
*nameFormatter, *fieldProperties, resReader ); |
|
321 |
||
322 |
RVPbkContactFieldDefaultPriorities defaultPrioritiesArray; |
|
323 |
||
324 |
switch ( aResourceId ) |
|
325 |
{ |
|
326 |
case R_FSC_PHONE_NUMBER_SELECT: |
|
327 |
{ |
|
328 |
defaultPrioritiesArray.Append( EVPbkDefaultTypePhoneNumber ); |
|
329 |
// Launch call directly using default values. |
|
330 |
params.SetUseDefaultDirectly( ETrue ); |
|
331 |
break; |
|
332 |
} |
|
333 |
||
334 |
case R_FSC_VIDEO_NUMBER_SELECT: |
|
335 |
{ |
|
336 |
defaultPrioritiesArray.Append( EVPbkDefaultTypeVideoNumber ); |
|
337 |
// Launch call directly using default values. |
|
338 |
params.SetUseDefaultDirectly( ETrue ); |
|
339 |
break; |
|
340 |
} |
|
341 |
||
342 |
case R_FSC_VOIP_SELECT: |
|
343 |
{ |
|
344 |
defaultPrioritiesArray.Append( EVPbkDefaultTypeVoIP ); |
|
345 |
// Launch call directly using default values. |
|
346 |
params.SetUseDefaultDirectly( ETrue ); |
|
347 |
break; |
|
348 |
} |
|
349 |
||
350 |
case R_FSC_PTT_SELECT: |
|
351 |
{ |
|
352 |
defaultPrioritiesArray.Append( EVPbkDefaultTypePOC ); |
|
353 |
// Launch call directly using default values. |
|
354 |
params.SetUseDefaultDirectly( ETrue ); |
|
355 |
break; |
|
356 |
} |
|
357 |
||
358 |
case R_FSC_MSG_SELECT: |
|
359 |
{ |
|
360 |
defaultPrioritiesArray.Append( EVPbkDefaultTypeSms ); |
|
361 |
defaultPrioritiesArray.Append( EVPbkDefaultTypeMms ); |
|
362 |
params.SetUseDefaultDirectly( ETrue ); |
|
363 |
break; |
|
364 |
} |
|
365 |
||
366 |
case R_FSC_EMAIL_SELECT: |
|
367 |
{ |
|
368 |
defaultPrioritiesArray.Append( EVPbkDefaultTypeEmail ); |
|
369 |
params.SetUseDefaultDirectly( ETrue ); |
|
370 |
break; |
|
371 |
} |
|
372 |
||
373 |
default: |
|
374 |
{ |
|
375 |
User::Leave( KErrArgument ); |
|
376 |
break; |
|
377 |
} |
|
378 |
} |
|
379 |
||
380 |
params.SetDefaultPriorities( defaultPrioritiesArray ); |
|
381 |
||
382 |
// Create select dialog |
|
383 |
delete iAddressSelect; |
|
384 |
iAddressSelect = NULL; |
|
385 |
iAddressSelect = CFscAddressSelect::NewL( params ); |
|
386 |
// Run select dialog |
|
387 |
MVPbkStoreContactField* selectedField = iAddressSelect->ExecuteLD(); |
|
388 |
iAddressSelect = NULL; |
|
389 |
||
390 |
defaultPrioritiesArray.Close(); |
|
391 |
CleanupStack::PopAndDestroy(); //resReader |
|
392 |
CCoeEnv::Static()->DeleteResourceFile( offset ); |
|
393 |
delete fieldProperties; |
|
394 |
delete nameFormatter; |
|
395 |
CleanupStack::PopAndDestroy( sortOrderManager ); |
|
396 |
||
397 |
return selectedField; |
|
398 |
} |
|
399 |
||
400 |
// --------------------------------------------------------------------------- |
|
401 |
// CFscActionUtils::GetVoiceCallNumberL |
|
402 |
// --------------------------------------------------------------------------- |
|
403 |
// |
|
404 |
TInt CFscActionUtils::GetVoiceCallNumberL( MVPbkStoreContact& aStoreContact, |
|
405 |
TDes& aNumber ) |
|
406 |
{ |
|
407 |
FUNC_LOG; |
|
408 |
aNumber.Zero(); |
|
409 |
||
410 |
if( !IsContactNumberAvailableL( aStoreContact, ETypeVoiceCallNumber ) ) |
|
411 |
{ |
|
412 |
return KErrNotFound; |
|
413 |
} |
|
414 |
||
415 |
TInt ret = KErrNone; |
|
416 |
||
417 |
// open select dialog for voice call number |
|
418 |
MVPbkStoreContactField* selectedField = OpenSelectDialogL( |
|
419 |
R_FSC_PHONE_NUMBER_SELECT, aStoreContact ); |
|
420 |
||
421 |
// If select number dialog was cancelled, we will return KErrCancel |
|
422 |
if ( !selectedField ) |
|
423 |
{ |
|
424 |
ret = KErrCancel; |
|
425 |
} |
|
426 |
else |
|
427 |
{ |
|
428 |
// Else, copy phone number to the aNubmer argument |
|
429 |
TPtrC phoneNumberFieldData = MVPbkContactFieldTextData::Cast( |
|
430 |
selectedField->FieldData() ).Text(); |
|
431 |
||
432 |
// Copy number from selected field |
|
433 |
if ( phoneNumberFieldData.Length() ) |
|
434 |
{ |
|
435 |
aNumber.Copy( phoneNumberFieldData ); |
|
436 |
} |
|
437 |
||
438 |
// Format phone number |
|
439 |
CommonPhoneParser::ParsePhoneNumber( aNumber, |
|
440 |
CommonPhoneParser::EPlainPhoneNumber ); |
|
441 |
} |
|
442 |
||
443 |
// Destroy objects |
|
444 |
delete selectedField; |
|
445 |
||
446 |
return ret; |
|
447 |
} |
|
448 |
||
449 |
// --------------------------------------------------------------------------- |
|
450 |
// CFscActionUtils::GetVideoCallNumberL |
|
451 |
// --------------------------------------------------------------------------- |
|
452 |
// |
|
453 |
TInt CFscActionUtils::GetVideoCallNumberL( MVPbkStoreContact& aStoreContact, |
|
454 |
TDes& aNumber ) |
|
455 |
{ |
|
456 |
FUNC_LOG; |
|
457 |
||
458 |
if( !IsContactNumberAvailableL( aStoreContact, ETypeVideoCallNumber ) ) |
|
459 |
{ |
|
460 |
return KErrNotFound; |
|
461 |
} |
|
462 |
||
463 |
aNumber.Zero(); |
|
464 |
TInt ret = KErrNone; |
|
465 |
||
466 |
// open select dialog for video call number |
|
467 |
MVPbkStoreContactField* selectedField = OpenSelectDialogL( |
|
468 |
R_FSC_VIDEO_NUMBER_SELECT, aStoreContact ); |
|
469 |
||
470 |
// If select number dialog was cancelled, we will return KErrCancel |
|
471 |
if ( !selectedField ) |
|
472 |
{ |
|
473 |
ret = KErrCancel; |
|
474 |
} |
|
475 |
else |
|
476 |
{ |
|
477 |
// Else, copy phone number to the aNubmer argument |
|
478 |
TPtrC phoneNumberFieldData = MVPbkContactFieldTextData::Cast( |
|
479 |
selectedField->FieldData() ).Text(); |
|
480 |
||
481 |
// Copy number from selected field |
|
482 |
if ( phoneNumberFieldData.Length() ) |
|
483 |
{ |
|
484 |
aNumber.Copy( phoneNumberFieldData ); |
|
485 |
} |
|
486 |
||
487 |
// Format phone number |
|
488 |
CommonPhoneParser::ParsePhoneNumber( aNumber, |
|
489 |
CommonPhoneParser::EPlainPhoneNumber ); |
|
490 |
} |
|
491 |
||
492 |
// Destroy objects |
|
493 |
delete selectedField; |
|
494 |
||
495 |
return ret; |
|
496 |
} |
|
497 |
||
498 |
// --------------------------------------------------------------------------- |
|
499 |
// CFscActionUtils::GetVoipAddressL |
|
500 |
// --------------------------------------------------------------------------- |
|
501 |
// |
|
502 |
TInt CFscActionUtils::GetVoipAddressL( MVPbkStoreContact& aStoreContact, |
|
503 |
TDes& aVoipAddress ) |
|
504 |
{ |
|
505 |
FUNC_LOG; |
|
506 |
||
507 |
if( !IsContactNumberAvailableL( aStoreContact, ETypeInternetTel ) ) |
|
508 |
{ |
|
509 |
return KErrNotFound; |
|
510 |
} |
|
511 |
||
512 |
aVoipAddress.Zero(); |
|
513 |
TInt ret = KErrNone; |
|
514 |
||
515 |
// open select dialog for voip address |
|
516 |
MVPbkStoreContactField* selectedField = OpenSelectDialogL( |
|
517 |
R_FSC_VOIP_SELECT, aStoreContact ); |
|
518 |
||
519 |
// If select VOIP address dialog was cancelled, we will return KErrCancel |
|
520 |
if ( !selectedField ) |
|
521 |
{ |
|
522 |
ret = KErrCancel; |
|
523 |
} |
|
524 |
else |
|
525 |
{ |
|
526 |
// Copy VOIP address from selected field |
|
527 |
TPtrC voipAddress = MVPbkContactFieldTextData::Cast( |
|
528 |
selectedField->FieldData() ).Text(); |
|
529 |
||
530 |
if ( voipAddress.Length() ) |
|
531 |
{ |
|
532 |
aVoipAddress.Copy( voipAddress ); |
|
533 |
} |
|
534 |
else |
|
535 |
{ |
|
536 |
ret = KErrNotFound; |
|
537 |
} |
|
538 |
} |
|
539 |
||
540 |
// Format phone number |
|
541 |
CommonPhoneParser::ParsePhoneNumber( aVoipAddress, |
|
542 |
CommonPhoneParser::EPlainPhoneNumber ); |
|
543 |
||
544 |
// Destroy objects |
|
545 |
delete selectedField; |
|
546 |
||
547 |
return ret; |
|
548 |
} |
|
549 |
||
550 |
// --------------------------------------------------------------------------- |
|
551 |
// CFscActionUtils::GetConfInfoL |
|
552 |
// --------------------------------------------------------------------------- |
|
553 |
// |
|
554 |
TInt CFscActionUtils::GetConfInfoL( MVPbkStoreContact& aStoreContact, |
|
555 |
TDes& aConfNum, TDes& aConfId, TDes& aConfPin ) |
|
556 |
{ |
|
557 |
FUNC_LOG; |
|
558 |
aConfNum.Zero(); |
|
559 |
aConfId.Zero(); |
|
560 |
aConfPin.Zero(); |
|
561 |
||
562 |
if( !IsContactNumberAvailableL( aStoreContact, ETypeConfNumber ) ) |
|
563 |
{ |
|
564 |
return KErrNotFound; |
|
565 |
} |
|
566 |
||
567 |
TInt ret = KErrNone; |
|
568 |
||
569 |
// Search for conference number |
|
570 |
TInt offset = FindAndAddResourceFileL(); |
|
571 |
TResourceReader selectorReader; |
|
572 |
CCoeEnv::Static()->CreateResourceReaderLC( selectorReader, |
|
573 |
R_FSC_CONF_NUMBER_SELECTOR ); |
|
574 |
||
575 |
CVPbkFieldTypeSelector* fieldTypeSelector = CVPbkFieldTypeSelector::NewL( |
|
576 |
selectorReader, iContactManager.FieldTypes() ); |
|
577 |
CleanupStack::PopAndDestroy(); // selectorReader |
|
578 |
||
579 |
CVPbkFieldFilter::TConfig config( |
|
580 |
const_cast<MVPbkStoreContactFieldCollection&> ( |
|
581 |
aStoreContact.Fields() ), fieldTypeSelector, NULL ); |
|
582 |
||
583 |
CVPbkFieldFilter* fieldFilter = CVPbkFieldFilter::NewL( config ); |
|
584 |
TInt fieldCount = fieldFilter->FieldCount(); |
|
585 |
const MVPbkStoreContactField* field = NULL; |
|
586 |
if ( fieldCount == 1 ) |
|
587 |
{ |
|
588 |
field = fieldFilter->FieldAtLC(0); |
|
589 |
aConfNum.Append( MVPbkContactFieldTextData::Cast( |
|
590 |
field->FieldData() ).Text() ); |
|
591 |
CleanupStack::PopAndDestroy();//field |
|
592 |
} |
|
593 |
||
594 |
delete fieldFilter; |
|
595 |
fieldFilter = NULL; |
|
596 |
delete fieldTypeSelector; |
|
597 |
fieldTypeSelector = NULL; |
|
598 |
||
599 |
// if conference number field exists but no number set |
|
600 |
if ( !( CommonPhoneParser::IsValidPhoneNumber( aConfNum, |
|
601 |
CommonPhoneParser::EContactCardNumber ) ) ) |
|
602 |
{ |
|
603 |
return KErrNotFound; |
|
604 |
} |
|
605 |
||
606 |
// Search for conference id |
|
607 |
CCoeEnv::Static()->CreateResourceReaderLC( selectorReader, |
|
608 |
R_FSC_CONF_ID_SELECTOR ); |
|
609 |
||
610 |
fieldTypeSelector = CVPbkFieldTypeSelector::NewL( |
|
611 |
selectorReader, iContactManager.FieldTypes() ); |
|
612 |
CleanupStack::PopAndDestroy(); // selectorReader |
|
613 |
config.iFieldSelector = fieldTypeSelector; |
|
614 |
||
615 |
fieldFilter = CVPbkFieldFilter::NewL( config ); |
|
616 |
fieldCount = fieldFilter->FieldCount(); |
|
617 |
field = NULL; |
|
618 |
||
619 |
if ( fieldCount == 1 ) |
|
620 |
{ |
|
621 |
field = fieldFilter->FieldAtLC(0); |
|
622 |
const TDesC& confIdData = MVPbkContactFieldTextData::Cast( |
|
623 |
field->FieldData() ).Text(); |
|
624 |
if ( confIdData.Length() <= KMaxConfIdLen ) |
|
625 |
{ |
|
626 |
aConfId.Append( confIdData ); |
|
627 |
} |
|
628 |
else |
|
629 |
{ |
|
630 |
aConfId = KNullDesC; |
|
631 |
} |
|
632 |
CleanupStack::PopAndDestroy();//field |
|
633 |
if ( !( CommonPhoneParser::IsValidPhoneNumber( aConfId, |
|
634 |
CommonPhoneParser::EContactCardNumber ) ) ) |
|
635 |
{ |
|
636 |
aConfId = KNullDesC; |
|
637 |
} |
|
638 |
} |
|
639 |
||
640 |
delete fieldFilter; |
|
641 |
fieldFilter = NULL; |
|
642 |
delete fieldTypeSelector; |
|
643 |
fieldTypeSelector = NULL; |
|
644 |
||
645 |
// Search for conference id |
|
646 |
CCoeEnv::Static()->CreateResourceReaderLC( selectorReader, |
|
647 |
R_FSC_CONF_PIN_SELECTOR ); |
|
648 |
||
649 |
fieldTypeSelector = CVPbkFieldTypeSelector::NewL( |
|
650 |
selectorReader, iContactManager.FieldTypes() ); |
|
651 |
CleanupStack::PopAndDestroy(); // selectorReader |
|
652 |
config.iFieldSelector = fieldTypeSelector; |
|
653 |
||
654 |
fieldFilter = CVPbkFieldFilter::NewL( config ); |
|
655 |
fieldCount = fieldFilter->FieldCount(); |
|
656 |
field = NULL; |
|
657 |
if ( fieldCount == 1 ) |
|
658 |
{ |
|
659 |
field = fieldFilter->FieldAtLC(0); |
|
660 |
const TDesC& confPinData = MVPbkContactFieldTextData::Cast( |
|
661 |
field->FieldData() ).Text(); |
|
662 |
if ( confPinData.Length() <= KMaxConfPinLen ) |
|
663 |
{ |
|
664 |
aConfPin.Append( confPinData ); |
|
665 |
} |
|
666 |
else |
|
667 |
{ |
|
668 |
aConfPin = KNullDesC; |
|
669 |
} |
|
670 |
CleanupStack::PopAndDestroy();//field |
|
671 |
if ( !( CommonPhoneParser::IsValidPhoneNumber( aConfPin, |
|
672 |
CommonPhoneParser::EContactCardNumber ) ) ) |
|
673 |
{ |
|
674 |
aConfPin = KNullDesC; |
|
675 |
} |
|
676 |
} |
|
677 |
||
678 |
delete fieldFilter; |
|
679 |
fieldFilter = NULL; |
|
680 |
delete fieldTypeSelector; |
|
681 |
fieldTypeSelector = NULL; |
|
682 |
||
683 |
CCoeEnv::Static()->DeleteResourceFile( offset ); |
|
684 |
||
685 |
||
686 |
return ret; |
|
687 |
} |
|
688 |
||
689 |
// --------------------------------------------------------------------------- |
|
690 |
// CFscActionUtils::GetPocAddressL |
|
691 |
// --------------------------------------------------------------------------- |
|
692 |
// |
|
693 |
TInt CFscActionUtils::GetPocAddressL( MVPbkStoreContact& aStoreContact, |
|
694 |
TDes& aPocAddress ) |
|
695 |
{ |
|
696 |
FUNC_LOG; |
|
697 |
||
698 |
if( !IsContactNumberAvailableL( aStoreContact, ETypePttNumber ) ) |
|
699 |
{ |
|
700 |
return KErrNotFound; |
|
701 |
} |
|
702 |
||
703 |
aPocAddress.Zero(); |
|
704 |
TInt ret = KErrNone; |
|
705 |
||
706 |
// open select dialog for poc address |
|
707 |
MVPbkStoreContactField* selectedField = OpenSelectDialogL( |
|
708 |
R_FSC_PTT_SELECT, aStoreContact ); |
|
709 |
||
710 |
// If select POC address dialog was cancelled, we will return KErrCancel |
|
711 |
if ( !selectedField ) |
|
712 |
{ |
|
713 |
ret = KErrCancel; |
|
714 |
} |
|
715 |
else |
|
716 |
{ |
|
717 |
// Else, copy POC address to the aPocAddress argument |
|
718 |
TPtrC pocAddress = MVPbkContactFieldTextData::Cast( |
|
719 |
selectedField->FieldData() ).Text(); |
|
720 |
||
721 |
// Copy POC address from selected field |
|
722 |
if ( pocAddress.Length() ) |
|
723 |
{ |
|
724 |
aPocAddress.Copy( pocAddress ); |
|
725 |
} |
|
726 |
else |
|
727 |
{ |
|
728 |
ret = KErrNotFound; |
|
729 |
} |
|
730 |
} |
|
731 |
||
732 |
// Destroy objects |
|
733 |
delete selectedField; |
|
734 |
||
735 |
return ret; |
|
736 |
} |
|
737 |
||
738 |
// --------------------------------------------------------------------------- |
|
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
739 |
// CFscActionUtils::GetMessageAddressL |
64 | 740 |
// --------------------------------------------------------------------------- |
741 |
// |
|
742 |
TInt CFscActionUtils::GetMessageAddressL( MVPbkStoreContact& aStoreContact, |
|
743 |
TDes& aMsgAddress ) |
|
744 |
{ |
|
745 |
FUNC_LOG; |
|
746 |
||
747 |
if( !IsContactNumberAvailableL( aStoreContact, ETypeMsgAddress ) ) |
|
748 |
{ |
|
749 |
return KErrNotFound; |
|
750 |
} |
|
751 |
||
752 |
aMsgAddress.Zero(); |
|
753 |
||
754 |
TInt ret = KErrNone; |
|
755 |
||
756 |
// open select dialog for message address |
|
757 |
MVPbkStoreContactField* selectedField = OpenSelectDialogL( |
|
758 |
R_FSC_MSG_SELECT, aStoreContact ); |
|
759 |
||
760 |
// If select message address dialog was cancelled, |
|
761 |
// we will return KErrCancel |
|
762 |
if ( !selectedField ) |
|
763 |
{ |
|
764 |
ret = KErrCancel; |
|
765 |
} |
|
766 |
else |
|
767 |
{ |
|
768 |
// Copy message address from selected field |
|
769 |
TPtrC msgAddress = MVPbkContactFieldTextData::Cast( |
|
770 |
selectedField->FieldData() ).Text(); |
|
771 |
||
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
772 |
if ( msgAddress.Length() && |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
773 |
msgAddress.Length() <= KMaxLengthOfAddrData ) |
64 | 774 |
{ |
775 |
aMsgAddress.Copy( msgAddress ); |
|
776 |
} |
|
777 |
else |
|
778 |
{ |
|
779 |
ret = KErrNotFound; |
|
780 |
} |
|
781 |
} |
|
782 |
||
783 |
// Destroy objects |
|
784 |
delete selectedField; |
|
785 |
||
786 |
return ret; |
|
787 |
} |
|
788 |
||
789 |
// --------------------------------------------------------------------------- |
|
790 |
// CFscActionUtils::GetEmailAddressL |
|
791 |
// --------------------------------------------------------------------------- |
|
792 |
// |
|
793 |
TInt CFscActionUtils::GetEmailAddressL( MVPbkStoreContact& aStoreContact, |
|
794 |
TDes& aEmailAddress ) |
|
795 |
{ |
|
796 |
FUNC_LOG; |
|
797 |
||
798 |
if( !IsContactNumberAvailableL( aStoreContact, ETypeEmailAddress ) ) |
|
799 |
{ |
|
800 |
return KErrNotFound; |
|
801 |
} |
|
802 |
||
803 |
aEmailAddress.Zero(); |
|
804 |
||
805 |
TInt ret = KErrNone; |
|
806 |
||
807 |
// open select dialog for email address |
|
808 |
MVPbkStoreContactField* selectedField = OpenSelectDialogL( |
|
809 |
R_FSC_EMAIL_SELECT, aStoreContact ); |
|
810 |
||
811 |
// If select email address dialog was cancelled, we will return KErrCancel |
|
812 |
if ( !selectedField ) |
|
813 |
{ |
|
814 |
ret = KErrCancel; |
|
815 |
} |
|
816 |
else |
|
817 |
{ |
|
818 |
// Copy email address from selected field |
|
819 |
TPtrC emailAddress = MVPbkContactFieldTextData::Cast( |
|
820 |
selectedField->FieldData() ).Text(); |
|
821 |
||
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
822 |
if ( emailAddress.Length() && |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
823 |
emailAddress.Length() <= KMaxLengthOfAddrData ) |
64 | 824 |
{ |
825 |
aEmailAddress.Copy( emailAddress ); |
|
826 |
} |
|
827 |
else |
|
828 |
{ |
|
829 |
ret = KErrNotFound; |
|
830 |
} |
|
831 |
} |
|
832 |
||
833 |
// Destroy objects |
|
834 |
delete selectedField; |
|
835 |
||
836 |
return ret; |
|
837 |
} |
|
838 |
||
839 |
// --------------------------------------------------------------------------- |
|
840 |
// CFscActionUtils::RemoveInvalidChar |
|
841 |
// --------------------------------------------------------------------------- |
|
842 |
// |
|
843 |
void CFscActionUtils::RemoveInvalidChar( const TDesC& aNumber, |
|
844 |
const TDesC& aValidChars, TDes& aOutNumber ) |
|
845 |
{ |
|
846 |
FUNC_LOG; |
|
847 |
for ( TInt ii = 0; ii < aNumber.Length(); ++ii ) |
|
848 |
{ |
|
849 |
TChar ch = aNumber[ ii ]; |
|
850 |
if ( aValidChars.Locate( ch ) != KErrNotFound ) |
|
851 |
{ |
|
852 |
aOutNumber.Append( ch ); |
|
853 |
} |
|
854 |
} |
|
855 |
} |
|
856 |
||
857 |
// --------------------------------------------------------------------------- |
|
858 |
// CFscActionUtils::IsContactNumberAvailableL |
|
859 |
// --------------------------------------------------------------------------- |
|
860 |
// |
|
861 |
TBool CFscActionUtils::IsContactNumberAvailableL( |
|
862 |
MVPbkStoreContact& aStoreContact, TContactNumberType aContactNumberType ) |
|
863 |
{ |
|
864 |
FUNC_LOG; |
|
865 |
||
866 |
TBool available( EFalse ); |
|
867 |
||
868 |
// Search for the contact name |
|
869 |
TInt offset = FindAndAddResourceFileL(); |
|
870 |
||
871 |
TResourceReader selectorReader; |
|
872 |
CVPbkFieldTypeSelector* fieldTypeSelector = NULL; |
|
873 |
CVPbkFieldFilter* fieldFilter = NULL; |
|
874 |
TInt selector = 0; |
|
875 |
||
876 |
switch ( aContactNumberType ) |
|
877 |
{ |
|
878 |
case ETypeVoiceCallNumber: |
|
879 |
{ |
|
880 |
selector = R_FSC_PHONENUMBER_SELECTOR; |
|
881 |
} |
|
882 |
break; |
|
883 |
||
884 |
case ETypeVideoCallNumber: |
|
885 |
{ |
|
886 |
selector = R_FSC_VIDEO_SELECTOR; |
|
887 |
} |
|
888 |
break; |
|
889 |
||
890 |
case ETypeConfNumber: |
|
891 |
{ |
|
892 |
selector = R_FSC_CONF_NUMBER_SELECTOR; |
|
893 |
} |
|
894 |
break; |
|
895 |
||
896 |
case ETypeInternetTel: |
|
897 |
{ |
|
898 |
selector = R_FSC_VOIP_SELECTOR; |
|
899 |
} |
|
900 |
break; |
|
901 |
||
902 |
case ETypePttNumber: |
|
903 |
{ |
|
904 |
selector = R_FSC_PTT_SELECTOR; |
|
905 |
} |
|
906 |
break; |
|
907 |
||
908 |
case ETypeMsgAddress: |
|
909 |
{ |
|
910 |
selector = R_FSC_MSG_SELECTOR; |
|
911 |
} |
|
912 |
break; |
|
913 |
||
914 |
case ETypeAudioAddress: |
|
915 |
{ |
|
916 |
selector = R_FSC_MSG_SELECTOR; |
|
917 |
} |
|
918 |
break; |
|
919 |
||
920 |
case ETypeEmailAddress: |
|
921 |
{ |
|
922 |
selector = R_FSC_EMAIL_SELECTOR; |
|
923 |
} |
|
924 |
break; |
|
925 |
||
926 |
default: |
|
927 |
{ |
|
928 |
break; |
|
929 |
} |
|
930 |
} |
|
931 |
||
932 |
if ( selector ) |
|
933 |
{ |
|
934 |
CCoeEnv::Static()->CreateResourceReaderLC( selectorReader, selector ); |
|
935 |
||
936 |
fieldTypeSelector = CVPbkFieldTypeSelector::NewL( selectorReader, |
|
937 |
iContactManager.FieldTypes() ); |
|
938 |
CleanupStack::PopAndDestroy(); // selectorReader |
|
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
939 |
CleanupStack::PushL( fieldTypeSelector ); |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
940 |
|
64 | 941 |
CVPbkFieldFilter::TConfig config( |
942 |
const_cast<MVPbkStoreContactFieldCollection&> ( |
|
943 |
aStoreContact.Fields() ), fieldTypeSelector, NULL); |
|
944 |
||
945 |
fieldFilter = CVPbkFieldFilter::NewL( config ); |
|
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
946 |
CleanupStack::PushL( fieldFilter ); |
64 | 947 |
|
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
948 |
if ( fieldFilter->FieldCount() ) |
64 | 949 |
{ |
950 |
if ( selector == R_FSC_CONF_NUMBER_SELECTOR ) |
|
951 |
{ |
|
952 |
TBuf<KMaxLengthOfNumber> confNum; |
|
953 |
const MVPbkStoreContactField* field = NULL; |
|
954 |
field = fieldFilter->FieldAtLC(0); |
|
955 |
confNum.Append( MVPbkContactFieldTextData::Cast( |
|
956 |
field->FieldData() ).Text() ); |
|
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
957 |
CleanupStack::PopAndDestroy(); // field |
64 | 958 |
|
959 |
if ( CommonPhoneParser::IsValidPhoneNumber( confNum, |
|
960 |
CommonPhoneParser::EContactCardNumber ) ) |
|
961 |
{ |
|
962 |
available = ETrue; |
|
963 |
} |
|
964 |
} |
|
965 |
else |
|
966 |
{ |
|
967 |
available = ETrue; |
|
968 |
} |
|
969 |
} |
|
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
970 |
CleanupStack::PopAndDestroy( 2 ); // fieldFilter, fieldTypeSelector |
64 | 971 |
} |
972 |
||
973 |
CCoeEnv::Static()->DeleteResourceFile( offset ); |
|
974 |
||
975 |
return available; |
|
976 |
} |
|
977 |
||
978 |
// --------------------------------------------------------------------------- |
|
979 |
// CFscActionUtils::Is3GNetworkAvailable |
|
980 |
// --------------------------------------------------------------------------- |
|
981 |
// |
|
982 |
TBool CFscActionUtils::Is3GNetworkAvailable() |
|
983 |
{ |
|
984 |
FUNC_LOG; |
|
985 |
TInt err = KErrNone; |
|
986 |
TBool available( EFalse ); |
|
987 |
||
988 |
TInt networkMode = ENWNetworkModeGsm; |
|
989 |
err = RProperty::Get( KPSUidNetworkInfo, KNWTelephonyNetworkMode, |
|
990 |
networkMode ); |
|
991 |
||
992 |
if ( err == KErrNone && networkMode == ENWNetworkModeWcdma ) |
|
993 |
{ |
|
994 |
available = FeatureManager::FeatureSupported( |
|
995 |
KFeatureIdProtocolWcdma ); |
|
996 |
} |
|
997 |
||
998 |
return available; |
|
999 |
} |
|
1000 |
||
1001 |
// --------------------------------------------------------------------------- |
|
1002 |
// CFscActionUtils::IsOfflineModeL |
|
1003 |
// --------------------------------------------------------------------------- |
|
1004 |
// |
|
1005 |
TBool CFscActionUtils::IsOfflineModeL() |
|
1006 |
{ |
|
1007 |
FUNC_LOG; |
|
1008 |
TBool mode( EFalse ); |
|
1009 |
TInt status = ECoreAppUIsNetworkConnectionAllowed; |
|
1010 |
||
1011 |
CRepository* cenRep = CRepository::NewL( KCRUidCoreApplicationUIs ); |
|
1012 |
if ( cenRep ) |
|
1013 |
{ |
|
1014 |
cenRep->Get( KCoreAppUIsNetworkConnectionAllowed, status ); |
|
1015 |
} |
|
1016 |
delete cenRep; |
|
1017 |
||
1018 |
if ( status == ECoreAppUIsNetworkConnectionNotAllowed ) |
|
1019 |
{ |
|
1020 |
mode = ETrue; |
|
1021 |
} |
|
1022 |
||
1023 |
return mode; |
|
1024 |
} |
|
1025 |
||
1026 |
// --------------------------------------------------------------------------- |
|
1027 |
// CFscActionUtils::IsPttConfiguredL |
|
1028 |
// --------------------------------------------------------------------------- |
|
1029 |
// |
|
1030 |
TBool CFscActionUtils::IsPttConfiguredL() |
|
1031 |
{ |
|
1032 |
FUNC_LOG; |
|
1033 |
||
1034 |
TBool result = EFalse; |
|
1035 |
||
1036 |
// Check configuration status from cenrep. |
|
1037 |
// If configuration status can not be found EFalse is returned. |
|
1038 |
CRepository* cenRep= NULL; |
|
1039 |
TRAPD( err, cenRep = CRepository::NewL( KPoCOmaServerUid ) ) ; |
|
1040 |
if ( err == KErrNone ) |
|
1041 |
{ |
|
1042 |
TInt settingsId; |
|
1043 |
TInt err = cenRep->Get( KPoCDefaultSettings, settingsId ); |
|
1044 |
if ( err == KErrNone ) |
|
1045 |
{ |
|
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1046 |
result = ( settingsId != KErrNotFound ); |
64 | 1047 |
} |
1048 |
delete cenRep; |
|
1049 |
} |
|
1050 |
||
1051 |
return result; |
|
1052 |
} |
|
1053 |
||
1054 |
// --------------------------------------------------------------------------- |
|
1055 |
// CFscActionUtils::IsVoipConfiguredL |
|
1056 |
// --------------------------------------------------------------------------- |
|
1057 |
// |
|
1058 |
TBool CFscActionUtils::IsVoipConfiguredL() |
|
1059 |
{ |
|
1060 |
FUNC_LOG; |
|
1061 |
||
1062 |
TBool configured = EFalse; |
|
1063 |
if ( iRCSEProfileRegistry != NULL ) |
|
1064 |
{ |
|
1065 |
RArray<TUint32> ids; |
|
1066 |
CleanupClosePushL( ids ); |
|
1067 |
iRCSEProfileRegistry->GetAllIdsL( ids ); |
|
1068 |
configured = ids.Count() > 0; |
|
1069 |
CleanupStack::PopAndDestroy( &ids ); |
|
1070 |
} |
|
1071 |
||
1072 |
return configured; |
|
1073 |
} |
|
1074 |
||
1075 |
// --------------------------------------------------------------------------- |
|
1076 |
// CFscActionUtils::SkinIconL |
|
1077 |
// --------------------------------------------------------------------------- |
|
1078 |
// |
|
1079 |
CGulIcon* CFscActionUtils::SkinIconL( TAknsItemID aItemId, |
|
1080 |
const TDesC& aFilename, TInt aFileBitmapId, TInt aFileMaskId ) |
|
1081 |
{ |
|
1082 |
FUNC_LOG; |
|
1083 |
CGulIcon* returnIcon( NULL ); |
|
1084 |
CFbsBitmap* bitmap( NULL ); |
|
1085 |
CFbsBitmap* mask( NULL ); |
|
1086 |
||
1087 |
MAknsSkinInstance* skin = AknsUtils::SkinInstance(); |
|
1088 |
AknsUtils::CreateIconL( skin, aItemId, bitmap, mask, aFilename, |
|
1089 |
aFileBitmapId, aFileMaskId ); |
|
1090 |
||
1091 |
CleanupStack::PushL( mask ); |
|
1092 |
CleanupStack::PushL( bitmap ); |
|
1093 |
returnIcon = CGulIcon::NewL( bitmap, mask ); |
|
1094 |
CleanupStack::Pop( bitmap ); |
|
1095 |
CleanupStack::Pop( mask ); |
|
1096 |
||
1097 |
return returnIcon; |
|
1098 |
} |
|
1099 |
||
1100 |
// --------------------------------------------------------------------------- |
|
1101 |
// CFscActionUtils::ActionPriority |
|
1102 |
// --------------------------------------------------------------------------- |
|
1103 |
// |
|
1104 |
TInt CFscActionUtils::ActionPriority( TUint32 aActionPriorityCrKey, |
|
1105 |
TInt aDefaultPriority ) |
|
1106 |
{ |
|
1107 |
FUNC_LOG; |
|
1108 |
TInt result( 0 ); // some value to escape warning |
|
1109 |
TInt error = KErrNotFound; |
|
1110 |
||
1111 |
if ( iRep != NULL ) |
|
1112 |
{ |
|
1113 |
// Get() returns KErrNone if successful |
|
1114 |
error = iRep->Get( aActionPriorityCrKey, result ); |
|
1115 |
} |
|
1116 |
||
1117 |
if ( error ) |
|
1118 |
{ |
|
1119 |
result = aDefaultPriority; |
|
1120 |
} |
|
1121 |
||
1122 |
return result; |
|
1123 |
} |
|
1124 |
||
1125 |
// --------------------------------------------------------------------------- |
|
1126 |
// CFscActionUtils::CreateActionL |
|
1127 |
// --------------------------------------------------------------------------- |
|
1128 |
// |
|
1129 |
CFscContactAction* CFscActionUtils::CreateActionL( |
|
1130 |
MFscReasonCallback& aReasonCallback, TUid aContactActionUid, |
|
1131 |
TUint64 aActionType, TInt aActionMenuTextResourceId, CGulIcon* aIcon ) |
|
1132 |
{ |
|
1133 |
FUNC_LOG; |
|
1134 |
CFscContactAction* contactAction = CFscContactAction::NewL( |
|
1135 |
aReasonCallback, aContactActionUid, aActionType, |
|
1136 |
aActionMenuTextResourceId, aIcon ); |
|
1137 |
||
1138 |
return contactAction; |
|
1139 |
} |
|
1140 |
||
1141 |
// --------------------------------------------------------------------------- |
|
1142 |
// CFscActionUtils::CFscActionUtils |
|
1143 |
// --------------------------------------------------------------------------- |
|
1144 |
// |
|
1145 |
CFscActionUtils::CFscActionUtils( CVPbkContactManager& aContactManager ) : |
|
1146 |
iContactManager( aContactManager ) |
|
1147 |
{ |
|
1148 |
FUNC_LOG; |
|
1149 |
} |
|
1150 |
||
1151 |
// --------------------------------------------------------------------------- |
|
1152 |
// CFscActionUtils::ConstructL |
|
1153 |
// --------------------------------------------------------------------------- |
|
1154 |
// |
|
1155 |
void CFscActionUtils::ConstructL() |
|
1156 |
{ |
|
1157 |
FUNC_LOG; |
|
1158 |
TRAP_IGNORE( iRep = CRepository::NewL( KCRUidFsContactActionService ) ); |
|
1159 |
||
1160 |
if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) ) |
|
1161 |
{ |
|
1162 |
TRAP_IGNORE( iRCSEProfileRegistry = CRCSEProfileRegistry::NewL() ); |
|
1163 |
} |
|
1164 |
} |
|
1165 |
||
1166 |
// --------------------------------------------------------------------------- |
|
1167 |
// CFscActionUtils::GetFileDir |
|
1168 |
// --------------------------------------------------------------------------- |
|
1169 |
// |
|
1170 |
TPtrC CFscActionUtils::GetFileDirL( const TDesC& aFilePath ) |
|
1171 |
{ |
|
1172 |
FUNC_LOG; |
|
1173 |
if ( iLetterDrive.Size() == 0 ) |
|
1174 |
{ |
|
1175 |
CEikonEnv* eikonEnv = CEikonEnv::Static(); |
|
1176 |
const TUid applUid = eikonEnv->EikAppUi()->Application()->AppDllUid(); |
|
1177 |
RApaLsSession ls; |
|
1178 |
TApaAppInfo appInfo; |
|
1179 |
User::LeaveIfError( ls.Connect() ); |
|
1180 |
User::LeaveIfError( ls.GetAppInfo( appInfo, applUid ) ); |
|
1181 |
// Extract application drive, path, name and extension |
|
1182 |
const TFileName appFullName = appInfo.iFullName; |
|
1183 |
ls.Close(); |
|
1184 |
TParse appNameParse; |
|
1185 |
User::LeaveIfError( appNameParse.Set( appFullName, NULL, NULL ) ); |
|
1186 |
iLetterDrive = appNameParse.Drive(); |
|
1187 |
} |
|
1188 |
TFileName fileName; |
|
1189 |
fileName.Append( iLetterDrive ); |
|
1190 |
fileName.Append( aFilePath ); |
|
1191 |
||
1192 |
return fileName; |
|
1193 |
} |
|
1194 |
||
1195 |
// --------------------------------------------------------------------------- |
|
1196 |
// CFscActionUtils::FindAndAddResourceFileL |
|
1197 |
// --------------------------------------------------------------------------- |
|
1198 |
// |
|
1199 |
TInt CFscActionUtils::FindAndAddResourceFileL() |
|
1200 |
{ |
|
1201 |
FUNC_LOG; |
|
1202 |
TFileName resourceFileName( KDC_RESOURCE_FILES_DIR ); |
|
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1203 |
resourceFileName.Append( KFscRscFileName ); |
64 | 1204 |
BaflUtils::NearestLanguageFile( CCoeEnv::Static()->FsSession(), resourceFileName ); |
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1205 |
return CCoeEnv::Static()->AddResourceFileL( resourceFileName ); |
64 | 1206 |
} |
1207 |
// --------------------------------------------------------------------------- |
|
1208 |
// CFscActionUtils::CloseSelectDialogL |
|
1209 |
// --------------------------------------------------------------------------- |
|
1210 |
// |
|
1211 |
void CFscActionUtils::CloseSelectDialogL() |
|
1212 |
{ |
|
1213 |
FUNC_LOG; |
|
1214 |
if ( iAddressSelect ) |
|
1215 |
{ |
|
1216 |
iAddressSelect->AttemptExitL( EFalse ); |
|
1217 |
} |
|
1218 |
} |
|
1219 |
||
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1220 |
// --------------------------------------------------------------------------- |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1221 |
// CFscActionUtils::AppendFieldToContactL |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1222 |
// --------------------------------------------------------------------------- |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1223 |
// |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1224 |
void CFscActionUtils::AppendFieldToContactL( TDes& aContact, |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1225 |
TInt aFieldResourceId, |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1226 |
MVPbkStoreContact& aStoreContact, |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1227 |
TBool aAddSpace ) |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1228 |
{ |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1229 |
FUNC_LOG; |
64 | 1230 |
|
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1231 |
TResourceReader selectorReader; |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1232 |
CCoeEnv::Static()->CreateResourceReaderLC( selectorReader, |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1233 |
aFieldResourceId ); |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1234 |
|
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1235 |
CVPbkFieldTypeSelector* fieldTypeSelector = CVPbkFieldTypeSelector::NewL( |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1236 |
selectorReader, iContactManager.FieldTypes() ); |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1237 |
CleanupStack::PopAndDestroy(); // selectorReader |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1238 |
CleanupStack::PushL( fieldTypeSelector ); |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1239 |
|
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1240 |
CVPbkFieldFilter::TConfig config( |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1241 |
const_cast<MVPbkStoreContactFieldCollection&> ( |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1242 |
aStoreContact.Fields() ), fieldTypeSelector, NULL ); |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1243 |
|
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1244 |
CVPbkFieldFilter* fieldFilter = CVPbkFieldFilter::NewL( config ); |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1245 |
CleanupStack::PushL( fieldFilter ); |
64 | 1246 |
|
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1247 |
if ( fieldFilter->FieldCount() == 1 ) |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1248 |
{ |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1249 |
if ( aAddSpace && aContact.Length() > 0 ) |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1250 |
{ |
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
70
diff
changeset
|
1251 |
if ( aContact.Length() < KMaxLengthOfName ) |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
70
diff
changeset
|
1252 |
{ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
70
diff
changeset
|
1253 |
aContact.Append( KSpace ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
70
diff
changeset
|
1254 |
} |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
70
diff
changeset
|
1255 |
else |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
70
diff
changeset
|
1256 |
{ |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
70
diff
changeset
|
1257 |
User::Leave( KErrOverflow ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
70
diff
changeset
|
1258 |
} |
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1259 |
} |
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
70
diff
changeset
|
1260 |
MVPbkStoreContactField* field = fieldFilter->FieldAtLC( 0 ); |
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1261 |
TPtrC castFieldText = MVPbkContactFieldTextData::Cast( |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1262 |
field->FieldData() ).Text(); |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1263 |
|
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1264 |
if ( ( aContact.Length() + castFieldText.Length() ) > KMaxLengthOfName ) |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1265 |
{ |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1266 |
User::Leave( KErrOverflow ); |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1267 |
} |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1268 |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
70
diff
changeset
|
1269 |
aContact.Append( castFieldText ); |
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
70
diff
changeset
|
1270 |
CleanupStack::PopAndDestroy( field ); |
70
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1271 |
} |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1272 |
CleanupStack::PopAndDestroy( 2 ); // fieldFilter, fieldTypeSelector |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1273 |
} |
968773a0b6ef
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
1274 |