1 /* |
1 /* |
2 * Copyright (c) 2005, 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2005, 2008 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: Get count of VoIP profiles. |
14 * Description: Stub class for get count of VoIP profiles. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 #include "MsgVoIPExtension.h" |
19 #include "MsgVoIPExtension.h" |
20 |
|
21 #include <spsettings.h> |
|
22 #include <featmgr.h> |
|
23 |
20 |
24 // ================= MEMBER FUNCTIONS ======================= |
21 // ================= MEMBER FUNCTIONS ======================= |
25 |
22 |
26 // C++ default constructor can NOT contain any code, that |
23 // C++ default constructor can NOT contain any code, that |
27 // might leave. |
24 // might leave. |
28 // |
25 // |
29 CMsgVoIPExtension::CMsgVoIPExtension() |
26 CMsgVoIPExtension::CMsgVoIPExtension() |
30 { |
27 { |
31 iVoIPFeatureSupport = EFalse; |
|
32 } |
28 } |
33 |
29 |
34 // Two-phased constructor. |
30 // Two-phased constructor. |
35 // |
31 // |
36 EXPORT_C CMsgVoIPExtension* CMsgVoIPExtension::NewL() |
32 EXPORT_C CMsgVoIPExtension* CMsgVoIPExtension::NewL() |
37 { |
33 { |
38 CMsgVoIPExtension *self = |
34 CMsgVoIPExtension *self = |
39 new ( ELeave ) CMsgVoIPExtension(); |
35 new ( ELeave ) CMsgVoIPExtension(); |
40 CleanupStack::PushL( self ); |
36 CleanupStack::PushL( self ); |
41 self->ConstructL(); |
37 self->ConstructL(); |
42 CleanupStack::Pop(); |
38 CleanupStack::Pop(); |
43 return self; |
39 return self; |
44 } |
40 } |
45 |
41 |
46 // ConstructL |
42 // ConstructL |
47 // |
43 // |
48 void CMsgVoIPExtension::ConstructL() |
44 void CMsgVoIPExtension::ConstructL() |
49 { |
45 { |
50 FeatureManager::InitializeLibL(); |
46 } |
51 //checking If VOIP is enabled |
47 |
52 if( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) ) |
|
53 { |
|
54 iVoIPFeatureSupport = ETrue; |
|
55 } |
|
56 FeatureManager::UnInitializeLib(); |
|
57 if(iVoIPFeatureSupport) |
|
58 { |
|
59 // for handling services related data |
|
60 iSPSettings = CSPSettings::NewL(); |
|
61 } |
|
62 } |
|
63 // Destructor |
48 // Destructor |
64 // |
49 // |
65 CMsgVoIPExtension::~CMsgVoIPExtension() |
50 CMsgVoIPExtension::~CMsgVoIPExtension() |
66 { |
51 { |
67 if(iVoIPFeatureSupport) |
|
68 { |
|
69 delete iSPSettings; |
|
70 } |
|
71 } |
52 } |
72 // ---------------------------------------------------- |
53 // ---------------------------------------------------- |
73 // CMsgVoIPExtension::VoIPProfilesExistL |
54 // CMsgVoIPExtension::VoIPProfilesExistL |
74 // |
55 // |
75 // ---------------------------------------------------- |
56 // ---------------------------------------------------- |
76 EXPORT_C TBool CMsgVoIPExtension::VoIPProfilesExistL() const |
57 EXPORT_C TBool CMsgVoIPExtension::VoIPProfilesExistL() const |
77 { |
58 { |
78 TBool result = EFalse; |
59 return EFalse; |
|
60 } |
79 |
61 |
80 if(iVoIPFeatureSupport) |
|
81 { |
|
82 result = iSPSettings->IsFeatureSupported( ESupportVoIPFeature ) && |
|
83 iSPSettings->IsFeatureSupported( ESupportInternetCallFeature ); |
|
84 } |
|
85 return result; |
|
86 } |
|
87 |
|
88 // ---------------------------------------------------- |
62 // ---------------------------------------------------- |
89 // CMsgVoIPExtension::IsPreferredTelephonyVoIP |
63 // CMsgVoIPExtension::IsPreferredTelephonyVoIP |
90 // |
64 // |
91 // ---------------------------------------------------- |
65 // ---------------------------------------------------- |
92 EXPORT_C TBool CMsgVoIPExtension::IsPreferredTelephonyVoIP() const |
66 EXPORT_C TBool CMsgVoIPExtension::IsPreferredTelephonyVoIP() const |