author | Leon Anavi <leon.anavi@opencode.com> |
Sat, 06 Nov 2010 18:38:12 +0200 | |
branch | opencode |
changeset 87 | 434681fe53c8 |
parent 32 | 58332560b319 |
permissions | -rw-r--r-- |
24 | 1 |
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 |
// All rights reserved. |
|
3 |
// This component and the accompanying materials are made available |
|
4 |
// under the terms of "Eclipse Public License v1.0" |
|
5 |
// which accompanies this distribution, and is available |
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 |
// |
|
8 |
// Initial Contributors: |
|
9 |
// Nokia Corporation - initial contribution. |
|
10 |
// |
|
11 |
// Contributors: |
|
12 |
// |
|
13 |
// Description: |
|
14 |
// INCLUDE FILES |
|
15 |
// |
|
16 |
||
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
17 |
|
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
18 |
|
24 | 19 |
#include <featmgr/featurecontrol.h> |
20 |
#include <featureuids.h> |
|
21 |
||
22 |
#include "cmmphonefactorytsy.h" |
|
23 |
#include "cmmphonetsy.h" |
|
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
24 |
#include <ctsy/mmtsy_names.h> |
24 | 25 |
#include "MmTsy_conf.h" |
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
26 |
#include "cmmmessagemanagerbase.h" |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
27 |
#include <ctsy/serviceapi/ctsysatmessagingbase.h> |
24 | 28 |
|
29 |
#ifdef USING_CTSY_DISPATCHER |
|
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
30 |
_LIT(KLicenseeTsyDllName, "licenseetsy.dll"); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
31 |
_LIT(KCtsyDispatcherDllName, "ctsydispatcher.dll"); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
32 |
|
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
33 |
const TInt KLicenseeTsyUID3 = 0x2000BEE4; |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
34 |
const TInt KCtsyDispatcherUID3 = 0x10285C38; |
24 | 35 |
|
36 |
typedef MLtsyFactoryBase*(*TFactoryBaseNewL)(); |
|
37 |
||
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
38 |
#endif //USING_CTSY_DISPATCHER |
24 | 39 |
// ======== MEMBER FUNCTIONS ======== |
40 |
||
41 |
CMmPhoneFactoryTsy::CMmPhoneFactoryTsy() |
|
42 |
{ |
|
43 |
// Version numbers defined in ETEL.h |
|
44 |
iVersion = TVersion( KEtelMajorVersionNumber, |
|
45 |
KEtelMinorVersionNumber, |
|
46 |
KEtelBuildVersionNumber ); |
|
47 |
} |
|
48 |
||
49 |
CMmPhoneFactoryTsy* CMmPhoneFactoryTsy::NewL() |
|
50 |
{ |
|
51 |
CMmPhoneFactoryTsy* phoneFactoryTsy = NULL; |
|
52 |
phoneFactoryTsy = new ( ELeave ) CMmPhoneFactoryTsy(); |
|
53 |
CleanupStack::PushL( phoneFactoryTsy ); |
|
54 |
phoneFactoryTsy->ConstructL(); |
|
55 |
CleanupStack::Pop(); |
|
56 |
return phoneFactoryTsy; |
|
57 |
} |
|
58 |
||
59 |
void CMmPhoneFactoryTsy::ConstructL() |
|
60 |
{ |
|
61 |
} |
|
62 |
||
63 |
CMmPhoneFactoryTsy::~CMmPhoneFactoryTsy() |
|
64 |
{ |
|
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
65 |
#ifdef USING_CTSY_DISPATCHER |
24 | 66 |
iLoadedLib.Close(); |
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
67 |
#endif //USING_CTSY_DISPATCHER |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
68 |
} |
24 | 69 |
|
70 |
// --------------------------------------------------------------------------- |
|
71 |
// CMmPhoneFactoryTsy::NewPhoneL |
|
72 |
// Creates a new phone object instance |
|
73 |
// (other items were commented in a header). |
|
74 |
// --------------------------------------------------------------------------- |
|
75 |
// |
|
76 |
CPhoneBase* CMmPhoneFactoryTsy::NewPhoneL( const TDesC& aName ) |
|
77 |
{ |
|
78 |
TFLOGSTRING("TSY: CMmPhoneFactoryTsy::NewL - NEW LOG"); |
|
79 |
||
80 |
iPhoneTsy = NULL; |
|
81 |
||
82 |
// In case of debug build, print flag info. |
|
83 |
#ifdef TF_LOGGING_ENABLED |
|
84 |
||
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
85 |
RFeatureControl featureControl; |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
86 |
TInt err = featureControl.Open(); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
87 |
if (err != KErrNone) |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
88 |
{ |
24 | 89 |
TFLOGSTRING("CMmPhoneFactoryTsy::NewPhoneL - failed to connect to FeatMgr"); |
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
90 |
} |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
91 |
else if (featureControl.FeatureSupported(NFeature::KCsVideoTelephony) == KFeatureSupported) |
24 | 92 |
{ |
93 |
TFLOGSTRING("TSY: __CS_VIDEO_TELEPHONY -flag is on"); |
|
94 |
} |
|
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
95 |
else if (featureControl.FeatureSupported(NFeature::KEmergencyCallsEnabledInOfflineMode) == KFeatureSupported) |
24 | 96 |
{ |
97 |
TFLOGSTRING("TSY: __COMMON_TSY__EMERGENCY_CALLS_ENABLED_IN_OFFLINE_MODE -flag is on"); |
|
98 |
} |
|
99 |
||
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
100 |
featureControl.Close(); |
24 | 101 |
#endif |
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
102 |
|
24 | 103 |
// Check if the Phone Name is OK |
104 |
if ( KErrNone == aName.CompareF( KMmTsyPhoneName ) ) |
|
105 |
{ |
|
106 |
iMessageRouter = NULL; |
|
107 |
||
108 |
// Create Message Manager (the 'core' of the LTSY Plug-in API) |
|
109 |
CMmMessageManagerBase* messageManager = CMmMessageManagerBase::NewL(); |
|
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
110 |
if ( messageManager ) |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
111 |
{ |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
112 |
CleanupStack::PushL( messageManager ); |
24 | 113 |
|
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
114 |
// LTSY Plug-in API successfully created |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
115 |
TFLOGSTRING("TSY: CMmPhoneFactoryTsy::NewL - Starting to open LicenceeTSY"); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
116 |
|
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
117 |
// get TSY message manager callback object |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
118 |
MmMessageManagerCallback* callBack = |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
119 |
messageManager->GetMessageManagerCallback(); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
120 |
|
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
121 |
#ifdef USING_CTSY_DISPATCHER |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
122 |
iLtsyFactory = LoadLibraryL(); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
123 |
#else |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
124 |
// library entry for LTSY, get base factory object |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
125 |
iLtsyFactory = LTsyFactoryL(); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
126 |
|
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
127 |
#endif //USING_CTSY_DISPATCHER |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
128 |
|
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
129 |
if( iLtsyFactory ) |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
130 |
{ |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
131 |
// Get message router from LTSY. All current interface versions |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
132 |
// have the same GetMessageRouter defined in version 1. |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
133 |
MLtsyFactoryV1* ptr_v1 = |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
134 |
static_cast<MLtsyFactoryV1*>( iLtsyFactory ); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
135 |
|
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
136 |
iMessageRouter = ptr_v1->GetMessageRouter( *callBack ); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
137 |
User::LeaveIfNull( iMessageRouter ); |
24 | 138 |
|
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
139 |
// Licencee Tsy successfully created |
24 | 140 |
TFLOGSTRING("TSY: CMmPhoneFactoryTsy::NewL - LicenceeTSY successfully opened"); |
141 |
||
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
142 |
// set the pointer to the message router object |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
143 |
messageManager->SetMessageRouter( iMessageRouter ); |
24 | 144 |
|
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
145 |
// Ownership of messageManager passed to iPhoneTsy. |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
146 |
CleanupStack::Pop( messageManager ); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
147 |
// Create Phone Tsy (which creates the whole Common TSY) |
24 | 148 |
TFLOGSTRING("TSY: CMmPhoneFactoryTsy::NewL - Starting to open CommonTSY"); |
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
149 |
iPhoneTsy = CMmPhoneTsy::NewL( |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
150 |
messageManager, this, iLtsyFactory ); |
24 | 151 |
|
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
152 |
if ( iPhoneTsy ) |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
153 |
{ |
24 | 154 |
TFLOGSTRING("TSY: CMmPhoneFactoryTsy::NewL - CommonTSY successfully opened"); |
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
155 |
messageManager->SetPhoneTsy( iPhoneTsy ); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
156 |
} |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
157 |
} |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
158 |
else |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
159 |
{ |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
160 |
CleanupStack::PopAndDestroy( messageManager ); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
161 |
} |
24 | 162 |
} |
163 |
} |
|
164 |
||
165 |
return iPhoneTsy; |
|
166 |
} |
|
167 |
||
168 |
// --------------------------------------------------------------------------- |
|
169 |
// CMmPhoneFactoryTsy::EnumeratePhones |
|
170 |
// Returns the maximum number of supported phone instances |
|
171 |
// (other items were commented in a header). |
|
172 |
// --------------------------------------------------------------------------- |
|
173 |
// |
|
174 |
TInt CMmPhoneFactoryTsy::EnumeratePhones() |
|
175 |
{ |
|
176 |
return KMmTsyNumOfSupportedPhones; |
|
177 |
} |
|
178 |
||
179 |
// --------------------------------------------------------------------------- |
|
180 |
// CMmPhoneFactoryTsy::GetPhoneInfo |
|
181 |
// Index of the requested phone is passed to the client |
|
182 |
// (other items were commented in a header). |
|
183 |
// --------------------------------------------------------------------------- |
|
184 |
// |
|
185 |
TInt CMmPhoneFactoryTsy::GetPhoneInfo( |
|
186 |
const TInt aIndex, |
|
187 |
RTelServer::TPhoneInfo& aInfo ) |
|
188 |
{ |
|
189 |
TInt ret( KErrNotFound ); |
|
190 |
||
191 |
if( aIndex == 0 ) |
|
192 |
{ |
|
193 |
aInfo.iName.Copy( TPtrC( KMmTsyPhoneName ) ); |
|
194 |
aInfo.iNetworkType = KMmTsyNetworkType; |
|
195 |
aInfo.iNumberOfLines = KMmTsyNumOfSupportedLines; |
|
196 |
//(TAN) Symbian's comment to iExtension parameter: |
|
197 |
//The best solution is not to worry about this iExtensions field too |
|
198 |
//much and to just return one API extension value, and that being the |
|
199 |
//main API supported by the TSY. If the TSY also supports e.g. GPRS |
|
200 |
//and/or SAT then the client can find this out using the |
|
201 |
//RTelServer::IsSupportedByModule method. |
|
202 |
aInfo.iExtensions = KETelExtMultimodeV1; |
|
203 |
||
204 |
// Phone found. Change ret value. |
|
205 |
ret = KErrNone; |
|
206 |
} |
|
207 |
||
208 |
return ret; |
|
209 |
} |
|
210 |
||
211 |
// --------------------------------------------------------------------------- |
|
212 |
// CMmPhoneFactoryTsy::IsSupported |
|
213 |
// Provides information about the supported functional units of |
|
214 |
// the TSY. This method directs the request to all supported protocol |
|
215 |
// extensions. If functional unit is supported by any of those protocol |
|
216 |
// extension the result will be ETrue. Otherwise the method will |
|
217 |
// return KErrNone |
|
218 |
// (other items were commented in a header). |
|
219 |
// --------------------------------------------------------------------------- |
|
220 |
// |
|
221 |
TBool CMmPhoneFactoryTsy::IsSupported( const TInt aFunctionalUnit ) |
|
222 |
{ |
|
223 |
TBool ret = EFalse; |
|
224 |
||
225 |
switch ( aFunctionalUnit ) |
|
226 |
{ |
|
227 |
//Supported functional units of mmtsy |
|
228 |
case KETelFuncMobileIccAccess: |
|
229 |
case KETelFuncMobileNetwork: |
|
230 |
case KETelFuncMobileIdentity: |
|
231 |
case KETelFuncMobilePower: |
|
232 |
case KETelFuncMobileSignal: |
|
233 |
case KETelFuncMobileDTMF: |
|
234 |
case KETelFuncMobileUserNetworkAccess: |
|
235 |
case KETelFuncMobileIdentityService: |
|
236 |
case KETelFuncMobileCallForwarding: |
|
237 |
case KETelFuncMobileCallBarring: |
|
238 |
case KETelFuncMobileCallWaiting: |
|
239 |
case KETelFuncMobileCallCompletion: |
|
240 |
case KETelFuncMobileSecurity: |
|
241 |
case KETelFuncMobileAlternateLineService: |
|
242 |
case KETelFuncMobileFixedDiallingNumbers: |
|
243 |
case KETelFuncMobileDataCall: |
|
244 |
case KETelFuncMobileEmergencyCall: |
|
245 |
case KETelFuncMobileSmsMessaging: |
|
246 |
case KETelFuncMobileBroadcastMessaging: |
|
247 |
case KETelFuncMobileUssdMessaging: |
|
248 |
case KETelFuncMobileConferenceCall: |
|
249 |
case KETelFuncMobilePhonebook: |
|
250 |
case KETelFuncMobileSmsStore: |
|
251 |
case KETelFuncMobileOwnNumberStore: |
|
252 |
case KETelFuncMobileEmergencyNumberStore: |
|
253 |
case KETelFuncMobilePrivacy: |
|
254 |
case KETelExtMultimodeV1: |
|
255 |
case KETelExtMultimodeV2: |
|
256 |
case KETelExtMultimodeV3: |
|
257 |
case KEtelFuncMobileAPNControlList: |
|
258 |
case KEtelExtMultimodeV9: |
|
259 |
case KEtelFuncCellInfo: |
|
260 |
ret = ETrue; |
|
261 |
break; |
|
262 |
||
263 |
//Unsupported functional units |
|
264 |
//case KETelFuncMobileAlternatingCall: |
|
265 |
//case KETelFuncMobileMessageWaiting: |
|
266 |
//case KETelFuncMobileNamStore: |
|
267 |
//case KETelFuncMobileMultimediaCall: |
|
268 |
//case KEtelFuncMobileMultimediaCallSettings: |
|
269 |
//case KETelFuncMobileCost: |
|
270 |
||
271 |
default: |
|
272 |
ret = EFalse; |
|
273 |
} |
|
274 |
||
275 |
return ret; |
|
276 |
} |
|
277 |
||
278 |
// --------------------------------------------------------------------------- |
|
279 |
// CMmPhoneFactoryTsy::NewSimAtk |
|
280 |
// Creates CTsySatMessaging object and returns it |
|
281 |
// (other items were commented in a header). |
|
282 |
// --------------------------------------------------------------------------- |
|
283 |
// |
|
284 |
CTsySatMessagingBase* CMmPhoneFactoryTsy::NewSimAtk( const TDesC& aName ) |
|
285 |
{ |
|
286 |
CTsySatMessagingBase* satMessaging = NULL; |
|
287 |
||
288 |
if ( KErrNone == aName.CompareF( KSatToolkit ) ) |
|
289 |
{ |
|
290 |
TFLOGSTRING("TSY: CMmPhoneFactoryTsy::NewSimAtk - Starting to open SimAtkTSY"); |
|
291 |
||
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
292 |
if( iLtsyFactory ) |
24 | 293 |
{ |
294 |
// Get SIM ATK TSY messaging service from LicenseeTsy |
|
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
295 |
MLtsyFactoryV1* ptr_v1 = |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
296 |
static_cast<MLtsyFactoryV1*>( iLtsyFactory ); |
24 | 297 |
|
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
298 |
#ifdef USING_CTSY_DISPATCHER |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
299 |
satMessaging = ptr_v1->GetSatMessagingService( |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
300 |
iPhoneTsy->SmsService() ); |
24 | 301 |
#else |
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
302 |
satMessaging = ptr_v1->GetSatMessagingService( ); |
24 | 303 |
#endif |
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
304 |
} |
24 | 305 |
} |
306 |
||
307 |
return satMessaging; |
|
308 |
} |
|
309 |
||
310 |
// --------------------------------------------------------------------------- |
|
311 |
// extern "C" |
|
312 |
// The LibEntry function is implemented in another programming |
|
313 |
// language (ASM?). extern "C" is required to port from other language |
|
314 |
// --------------------------------------------------------------------------- |
|
315 |
// |
|
316 |
extern "C" |
|
317 |
{ |
|
318 |
IMPORT_C CPhoneFactoryBase* LibEntry(); // Force "Proper Name" export |
|
319 |
} |
|
320 |
||
321 |
// --------------------------------------------------------------------------- |
|
322 |
// LibEntry |
|
323 |
// A Windows Entry Procedure. The LibEntry() procedure in the |
|
324 |
// DLL C run-time libraries performs all the necessary initialization |
|
325 |
// required by the WEPs (Windows Entry Point) they contain. This code is |
|
326 |
// copied from Symbian's example |
|
327 |
// Returns: CPhoneFactoryBase*: Pointer to CMmPhoneFactoryTsy class |
|
328 |
// --------------------------------------------------------------------------- |
|
329 |
// |
|
330 |
EXPORT_C CPhoneFactoryBase* LibEntry() |
|
331 |
{ |
|
332 |
TFLOGSTRING("TSY: CPhoneFactoryBase::LibEntry()..."); |
|
333 |
// return NULL if instantiation fails |
|
334 |
CMmPhoneFactoryTsy* factory(NULL); |
|
335 |
TRAP_IGNORE(factory = CMmPhoneFactoryTsy::NewL()); |
|
336 |
return factory; |
|
337 |
} |
|
338 |
||
339 |
#ifdef USING_CTSY_DISPATCHER |
|
340 |
TBool CMmPhoneFactoryTsy::UsingCtsyDispatcher() |
|
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
341 |
{ |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
342 |
//function to determine whether the setup is using the CTSY Dispatcher layer. |
24 | 343 |
#ifdef USING_CTSY_DISPATCHER |
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
344 |
return ETrue; |
24 | 345 |
#else |
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
346 |
return EFalse; |
24 | 347 |
#endif |
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
348 |
} |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
349 |
|
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
350 |
MLtsyFactoryBase* CMmPhoneFactoryTsy::LoadLibraryL() |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
351 |
{ |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
352 |
//load library. This can either be LicenseeTsy or CtsyDispatcher dlls |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
353 |
TPtrC dllname; |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
354 |
TInt uid3_int; |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
355 |
if(UsingCtsyDispatcher()) |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
356 |
{ |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
357 |
dllname.Set(KCtsyDispatcherDllName); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
358 |
uid3_int = KCtsyDispatcherUID3; |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
359 |
} |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
360 |
else |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
361 |
{ |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
362 |
dllname.Set(KLicenseeTsyDllName); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
363 |
uid3_int = KLicenseeTsyUID3; |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
364 |
} |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
365 |
|
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
366 |
TFLOGSTRING3("TSY: CMmPhoneFactoryTsy::LoadLibraryL - Loading Dll=%S, UID3=0x%x", &dllname, uid3_int); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
367 |
|
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
368 |
TUidType uid(KNullUid, KNullUid, TUid::Uid(uid3_int)); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
369 |
|
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
370 |
User::LeaveIfError(iLoadedLib.Load(dllname)); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
371 |
|
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
372 |
// Check the Uid3 is as expected |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
373 |
if(iLoadedLib.Type()[2]!=TUid::Uid(uid3_int)) |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
374 |
User::Leave(KErrBadLibraryEntryPoint); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
375 |
|
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
376 |
TFactoryBaseNewL libEntry=(TFactoryBaseNewL)iLoadedLib.Lookup(1); |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
377 |
MLtsyFactoryBase* factory=(*libEntry)(); // libEntry may leave. |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
378 |
|
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
379 |
return factory; |
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
380 |
} |
24 | 381 |
#endif //USING_CTSY_DISPATCHER |
382 |
||
32
58332560b319
Bring opencode branch up-to-date with latest cellularsrv changes
Oscar Gonzalez <oscar.1.gonzalez@nokia.com>
parents:
24
diff
changeset
|
383 |
// End of File |
24 | 384 |
|
385 |