|
1 /* |
|
2 * Copyright (c) 2002-2005 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: Container for the Barring folder |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "GSCallBarringPluginContainer.h" |
|
21 |
|
22 #include <aknlists.h> |
|
23 #include <StringLoader.h> |
|
24 #include <GSCallBarringPluginRsc.rsg> |
|
25 #include <csxhelp/cp.hlp.hrh> |
|
26 #include <featmgr.h> |
|
27 #include <gsfwviewuids.h> |
|
28 #include <gslistbox.h> |
|
29 |
|
30 #include <centralrepository.h> |
|
31 #include <settingsinternalcrkeys.h> |
|
32 #if defined(__VOIP) && defined(RD_VOIP_REL_2_2) |
|
33 #include <spsettings.h> |
|
34 #endif // __VOIP && RD_VOIP_REL_2_2 |
|
35 // ========================= MEMBER FUNCTIONS ================================ |
|
36 // --------------------------------------------------------------------------- |
|
37 // |
|
38 // Symbian OS two phased constructor |
|
39 // |
|
40 // --------------------------------------------------------------------------- |
|
41 void CGSCallBarringPluginContainer::ConstructL( const TRect& aRect ) |
|
42 { |
|
43 iListBox = new ( ELeave ) CAknSingleLargeStyleListBox; |
|
44 BaseConstructL( aRect, R_GS_BARR_VIEW_TITLE, R_INTERNET_BARRING_LBX ); |
|
45 |
|
46 #if defined(__VOIP) && defined(RD_VOIP_REL_2_2) |
|
47 iVoIPSupported = EFalse; |
|
48 CSPSettings* spSettings = CSPSettings::NewL(); |
|
49 if ( spSettings->IsFeatureSupported( ESupportVoIPFeature ) && |
|
50 spSettings->IsFeatureSupported( ESupportVoIPSSFeature ) ) |
|
51 { |
|
52 iVoIPSupported = ETrue; |
|
53 } |
|
54 #else // __VOIP && RD_VOIP_REL_2_2 |
|
55 if ( FeatureManager::FeatureSupported ( KFeatureIdCommonVoip ) ) |
|
56 { |
|
57 TInt supported( KGSSettingOff ); |
|
58 CRepository* telephonyrep = |
|
59 CRepository::NewL( KCRUidTelephonySettings ); |
|
60 telephonyrep->Get( KDynamicVoIP, supported ); |
|
61 iVoIPSupported = KGSSettingOff != supported; |
|
62 delete telephonyrep; |
|
63 } |
|
64 #endif // __VOIP && RD_VOIP_REL_2_2 |
|
65 } |
|
66 |
|
67 // --------------------------------------------------------------------------- |
|
68 // |
|
69 // Destructor |
|
70 // |
|
71 // --------------------------------------------------------------------------- |
|
72 CGSCallBarringPluginContainer::~CGSCallBarringPluginContainer() |
|
73 { |
|
74 if ( iListboxItemArray ) |
|
75 { |
|
76 delete iListboxItemArray; |
|
77 } |
|
78 } |
|
79 // --------------------------------------------------------------------------- |
|
80 // |
|
81 // Creates list box |
|
82 // |
|
83 // --------------------------------------------------------------------------- |
|
84 void CGSCallBarringPluginContainer::ConstructListBoxL( TInt aResLbxId ) |
|
85 { |
|
86 iListBox->ConstructL( this ); |
|
87 iListboxItemArray = CGSListBoxItemTextArray::NewL( aResLbxId, |
|
88 *iListBox, *iCoeEnv ); |
|
89 iListBox->Model()->SetItemTextArray( iListboxItemArray ); |
|
90 iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray ); |
|
91 } |
|
92 |
|
93 // --------------------------------------------------------------------------- |
|
94 // CGSCallBarringPluginContainer::GetHelpContext |
|
95 // Gets Help Context |
|
96 // |
|
97 // --------------------------------------------------------------------------- |
|
98 // |
|
99 void CGSCallBarringPluginContainer::GetHelpContext( |
|
100 TCoeHelpContext& aContext ) const |
|
101 { |
|
102 if ( iVoIPSupported ) |
|
103 { |
|
104 aContext.iMajor = KUidGS; |
|
105 aContext.iContext = KDIV_HLP_BARRING_MAIN; |
|
106 } |
|
107 else |
|
108 { |
|
109 aContext.iMajor = KUidGS; |
|
110 aContext.iContext = KSET_HLP_BARRING_SETTINGS; |
|
111 } |
|
112 } |
|
113 //End of File |