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 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MUSFACTROYSETTINGS_INL |
|
20 #define MUSFACTORYSETTINGS_INL |
|
21 |
|
22 |
|
23 #include "musfactorysettings.h" |
|
24 #include "mussettingskeys.h" |
|
25 #include "mussettings.h" |
|
26 #include "muslogger.h" |
|
27 |
|
28 // ----------------------------------------------------------------------------- |
|
29 // Checks from the factory settings ( central repository ) |
|
30 // whether call type is supported. |
|
31 // ----------------------------------------------------------------------------- |
|
32 // |
|
33 inline TBool MusFactorySettings::IsSupportedL( |
|
34 const TPSCTsyCallType& aCallType) |
|
35 { |
|
36 MusSettingsKeys::TAllowedCSOnly allowedCallType = |
|
37 MultimediaSharingSettings::AllowedCSOnlySettingL(); |
|
38 if( allowedCallType == MusSettingsKeys::EAllowedCSOnly && |
|
39 aCallType != EPSCTsyCallTypeCSVoice ) |
|
40 { |
|
41 MUS_LOG( "mus: [MUSAO] <-> MusFactorySettings::IsSupportedL Call : EFalse" ) |
|
42 return EFalse; |
|
43 } |
|
44 MUS_LOG( "mus: [MUSAO] <-> MusFactorySettings::IsSupportedL Call : ETrue" ) |
|
45 return ETrue; |
|
46 } |
|
47 |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // Checks from the factory settings ( central repository ) |
|
51 // whether network type is supported. |
|
52 // ----------------------------------------------------------------------------- |
|
53 // |
|
54 inline TBool MusFactorySettings::IsSupportedL( |
|
55 const RMobilePhone::TMobilePhoneNetworkMode& aNetworkType) |
|
56 { |
|
57 MUS_LOG1( "mus: [MUSAO] -> MusFactorySettings::IsSupportedL Network :%d", aNetworkType ) |
|
58 |
|
59 TBool networkSupported = EFalse; |
|
60 TInt onlyIn3GNetwork = MusSettingsKeys::EAllowedAllBearers; |
|
61 // Check from Central Repository that do we Only support in 3G or All Networks. |
|
62 // if key is not found then behave like default ie AllowedAllBearers. |
|
63 TRAP_IGNORE( onlyIn3GNetwork = MultimediaSharingSettings::Allowed3GOnlySettingL() ); |
|
64 if( onlyIn3GNetwork == MusSettingsKeys::EAllowedAllBearers ) |
|
65 { |
|
66 networkSupported = ETrue; |
|
67 } |
|
68 else |
|
69 { |
|
70 switch( aNetworkType ) |
|
71 { |
|
72 case RMobilePhone::ENetworkModeWcdma: |
|
73 case RMobilePhone::ENetworkModeTdcdma: |
|
74 case RMobilePhone::ENetworkModeCdma95: |
|
75 case RMobilePhone::ENetworkModeCdma2000: |
|
76 { |
|
77 networkSupported = ETrue; |
|
78 break; |
|
79 } |
|
80 |
|
81 case RMobilePhone::ENetworkModeGsm: |
|
82 { |
|
83 TInt edgeDtmSupport = KErrNone; |
|
84 |
|
85 // We Will throw an Activation Error for the Mandatory Settings if |
|
86 // they are not found. |
|
87 |
|
88 edgeDtmSupport = MultimediaSharingSettings::EdgeDtmSupportSettingL(); |
|
89 |
|
90 if( edgeDtmSupport == MusSettingsKeys::EDtmModeAllowed ) |
|
91 { |
|
92 networkSupported = ETrue; |
|
93 } |
|
94 else |
|
95 { |
|
96 networkSupported = EFalse; |
|
97 } |
|
98 break; |
|
99 } |
|
100 } |
|
101 } |
|
102 MUS_LOG1( "mus: [MUSAO] <- MusFactorySettings::IsSupportedL (%d)", networkSupported ) |
|
103 |
|
104 return networkSupported; |
|
105 } |
|
106 |
|
107 |
|
108 #endif // MUSFACTROYSETTINGS_INL |
|