|
1 /* |
|
2 * Copyright (c) 2006 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 * Provides MMS access point selection dialog |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include <e32base.h> |
|
23 |
|
24 #include <ApSelect.h> |
|
25 #include <ApEngineConsts.h> |
|
26 #include <ApSettingsHandlerUI.h> |
|
27 #include <ApSettingsHandlerCommons.h> |
|
28 |
|
29 #include <mmsapselect.h> |
|
30 |
|
31 // ----------------------------------------------------------------------------- |
|
32 // MmsApSelect::SelectMmsAccessPointL |
|
33 // ----------------------------------------------------------------------------- |
|
34 // |
|
35 EXPORT_C TInt MmsApSelect::SelectMmsAccessPointL( |
|
36 CCommsDatabase& aCommsDb, |
|
37 TUint32 aCurrent, |
|
38 TUint32& aSelected, |
|
39 TInt aBearerFilter ) |
|
40 { |
|
41 TInt taskDone = 0; |
|
42 //Check if there are any APs or not. |
|
43 CApSelect* apSelect = CApSelect::NewLC( |
|
44 aCommsDb, |
|
45 KEApIspTypeMMSMandatory, |
|
46 aBearerFilter, |
|
47 KEApSortNameAscending ); |
|
48 |
|
49 TSelectionListType popupType = apSelect->Count() ? |
|
50 EApSettingsSelListIsPopUpWithNone : |
|
51 EApSettingsSelListIsPopUp; |
|
52 |
|
53 CleanupStack::PopAndDestroy( apSelect ); |
|
54 |
|
55 CApSettingsHandler* apHandler = CApSettingsHandler::NewLC( |
|
56 ETrue, // selecting, not editing |
|
57 popupType, |
|
58 EApSettingsSelMenuSelectNormal, |
|
59 KEApIspTypeMMSMandatory, |
|
60 aBearerFilter, |
|
61 KEApSortNameAscending ); // Not UI specified, but we can live with this. |
|
62 |
|
63 aSelected = KMaxTUint32; // invalid value |
|
64 TRAPD(err,taskDone = apHandler->RunSettingsL( aCurrent, aSelected )) |
|
65 CleanupStack::PopAndDestroy( apHandler ); |
|
66 User::LeaveIfError(err); |
|
67 return taskDone; |
|
68 } |
|
69 |
|
70 // End of File |