1 /* |
|
2 * Copyright (c) 2004 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: Represents a connection |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <stdlib.h> |
|
22 #include <nifvar.h> |
|
23 #include <StringLoader.h> |
|
24 #include <connectionmonitorui.rsg> |
|
25 #include <avkon.rsg> |
|
26 #include <AknUtils.h> |
|
27 #include <apgcli.h> |
|
28 |
|
29 #include "ConnectionMonitorUiLogger.h" |
|
30 #include "ConnectionInfoBase.h" |
|
31 #include "ActiveWrapper.h" |
|
32 |
|
33 // CONSTANTS |
|
34 |
|
35 const TUint KUpArrowChar = 0x2191; ///< ASCII code of UpArrow |
|
36 const TUint KDownArrowChar = 0x2193; ///< ASCII code of DownArrow |
|
37 const TUint KBannedServerUID = 0x101fd9c5; // Banned DHCP server UID |
|
38 |
|
39 const TInt KFeedsServerUid = 0x1020728E; |
|
40 const TInt KDownloadMgrServerUid = 0x10008D60; |
|
41 const TInt KMessagingServerUid = 0x1000484b; |
|
42 const TInt KJavaVMUid = 0x102033E6; |
|
43 const TInt KSUPLServerUid = 0x102073CA; |
|
44 |
|
45 LOCAL_D const TInt KStringsGranularity = 5; |
|
46 |
|
47 _LIT( KMrouterName, "mRouter"); ///< see CheckMrouteIap |
|
48 _LIT( KEmpty, ""); ///< Empty string |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 // ================= MEMBER FUNCTIONS ======================= |
|
54 |
|
55 // --------------------------------------------------------- |
|
56 // CConnectionInfoBase::~CConnectionInfoBase |
|
57 // --------------------------------------------------------- |
|
58 // |
|
59 CConnectionInfoBase::~CConnectionInfoBase() |
|
60 { |
|
61 delete iDetailsArray; |
|
62 delete iAppNames; |
|
63 } |
|
64 |
|
65 |
|
66 // --------------------------------------------------------- |
|
67 // CConnectionInfoBase::CConnectionInfoBase |
|
68 // --------------------------------------------------------- |
|
69 // |
|
70 CConnectionInfoBase::CConnectionInfoBase( |
|
71 TInt aConnectionId, |
|
72 RConnectionMonitor* const aConnectionMonitor, |
|
73 TConnMonBearerType aConnectionBearerType, |
|
74 CActiveWrapper* aActiveWrapper ) : |
|
75 iConnectionMonitor( aConnectionMonitor ), |
|
76 iStartTime( NULL ), |
|
77 iDeletedFromCMUI( EFalse ), |
|
78 iActiveWrapper( aActiveWrapper ) |
|
79 { |
|
80 CMUILOGGER_WRITE( "CConnectionInfoBase constuctor - start " ); |
|
81 iConnectionStatus = EConnectionUninitialized; |
|
82 iConnectionId = aConnectionId; |
|
83 iConnectionBearerType = aConnectionBearerType; |
|
84 iLastSpeedUpdate.UniversalTime(); |
|
85 CMUILOGGER_WRITE( "CConnectionInfoBase constuctor - end " ); |
|
86 } |
|
87 |
|
88 |
|
89 // --------------------------------------------------------- |
|
90 // CConnectionInfoBase::ConstructL |
|
91 // --------------------------------------------------------- |
|
92 // |
|
93 void CConnectionInfoBase::ConstructL() |
|
94 { |
|
95 CMUILOGGER_ENTERFN( "CConnectionInfoBase::ConstructL() start" ); |
|
96 |
|
97 if ( iConnectionBearerType >= EBearerExternalCSD ) |
|
98 { |
|
99 StringLoader::Load( iConnectionName, |
|
100 R_QTN_CMON_ITEM_CONN_NAME_MODEM ); |
|
101 } |
|
102 else |
|
103 { |
|
104 iActiveWrapper->StartGetStringAttribute( iConnectionId, |
|
105 iConnectionMonitor, |
|
106 KIAPName, |
|
107 iConnectionName ); |
|
108 TInt err( iActiveWrapper->iStatus.Int() ); |
|
109 CMUILOGGER_WRITE_F( "CConnectionInfoBase::ConstructL() status: %d", |
|
110 err ); |
|
111 CMUILOGGER_WRITE_F( "iConnectionName : %S", &iConnectionName ); |
|
112 CMUILOGGER_WRITE_F( "iConnectionId : %d", iConnectionId ); |
|
113 CMUILOGGER_WRITE_F( "iConnectionBearerType : %d", |
|
114 ( TInt )iConnectionBearerType ); |
|
115 if ( err != KErrNone ) |
|
116 { |
|
117 User::Leave( err ); |
|
118 } |
|
119 } |
|
120 |
|
121 if ( !iAppNames ) |
|
122 { |
|
123 iAppNames = new( ELeave ) CDesCArrayFlat( KStringsGranularity ); |
|
124 } |
|
125 |
|
126 StatusChangedL(); |
|
127 if ( GetStatus() == EConnectionSuspended ) |
|
128 { |
|
129 InitializeConnectionInfoL(); |
|
130 } |
|
131 CMUILOGGER_LEAVEFN( "CConnectionInfoBase::ConstructL() end" ); |
|
132 } |
|
133 |
|
134 |
|
135 // --------------------------------------------------------- |
|
136 // CConnectionInfoBase::StatusChangedL |
|
137 // --------------------------------------------------------- |
|
138 // |
|
139 void CConnectionInfoBase::StatusChangedL() |
|
140 { |
|
141 CMUILOGGER_WRITE( "CConnectionInfoBase::StatusChangedL() start" ); |
|
142 |
|
143 RefreshConnectionStatus(); |
|
144 |
|
145 switch ( iConnectionStatus ) |
|
146 { |
|
147 case EConnectionCreated: |
|
148 { |
|
149 InitializeConnectionInfoL(); |
|
150 break; |
|
151 } |
|
152 case EConnectionSuspended: |
|
153 { |
|
154 RefreshDetailsL(); |
|
155 if ( !iDetailsArray ) |
|
156 { |
|
157 ToArrayDetailsL(); |
|
158 } |
|
159 RefreshDetailsArrayL(); |
|
160 break; |
|
161 } |
|
162 case EConnectionClosing: |
|
163 case EConnectionClosed: |
|
164 case EConnectionUninitialized: |
|
165 { |
|
166 if ( iDetailsArray ) // if there is details array |
|
167 { |
|
168 RefreshDetailsArrayL(); |
|
169 } |
|
170 break; |
|
171 } |
|
172 case EConnectionCreating: |
|
173 default : |
|
174 { |
|
175 break; |
|
176 } |
|
177 } |
|
178 |
|
179 RefreshConnectionListBoxItemTextL(); |
|
180 |
|
181 CMUILOGGER_WRITE( "CConnectionInfoBase::StatusChangedL() end" ); |
|
182 } |
|
183 |
|
184 // --------------------------------------------------------- |
|
185 // CConnectionInfoBase::IsAlive |
|
186 // --------------------------------------------------------- |
|
187 // |
|
188 TBool CConnectionInfoBase::IsAlive() const |
|
189 { |
|
190 TBool alive( EFalse ); |
|
191 if ( ( iConnectionStatus == EConnectionSuspended ) || |
|
192 ( iConnectionStatus == EConnectionCreated ) ) |
|
193 { |
|
194 alive = ETrue; |
|
195 } |
|
196 return alive; |
|
197 } |
|
198 |
|
199 // --------------------------------------------------------- |
|
200 // CConnectionInfoBase::IsSuspended |
|
201 // --------------------------------------------------------- |
|
202 // |
|
203 TBool CConnectionInfoBase::IsSuspended() const |
|
204 { |
|
205 TBool suspended( EFalse ); |
|
206 if ( iConnectionStatus == EConnectionSuspended ) |
|
207 { |
|
208 suspended = ETrue; |
|
209 } |
|
210 return suspended; |
|
211 } |
|
212 |
|
213 // --------------------------------------------------------- |
|
214 // CConnectionInfoBase::GetConnectionId |
|
215 // --------------------------------------------------------- |
|
216 // |
|
217 CDesCArrayFlat* CConnectionInfoBase::GetDetailsArray() const |
|
218 { |
|
219 return iDetailsArray; |
|
220 } |
|
221 |
|
222 // --------------------------------------------------------- |
|
223 // CConnectionInfoBase::GetConnectionId |
|
224 // --------------------------------------------------------- |
|
225 // |
|
226 TUint CConnectionInfoBase::GetConnectionId() const |
|
227 { |
|
228 return iConnectionId; |
|
229 } |
|
230 |
|
231 // --------------------------------------------------------- |
|
232 // CConnectionInfoBase::GetStatus |
|
233 // --------------------------------------------------------- |
|
234 // |
|
235 TConnectionStatus CConnectionInfoBase::GetStatus() const |
|
236 { |
|
237 return iConnectionStatus; |
|
238 } |
|
239 |
|
240 // --------------------------------------------------------- |
|
241 // CConnectionInfoBase::GetName |
|
242 // --------------------------------------------------------- |
|
243 // |
|
244 HBufC* CConnectionInfoBase::GetNameLC() const |
|
245 { |
|
246 HBufC* name = iConnectionName.AllocLC(); |
|
247 return name; |
|
248 } |
|
249 |
|
250 // --------------------------------------------------------- |
|
251 // CConnectionInfoBase::GetBearerType |
|
252 // --------------------------------------------------------- |
|
253 // |
|
254 TConnMonBearerType CConnectionInfoBase::GetBearerType() const |
|
255 { |
|
256 return iConnectionBearerType; |
|
257 } |
|
258 |
|
259 |
|
260 // --------------------------------------------------------- |
|
261 // CConnectionInfoBase::GetConnectionListBoxItemText |
|
262 // --------------------------------------------------------- |
|
263 // |
|
264 TPtrC CConnectionInfoBase::GetConnectionListBoxItemText() const |
|
265 { |
|
266 return iListBoxItemText; |
|
267 } |
|
268 |
|
269 // --------------------------------------------------------- |
|
270 // CConnectionInfoBase::RefreshConnectionStatus |
|
271 // --------------------------------------------------------- |
|
272 // |
|
273 void CConnectionInfoBase::RefreshConnectionStatus() |
|
274 { |
|
275 TConnectionStatus connStatus( EConnectionUninitialized ); |
|
276 iActiveWrapper->StartGetIntAttribute( iConnectionId, |
|
277 iConnectionMonitor, |
|
278 KConnectionStatus, |
|
279 ( ( TInt& )( connStatus ) ) ); |
|
280 TInt err( iActiveWrapper->iStatus.Int() ); |
|
281 CMUILOGGER_WRITE_F( "RefreshConnectionStatus status : %d", |
|
282 err ); |
|
283 if ( err == KErrNone ) |
|
284 { |
|
285 RefreshConnectionStatus( connStatus ); |
|
286 } |
|
287 else |
|
288 { |
|
289 iActiveWrapper->Cancel(); |
|
290 } |
|
291 } |
|
292 |
|
293 // --------------------------------------------------------- |
|
294 // CConnectionInfoBase::RefreshConnectionStatus |
|
295 // --------------------------------------------------------- |
|
296 // |
|
297 void CConnectionInfoBase::RefreshConnectionStatus( |
|
298 const TInt aConnectionStatus ) |
|
299 { |
|
300 CMUILOGGER_ENTERFN( "RefreshConnectionStatus" ); |
|
301 CMUILOGGER_WRITE_F( "RefreshConnectionStatus aConnectionStatus %d", |
|
302 ( TInt )aConnectionStatus ); |
|
303 CMUILOGGER_WRITE_F( "iConnectionStatus before %d", |
|
304 ( TInt )iConnectionStatus ); |
|
305 |
|
306 |
|
307 if ( ( aConnectionStatus == KLinkLayerOpen ) || |
|
308 ( ( aConnectionStatus == KConnectionOpen ) && |
|
309 ( iConnectionBearerType >= EBearerExternalCSD ) ) ) |
|
310 { |
|
311 CMUILOGGER_WRITE("1"); |
|
312 iConnectionStatus = EConnectionCreated; |
|
313 } |
|
314 else if ( ( aConnectionStatus == KConnectionClosed ) || |
|
315 ( aConnectionStatus == KLinkLayerClosed ) ) |
|
316 { |
|
317 CMUILOGGER_WRITE("2"); |
|
318 iConnectionStatus = EConnectionClosed; |
|
319 } |
|
320 else if ( ( ( aConnectionStatus >= KMinAgtProgress ) && |
|
321 ( aConnectionStatus <= KConnectionOpen ) ) || |
|
322 ( aConnectionStatus == KStartingSelection ) || |
|
323 ( aConnectionStatus == KFinishedSelection ) || |
|
324 ( aConnectionStatus == KConfigDaemonStartingRegistration ) || |
|
325 ( aConnectionStatus == KConfigDaemonFinishedRegistration ) ) |
|
326 // creating |
|
327 { |
|
328 CMUILOGGER_WRITE("5"); |
|
329 iConnectionStatus = EConnectionCreating; |
|
330 } |
|
331 else if ( aConnectionStatus == KDataTransferTemporarilyBlocked ) |
|
332 { |
|
333 CMUILOGGER_WRITE("6"); |
|
334 iConnectionStatus = EConnectionSuspended; |
|
335 } |
|
336 else if ( ( iConnectionStatus == EConnectionCreated ) && |
|
337 ( ( aConnectionStatus >= KConnectionStartingClose ) && |
|
338 ( aConnectionStatus < KConnectionClosed ) || |
|
339 ( aConnectionStatus == KConfigDaemonFinishedDeregistrationStop ) || |
|
340 ( aConnectionStatus == KConfigDaemonStartingDeregistration ) || |
|
341 ( aConnectionStatus == KLinkLayerClosed ) || |
|
342 ( aConnectionStatus == KConnectionUninitialised ) |
|
343 ) ) |
|
344 // closing |
|
345 { |
|
346 CMUILOGGER_WRITE("7"); |
|
347 iConnectionStatus = EConnectionClosing; |
|
348 } |
|
349 else if ( ( aConnectionStatus == KConnectionUninitialised ) && |
|
350 ( iConnectionStatus == EConnectionSuspended ) ) |
|
351 { // Back to created from suspended |
|
352 CMUILOGGER_WRITE("4"); |
|
353 iConnectionStatus = EConnectionCreated; |
|
354 } |
|
355 else if ( aConnectionStatus == KConnectionUninitialised ) |
|
356 { |
|
357 CMUILOGGER_WRITE("3"); |
|
358 iConnectionStatus = EConnectionUninitialized; |
|
359 } |
|
360 |
|
361 else |
|
362 { |
|
363 CMUILOGGER_WRITE_F( " else iConnectionStatus %d", |
|
364 ( TInt )iConnectionStatus ); |
|
365 CMUILOGGER_WRITE_F( "else aConnectionStatus %d", |
|
366 ( TInt )aConnectionStatus ); |
|
367 |
|
368 CMUILOGGER_WRITE("else"); |
|
369 } |
|
370 |
|
371 |
|
372 CMUILOGGER_WRITE_F( "iConnectionStatus after %d", |
|
373 ( TInt )iConnectionStatus ); |
|
374 CMUILOGGER_LEAVEFN( "RefreshConnectionStatus" ); |
|
375 } |
|
376 |
|
377 |
|
378 // --------------------------------------------------------- |
|
379 // CConnectionInfoBase::RefreshSentReceivedDataL |
|
380 // --------------------------------------------------------- |
|
381 // |
|
382 void CConnectionInfoBase::RefreshSentReceivedDataL() |
|
383 { |
|
384 CMUILOGGER_ENTERFN( "CConnectionInfoBase::RefreshSentReceivedDataL" ); |
|
385 // Downloaded |
|
386 CMUILOGGER_WRITE("Downloaded before"); |
|
387 iActiveWrapper->StartGetUintAttribute( iConnectionId, |
|
388 iConnectionMonitor, |
|
389 KDownlinkData, |
|
390 iDownloaded ); |
|
391 TInt errDownload( iActiveWrapper->iStatus.Int() ); |
|
392 CMUILOGGER_WRITE_F( "Download status: %d", errDownload ); |
|
393 if ( errDownload != KErrNone ) |
|
394 { |
|
395 iActiveWrapper->Cancel(); |
|
396 User::Leave( errDownload ); |
|
397 } |
|
398 CMUILOGGER_WRITE("Downloaded after"); |
|
399 // Uploaded |
|
400 CMUILOGGER_WRITE("Uploaded before"); |
|
401 iActiveWrapper->StartGetUintAttribute( iConnectionId, |
|
402 iConnectionMonitor, |
|
403 KUplinkData, |
|
404 iUploaded ); |
|
405 TInt errUpload( iActiveWrapper->iStatus.Int() ); |
|
406 CMUILOGGER_WRITE_F( "Upload status: %d", errUpload ); |
|
407 if ( errUpload != KErrNone ) |
|
408 { |
|
409 iActiveWrapper->Cancel(); |
|
410 User::Leave( errUpload ); |
|
411 } |
|
412 CMUILOGGER_WRITE("Uploaded after"); |
|
413 |
|
414 CMUILOGGER_LEAVEFN( "CConnectionInfoBase::RefreshSentReceivedDataL" ); |
|
415 } |
|
416 |
|
417 |
|
418 // --------------------------------------------------------- |
|
419 // CConnectionInfoBase::RefreshTransferSpeedsL |
|
420 // --------------------------------------------------------- |
|
421 // |
|
422 void CConnectionInfoBase::RefreshTransferSpeedsL() |
|
423 { |
|
424 CMUILOGGER_ENTERFN( "CConnectionInfoBase::RefreshTransferSpeedsL" ); |
|
425 TUint up = iUploaded; |
|
426 TUint down = iDownloaded; |
|
427 |
|
428 RefreshSentReceivedDataL(); |
|
429 |
|
430 TTime now; |
|
431 now.UniversalTime(); |
|
432 |
|
433 // 100 * 1/1000sec |
|
434 const TUint KOnesec = 1000; |
|
435 TUint diffTime = I64LOW( now.MicroSecondsFrom( iLastSpeedUpdate ).Int64() / |
|
436 TInt64( 1000 ) ); |
|
437 |
|
438 if ( iLastSpeedUpdate.Int64() == 0 ) |
|
439 { |
|
440 iLastSpeedUpdate = now; |
|
441 |
|
442 // speed cannot be calculated at the first time |
|
443 iUpSpeed.quot = 0; |
|
444 iUpSpeed.rem = 0; |
|
445 iDownSpeed.quot = 0; |
|
446 iDownSpeed.rem = 0; |
|
447 } |
|
448 else if ( diffTime > 500 ) |
|
449 // at least 1/2sec passed |
|
450 { |
|
451 // bytes/sec |
|
452 div_t upSpeed = div( ( iUploaded - up ) * KOnesec, diffTime ); |
|
453 div_t downSpeed = div( ( iDownloaded - down ) * KOnesec, diffTime ); |
|
454 // kbytes/sec |
|
455 iUpSpeed = div( upSpeed.quot, 1024 ); |
|
456 iDownSpeed = div( downSpeed.quot, 1024 ); |
|
457 |
|
458 iLastSpeedUpdate = now; |
|
459 } |
|
460 CMUILOGGER_LEAVEFN( "CConnectionInfoBase::RefreshTransferSpeedsL" ); |
|
461 } |
|
462 |
|
463 |
|
464 // --------------------------------------------------------- |
|
465 // CConnectionInfoBase::RefreshDuration |
|
466 // --------------------------------------------------------- |
|
467 // |
|
468 void CConnectionInfoBase::RefreshDuration() |
|
469 { |
|
470 CMUILOGGER_ENTERFN( "CConnectionInfoBase::RefreshDuration" ); |
|
471 TTime now; |
|
472 now.UniversalTime(); |
|
473 |
|
474 // passed time since connection established. |
|
475 iDuration = now.MicroSecondsFrom( iStartTime ).Int64(); |
|
476 CMUILOGGER_LEAVEFN( "CConnectionInfoBase::RefreshDuration" ); |
|
477 } |
|
478 |
|
479 |
|
480 // --------------------------------------------------------- |
|
481 // CConnectionInfoBase::RefreshAppNamesL |
|
482 // --------------------------------------------------------- |
|
483 // |
|
484 TInt CConnectionInfoBase::RefreshAppNamesL() |
|
485 { |
|
486 CMUILOGGER_ENTERFN( "CConnectionInfoBase::RefreshAppNamesL" ); |
|
487 |
|
488 TInt sharings( 0 ); |
|
489 |
|
490 if ( IsAlive() ) |
|
491 { |
|
492 if ( iAppNames ) |
|
493 { |
|
494 iAppNames->Reset(); |
|
495 HBufC* actAppName = NULL; |
|
496 // Check whether it is an internal or external (modem) connection |
|
497 // External (modem) connections does not need application name |
|
498 if ( iConnectionBearerType < EBearerExternalCSD ) |
|
499 { |
|
500 TInt count( 0 ); |
|
501 TConnMonClientEnumBuf clientBuf; |
|
502 iActiveWrapper->StartGetConnSharings( iConnectionId, |
|
503 iConnectionMonitor, |
|
504 clientBuf ); |
|
505 |
|
506 TInt err( iActiveWrapper->iStatus.Int() ); |
|
507 CMUILOGGER_WRITE_F( "RefreshSharings status: %d", err ); |
|
508 |
|
509 if ( !err ) |
|
510 { |
|
511 count = clientBuf().iCount; |
|
512 } |
|
513 |
|
514 CMUILOGGER_WRITE_F( "clientBuf().iCount: %d", count ); |
|
515 |
|
516 #ifndef __WINS__ // Appl. uid is always zero in emulator |
|
517 |
|
518 RApaLsSession appSess; |
|
519 TApaAppInfo appInfo; |
|
520 |
|
521 // The connection could be shared by several applications |
|
522 User::LeaveIfError( appSess.Connect() ); |
|
523 |
|
524 TUint i; |
|
525 for ( i = 0; i < count; i++ ) |
|
526 { |
|
527 actAppName = NULL; |
|
528 appInfo.iCaption.Zero(); |
|
529 |
|
530 TInt result = appSess.GetAppInfo( appInfo, |
|
531 clientBuf().iUid[i] ); |
|
532 |
|
533 //================================ |
|
534 CMUILOGGER_WRITE_F( "result: %d", result ); |
|
535 CMUILOGGER_WRITE_F( "iClientInfo.iUid[i].iUid: %x", |
|
536 clientBuf().iUid[i].iUid ); |
|
537 |
|
538 if ( result != KErrNone ) |
|
539 { |
|
540 TInt resId = 0; |
|
541 switch ( clientBuf().iUid[i].iUid ) |
|
542 { |
|
543 case KMessagingServerUid: // Messaging |
|
544 { |
|
545 resId = R_QTN_CMON_SHARING_APP_MSG_SERVER; |
|
546 break; |
|
547 } |
|
548 case KDownloadMgrServerUid: // Downloads |
|
549 { |
|
550 resId = R_QTN_CMON_SHARING_APP_DL_MG; |
|
551 break; |
|
552 } |
|
553 case KFeedsServerUid: // Web Feeds |
|
554 { |
|
555 resId = R_QTN_CMON_SHARING_APP_RSS_SERVER; |
|
556 break; |
|
557 } |
|
558 case KJavaVMUid: // Application |
|
559 { |
|
560 resId = R_QTN_CMON_SHARING_APP_JAVA_MIDLET; |
|
561 break; |
|
562 } |
|
563 case KBannedServerUID: |
|
564 { // Forget about DHCP server! |
|
565 break; |
|
566 } |
|
567 case KSUPLServerUid: |
|
568 { |
|
569 resId = R_QTN_CMON_SHARING_APP_SUPL; |
|
570 break; |
|
571 } |
|
572 default: // (unknown) |
|
573 { |
|
574 resId = R_QTN_CMON_SHARING_APP_UNKNOWN; |
|
575 break; |
|
576 } |
|
577 } |
|
578 |
|
579 if ( resId ) |
|
580 { |
|
581 actAppName = StringLoader::LoadL( resId ); |
|
582 } |
|
583 } |
|
584 else |
|
585 { |
|
586 actAppName = HBufC::NewL( appInfo.iCaption.Length() ); |
|
587 TPtr actAppNameBuf = actAppName->Des(); |
|
588 actAppNameBuf.Append( appInfo.iCaption ); |
|
589 } |
|
590 |
|
591 if ( actAppName ) |
|
592 { |
|
593 iAppNames->AppendL( actAppName->Des() ); |
|
594 delete actAppName; |
|
595 } |
|
596 } |
|
597 |
|
598 iAppNames->Sort(); |
|
599 appSess.Close(); |
|
600 #else |
|
601 TInt countBan( 0 ); |
|
602 |
|
603 if ( !err ) |
|
604 { |
|
605 // remove the DHCP server is not actually |
|
606 // an owner of the connection |
|
607 for ( TUint tmp = 0; tmp < count; ++tmp ) |
|
608 { |
|
609 TUid uid = clientBuf().iUid[tmp]; |
|
610 |
|
611 if ( uid.iUid == KBannedServerUID ) |
|
612 { |
|
613 ++countBan; |
|
614 } |
|
615 } // end |
|
616 } |
|
617 |
|
618 _LIT( KStrApplication, "Application" ); |
|
619 // Give a dummy name of the application |
|
620 for ( TInt i = 0; i < ( count - countBan ); i++ ) |
|
621 { |
|
622 iAppNames->AppendL( KStrApplication ); |
|
623 } |
|
624 |
|
625 #endif // __WINS__ |
|
626 |
|
627 } |
|
628 /* modem connections does not need application name |
|
629 else |
|
630 { |
|
631 } |
|
632 */ |
|
633 sharings = iAppNames->Count(); |
|
634 } |
|
635 } |
|
636 |
|
637 CMUILOGGER_LEAVEFN( "CConnectionInfoBase::RefreshAppNamesL" ); |
|
638 return sharings; |
|
639 } |
|
640 |
|
641 |
|
642 // --------------------------------------------------------- |
|
643 // CConnectionInfoBase::ToDetailsListBoxItemTextL |
|
644 // --------------------------------------------------------- |
|
645 // |
|
646 HBufC* CConnectionInfoBase::ToDetailsListBoxItemTextL( |
|
647 const TUint aResourceId, |
|
648 const HBufC* aValueText ) const |
|
649 { |
|
650 CMUILOGGER_ENTERFN( "CConnectionInfoBase::ToDetailsListBoxItemTextL" ); |
|
651 |
|
652 HBufC* columnName = NULL; |
|
653 if ( aResourceId ) |
|
654 { |
|
655 columnName = StringLoader::LoadLC( aResourceId ); |
|
656 } |
|
657 else |
|
658 { |
|
659 columnName = KEmpty().AllocLC(); |
|
660 } |
|
661 |
|
662 HBufC* listBoxItemText = HBufC::NewL( KDetailsListItemText ); |
|
663 |
|
664 TPtr ptrToListBoxItemText = listBoxItemText->Des(); |
|
665 |
|
666 ptrToListBoxItemText.Format( KDetailsListItemTextFormat, |
|
667 columnName, aValueText ); |
|
668 CleanupStack::PopAndDestroy( columnName ); |
|
669 |
|
670 |
|
671 CMUILOGGER_LEAVEFN( "CConnectionInfoBase::ToDetailsListBoxItemTextL" ); |
|
672 |
|
673 return listBoxItemText; |
|
674 } |
|
675 |
|
676 // --------------------------------------------------------- |
|
677 // CConnectionInfoBase::ToDetailsListBoxItemTextWithAppendL |
|
678 // --------------------------------------------------------- |
|
679 // |
|
680 void CConnectionInfoBase::ToDetailsListBoxItemTextWithAppendL( |
|
681 const TUint aResourceId, |
|
682 const HBufC* aValueText ) |
|
683 { |
|
684 HBufC* listBoxItemText = ToDetailsListBoxItemTextL( aResourceId, |
|
685 aValueText ); |
|
686 CleanupStack::PushL( listBoxItemText ); |
|
687 CMUILOGGER_WRITE_F( "LISTBOXITEM: %S", listBoxItemText ); |
|
688 iDetailsArray->AppendL( *listBoxItemText ); |
|
689 CleanupStack::PopAndDestroy( listBoxItemText ); |
|
690 } |
|
691 |
|
692 |
|
693 // --------------------------------------------------------- |
|
694 // CConnectionInfoBase::ToDetailsListBoxItemTextWithReplaceL |
|
695 // --------------------------------------------------------- |
|
696 // |
|
697 void CConnectionInfoBase::ToDetailsListBoxItemTextWithReplaceL( |
|
698 const TUint aResourceId, |
|
699 const HBufC* aValueText, |
|
700 TInt aIndex ) |
|
701 { |
|
702 CMUILOGGER_ENTERFN |
|
703 ( "CConnectionInfoBase::ToDetailsListBoxItemTextWithReplaceL" ); |
|
704 CMUILOGGER_WRITE_F( "aValueText: %S", aValueText ); |
|
705 |
|
706 if ( /*( iDetailsArray ) && */ |
|
707 ( aIndex < iDetailsArray->Count() ) && |
|
708 ( aIndex > KErrNotFound ) ) |
|
709 { |
|
710 HBufC* listBoxItemText = ToDetailsListBoxItemTextL( aResourceId, |
|
711 aValueText ); |
|
712 iDetailsArray->Delete( aIndex ); |
|
713 CleanupStack::PushL( listBoxItemText ); |
|
714 iDetailsArray->InsertL( aIndex, *listBoxItemText ); |
|
715 CleanupStack::PopAndDestroy( listBoxItemText ); |
|
716 iDetailsArray->Compress(); |
|
717 } |
|
718 CMUILOGGER_LEAVEFN |
|
719 ( "CConnectionInfoBase::ToDetailsListBoxItemTextWithReplaceL" ); |
|
720 |
|
721 } |
|
722 |
|
723 // --------------------------------------------------------- |
|
724 // CConnectionInfoBase::ToStringBearerLC |
|
725 // --------------------------------------------------------- |
|
726 // |
|
727 HBufC* CConnectionInfoBase::ToStringBearerLC() const |
|
728 { |
|
729 HBufC* bearer = NULL; |
|
730 TUint resourceId( 0 ); |
|
731 |
|
732 // Bearer type |
|
733 if ( iConnectionBearerType == EBearerHSCSD || |
|
734 iConnectionBearerType == EBearerExternalHSCSD ) |
|
735 { |
|
736 resourceId = R_QTN_CMON_BEARER_HSCSD; |
|
737 |
|
738 } |
|
739 else if ( iConnectionBearerType == EBearerCSD || |
|
740 iConnectionBearerType == EBearerExternalCSD || |
|
741 iConnectionBearerType == EBearerWcdmaCSD || |
|
742 iConnectionBearerType == EBearerExternalWcdmaCSD ) |
|
743 { |
|
744 resourceId = R_QTN_SET_BEARER_DATA_CALL; |
|
745 } |
|
746 else if ( iConnectionBearerType == EBearerWLAN ) |
|
747 { |
|
748 resourceId = R_QTN_WLAN_SETT_BEARER_WLAN; |
|
749 } |
|
750 else |
|
751 { |
|
752 resourceId = R_QTN_SET_BEARER_PACKET_DATA; |
|
753 } |
|
754 |
|
755 bearer = StringLoader::LoadLC( resourceId ); |
|
756 |
|
757 return bearer; |
|
758 } |
|
759 |
|
760 |
|
761 // --------------------------------------------------------- |
|
762 // CConnectionInfoBase::ToStringStatusLC |
|
763 // --------------------------------------------------------- |
|
764 // |
|
765 HBufC* CConnectionInfoBase::ToStringStatusLC( TBool aIsDetailsView ) const |
|
766 { |
|
767 HBufC* status = NULL; |
|
768 TUint resourceId( 0 ); |
|
769 switch ( iConnectionStatus ) |
|
770 { |
|
771 case EConnectionCreated: |
|
772 { |
|
773 if ( iUpSpeed.quot || iUpSpeed.rem || |
|
774 iDownSpeed.quot || iDownSpeed.rem ) |
|
775 { |
|
776 resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_ACTIVE |
|
777 : R_QTN_CMON_STATUS_ACTIVE; |
|
778 } |
|
779 else |
|
780 { |
|
781 resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_IDLE |
|
782 : R_QTN_CMON_STATUS_IDLE; |
|
783 } |
|
784 break; |
|
785 } |
|
786 case EConnectionUninitialized: |
|
787 case EConnectionClosed: |
|
788 { |
|
789 resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_CLOSED |
|
790 : R_QTN_CMON_STATUS_CLOSED; |
|
791 break; |
|
792 } |
|
793 case EConnectionClosing: |
|
794 { |
|
795 resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_CLOSING |
|
796 : R_QTN_CMON_STATUS_CLOSING; |
|
797 break; |
|
798 } |
|
799 case EConnectionSuspended: |
|
800 { |
|
801 resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_SUSPENDED |
|
802 : R_QTN_CMON_STATUS_SUSPENDED; |
|
803 break; |
|
804 } |
|
805 case EConnectionCreating: |
|
806 default : |
|
807 { |
|
808 resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_CREATING |
|
809 : R_QTN_CMON_STATUS_CREATING; |
|
810 break; |
|
811 } |
|
812 } |
|
813 |
|
814 status = StringLoader::LoadLC( resourceId ); |
|
815 |
|
816 return status; |
|
817 } |
|
818 |
|
819 |
|
820 // --------------------------------------------------------- |
|
821 // CConnectionInfoBase::ToStringTotalTransmittedDataLC |
|
822 // --------------------------------------------------------- |
|
823 // |
|
824 HBufC* CConnectionInfoBase::ToStringTotalTransmittedDataLC() const |
|
825 { |
|
826 TUint total = iUploaded + iDownloaded; |
|
827 CMUILOGGER_WRITE_F( "iUploaded : %d", iUploaded ); |
|
828 CMUILOGGER_WRITE_F( "iDownloaded : %d", iDownloaded ); |
|
829 CMUILOGGER_WRITE_F( "total : %d", total ); |
|
830 |
|
831 return ToStringLoadedDataLC( total ); |
|
832 } |
|
833 |
|
834 // --------------------------------------------------------- |
|
835 // CConnectionInfoBase::ToStringSentDataLC |
|
836 // --------------------------------------------------------- |
|
837 // |
|
838 HBufC* CConnectionInfoBase::ToStringSentDataLC( TBool aToBeThreeDigit ) const |
|
839 { |
|
840 return ToStringLoadedDataLC( iUploaded, aToBeThreeDigit, KUpArrowChar ); |
|
841 } |
|
842 |
|
843 |
|
844 // --------------------------------------------------------- |
|
845 // CConnectionInfoBase::ToStringReceivedDataLC |
|
846 // --------------------------------------------------------- |
|
847 // |
|
848 HBufC* CConnectionInfoBase::ToStringReceivedDataLC( TBool aToBeThreeDigit ) const |
|
849 { |
|
850 return ToStringLoadedDataLC( iDownloaded, aToBeThreeDigit, KDownArrowChar ); |
|
851 } |
|
852 |
|
853 |
|
854 // --------------------------------------------------------- |
|
855 // CConnectionInfoBase::ToStringTransferSpeedUpLC |
|
856 // --------------------------------------------------------- |
|
857 // |
|
858 HBufC* CConnectionInfoBase::ToStringTransferSpeedUpLC() const |
|
859 { |
|
860 return ToStringTransferSpeedLC( iUpSpeed, KUpArrowChar ); |
|
861 } |
|
862 |
|
863 |
|
864 // --------------------------------------------------------- |
|
865 // CConnectionInfoBase::ToStringTransferSpeedDownLC |
|
866 // --------------------------------------------------------- |
|
867 // |
|
868 HBufC* CConnectionInfoBase::ToStringTransferSpeedDownLC() const |
|
869 { |
|
870 return ToStringTransferSpeedLC( iDownSpeed, KDownArrowChar ); |
|
871 } |
|
872 |
|
873 |
|
874 // --------------------------------------------------------- |
|
875 // CConnectionInfoBase::ToStringDurationLC |
|
876 // --------------------------------------------------------- |
|
877 // |
|
878 HBufC* CConnectionInfoBase::ToStringDurationLC() const |
|
879 { |
|
880 const TUint KTimeStringLength = 64; |
|
881 const TUint KTimeFormatBuf = 16; |
|
882 const TUint KDateFormatBuf = 16; |
|
883 _LIT( KDayFormat, "%d" ); |
|
884 |
|
885 |
|
886 TTime now; |
|
887 now.UniversalTime(); |
|
888 HBufC* timeString = NULL; |
|
889 |
|
890 TTimeIntervalDays days = NULL; |
|
891 |
|
892 if ( iStartTime != NULL ) |
|
893 { |
|
894 // calculate days passed since connection started |
|
895 days = now.DaysFrom( iStartTime ); |
|
896 CMUILOGGER_WRITEF( _L( "ToStringDurationLC days before: %d" ), |
|
897 days.Int() ); |
|
898 } |
|
899 |
|
900 // passed time since connection established. |
|
901 if ( days.Int() <= 0 ) |
|
902 // it's still within 1 day |
|
903 { |
|
904 timeString = HBufC::NewLC( KTimeStringLength ); |
|
905 TPtr16 tempBuf( timeString->Des() ); |
|
906 |
|
907 HBufC* temp = StringLoader::LoadLC( R_QTN_TIME_DURAT_LONG_WITH_ZERO ); |
|
908 |
|
909 iDuration.FormatL( tempBuf, *temp ); |
|
910 CleanupStack::PopAndDestroy( temp ); |
|
911 } |
|
912 else |
|
913 // more than 1 day |
|
914 { |
|
915 CMUILOGGER_WRITEF( _L( "ToStringDurationLC days after: %d" ), |
|
916 days.Int() ); |
|
917 |
|
918 TBuf<KDateFormatBuf> dayFormat; |
|
919 dayFormat.Format( KDayFormat, days.Int() ); |
|
920 |
|
921 // format time format string |
|
922 HBufC* tempFormat = StringLoader::LoadLC( |
|
923 R_QTN_TIME_DURAT_SHORT_WITH_ZERO ); |
|
924 TBuf<KTimeFormatBuf> tempBuf; |
|
925 |
|
926 // format hours:mins |
|
927 iDuration.FormatL( tempBuf, *tempFormat ); |
|
928 |
|
929 CDesCArrayFlat* strings = new( ELeave ) CDesCArrayFlat( 2 ); |
|
930 CleanupStack::PushL( strings ); |
|
931 |
|
932 strings->AppendL( dayFormat ); |
|
933 strings->AppendL( tempBuf ); |
|
934 |
|
935 timeString = StringLoader::LoadL( R_QTN_CMON_DURATION_OVER_24H, |
|
936 *strings ); |
|
937 |
|
938 CleanupStack::PopAndDestroy( strings ); |
|
939 CleanupStack::PopAndDestroy( tempFormat ); |
|
940 CleanupStack::PushL( timeString ); |
|
941 } |
|
942 |
|
943 CMUILOGGER_WRITE_F( "duration time1: %S", timeString ); |
|
944 |
|
945 TPtr temp( timeString->Des() ); |
|
946 AknTextUtils::DisplayTextLanguageSpecificNumberConversion( temp ); |
|
947 CMUILOGGER_WRITE_F( "duration temp: %S", &temp ); |
|
948 |
|
949 CMUILOGGER_WRITE_F( "duration time2: %S", timeString ); |
|
950 |
|
951 |
|
952 return timeString; |
|
953 } |
|
954 |
|
955 |
|
956 // --------------------------------------------------------- |
|
957 // CConnectionInfoBase::CheckMrouterIap |
|
958 // --------------------------------------------------------- |
|
959 // |
|
960 TBool CConnectionInfoBase::CheckMrouterIap() |
|
961 { |
|
962 CMUILOGGER_ENTERFN( "CheckMrouterIap" ); |
|
963 TBool result( ETrue ); |
|
964 |
|
965 CMUILOGGER_WRITE_F( "IAP name: %S", &iConnectionName ); |
|
966 iConnectionName.Trim(); |
|
967 if ( iConnectionName.Left( |
|
968 KMrouterName().Length() ).CompareF( KMrouterName ) ) |
|
969 { |
|
970 result = EFalse; |
|
971 } |
|
972 CMUILOGGER_LEAVEFN( "CheckMrouterIap" ); |
|
973 return result; |
|
974 } |
|
975 |
|
976 |
|
977 // --------------------------------------------------------- |
|
978 // CConnectionInfoBase::ToStringLoadedDataLC |
|
979 // --------------------------------------------------------- |
|
980 // |
|
981 HBufC* CConnectionInfoBase::ToStringLoadedDataLC( TUint aLoadedData, |
|
982 TBool aToBeThreeDigit, |
|
983 const TUint aArrowChar ) const |
|
984 { |
|
985 const TUint KTransferedBytesFormatBuf = 16; |
|
986 const TUint KTransferedBytesWidth = 10; |
|
987 TUint transferedBytesDecimalPlaces(2); |
|
988 TUint resId; |
|
989 HBufC* loadedTxt = NULL; |
|
990 |
|
991 TBuf<KTransferedBytesFormatBuf> buf; |
|
992 |
|
993 if ( aLoadedData < 1000 ) // bytes |
|
994 { |
|
995 if ( aToBeThreeDigit ) // added arrow to listbox |
|
996 { |
|
997 _LIT( KUdLinkFormatBytes, "%c%d" ); |
|
998 |
|
999 buf.Format( KUdLinkFormatBytes, aArrowChar, aLoadedData ); |
|
1000 } |
|
1001 else |
|
1002 { |
|
1003 _LIT( KUdLinkFormatBytes, "%d" ); |
|
1004 |
|
1005 buf.Format( KUdLinkFormatBytes, aLoadedData ); |
|
1006 } |
|
1007 resId = R_QTN_LOG_GPRS_AMOUNT_B; |
|
1008 } |
|
1009 else |
|
1010 { // KB, MB, GB |
|
1011 TUint denom; |
|
1012 |
|
1013 if ( aLoadedData < 1000 * 1024 ) |
|
1014 { |
|
1015 denom = 1024; |
|
1016 resId = R_QTN_LOG_GPRS_AMOUNT_KB; |
|
1017 } |
|
1018 else if ( aLoadedData < 1000 * 1024 * 1024 ) |
|
1019 { |
|
1020 denom = 1024 * 1024; |
|
1021 resId = R_QTN_LOG_GPRS_AMOUNT_MB; |
|
1022 } |
|
1023 else |
|
1024 { |
|
1025 denom = 1024 * 1024 * 1024; |
|
1026 resId = R_QTN_LOG_GPRS_AMOUNT_GB; |
|
1027 } |
|
1028 |
|
1029 TReal value = STATIC_CAST( TReal, aLoadedData ) / |
|
1030 STATIC_CAST( TReal, denom ); |
|
1031 |
|
1032 if ( aToBeThreeDigit ) |
|
1033 { |
|
1034 if ( value < 10 ) // number of decimal places |
|
1035 { |
|
1036 transferedBytesDecimalPlaces = 2; |
|
1037 } |
|
1038 else if ( value < 100 ) |
|
1039 { |
|
1040 transferedBytesDecimalPlaces = 1; |
|
1041 } |
|
1042 else |
|
1043 { |
|
1044 transferedBytesDecimalPlaces = 0; |
|
1045 } |
|
1046 } |
|
1047 |
|
1048 TRealFormat Format( KTransferedBytesWidth, |
|
1049 transferedBytesDecimalPlaces ); |
|
1050 |
|
1051 HBufC* number = HBufC::NewLC( KTransferedBytesWidth ); |
|
1052 number->Des().Num( value, Format ); |
|
1053 |
|
1054 if ( aToBeThreeDigit ) // added arrow to listbox |
|
1055 { |
|
1056 _LIT( KUdFormatLarge, "%c%S" ); |
|
1057 buf.Format( KUdFormatLarge, aArrowChar, number ); |
|
1058 } |
|
1059 else |
|
1060 { |
|
1061 _LIT( KUdFormatLarge, "%S" ); |
|
1062 buf.Format( KUdFormatLarge, number ); |
|
1063 } |
|
1064 CleanupStack::PopAndDestroy( number ); |
|
1065 } |
|
1066 |
|
1067 loadedTxt = StringLoader::LoadLC( resId, buf ); |
|
1068 |
|
1069 TPtr temp( loadedTxt->Des() ); |
|
1070 AknTextUtils::DisplayTextLanguageSpecificNumberConversion( temp ); |
|
1071 |
|
1072 return loadedTxt; |
|
1073 } |
|
1074 |
|
1075 |
|
1076 // --------------------------------------------------------- |
|
1077 // CConnectionInfoBase::ToStringTransferSpeedLC |
|
1078 // --------------------------------------------------------- |
|
1079 // |
|
1080 HBufC* CConnectionInfoBase::ToStringTransferSpeedLC( div_t aSpeed, |
|
1081 const TUint aArrowChar ) const |
|
1082 { |
|
1083 const TUint KUpDownSpeedBufSize = 16; |
|
1084 _LIT( KUdSpeedFmt, "%c%d%S%02d" ); |
|
1085 |
|
1086 TBuf<KUpDownSpeedBufSize> buf; |
|
1087 TInt resId; |
|
1088 |
|
1089 HBufC* decSep = StringLoader::LoadLC( R_TEXT_CALC_DECIMAL_SEPARATOR ); |
|
1090 |
|
1091 resId = R_QTN_CMON_DATA_TRANSF_RATE_UL; |
|
1092 buf.Format( KUdSpeedFmt, aArrowChar, aSpeed.quot, decSep, aSpeed.rem ); |
|
1093 |
|
1094 CleanupStack::PopAndDestroy( decSep ); |
|
1095 |
|
1096 HBufC* speedTxt = StringLoader::LoadLC( resId, buf ); |
|
1097 |
|
1098 TPtr temp( speedTxt->Des() ); |
|
1099 AknTextUtils::DisplayTextLanguageSpecificNumberConversion( temp ); |
|
1100 |
|
1101 return speedTxt; |
|
1102 } |
|
1103 |
|
1104 // --------------------------------------------------------- |
|
1105 // CConnectionInfoBase::InitializeConnectionInfoL |
|
1106 // --------------------------------------------------------- |
|
1107 // |
|
1108 void CConnectionInfoBase::InitializeConnectionInfoL() |
|
1109 { |
|
1110 CMUILOGGER_WRITE( "InitializeConnectionInfoL - start " ); |
|
1111 TConnMonTimeBuf timeBuf; |
|
1112 iActiveWrapper->StartGetConnTime( iConnectionId, |
|
1113 iConnectionMonitor, |
|
1114 timeBuf ); |
|
1115 TInt err( iActiveWrapper->iStatus.Int() ); |
|
1116 CMUILOGGER_WRITE_F( "IntiConnectionInfo() status: %d", err ); |
|
1117 if ( err != KErrNone ) |
|
1118 { |
|
1119 User::Leave( err ); |
|
1120 } |
|
1121 |
|
1122 iStartTime = timeBuf(); |
|
1123 TDateTime dt = iStartTime.DateTime(); |
|
1124 CMUILOGGER_WRITE_F( "Day : %d", dt.Day() ); |
|
1125 CMUILOGGER_WRITE_F( "Hour : %d", dt.Hour() ); |
|
1126 CMUILOGGER_WRITE_F( "Minute : %d", dt.Minute() ); |
|
1127 CMUILOGGER_WRITE_F( "Second : %d", dt.Second() ); |
|
1128 |
|
1129 |
|
1130 RefreshDetailsL(); |
|
1131 if ( !iDetailsArray ) |
|
1132 { |
|
1133 ToArrayDetailsL(); |
|
1134 } |
|
1135 CMUILOGGER_WRITE( "InitializeConnectionInfoL - end " ); |
|
1136 } |
|
1137 |
|
1138 // --------------------------------------------------------- |
|
1139 // CConnectionInfoBase::StringMarkerRemoval |
|
1140 // --------------------------------------------------------- |
|
1141 // |
|
1142 void CConnectionInfoBase::StringMarkerRemoval( HBufC* aStringHolder ) |
|
1143 { |
|
1144 TPtr bufPtr = aStringHolder->Des(); |
|
1145 |
|
1146 const TText KLRMarker = 0x200E; |
|
1147 const TText KRLMarker = 0x200F; |
|
1148 |
|
1149 TBuf<2> markers; |
|
1150 markers.Append( KLRMarker ); |
|
1151 markers.Append( KRLMarker ); |
|
1152 |
|
1153 // This function is requested to remove directional markers, because they |
|
1154 // cause a display error in languages such Hebrew. Directional markers will |
|
1155 // be correctly added later, when the one or two parts of the time string |
|
1156 // are merged, again with StringLoader functions. |
|
1157 AknTextUtils::StripCharacters( bufPtr, markers ); |
|
1158 } |
|
1159 |
|
1160 // --------------------------------------------------------- |
|
1161 // CConnectionInfoBase::ToStringAppNameLC |
|
1162 // --------------------------------------------------------- |
|
1163 // |
|
1164 HBufC* CConnectionInfoBase::ToStringAppNameLC( TInt aAppIndex ) |
|
1165 { |
|
1166 HBufC* appName = ( iAppNames->MdcaPoint( aAppIndex ) ).AllocLC(); |
|
1167 |
|
1168 return appName; |
|
1169 } |
|
1170 |
|
1171 // --------------------------------------------------------- |
|
1172 // CConnectionInfoBase::GetDeletedFromCMUI |
|
1173 // --------------------------------------------------------- |
|
1174 // |
|
1175 TBool CConnectionInfoBase::GetDeletedFromCMUI() const |
|
1176 { |
|
1177 return iDeletedFromCMUI; |
|
1178 } |
|
1179 |
|
1180 // --------------------------------------------------------- |
|
1181 // CConnectionInfoBase::SetAllDeletedFromCMUI |
|
1182 // --------------------------------------------------------- |
|
1183 // |
|
1184 void CConnectionInfoBase::SetAllDeletedFromCMUI() |
|
1185 { |
|
1186 iConnectionStatus = EConnectionClosing; |
|
1187 } |
|
1188 |
|
1189 // --------------------------------------------------------- |
|
1190 // CConnectionInfoBase::SetDeletedFromCMUI |
|
1191 // --------------------------------------------------------- |
|
1192 // |
|
1193 void CConnectionInfoBase::SetDeletedFromCMUI() |
|
1194 { |
|
1195 iConnectionStatus = EConnectionClosing; |
|
1196 |
|
1197 iDeletedFromCMUI = ETrue; |
|
1198 } |
|
1199 |
|
1200 |
|
1201 // End of File |
|