# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1283449805 -10800 # Node ID a9c709db68dbb1d3c52c3e0cfa75c86f627afd8a # Parent 4af712113915dffb2e1dd62b5e66852738f8af82 Revision: 201033 Kit: 201035 diff -r 4af712113915 -r a9c709db68db bearermanagement/mpm/group/mpmserver.mmp --- a/bearermanagement/mpm/group/mpmserver.mmp Wed Aug 18 10:10:23 2010 +0300 +++ b/bearermanagement/mpm/group/mpmserver.mmp Thu Sep 02 20:50:05 2010 +0300 @@ -50,6 +50,8 @@ SOURCE mpmdialogbase.cpp SOURCE mpmdatausagewatcher.cpp SOURCE mpmvpntogglewatcher.cpp +SOURCE mpmexpirytimer.cpp +SOURCE mpmconnpermquerytimer.cpp USERINCLUDE ../inc diff -r 4af712113915 -r a9c709db68db bearermanagement/mpm/inc/mpmconnmonevents.h --- a/bearermanagement/mpm/inc/mpmconnmonevents.h Wed Aug 18 10:10:23 2010 +0300 +++ b/bearermanagement/mpm/inc/mpmconnmonevents.h Thu Sep 02 20:50:05 2010 +0300 @@ -293,6 +293,13 @@ inline TBool DiscardAvailabilityNotification(); /** + * Returns the setting whether IAP availability notification has been discarded by MPM. + * @since 3.2 + * @return ETrue if availability notifications have been discarded. + */ + inline TBool AvailabilityNotificationDiscarded(); + + /** * Creates preferred carrier available notification when needed. * @since 5.1 * @param aCaller Identifies the calling context @@ -343,6 +350,9 @@ // until MPM initiated WLAN scan request has completed. TBool iDiscardAvailabilityNotification; + // ConnMon's IAP availability event has been discarded. + TBool iAvailabilityNotificationDiscarded; + #ifdef _DEBUG TBool iFilterEvents; // by default off. (CBase) public: @@ -378,6 +388,15 @@ return iDiscardAvailabilityNotification; } +// ----------------------------------------------------------------------------- +// CMPMConnMonEvents::AvailabilityNotificationDiscarded +// ----------------------------------------------------------------------------- +// +inline TBool CMPMConnMonEvents::AvailabilityNotificationDiscarded() + { + return iAvailabilityNotificationDiscarded; + } + #endif // MPMCONNMONEVENTS_H // End of file diff -r 4af712113915 -r a9c709db68db bearermanagement/mpm/inc/mpmconnpermquerytimer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bearermanagement/mpm/inc/mpmconnpermquerytimer.h Thu Sep 02 20:50:05 2010 +0300 @@ -0,0 +1,99 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Declaration of class CMPMConnPermQueryTimer. +* +*/ + +#ifndef MPMCONNPERMQUERYTIMER_H +#define MPMCONNPERMQUERYTIMER_H + +// INCLUDES +#include +#include "mpmexpirytimercallback.h" + +class CMPMServer; +class CMPMExpiryTimer; + +/** +* Class that implements Connection permission query's cancellation delay timer +* and callback. +* @since 5.2 +*/ +class CMPMConnPermQueryTimer : public CBase, public MMPMExpiryTimerCallback + { + +public: + + /** + * New for calling the two-phased constructor. + * @since 5.2 + * @param aServer Pointer to the MPM server object, for callback purposes + * @return Pointer to created object instance + */ + static CMPMConnPermQueryTimer* NewL( CMPMServer* aServer ); + + /** + * Destructor. + * @since 5.2 + */ + virtual ~CMPMConnPermQueryTimer(); + + /** + * Start the timer. + * @since 5.2 + */ + void StartTimer(); + + /** + * Dialog expiration timeout callback, inherited from MMPMExpiryTimerCallback. + * @since 5.2 + */ + void HandleTimedOut(); + +private: + + /** + * C++ default constructor. + * @since 5.2 + * @param aServer Pointer to the MPM server object, for callback purposes + */ + CMPMConnPermQueryTimer( CMPMServer* aServer ); + + /** + * Symbian 2nd phase constructor. + * @since 5.2 + */ + void ConstructL(); + + +private: // data + + /** + * Pointer to the MPM Server object. Not own. + */ + CMPMServer* iServer; + + /** + * Pointer to the common MPM expiry timer object. + */ + CMPMExpiryTimer* iExpiryTimer; + + /** + * Timeout constant. + */ + static const TInt KTimeout = 10000000; // 10 sec + + }; + +#endif // MPMCONNPERMQUERYTIMER_H diff -r 4af712113915 -r a9c709db68db bearermanagement/mpm/inc/mpmexpirytimer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bearermanagement/mpm/inc/mpmexpirytimer.h Thu Sep 02 20:50:05 2010 +0300 @@ -0,0 +1,85 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Declaration of class CMPMExpiryTimer. +* +*/ + +#ifndef MPMEXPIRYTIMER_H +#define MPMEXPIRYTIMER_H + +// INCLUDES +#include +#include + +#include "mpmexpirytimercallback.h" + +/** +* Class that implements simple microsecond timer and callback. +* @since 5.2 +*/ +NONSHARABLE_CLASS( CMPMExpiryTimer ): public CTimer + { +public: + + /** + * New for calling the two-phased constructor. + * @since 5.2 + * @param aCallback Pointer to the class where callback goes + * @param aTimeout Timeout value in microseconds + * @return Pointer to created object instance + */ + static CMPMExpiryTimer* NewL( MMPMExpiryTimerCallback& aCallback, + TInt aTimeout); + + /** + * Starts up the timer. + * @since 5.2 + */ + void Start(); + +private: + /** + * C++ constructor. + * @since 5.2 + * @param aCallback Pointer to the class where callback goes + * @param aTimer Timeout value in microseconds + */ + CMPMExpiryTimer( MMPMExpiryTimerCallback& aCallback, + TInt aTimeout ); + + /** + * ConstructL. + * @since 5.2 + */ + void ConstructL(); + + /** + * RunL. Inherited from CTimer. + * @since 5.2 + */ + void RunL(); + +private: + /** + * Callback reference. + */ + MMPMExpiryTimerCallback& iCallback; + + /** + * Timeout value in microseconds. + */ + TInt iTimeout; + }; + +#endif // MPMEXPIRYTIMER_H diff -r 4af712113915 -r a9c709db68db bearermanagement/mpm/inc/mpmexpirytimercallback.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bearermanagement/mpm/inc/mpmexpirytimercallback.h Thu Sep 02 20:50:05 2010 +0300 @@ -0,0 +1,38 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Declaration of class MMPMExpiryTimerCallback. +* +*/ + +#ifndef MPMEXPIRYTIMERCALLBACK_H +#define MPMEXPIRYTIMERCALLBACK_H + +// INCLUDES +#include + +/** +* Callback class for timer expiration. +* @since 5.2 +*/ +class MMPMExpiryTimerCallback + { +public: + /** + * Callback function for handling the timeout. + * @since 5.2 + */ + virtual void HandleTimedOut() = 0; + }; + +#endif // MPMEXPIRYTIMERCALLBACK_H diff -r 4af712113915 -r a9c709db68db bearermanagement/mpm/inc/mpmserver.h --- a/bearermanagement/mpm/inc/mpmserver.h Wed Aug 18 10:10:23 2010 +0300 +++ b/bearermanagement/mpm/inc/mpmserver.h Thu Sep 02 20:50:05 2010 +0300 @@ -191,6 +191,7 @@ class CMPMConfirmDlgRoaming; class CMPMConfirmDlgStarting; class CMPMDefaultConnection; +class CMPMConnPermQueryTimer; // CLASS DECLARATION /** @@ -861,6 +862,27 @@ */ void SetOfflineWlanQueryResponse( TOfflineWlanQueryResponse aResponse); + /** + * Starts the connection permission query timer. + * During the timer, no connection permission query can be initiated. + * @since 5.2 + */ + void StartConnPermQueryTimer(); + + /** + * Resets the connection permission query timer. + * @since 5.2 + */ + void ResetConnPermQueryTimer(); + + /** + * Returns true if the connection permission query timer is running. + * During the timer, no connection permission query can be initiated. + * @since 5.2 + * @return ETrue if timer is running, EFalse otherwise. + */ + TBool IsConnPermQueryTimerOn(); + private: /** @@ -989,6 +1011,9 @@ // TConnMonIapInfo Info about available IAPs TConnMonIapInfo iConnMonIapInfo; + + // Connection permission query cancellation delay timer + CMPMConnPermQueryTimer* iConnPermQueryTimer; }; #include "mpmserver.inl" diff -r 4af712113915 -r a9c709db68db bearermanagement/mpm/src/mpmconfirmdlgstarting.cpp --- a/bearermanagement/mpm/src/mpmconfirmdlgstarting.cpp Wed Aug 18 10:10:23 2010 +0300 +++ b/bearermanagement/mpm/src/mpmconfirmdlgstarting.cpp Thu Sep 02 20:50:05 2010 +0300 @@ -197,6 +197,9 @@ { MPMLOGSTRING3( "CMPMConfirmDlgStarting<0x%x>::UserSelectedCancel:\ Complete %d", iConnId, aError ) + // User cancelled the connection permission query, + // don't try again until the timer expires. + iServer.StartConnPermQueryTimer(); iIapSelection.ChooseIapComplete( aError, NULL ); } diff -r 4af712113915 -r a9c709db68db bearermanagement/mpm/src/mpmconnmonevents.cpp --- a/bearermanagement/mpm/src/mpmconnmonevents.cpp Wed Aug 18 10:10:23 2010 +0300 +++ b/bearermanagement/mpm/src/mpmconnmonevents.cpp Thu Sep 02 20:50:05 2010 +0300 @@ -51,7 +51,8 @@ // CMPMConnMonEvents::CMPMConnMonEvents( CMPMServer& aServer ) : iMyServer( aServer ), - iDiscardAvailabilityNotification( EFalse ) + iDiscardAvailabilityNotification( EFalse ), + iAvailabilityNotificationDiscarded( EFalse ) { } @@ -466,6 +467,7 @@ if ( ( iAvailableIAPs.Count() > 0 ) && !DiscardAvailabilityNotification() ) { + iAvailabilityNotificationDiscarded = EFalse; // Remove temporary blacklistings as fresh availability // info is available. // @@ -479,6 +481,7 @@ } else { + iAvailabilityNotificationDiscarded = ETrue; MPMLOGSTRING2( "CMPMConnMonEvents::EventL - IAPs count: %d", iAvailableIAPs.Count() ) MPMLOGSTRING2( diff -r 4af712113915 -r a9c709db68db bearermanagement/mpm/src/mpmconnmonreqs.cpp --- a/bearermanagement/mpm/src/mpmconnmonreqs.cpp Wed Aug 18 10:10:23 2010 +0300 +++ b/bearermanagement/mpm/src/mpmconnmonreqs.cpp Thu Sep 02 20:50:05 2010 +0300 @@ -349,6 +349,12 @@ // iParent.IapAvailabilityChange( EConnMon ); } + + if ( iParent.AvailabilityNotificationDiscarded() ) + { + MPMLOGSTRING( "CMPMConnMonReqs::RunL: AvailabilityNotificationDiscarded, roaming logic triggered" ) + iParent.IapAvailabilityChange( EConnMonEvent ); + } } // check which callback function to use // diff -r 4af712113915 -r a9c709db68db bearermanagement/mpm/src/mpmconnpermquerytimer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bearermanagement/mpm/src/mpmconnpermquerytimer.cpp Thu Sep 02 20:50:05 2010 +0300 @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: Implementation of class CMPMConnPermQueryTimer. + * This timer is used for preventing excessive connection permission queries, + * when the used has cancelled the previous connection permission query. + * + */ + +#include "mpmlogger.h" +#include "mpmserver.h" +#include "mpmexpirytimer.h" +#include "mpmconnpermquerytimer.h" + +// --------------------------------------------------------------------------- +// Creates a new object by calling the two-phased constructor. +// --------------------------------------------------------------------------- +// +CMPMConnPermQueryTimer* CMPMConnPermQueryTimer::NewL( CMPMServer* aServer ) + { + MPMLOGSTRING( "CMPMConnPermQueryTimer::NewL" ) + + CMPMConnPermQueryTimer* self = new( ELeave ) CMPMConnPermQueryTimer( aServer ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Default C++ constructor. +// --------------------------------------------------------------------------- +// +CMPMConnPermQueryTimer::CMPMConnPermQueryTimer( CMPMServer* aServer ) : + iServer( aServer ) + { + MPMLOGSTRING( "CMPMConnPermQueryTimer::CMPMConnPermQueryTimer" ) + } + +// --------------------------------------------------------------------------- +// Symbian 2nd phase constructor. +// --------------------------------------------------------------------------- +// +void CMPMConnPermQueryTimer::ConstructL() + { + MPMLOGSTRING( "CMPMConnPermQueryTimer::ConstructL" ) + iExpiryTimer = CMPMExpiryTimer::NewL( *this, KTimeout ); + } + +// --------------------------------------------------------------------------- +// Destructor. +// --------------------------------------------------------------------------- +// +CMPMConnPermQueryTimer::~CMPMConnPermQueryTimer() + { + MPMLOGSTRING( "CMPMConnPermQueryTimer::~CMPMConnPermQueryTimer" ) + if ( iExpiryTimer ) + { + iExpiryTimer->Cancel(); + delete iExpiryTimer; + } + } + +// --------------------------------------------------------------------------- +// Start the timer. +// --------------------------------------------------------------------------- +// +void CMPMConnPermQueryTimer::StartTimer() + { + MPMLOGSTRING( "CMPMConnPermQueryTimer::StartTimer" ) + if ( iExpiryTimer ) + { + iExpiryTimer->Cancel(); + iExpiryTimer->Start(); + } + } + +// --------------------------------------------------------------------------- +// Handles the timeout. +// --------------------------------------------------------------------------- +// +void CMPMConnPermQueryTimer::HandleTimedOut() + { + MPMLOGSTRING( "CMPMConnPermQueryTimer::HandleTimedOut" ) + iServer->ResetConnPermQueryTimer(); + } diff -r 4af712113915 -r a9c709db68db bearermanagement/mpm/src/mpmexpirytimer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bearermanagement/mpm/src/mpmexpirytimer.cpp Thu Sep 02 20:50:05 2010 +0300 @@ -0,0 +1,75 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implementation of class CMPMExpiryTimer, a common timer class for MPM. +* +*/ + +#include "mpmexpirytimer.h" +#include "mpmexpirytimercallback.h" + +// --------------------------------------------------------------------------- +// Constructs and returns the class object. +// --------------------------------------------------------------------------- +// +CMPMExpiryTimer* CMPMExpiryTimer::NewL( MMPMExpiryTimerCallback& aCallback, TInt aTimeout ) + { + CMPMExpiryTimer* self = new( ELeave ) CMPMExpiryTimer( aCallback, aTimeout ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +// --------------------------------------------------------------------------- +// Default C++ constructor. +// --------------------------------------------------------------------------- +// + +CMPMExpiryTimer::CMPMExpiryTimer( MMPMExpiryTimerCallback& aCallback, TInt aTimeout ): + CTimer( CActive::EPriorityStandard ), + iCallback( aCallback ), + iTimeout( aTimeout ) + { + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// Symbian 2nd phase constructor. +// --------------------------------------------------------------------------- +// + +void CMPMExpiryTimer::ConstructL() + { + CTimer::ConstructL(); + } + +// --------------------------------------------------------------------------- +// RunL, from CTimer, starts up the timer. +// --------------------------------------------------------------------------- +// + +void CMPMExpiryTimer::Start() + { + After( iTimeout ); + } + +// --------------------------------------------------------------------------- +// RunL, from CTimer, called when the timer expires. +// --------------------------------------------------------------------------- +// + +void CMPMExpiryTimer::RunL() + { + iCallback.HandleTimedOut(); + } diff -r 4af712113915 -r a9c709db68db bearermanagement/mpm/src/mpmiapselection.cpp --- a/bearermanagement/mpm/src/mpmiapselection.cpp Wed Aug 18 10:10:23 2010 +0300 +++ b/bearermanagement/mpm/src/mpmiapselection.cpp Thu Sep 02 20:50:05 2010 +0300 @@ -353,12 +353,12 @@ if ( iSession->IsConfirmFirstL( validateIapId ) && !( iSession->MyServer().CommsDatAccess()->IsVirtualIapL( validateIapId ) )) { - - // Check whether queries are enabled + // Check that queries aren't disabled and + // enough time has elapsed from the last query cancelled by the user. if ( !( iChooseIapPref.NoteBehaviour() - & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) ) + & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) && + !iSession->MyServer().IsConnPermQueryTimerOn() ) { - TConnectionId connId = iSession->ConnectionId(); // Set confirmation type based on roaming status @@ -512,8 +512,10 @@ ( iSession->MyServer().CommsDatAccess()->CheckWlanL( validateIapId ) == ENotWlanIap ) && !( iSession->MyServer().CommsDatAccess()->IsVirtualIapL( validateIapId ) ) ) { - // Check whether queries are disabled - if ( !( iChooseIapPref.NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) ) + // Check that queries aren't disabled and + // enough time has elapsed from the last query cancelled by the user. + if ( !( iChooseIapPref.NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) && + !iSession->MyServer().IsConnPermQueryTimerOn() ) { if ( iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMInternationalRoaming ) { @@ -791,8 +793,10 @@ // to the user in this country if ( iSession->MyServer().RoamingWatcher()->RoamingStatus() == EMPMInternationalRoaming ) { - // Check whether queries are enabled - if ( !( iChooseIapPref.NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) ) + // Check that queries aren't disabled and + // enough time has elapsed from the last query cancelled by the user. + if ( !( iChooseIapPref.NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) && + !iSession->MyServer().IsConnPermQueryTimerOn() ) { TConnectionId connId = iSession->ConnectionId(); diff -r 4af712113915 -r a9c709db68db bearermanagement/mpm/src/mpmserver.cpp --- a/bearermanagement/mpm/src/mpmserver.cpp Wed Aug 18 10:10:23 2010 +0300 +++ b/bearermanagement/mpm/src/mpmserver.cpp Thu Sep 02 20:50:05 2010 +0300 @@ -42,6 +42,7 @@ #include "mpmvpntogglewatcher.h" #include "mpmdatausagewatcher.h" #include "mpmpropertydef.h" +#include "mpmconnpermquerytimer.h" static const TUint32 KUidKmdServer = 0x1000088A; @@ -99,7 +100,8 @@ iConnUiUtils( NULL ), iOfflineMode( ECoreAppUIsNetworkConnectionAllowed ), iOfflineWlanQueryResponse( EOfflineResponseUndefined ), - iRoamingToWlanPeriodic( NULL ) + iRoamingToWlanPeriodic( NULL ), + iConnPermQueryTimer( NULL ) { } @@ -270,6 +272,8 @@ delete iCommsDatAccess; delete iConnUiUtils; + + delete iConnPermQueryTimer; } // ----------------------------------------------------------------------------- @@ -383,19 +387,13 @@ "CMPMServer::AppendBMConnection - aConnId = 0x%x, aSnap = %i", aConnId, aSnap ) - // Set the Connection Id, SNAP, Iap Id and connection state - // - TConnectionInfo connInfo; - connInfo.iConnId = aConnId; - connInfo.iSnap = aSnap; - connInfo.iIapId = aIapId; - connInfo.iState = aState; - connInfo.iAppUid = aSession.AppUid(); - - // Package into TActiveBMConn //TODO Redundant.. remove the other one. - // + // Set the Connection Id, SNAP, Iap Id and connection state, into TActiveBMConn TActiveBMConn conn; - conn.iConnInfo = connInfo; + conn.iConnInfo.iConnId = aConnId; + conn.iConnInfo.iSnap = aSnap; + conn.iConnInfo.iIapId = aIapId; + conn.iConnInfo.iState = aState; + conn.iConnInfo.iAppUid = aSession.AppUid(); TInt index1 = iActiveBMConns.Find( conn, TActiveBMConn::MatchConnInfo ); @@ -1482,7 +1480,7 @@ MPMLOGSTRING( "CMPMServer::StartForcedRoamingToWlan" ) // cancel the periodic object - if ( iRoamingToWlanPeriodic != NULL ) + if ( iRoamingToWlanPeriodic ) { iRoamingToWlanPeriodic->Cancel(); } @@ -1554,6 +1552,11 @@ MPMLOGSTRING( "CMPMServer::StartForcedRoamingToConnectedWlanL" ); static_cast( aUpdater )->StartForcedRoamingToWlanL( static_cast( aUpdater )->iConnMonIapInfo ); + // Added also execution of policy based roaming logic because + // connections that are in EStarting state, when WLAN signal + // gets weak, would remain in WLAN as long as signal is weak. + static_cast( aUpdater )->StartForcedRoamingFromWlanL( + static_cast( aUpdater )->iConnMonIapInfo ); return 0; } @@ -2018,6 +2021,61 @@ iOfflineWlanQueryResponse = aResponse; } +// --------------------------------------------------------------------------- +// CMPMServer::StartConnPermQueryTimer +// Starts the connection permission query timer. +// --------------------------------------------------------------------------- +// +void CMPMServer::StartConnPermQueryTimer() + { + MPMLOGSTRING( "CMPMServer::StartConnPermQueryTimer" ) + + if ( !iConnPermQueryTimer ) + { + TRAPD( err, iConnPermQueryTimer = CMPMConnPermQueryTimer::NewL( this ) ); + if ( err == KErrNone ) + { + iConnPermQueryTimer->StartTimer(); + MPMLOGSTRING( "CMPMServer::StartConnPermQueryTimer: Ok." ) + } + } + } + +// --------------------------------------------------------------------------- +// CMPMServer::ResetConnPermQueryTimer +// Resets the connection permission query timer. +// --------------------------------------------------------------------------- +// +void CMPMServer::ResetConnPermQueryTimer() + { + MPMLOGSTRING( "CMPMServer::ResetConnPermQueryTimer" ) + + if ( iConnPermQueryTimer ) + { + delete iConnPermQueryTimer; + iConnPermQueryTimer = NULL; + MPMLOGSTRING( "CMPMServer::ResetConnPermQueryTimer: Ok." ) + } + } + +// --------------------------------------------------------------------------- +// CMPMServer::IsConnPermQueryTimerOn +// Tells if the connection permission query timer is on. +// --------------------------------------------------------------------------- +// +TBool CMPMServer::IsConnPermQueryTimerOn() + { + MPMLOGSTRING( "CMPMServer::IsConnPermQueryTimerOn" ) + + TBool retval = EFalse; + if ( iConnPermQueryTimer ) + { + retval = ETrue; + MPMLOGSTRING( "CMPMServer::IsConnPermQueryTimerOn: Yes." ) + } + return retval; + } + // ----------------------------------------------------------------------------- // TMPMBlackListConnId::Append // ----------------------------------------------------------------------------- diff -r 4af712113915 -r a9c709db68db bearermanagement/mpm/src/mpmserversession.cpp --- a/bearermanagement/mpm/src/mpmserversession.cpp Wed Aug 18 10:10:23 2010 +0300 +++ b/bearermanagement/mpm/src/mpmserversession.cpp Thu Sep 02 20:50:05 2010 +0300 @@ -913,7 +913,10 @@ //Display confirm dialog only if we are moving to cellular IAP if ( MyServer().CommsDatAccess()->CheckWlanL( iMigrateIap ) == ENotWlanIap ) { - if ( !( iIapSelection->MpmConnPref().NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) ) + // Check that connection preferences don't deny queries, and + // enough time has elapsed from the last query cancelled by the user. + if ( !( iIapSelection->MpmConnPref().NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) && + !MyServer().IsConnPermQueryTimerOn() ) { if ( MyServer().RoamingWatcher()->RoamingStatus() == EMPMInternationalRoaming ) { @@ -1015,6 +1018,10 @@ { if( aResponse == EMsgQueryCancelled ) { + // User cancelled the connection permission query, + // don't try again until the timer expires. + MyServer().StartConnPermQueryTimer(); + if( !aReconnect ) { // Send a preferred IAP notification diff -r 4af712113915 -r a9c709db68db cmmanager/cmapplsettingsui/cmapplsettingsui.pro --- a/cmmanager/cmapplsettingsui/cmapplsettingsui.pro Wed Aug 18 10:10:23 2010 +0300 +++ b/cmmanager/cmapplsettingsui/cmapplsettingsui.pro Thu Sep 02 20:50:05 2010 +0300 @@ -31,6 +31,8 @@ CONFIG += hb RESOURCES = res/cmapplsettingsui.qrc +DOCML += res/cmradiodialog.docml + TRANSLATIONS = cmapplsettingsui.ts #Store generated files to their own directory diff -r 4af712113915 -r a9c709db68db cmmanager/cmapplsettingsui/res/cmapplsettingsui.qrc --- a/cmmanager/cmapplsettingsui/res/cmapplsettingsui.qrc Wed Aug 18 10:10:23 2010 +0300 +++ b/cmmanager/cmapplsettingsui/res/cmapplsettingsui.qrc Thu Sep 02 20:50:05 2010 +0300 @@ -1,5 +1,5 @@ - cmradiodialog.docml + cmradiodialog.docml.bin diff -r 4af712113915 -r a9c709db68db cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/res/tst_applsettingsui.qrc --- a/cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/res/tst_applsettingsui.qrc Wed Aug 18 10:10:23 2010 +0300 +++ b/cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/res/tst_applsettingsui.qrc Thu Sep 02 20:50:05 2010 +0300 @@ -1,5 +1,5 @@ - tst_applsettingsui.docml + tst_applsettingsui.docml.bin diff -r 4af712113915 -r a9c709db68db cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/tst_applsettingsui.pro --- a/cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/tst_applsettingsui.pro Wed Aug 18 10:10:23 2010 +0300 +++ b/cmmanager/cmapplsettingsui/tsrc/tst_applsettingsui/tst_applsettingsui.pro Thu Sep 02 20:50:05 2010 +0300 @@ -23,8 +23,9 @@ inc \ ../../inc \ ../../../../inc -load(hb.prf) +CONFIG += hb RESOURCES = res/tst_applsettingsui.qrc +DOCML += res/tst_applsettingsui.docml MOC_DIR = moc # Input @@ -35,10 +36,8 @@ src/tst_applsettingsui.cpp symbian*: { - CONFIG -= symbian_i18n LIBS += -lcmapplsettingsui TARGET.UID3 = 0x2002E69A - SYMBIAN_PLATFORMS = WINSCW ARMV5 } symbian: { diff -r 4af712113915 -r a9c709db68db cmmanager/cpdestinationplugin/cpdestinationplugin.pro --- a/cmmanager/cpdestinationplugin/cpdestinationplugin.pro Wed Aug 18 10:10:23 2010 +0300 +++ b/cmmanager/cpdestinationplugin/cpdestinationplugin.pro Thu Sep 02 20:50:05 2010 +0300 @@ -25,6 +25,8 @@ symbian*::LIBS += -lcmmanager RESOURCES = res/cpdestinationplugin.qrc +DOCML += res/cpdestinationplugindialogs.docml + # Sources HEADERS += inc/cpiapitem.h \ inc/cpdestinationplugin.h \ diff -r 4af712113915 -r a9c709db68db cmmanager/cpdestinationplugin/inc/cpdestinationgroup.h --- a/cmmanager/cpdestinationplugin/inc/cpdestinationgroup.h Wed Aug 18 10:10:23 2010 +0300 +++ b/cmmanager/cpdestinationplugin/inc/cpdestinationgroup.h Thu Sep 02 20:50:05 2010 +0300 @@ -12,8 +12,8 @@ * Contributors: * * Description: -* CpDestinationGroup contains all destination UI items as well as -* items for uncategorized access points and adding new destinations. +* CpDestinationGroup contains all destination UI items as well as +* items for uncategorized access points and adding new destinations. */ #ifndef CPDESTINATIONGROUP_H @@ -44,7 +44,9 @@ CpDestinationGroup(CpItemDataHelper &itemDataHelper); ~CpDestinationGroup(); - void addDestination(const QString &dest, int destId); + void addDestination( + const QString &name, + QSharedPointer dest); void deleteDestination(int destId); CpBearerApPluginInterface *findBearerPlugin(int apId); diff -r 4af712113915 -r a9c709db68db cmmanager/cpdestinationplugin/res/cpdestinationplugin.qrc --- a/cmmanager/cpdestinationplugin/res/cpdestinationplugin.qrc Wed Aug 18 10:10:23 2010 +0300 +++ b/cmmanager/cpdestinationplugin/res/cpdestinationplugin.qrc Thu Sep 02 20:50:05 2010 +0300 @@ -1,5 +1,6 @@ - + + - cpdestinationplugindialogs.docml + cpdestinationplugindialogs.docml.bin diff -r 4af712113915 -r a9c709db68db cmmanager/cpdestinationplugin/src/cpadddestinationentryitemdata.cpp --- a/cmmanager/cpdestinationplugin/src/cpadddestinationentryitemdata.cpp Wed Aug 18 10:10:23 2010 +0300 +++ b/cmmanager/cpdestinationplugin/src/cpadddestinationentryitemdata.cpp Thu Sep 02 20:50:05 2010 +0300 @@ -1,36 +1,41 @@ /* - * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0"" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * Data item for representing "Add Destination" button in UI. - */ +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0"" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Data item for representing "Add Destination" button in UI. +*/ // System includes + #include #include #include #include + #include #include #include // User includes + #include "cpadddestinationentryitemdata.h" #include "cpdestinationgroup.h" + #include "OstTraceDefinitions.h" #ifdef OST_TRACE_COMPILER_IN_USE #include "cpadddestinationentryitemdataTraces.h" #endif + /*! \class CpAddDestinationEntryItemData \brief This class is a dummy destination. It does not contain @@ -48,17 +53,18 @@ /*! - Constructor. @param[in] itemDataHelper Helper from Control Panel for making connections. @param[in] parent Parent object. */ -CpAddDestinationEntryItemData::CpAddDestinationEntryItemData(CpItemDataHelper &itemDataHelper, - CpDestinationGroup *parent) - : CpSettingFormEntryItemData(CpSettingFormEntryItemData::ButtonEntryItem, itemDataHelper), +CpAddDestinationEntryItemData::CpAddDestinationEntryItemData( + CpItemDataHelper &itemDataHelper, + CpDestinationGroup *parent) : + CpSettingFormEntryItemData(CpSettingFormEntryItemData::ButtonEntryItem, itemDataHelper), mParent(parent), - mDialog(0) + mDialog(0), + mOkAction(NULL) { OstTraceFunctionEntry0(CPADDDESTINATIONENTRYITEMDATA_CPADDDESTINATIONENTRYITEMDATA_ENTRY); OstTraceFunctionExit0(CPADDDESTINATIONENTRYITEMDATA_CPADDDESTINATIONENTRYITEMDATA_EXIT); @@ -80,6 +86,7 @@ void CpAddDestinationEntryItemData::onLaunchView() { OstTraceFunctionEntry0(CPADDDESTINATIONENTRYITEMDATA_ONLAUNCHVIEW_ENTRY); + mDialog = new HbInputDialog(); mDialog->setAttribute(Qt::WA_DeleteOnClose); mDialog->lineEdit()->setMaxLength(CMManagerShim::CmNameLength); @@ -89,10 +96,11 @@ mOkAction = new HbAction( hbTrId("txt_common_button_ok"), mDialog); - bool connected = connect(mOkAction, - SIGNAL(triggered()), - this, - SLOT(setNewDestinationName())); + bool connected = connect( + mOkAction, + SIGNAL(triggered()), + this, + SLOT(setNewDestinationName())); Q_ASSERT(connected); HbAction *cancelAction = new HbAction( hbTrId("txt_common_button_cancel"), @@ -100,6 +108,7 @@ mDialog->addAction(mOkAction); mDialog->addAction(cancelAction); mDialog->show(); + OstTraceFunctionExit0(CPADDDESTINATIONENTRYITEMDATA_ONLAUNCHVIEW_EXIT); } @@ -112,33 +121,37 @@ void CpAddDestinationEntryItemData::setNewDestinationName() { OstTraceFunctionEntry0(CPADDDESTINATIONENTRYITEMDATA_SETNEWDESTINATIONNAME_ENTRY); + QString destinationName = mDialog->value().toString(); - bool destinationNameInvalid = true; - CmManagerShim *cmm = NULL; - CmDestinationShim *destination = NULL; + bool destinationNameValid = false; + QSharedPointer cmm; + QSharedPointer destination; try { - cmm = new CmManagerShim(); - if (isDestinationNameValid(destinationName, cmm)) { + cmm = QSharedPointer(new CmManagerShim()); + if (isDestinationNameValid(destinationName, cmm.data())) { // Destination name OK. Create new destination. - destination = cmm->createDestination(destinationName); - destinationNameInvalid = false; + destination = QSharedPointer( + cmm->createDestination(destinationName)); + destinationNameValid = true; } } catch (const std::exception&) { - OstTrace0( TRACE_NORMAL, DUP2_CPADDDESTINATIONENTRYITEMDATA_SETNEWDESTINATIONNAME, "CpAddDestinationEntryItemData::setNewDestinationName: exception caught" ); + OstTrace0( + TRACE_NORMAL, + DUP2_CPADDDESTINATIONENTRYITEMDATA_SETNEWDESTINATIONNAME, + "CpAddDestinationEntryItemData::setNewDestinationName: exception caught"); return; } - if (!destinationNameInvalid) { + if (destinationNameValid) { // Update view if (mParent != 0) { - mParent->addDestination(destinationName, destination->id()); + mParent->addDestination(destinationName, destination); } } else { showErrorNote(); } - delete destination; - delete cmm; + OstTraceFunctionExit0(CPADDDESTINATIONENTRYITEMDATA_SETNEWDESTINATIONNAME_EXIT); } @@ -163,9 +176,12 @@ @param[in] cmm Pointer to CmManagerShim for accessing data in commsdat. \return true if name is valid. */ -bool CpAddDestinationEntryItemData::isDestinationNameValid(const QString dest, CmManagerShim *cmm) const +bool CpAddDestinationEntryItemData::isDestinationNameValid( + const QString dest, + CmManagerShim *cmm) const { OstTraceFunctionEntry0(CPADDDESTINATIONENTRYITEMDATA_ISDESTINATIONNAMEVALID_ENTRY); + bool retVal = true; if (dest.length() > 0) { @@ -173,17 +189,17 @@ cmm->allDestinations(destinationList); for (int i = 0; i < destinationList.count(); i ++) { - CmDestinationShim *destination = cmm->destination(destinationList[i]); + QScopedPointer destination( + cmm->destination(destinationList[i])); if (0 == dest.compare(destination->name())) { retVal = false; - delete destination; break; } - delete destination; } } else { retVal = false; } + OstTraceFunctionExit0(CPADDDESTINATIONENTRYITEMDATA_ISDESTINATIONNAMEVALID_EXIT); return retVal; } @@ -195,6 +211,7 @@ void CpAddDestinationEntryItemData::showErrorNote() { OstTraceFunctionEntry0(CPADDDESTINATIONENTRYITEMDATA_SHOWERRORNOTE_ENTRY); + // Destination name NOK. Inform user and ask again. HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeInformation); note->clearActions(); @@ -213,5 +230,6 @@ Q_ASSERT(connected); note->addAction(errorOk); note->show(); + OstTraceFunctionExit0(CPADDDESTINATIONENTRYITEMDATA_SHOWERRORNOTE_EXIT); } diff -r 4af712113915 -r a9c709db68db cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp --- a/cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp Wed Aug 18 10:10:23 2010 +0300 +++ b/cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp Thu Sep 02 20:50:05 2010 +0300 @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -344,7 +345,8 @@ OstTraceFunctionEntry0(CPDESTINATIONENTRYITEMDATA_CONFIRMDESTINATIONDELETE_ENTRY); HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeQuestion); note->setAttribute(Qt::WA_DeleteOnClose); - note->setText(hbTrId("txt_occ_info_delete_snap").arg(mDestinationName)); + note->setText(HbParameterLengthLimiter( + "txt_occ_info_delete_snap").arg(mDestinationName)); note->clearActions(); HbAction *okAction = new HbAction( hbTrId("txt_common_button_yes"), diff -r 4af712113915 -r a9c709db68db cmmanager/cpdestinationplugin/src/cpdestinationgroup.cpp --- a/cmmanager/cpdestinationplugin/src/cpdestinationgroup.cpp Wed Aug 18 10:10:23 2010 +0300 +++ b/cmmanager/cpdestinationplugin/src/cpdestinationgroup.cpp Thu Sep 02 20:50:05 2010 +0300 @@ -12,18 +12,21 @@ * Contributors: * * Description: -* CpDestinationGroup contains all destination UI items as well as -* items for uncategorized access points and adding new destinations. +* CpDestinationGroup contains all destination UI items as well as +* items for uncategorized access points and adding new destinations. */ // System includes + #include #include #include + #include #include #include #include + #include #include #include @@ -34,9 +37,11 @@ #include // User includes + #include "cpdestinationgroup.h" #include "cpdestinationentryitem.h" #include "cpadddestinationentryitemdata.h" + #include "OstTraceDefinitions.h" #ifdef OST_TRACE_COMPILER_IN_USE #include "cpdestinationgroupTraces.h" @@ -63,14 +68,16 @@ @param[in] itemDataHelper Helper for connecting signals and slots. */ CpDestinationGroup::CpDestinationGroup(CpItemDataHelper &itemDataHelper) : - CpSettingFormItemData(HbDataFormModelItem::GroupItem, + CpSettingFormItemData( + HbDataFormModelItem::GroupItem, hbTrId("txt_occ_subhead_destinations_access_points")), - mItemDataHelper(&itemDataHelper), - mUncategorisedShown(false) + mItemDataHelper(&itemDataHelper), + mUncategorisedShown(false), + mCmManager(new CmManagerShim()), + mBearerPlugins(new QList()) { OstTraceFunctionEntry0(CPDESTINATIONGROUP_CPDESTINATIONGROUP_ENTRY); - mCmManager = new CmManagerShim(); - mBearerPlugins = new QList(); + this->loadBearerPlugins(); QList > destinationList; @@ -90,10 +97,11 @@ destDataItem->setDestinationName(destinationList.at(i)->name()); HbIcon destIcon(resolveDestinationIcon(destinationList.at(i))); destDataItem->setEntryItemIcon(destIcon); - bool connected = connect(destDataItem, - SIGNAL(destChanged()), - this, - SLOT(updateDestinationInformation())); + bool connected = connect( + destDataItem, + SIGNAL(destChanged()), + this, + SLOT(updateDestinationInformation())); Q_ASSERT(connected); this->appendChild(destDataItem); } @@ -102,9 +110,14 @@ createUncategorisedDestination(); // "Add Destination" button - CpSettingFormEntryItemData *addDest = new CpAddDestinationEntryItemData(itemDataHelper, this); - addDest->setContentWidgetData(QString("text"), hbTrId("txt_occ_button_add_destination")); + CpSettingFormEntryItemData *addDest = new CpAddDestinationEntryItemData( + itemDataHelper, + this); + addDest->setContentWidgetData( + QString("text"), + hbTrId("txt_occ_button_add_destination")); this->appendChild(addDest); + OstTraceFunctionExit0(CPDESTINATIONGROUP_CPDESTINATIONGROUP_EXIT); } @@ -114,8 +127,10 @@ CpDestinationGroup::~CpDestinationGroup() { OstTraceFunctionEntry0(DUP1_CPDESTINATIONGROUP_CPDESTINATIONGROUP_ENTRY); + delete mBearerPlugins; delete mCmManager; + OstTraceFunctionExit0(DUP1_CPDESTINATIONGROUP_CPDESTINATIONGROUP_EXIT); } @@ -123,25 +138,34 @@ addDestination() creates new destination item to Destinations group item. The new destination is shown in the UI immediately. */ -void CpDestinationGroup::addDestination(const QString &dest, int destId) +void CpDestinationGroup::addDestination( + const QString &name, + QSharedPointer dest) { OstTraceFunctionEntry0(CPDESTINATIONGROUP_ADDDESTINATION_ENTRY); // Create UI item for new destination CpDestinationEntryItemData *destDataItem; destDataItem = new CpDestinationEntryItemData(*mItemDataHelper); - destDataItem->setContentWidgetData(QString("text"), dest); + destDataItem->setContentWidgetData(QString("text"), name); destDataItem->setContentWidgetData( QString("additionalText"), hbTrId("txt_occ_dblist_internet_val_no_access_points")); - destDataItem->setDestinationId(destId); - destDataItem->setDestinationName(dest); - connect(destDataItem, SIGNAL(destChanged()), this, SLOT(updateDestinationInformation())); + destDataItem->setDestinationId(dest->id()); + destDataItem->setDestinationName(name); + HbIcon destIcon(resolveDestinationIcon(dest)); + destDataItem->setEntryItemIcon(destIcon); + connect( + destDataItem, + SIGNAL(destChanged()), + this, + SLOT(updateDestinationInformation())); // Insert Child to correct position QList > destinationList; fetchDestinations(destinationList); insertChild(destinationList.count() - 1, destDataItem); + OstTraceFunctionExit0(CPDESTINATIONGROUP_ADDDESTINATION_EXIT); } @@ -151,6 +175,7 @@ void CpDestinationGroup::deleteDestination(int destId) { OstTraceFunctionEntry0(CPDESTINATIONGROUP_DELETEDESTINATION_ENTRY); + // "Add Destination" child is removed from count (childCount() -1) for (int i = 0; i < this->childCount() - 1; i++) { CpDestinationEntryItemData *destDataItem = @@ -166,6 +191,7 @@ } } } + OstTraceFunctionExit0(CPDESTINATIONGROUP_DELETEDESTINATION_EXIT); } @@ -179,6 +205,7 @@ CpBearerApPluginInterface *CpDestinationGroup::findBearerPlugin(int apId) { OstTraceFunctionEntry0(CPDESTINATIONGROUP_FINDBEARERPLUGIN_ENTRY); + CpBearerApPluginInterface *retVal = NULL; try { CmConnectionMethodShim *cm = mCmManager->connectionMethod(apId); @@ -193,9 +220,13 @@ delete cm; } catch (const std::exception&) { - OstTrace0(TRACE_NORMAL, CPDESTINATIONGROUP_FINDBEARERPLUGIN, "CpDestinationGroup::findBearerPlugin: Exception caught"); + OstTrace0( + TRACE_NORMAL, + CPDESTINATIONGROUP_FINDBEARERPLUGIN, + "CpDestinationGroup::findBearerPlugin: Exception caught"); // Let return value be NULL. } + OstTraceFunctionExit0(CPDESTINATIONGROUP_FINDBEARERPLUGIN_EXIT); return retVal; } @@ -207,10 +238,11 @@ void CpDestinationGroup::updateDestinationInformation() { OstTraceFunctionEntry0(CPDESTINATIONGROUP_UPDATEDESTINATIONINFORMATION_ENTRY); + // "Add Destination" child is removed from count (childCount() -1) for (int i = 0; i < childCount() - 1; i++) { CpDestinationEntryItemData *destDataItem = - static_cast(this->childAt(i)); + static_cast(this->childAt(i)); if (destDataItem->destinationId() == 0) { // Uncategrised Iaps @@ -228,6 +260,7 @@ destDataItem->setContentWidgetData(QString("additionalText"), iapCount); destDataItem->setContentWidgetData(QString("text"), destDataItem->destinationName()); } + OstTraceFunctionExit0(CPDESTINATIONGROUP_UPDATEDESTINATIONINFORMATION_EXIT); } @@ -238,6 +271,7 @@ void CpDestinationGroup::createUncategorisedDestination() { OstTraceFunctionEntry0(CPDESTINATIONGROUP_CREATEUNCATEGORISEDDESTINATION_ENTRY); + QList apList; mCmManager->connectionMethod(apList); if (apList.count() > 0) { @@ -263,6 +297,7 @@ insertChild(destinationList.count(), destDataItem); mUncategorisedShown = true; } + OstTraceFunctionExit0(CPDESTINATIONGROUP_CREATEUNCATEGORISEDDESTINATION_EXIT); } @@ -274,6 +309,7 @@ QList > &destinationList) { OstTraceFunctionEntry0(CPDESTINATIONGROUP_FETCHDESTINATIONS_ENTRY); + try { QList destArray; mCmManager->allDestinations(destArray); @@ -288,8 +324,12 @@ } } } catch (const std::exception&) { - OstTrace0(TRACE_NORMAL, CPDESTINATIONGROUP_FETCHDESTINATIONS, "CpDestinationGroup::fetchDestinations: exception caught, Reading destinations"); + OstTrace0( + TRACE_NORMAL, + CPDESTINATIONGROUP_FETCHDESTINATIONS, + "CpDestinationGroup::fetchDestinations: exception caught, Reading destinations"); } + OstTraceFunctionExit0(CPDESTINATIONGROUP_FETCHDESTINATIONS_EXIT); } @@ -301,17 +341,19 @@ void CpDestinationGroup::loadBearerPlugins() { OstTraceFunctionEntry0(CPDESTINATIONGROUP_LOADBEARERPLUGINS_ENTRY); + // Load bearer plugins QDir pluginsDir("\\resource\\qt\\plugins\\controlpanel\\bearerap"); foreach (QString fileName, pluginsDir.entryList(QDir::Files)) { QPluginLoader loader(pluginsDir.absoluteFilePath(fileName)); CpBearerApPluginInterface *plugin = - qobject_cast(loader.instance()); + qobject_cast(loader.instance()); if (plugin) { mBearerPlugins->append(plugin); } - } + } + OstTraceFunctionExit0(CPDESTINATIONGROUP_LOADBEARERPLUGINS_EXIT); } @@ -323,6 +365,7 @@ QString CpDestinationGroup::getDestinationAdditionalText(QSharedPointer destination) { OstTraceFunctionEntry0(CPDESTINATIONGROUP_GETDESTINATIONADDITIONALTEXT_ENTRY); + QString result = ""; int iapCount = destination->connectionMethodCount(); int counter = 0; @@ -340,6 +383,7 @@ } else { result = hbTrId("txt_occ_dblist_internet_val_no_access_points"); } + OstTrace0(TRACE_FLOW, CPDESTINATIONGROUP_GETDESTINATIONADDITIONALTEXT_EXIT, "Exit"); return result; } @@ -352,6 +396,7 @@ QString CpDestinationGroup::getDestinationAdditionalText(int destinationId) { OstTraceFunctionEntry0(CPDESTINATIONGROUP_GETDESTINATIONADDITIONALTEXT2_ENTRY); + QString result = ""; int iapCount = 0; int counter = 0; @@ -386,6 +431,7 @@ } else { result = hbTrId("txt_occ_dblist_internet_val_no_access_points"); } + OstTrace0(TRACE_FLOW, CPDESTINATIONGROUP_GETDESTINATIONADDITIONALTEXT2_EXIT, "Exit"); return result; } @@ -406,20 +452,25 @@ case CMManagerShim::SnapPurposeInternet: result = "qtg_small_internet"; break; + case CMManagerShim::SnapPurposeIntranet: result = "qtg_small_intranet"; break; + case CMManagerShim::SnapPurposeMMS: result = "qtg_small_mms"; break; + case CMManagerShim::SnapPurposeOperator: result = "qtg_small_operator"; break; + default: // CMManagerShim::SnapPurposeUnknown result = "qtg_small_favorite"; break; } } + return result; } diff -r 4af712113915 -r a9c709db68db cmmanager/cpdestinationplugin/src/cpiapitem.cpp --- a/cmmanager/cpdestinationplugin/src/cpiapitem.cpp Wed Aug 18 10:10:23 2010 +0300 +++ b/cmmanager/cpdestinationplugin/src/cpiapitem.cpp Thu Sep 02 20:50:05 2010 +0300 @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -172,7 +173,8 @@ HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeQuestion); note->clearActions(); note->setAttribute(Qt::WA_DeleteOnClose); - note->setText(hbTrId("txt_occ_info_delete_access_point_1").arg(mIapName)); + note->setText(HbParameterLengthLimiter( + "txt_occ_info_delete_access_point_1").arg(mIapName)); HbAction *primaryAction = new HbAction(hbTrId("txt_common_button_yes")); bool connected = connect( primaryAction, diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/ROM/ConnectionMonitorUi.iby --- a/connectionmonitoring/connectionmonitorui/ROM/ConnectionMonitorUi.iby Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: IBY file for ConnectionMonitorUi application - * -*/ - - -#ifndef __CONNECTIONMONITORUI_IBY__ -#define __CONNECTIONMONITORUI_IBY__ - -S60_APP_EXE(ConnectionMonitorUi) -S60_APP_BITMAP(ConnectionMonitorUi) -S60_APP_AIF_ICONS(ConnectionMonitorUi) -S60_APP_AIF_RSC(ConnectionMonitorUi) - -#endif // __CONNECTIONMONITORUI_IBY__ - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/ROM/ConnectionMonitorUiResources.iby --- a/connectionmonitoring/connectionmonitorui/ROM/ConnectionMonitorUiResources.iby Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: IBY file for those parts of ConnectionMonitorUi that needs localization - * -*/ - - -#ifndef __CONNECTIONMONITORUIRESOURCES_IBY__ -#define __CONNECTIONMONITORUIRESOURCES_IBY__ - -S60_APP_RESOURCE(ConnectionMonitorUi) -S60_APP_CAPTION(ConnectionMonitorUi) - -#endif // __CONNECTIONMONITORUIRESOURCES_IBY__ - -// End of File - diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/aif/ConnectionMonitorUiaif.rss --- a/connectionmonitoring/connectionmonitorui/aif/ConnectionMonitorUiaif.rss Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -* -*/ - - -#include - -RESOURCE AIF_DATA - { - app_uid=0x101F84D0; - num_icons=2; - embeddability=KAppNotEmbeddable; - newfile=KAppDoesNotSupportNewFile; - } - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/aif/context_pane_icon.bmp Binary file connectionmonitoring/connectionmonitorui/aif/context_pane_icon.bmp has changed diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/aif/context_pane_icon_mask.bmp Binary file connectionmonitoring/connectionmonitorui/aif/context_pane_icon_mask.bmp has changed diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/aif/list_icon.bmp Binary file connectionmonitoring/connectionmonitorui/aif/list_icon.bmp has changed diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/aif/list_icon_mask.bmp Binary file connectionmonitoring/connectionmonitorui/aif/list_icon_mask.bmp has changed diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/data/ConnectionMonitorUi.rss --- a/connectionmonitoring/connectionmonitorui/data/ConnectionMonitorUi.rss Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,422 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This file contains all the resources for the ConnectionMonitorUi. -* -* -*/ - - -// RESOURCE IDENTIFIER -NAME CMUI // 4 letter ID -// -// INCLUDES - -#include -#include -#include "ConnectionMonitorUi.hrh" -#include -#include -#include -#include -#include -#include - -#include -#include - -// CONSTANTS -//#define ?constant ?value - -// MACROS -//#define ?macro - -// RESOURCE DEFINITIONS - -RESOURCE RSS_SIGNATURE { } - -RESOURCE TBUF { buf="ConnectionMonitorUi"; } - -RESOURCE EIK_APP_INFO - { - status_pane = r_connmonui_status_pane; - } - -RESOURCE STATUS_PANE_APP_MODEL r_connmonui_status_pane - { - panes = - { - SPANE_PANE - { - id = EEikStatusPaneUidTitle; - type = EAknCtTitlePane; - resource = r_connmonui_title_pane; - } - }; - } - -RESOURCE TITLE_PANE r_connmonui_title_pane - { - txt = qtn_cmon_title; - } - -RESOURCE TBUF r_qtn_cmon_no_active_connections { buf=qtn_cmon_no_active_connections; } -RESOURCE TBUF r_qtn_cmon_navi_one_active_conn { buf=qtn_cmon_navi_one_active_conn; } -RESOURCE TBUF r_qtn_cmon_navi_many_active_conns { buf=qtn_cmon_navi_many_active_conns; } - -RESOURCE TBUF r_qtn_set_bearer_data_call { buf=qtn_set_bearer_data_call; } -RESOURCE TBUF r_qtn_set_bearer_packet_data { buf=qtn_set_bearer_packet_data; } -RESOURCE TBUF r_qtn_cmon_bearer_hscsd { buf=qtn_cmon_bearer_hscsd; } -RESOURCE TBUF r_qtn_wlan_sett_bearer_wlan { buf=qtn_wlan_sett_bearer_wlan; } - - -RESOURCE TBUF r_qtn_cmon_heading_conn_name { buf=qtn_cmon_heading_conn_name; } -RESOURCE TBUF r_qtn_cmon_heading_bearer { buf=qtn_cmon_heading_bearer; } -RESOURCE TBUF r_qtn_cmon_heading_status { buf=qtn_cmon_heading_status; } -RESOURCE TBUF r_qtn_cmon_heading_data_total { buf=qtn_cmon_heading_data_total; } -RESOURCE TBUF r_qtn_cmon_heading_data_received { buf=qtn_cmon_heading_data_received; } -RESOURCE TBUF r_qtn_cmon_heading_data_sent { buf=qtn_cmon_heading_data_sent; } -RESOURCE TBUF r_qtn_cmon_heading_duration { buf=qtn_cmon_heading_duration; } -RESOURCE TBUF r_qtn_cmon_heading_speed { buf=qtn_cmon_heading_speed; } -RESOURCE TBUF r_qtn_cmon_heading_csd_number { buf=qtn_cmon_heading_csd_number; } -RESOURCE TBUF r_qtn_cmon_heading_gprs_apn { buf=qtn_cmon_heading_gprs_apn; } -RESOURCE TBUF r_qtn_cmon_heading_sharing_info { buf=qtn_cmon_heading_sharing_info; } - -RESOURCE TBUF r_qtn_cmon_status_creating { buf=qtn_cmon_status_creating; } -RESOURCE TBUF r_qtn_cmon_status_idle { buf=qtn_cmon_status_idle; } -RESOURCE TBUF r_qtn_cmon_status_active { buf=qtn_cmon_status_active; } -RESOURCE TBUF r_qtn_cmon_status_suspended { buf=qtn_cmon_status_suspended; } -RESOURCE TBUF r_qtn_cmon_status_closing { buf=qtn_cmon_status_closing; } -RESOURCE TBUF r_qtn_cmon_status_closed { buf=qtn_cmon_status_closed; } - -RESOURCE TBUF r_qtn_cmon_status_details_creating { buf=qtn_cmon_status_details_creating; } -RESOURCE TBUF r_qtn_cmon_status_details_idle { buf=qtn_cmon_status_details_idle; } -RESOURCE TBUF r_qtn_cmon_status_details_active { buf=qtn_cmon_status_details_active; } -RESOURCE TBUF r_qtn_cmon_status_details_suspended { buf=qtn_cmon_status_details_suspended; } -RESOURCE TBUF r_qtn_cmon_status_details_closing { buf=qtn_cmon_status_details_closing; } -RESOURCE TBUF r_qtn_cmon_status_details_closed { buf=qtn_cmon_status_details_closed; } - -RESOURCE TBUF r_qtn_log_gprs_amount_b { buf=qtn_log_gprs_amount_b; } -RESOURCE TBUF r_qtn_log_gprs_amount_kb { buf=qtn_log_gprs_amount_kb; } -RESOURCE TBUF r_qtn_log_gprs_amount_mb { buf=qtn_log_gprs_amount_mb; } -RESOURCE TBUF r_qtn_log_gprs_amount_gb { buf=qtn_log_gprs_amount_gb; } - -RESOURCE TBUF r_qtn_cmon_data_transf_rate_dl { buf=qtn_cmon_data_transf_rate_dl; } -RESOURCE TBUF r_qtn_cmon_data_transf_rate_ul { buf=qtn_cmon_data_transf_rate_ul; } - -RESOURCE TBUF r_qtn_cmon_ul_dl_data_amounts { buf=qtn_cmon_ul_dl_data_amounts; } -RESOURCE TBUF r_qtn_cmon_navi_nof_connection { buf=qtn_cmon_navi_nof_connection; } - -RESOURCE TBUF r_text_calc_decimal_separator { buf=text_calc_decimal_separator; } - -RESOURCE TBUF r_qtn_cmon_item_conn_name_modem { buf=qtn_cmon_item_conn_name_modem; } - -RESOURCE TBUF r_qtn_cmon_conf_end_single_conn { buf=qtn_cmon_conf_end_single_conn; } -RESOURCE TBUF r_qtn_cmon_conf_end_all_conns { buf=qtn_cmon_conf_end_all_conns; } -RESOURCE TBUF r_qtn_cmon_conf_end_modem_conn { buf=qtn_cmon_conf_end_modem_conn; } -RESOURCE TBUF r_qtn_cmon_duration_over_24h { buf=qtn_cmon_duration_over_24h; } -RESOURCE TBUF r_qtn_cmon_info_conn_already_end { buf=qtn_cmon_info_conn_already_end; } - -RESOURCE TBUF r_qtn_cmon_wlan_singal_strength_low { buf=qtn_cmon_wlan_singal_strength_low; } -RESOURCE TBUF r_qtn_cmon_wlan_singal_strength_medium { buf=qtn_cmon_wlan_singal_strength_medium; } -RESOURCE TBUF r_qtn_cmon_wlan_singal_strength_good { buf=qtn_cmon_wlan_singal_strength_good; } -RESOURCE TBUF r_qtn_cmon_wlan_signal_strength_no_signal - { buf=qtn_cmon_wlan_signal_strength_no_signal; } - -RESOURCE TBUF r_qtn_cmon_wlan_newtwork_mode_adhoc { buf=qtn_cmon_wlan_newtwork_mode_adhoc; } -RESOURCE TBUF r_qtn_cmon_wlan_newtwork_mode_infra { buf=qtn_cmon_wlan_newtwork_mode_infra; } - -RESOURCE TBUF r_qtn_cmon_wlan_security_mode_open { buf=qtn_cmon_wlan_security_mode_open; } -RESOURCE TBUF r_qtn_cmon_wlan_security_mode_wep { buf=qtn_cmon_wlan_security_mode_wep; } -RESOURCE TBUF r_qtn_cmon_wlan_security_mode_802_1x { buf=qtn_cmon_wlan_security_mode_802_1x; } -RESOURCE TBUF r_qtn_cmon_wlan_security_mode_wpa { buf=qtn_cmon_wlan_security_mode_wpa; } - -RESOURCE TBUF r_qtn_cmon_wlan_tx_power_level { buf=qtn_cmon_wlan_tx_power_level; } - -RESOURCE TBUF r_qtn_cmon_heading_wlan_network_name { buf=qtn_cmon_heading_wlan_network_name; } -RESOURCE TBUF r_qtn_cmon_heading_wlan_signal_strength - { buf=qtn_cmon_heading_wlan_signal_strength; } -RESOURCE TBUF r_qtn_cmon_heading_wlan_network_mode { buf=qtn_cmon_heading_wlan_network_mode; } -RESOURCE TBUF r_qtn_cmon_heading_wlan_security_mode { buf=qtn_cmon_heading_wlan_security_mode; } -RESOURCE TBUF r_qtn_cmon_heading_wlan_tx_power { buf=qtn_cmon_heading_wlan_tx_power; } - -RESOURCE TBUF r_qtn_cmon_parameter_unavailable { buf=qtn_cmon_parameter_unavailable; } - -RESOURCE TBUF r_qtn_cmon_sharing_app_msg_server { buf=qtn_cmon_sharing_app_msg_server; } -RESOURCE TBUF r_qtn_cmon_sharing_app_dl_mg { buf=qtn_cmon_sharing_app_dl_mg; } -RESOURCE TBUF r_qtn_cmon_sharing_app_rss_server { buf=qtn_cmon_sharing_app_rss_server; } -RESOURCE TBUF r_qtn_cmon_sharing_app_java_midlet { buf=qtn_cmon_sharing_app_java_midlet; } -RESOURCE TBUF r_qtn_cmon_sharing_app_unknown { buf=qtn_cmon_sharing_app_unknown; } -RESOURCE TBUF r_qtn_cmon_sharing_app_supl { buf=qtn_cmon_sharing_app_supl; } - - -//---------------------------------------------------- -// -// r_connectionmonitorui_title -// -//---------------------------------------------------- -// -RESOURCE TBUF r_connectionmonitorui_title - { - buf = qtn_cmon_title_active_conns; - } - -//---------------------------------------------------- -// -// r_connectionmonitorui_hotkeys -// -//---------------------------------------------------- -// -RESOURCE HOTKEYS r_connectionmonitorui_hotkeys - { - control= - { - HOTKEY { command=EAknCmdExit; key='e'; } - }; - } - -#ifdef RD_CONTROL_PANEL - -//---------------------------------------------------- -// -// r_connectionmonitorui_view_buttons -// -//---------------------------------------------------- -// -RESOURCE CBA r_cp_connectionmonitorui_view_buttons - { - buttons = - { - CBA_BUTTON {id=EAknSoftkeyOptions; txt=text_softkey_option;}, - CBA_BUTTON {id=EAknSoftkeyExit; txt=text_softkey_back;}, - CBA_BUTTON {id=EAknSoftkeyDetails; txt=qtn_msk_cmon_details;} - }; - } - -//---------------------------------------------------- -// -// r_connectionmonitorui_view -// -//---------------------------------------------------- -// -RESOURCE AVKON_VIEW r_cp_connectionmonitorui_view - { - hotkeys=r_connectionmonitorui_hotkeys; - menubar=r_connectionmonitorui_menubar_view; - cba=r_cp_connectionmonitorui_view_buttons; - } - -#endif // RD_CONTROL_PANEL - -//---------------------------------------------------- -// -// r_connectionmonitorui_view_buttons -// -//---------------------------------------------------- -// -RESOURCE CBA r_connectionmonitorui_view_buttons - { - buttons = - { - CBA_BUTTON {id=EAknSoftkeyOptions; txt=text_softkey_option;}, - CBA_BUTTON {id=EAknSoftkeyExit; txt=text_softkey_exit;}, - CBA_BUTTON {id=EAknSoftkeyDetails; txt=qtn_msk_cmon_details;} - }; - } - -//---------------------------------------------------- -// -// r_connectionmonitorui_view -// -//---------------------------------------------------- -// -RESOURCE AVKON_VIEW r_connectionmonitorui_view - { - hotkeys=r_connectionmonitorui_hotkeys; - menubar=r_connectionmonitorui_menubar_view; - cba=r_connectionmonitorui_view_buttons; - } - -//---------------------------------------------------- -// -// r_connectionmonitorui_menubar_view -// -//---------------------------------------------------- -// -RESOURCE MENU_BAR r_connectionmonitorui_menubar_view - { - titles= - { - MENU_TITLE { menu_pane=r_connectionmonitorui_app_menu; txt="App"; }, - MENU_TITLE { menu_pane=r_connectionmonitorui_view_menu; txt="View"; } - }; - } - -//---------------------------------------------------- -// -// r_connectionmonitorui_view_menu -// -//---------------------------------------------------- -// -RESOURCE MENU_PANE r_connectionmonitorui_view_menu - { - items= - { - MENU_ITEM { command=EConnectionMonitorUiCmdAppDetails; - txt = qtn_cmon_list_options_details; flags = EEikMenuItemSpecific;}, - MENU_ITEM { command=EConnectionMonitorUiCmdAppEndConn; - txt = qtn_cmon_list_options_end_conn; flags = EEikMenuItemSpecific;}, - MENU_ITEM { command=EConnectionMonitorUiCmdAppEndAll; - txt = qtn_cmon_list_options_end_all; } - }; - } - -//---------------------------------------------------- -// -// r_connectionmonitorui_detailsview -// -//---------------------------------------------------- -// -RESOURCE AVKON_VIEW r_connectionmonitorui_detailsview - { - hotkeys=r_connectionmonitorui_hotkeys; - cba=R_AVKON_SOFTKEYS_OK_EMPTY__OK; - } - -//---------------------------------------------------- -// -// r_connectionmonitorui_app_menu -// -//---------------------------------------------------- -// -RESOURCE MENU_PANE r_connectionmonitorui_app_menu - { - items= - { - MENU_ITEM { command=EAknCmdHelp; txt = qtn_options_help; }, - MENU_ITEM { command=EAknCmdExit; txt=qtn_options_exit; } - }; - } - -// ICONARRAYS - -RESOURCE AKN_ICON_ARRAY r_listbox_icons - { - bmpfile = APP_BITMAP_DIR"\\ConnectionMonitorUi.mbm"; - icons = - { - AKN_ICON - { - iconId = EMbmConnectionmonitoruiQgn_prop_wml_gprs; - maskId = EMbmConnectionmonitoruiQgn_prop_wml_gprs_mask; - }, - AKN_ICON - { - iconId = EMbmConnectionmonitoruiQgn_prop_wml_csd; - maskId = EMbmConnectionmonitoruiQgn_prop_wml_csd_mask; - }, - AKN_ICON - { - iconId = EMbmConnectionmonitoruiQgn_prop_wml_hscsd; - maskId = EMbmConnectionmonitoruiQgn_prop_wml_hscsd_mask; - }, - AKN_ICON - { - iconId = EMbmConnectionmonitoruiQgn_prop_cmon_gprs_suspended; - maskId = EMbmConnectionmonitoruiQgn_prop_cmon_gprs_suspended_mask; - } - }; - } - -RESOURCE TBUF r_qtn_appl_option_item { buf=qtn_appl_option_item; } - -RESOURCE DIALOG r_end_conn_confirmation_query - { - flags=EGeneralQueryFlags; - buttons=R_AVKON_SOFTKEYS_YES_NO__YES; - items= - { - DLG_LINE - { - type=EAknCtQuery; - id = EGeneralQuery; - control= AVKON_CONFIRMATION_QUERY - { - layout = EConfirmationQueryLayout; - }; - } - }; - } - -//---------------------------------------------------- -// -// r_qtn_cmon_connection_summary_note_text -// -//---------------------------------------------------- -// -RESOURCE TBUF r_qtn_cmon_connection_summary_note_text { buf = - qtn_cmon_summary_heading"\n"qtn_cmon_summary_transferred"\n%0U\n"qtn_cmon_summary_duration"\n%1U"; } - -//---------------------------------------------------- -// -// r_qtn_cmon_connection_summary_note -// -//---------------------------------------------------- -// -RESOURCE DIALOG r_qtn_cmon_connection_summary_note - { - flags = EAknInformationNoteFlags; - buttons = R_AVKON_SOFTKEYS_EMPTY; - items= - { - DLG_LINE - { - type = EAknCtNote; - id = EGeneralNote; - control= AVKON_NOTE - { - layout = ETextualNotificationLayout; - singular_label = ""; - plural_label = ""; - }; - } - }; - } - -//---------------------------------------------------- -// -// r_connectionmonitorui_localisable_app_info -// -//---------------------------------------------------- -// -RESOURCE LOCALISABLE_APP_INFO r_connectionmonitorui_localisable_app_info - { - short_caption = qtn_apps_cmon_grid; - caption_and_icon = - CAPTION_AND_ICON_INFO - { - caption = qtn_apps_cmon_list; -#ifdef __SCALABLE_ICONS - number_of_icons = 1; - icon_file = "Z:"APP_BITMAP_DIR"\\connectionmonitorui_aif.mif"; -#else - number_of_icons = 2; - icon_file = "Z:"APP_BITMAP_DIR"\\connectionmonitorui_aif.mbm"; -#endif - }; - } - - - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/data/ConnectionMonitorUi_caption.rss --- a/connectionmonitoring/connectionmonitorui/data/ConnectionMonitorUi_caption.rss Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Caption file for ConnectionMonitorUi. -* -* -*/ - - -#include -#include - -RESOURCE CAPTION_DATA - { - caption=qtn_apps_cmon_list; - shortcaption=qtn_apps_cmon_grid; - } - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/data/ConnectionMonitorUi_reg.rss --- a/connectionmonitoring/connectionmonitorui/data/ConnectionMonitorUi_reg.rss Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include -#include - -UID2 KUidAppRegistrationResourceFile -UID3 0x101F84D0 // Define your application UID here - -RESOURCE APP_REGISTRATION_INFO - { - app_file = "ConnectionMonitorUi"; - - localisable_resource_file = APP_RESOURCE_DIR"\\ConnectionMonitorUi"; - localisable_resource_id = R_CONNECTIONMONITORUI_LOCALISABLE_APP_INFO; - embeddability = KAppNotEmbeddable; - newfile = KAppDoesNotSupportNewFile; - - } - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/group/ConnectionMonitorUI.mmp --- a/connectionmonitoring/connectionmonitorui/group/ConnectionMonitorUI.mmp Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This is the project specification file for ConnectionMonitorUi. -* -* -*/ - -#include -#include - - -TARGET ConnectionMonitorUi.exe -TARGETTYPE exe - - -UID 0x100039CE 0x101F84D0 - -CAPABILITY CAP_APPLICATION NetworkControl ProtServ - -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE ConnectionMonitorUiApp.cpp -SOURCE ConnectionMonitorUiAppUi.cpp -SOURCE ConnectionMonitorUiDocument.cpp -SOURCE ConnectionMonitorUiContainer.cpp -SOURCE ConnectionMonitorUiView.cpp -SOURCE ConnectionMonitorUiDetailsView.cpp -SOURCE ConnectionMonitorUiDetailsContainer.cpp -SOURCE ConnectionInfoBase.cpp -SOURCE CsdConnectionInfo.cpp -SOURCE GprsConnectionInfo.cpp -SOURCE ConnectionArray.cpp -SOURCE FeatureManagerWrapper.cpp -SOURCE WlanConnectionInfo.cpp -SOURCE EasyWLANConnectionInfo.cpp -SOURCE ActiveWrapper.cpp - - -START RESOURCE ../data/ConnectionMonitorUi.rss -HEADER -TARGETPATH APP_RESOURCE_DIR -LANGUAGE_IDS -END // RESOURCE - -// Component specific internal headers -USERINCLUDE ../inc - -// ADO-SUBSYSTEM specific internal headers -SYSTEMINCLUDE ../../inc - -// ADO specific internal headers -SYSTEMINCLUDE ../../../inc - -//Macro to /epoc32 headers -MW_LAYER_SYSTEMINCLUDE - -#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS -APP_LAYER_SYSTEMINCLUDE -#endif - - -SYSTEMINCLUDE /epoc32/include/libc - - -LIBRARY euser.lib -LIBRARY apparc.lib -LIBRARY cone.lib -LIBRARY eikcore.lib -LIBRARY eikcoctl.lib -LIBRARY avkon.lib -LIBRARY eikctl.lib -LIBRARY bafl.lib -LIBRARY commonengine.lib -LIBRARY connmon.lib -LIBRARY estlib.lib -LIBRARY egul.lib -LIBRARY apgrfx.lib -LIBRARY hlplch.lib -LIBRARY AknSkins.lib -LIBRARY AKNNOTIFY.LIB -LIBRARY FeatMgr.lib -LIBRARY commsdat.lib -LIBRARY cmmanager.lib - -DEBUGLIBRARY flogger.lib -DEBUGLIBRARY efsrv.lib - - -epocstacksize 0x5000 - -// DEFFILE ?filename - - -START RESOURCE ../data/ConnectionMonitorUi_reg.rss -DEPENDS connectionmonitorui.rsg -// Do not change the UID below. -TARGETPATH /private/10003a3f/apps -END - - diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/group/bld.inf --- a/connectionmonitoring/connectionmonitorui/group/bld.inf Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -* -*/ - - -#include - -PRJ_PLATFORMS -DEFAULT - -// Help exports -#include "../help/group/bld.inf" - -PRJ_EXPORTS -// export iby files -../ROM/ConnectionMonitorUi.iby CORE_MW_LAYER_IBY_EXPORT_PATH(ConnectionMonitorUi.iby) -../ROM/ConnectionMonitorUiResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(ConnectionMonitorUiResources.iby) - -// export localised loc file -../loc/connectionmonitorui.loc MW_LAYER_LOC_EXPORT_PATH(connectionmonitorui.loc) - -PRJ_MMPFILES -./ConnectionMonitorUI.mmp - -PRJ_EXTENSIONS -START EXTENSION s60/mifconv -OPTION TARGETFILE ConnectionMonitorUi.mif -OPTION HEADERFILE ConnectionMonitorUi.mbg -OPTION SOURCES -c8,1 qgn_prop_wml_gprs.bmp \ - -c8,1 qgn_prop_wml_csd.bmp \ - -c8,1 qgn_prop_wml_hscsd.bmp \ - -c8,1 qgn_prop_empty.bmp \ - -c8,1 qgn_prop_cmon_gprs_suspended.bmp \ - -c8,8 qgn_prop_cmon_conn_active.bmp \ - -c8,8 qgn_prop_cmon_wlan_avail.bmp \ - -c8,1 qgn_prop_wlan_bearer.bmp \ - -c8,1 qgn_prop_cmon_wlan_conn.bmp \ - -c8,1 qgn_indi_wlan_signal_low_add.bmp \ - -c8,1 qgn_indi_wlan_signal_med_add.bmp \ - -c8,1 qgn_indi_wlan_signal_good_add.bmp \ - -c8,1 qgn_indi_wlan_secure_network_add.bmp -END - -PRJ_EXTENSIONS -START EXTENSION s60/mifconv - OPTION TARGETFILE ConnectionMonitorUi_aif.mif - OPTION SOURCES -c8,8 qgn_prop_cp_conn_man.bmp -END - -//PRJ_TESTMMPFILES \ No newline at end of file diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/help/data/xhtml.zip Binary file connectionmonitoring/connectionmonitorui/help/data/xhtml.zip has changed diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/help/group/bld.inf --- a/connectionmonitoring/connectionmonitorui/help/group/bld.inf Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - Initial contribution -* -* Contributors: -* -* -* Description: -* Export help related files. -* -*/ - -#include -PRJ_EXPORTS -:zip ../data/xhtml.zip /epoc32/data/z/resource/ overwrite -:zip ../data/xhtml.zip /epoc32/winscw/c/resource/ overwrite - -../inc/cmon.hlp.hrh MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/cmon.hlp.hrh) -../rom/connectionmonitoruihelps_variant.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(connectionmonitoruihelps_variant.iby) diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/help/inc/cmon.hlp.hrh --- a/connectionmonitoring/connectionmonitorui/help/inc/cmon.hlp.hrh Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - -// -// cmon.hlp.hrh generated by CSXHelp Utilities. -// - -#ifndef __CMON_HLP_HRH__ -#define __CMON_HLP_HRH__ - -_LIT(KCMON_HLP_CMON_MAIN_VIEW, "CMON_HLP_CMON_MAIN_VIEW"); // -_LIT(KCMON_HLP_CMON_WLAN_VIEW, "CMON_HLP_CMON_WLAN_VIEW"); // - -#endif \ No newline at end of file diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/help/rom/connectionmonitoruihelps_variant.iby --- a/connectionmonitoring/connectionmonitorui/help/rom/connectionmonitoruihelps_variant.iby Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: IBY file for ConnectionMonitorUi helps - * -*/ - - -#ifndef __CONNECTIONMONITORUIHELPS_VARIANT_IBY__ -#define __CONNECTIONMONITORUIHELPS_VARIANT_IBY__ - -#if defined(FF_S60_HELPS_IN_USE) - data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F84D0\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x101F84D0\contents.zip) - data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F84D0\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F84D0\index.xml) - data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F84D0\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F84D0\keywords.xml) - data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F84D0\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F84D0\meta.xml) -#endif - -#endif \ No newline at end of file diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/inc/ActiveWrapper.h --- a/connectionmonitoring/connectionmonitorui/inc/ActiveWrapper.h Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,159 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CActiveWrapper header file -* -*/ - - -#ifndef __ACTIVE_WRAPPER_H__ -#define __ACTIVE_WRAPPER_H__ - -// INCLUDES -#include -#include - -// CONSTANTS - -// CLASS DECLARATION - -/** -* Definition of CActiveWrapper -* -* @since S60 v3.2 -*/ -NONSHARABLE_CLASS( CActiveWrapper ) : public CActive - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - static CActiveWrapper* NewL(); - - /** - * Destructor. - */ - virtual ~CActiveWrapper(); - - public: // New functions - - /** - * Starts the active object and gets the value for a string attribute. - * @param aConnectionId Connection id. - * @param aConnectionMonitor RConnectionMonitor - * @param aAttribute Identifies the attribute to be retrived. - * @param aValue On completion, contains the requested string. - */ - void StartGetStringAttribute( TInt const aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TUint const aAttribute, - TDes& aValue ); - - /** - * Starts the active object and gets the value for a TInt attribute. - * @param aConnectionId Connection id. - * @param aConnectionMonitor RConnectionMonitor - * @param aAttribute Identifies the attribute to be retrived. - * @param aValue On completion, contains the requested TInt attribute. - */ - void StartGetIntAttribute( TInt const aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TUint const aAttribute, - TInt& aValue ); - - /** - * Starts the active object and gets the value for a TUint attribute. - * @param aConnectionId Connection id. - * @param aConnectionMonitor RConnectionMonitor - * @param aAttribute Identifies the attribute to be retrived. - * @param aValue On completion, contains the requested TUint attribute. - */ - void StartGetUintAttribute( TInt const aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TUint const aAttribute, - TUint& aValue ); - - /** - * Starts the active object and gets the value for a packaged - * attribute (TConnMonClientEnumBuf). - * @param aConnectionId Connection id. - * @param aConnectionMonitor RConnectionMonitor - * @param aValue On completion, contains the requested packaged attribute. - */ - void StartGetConnSharings( TInt const aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonClientEnumBuf& aValue ); - - /** - * Starts the active object and gets the value for a packaged - * attribute (TConnMonTimeBuf). - * @param aConnectionId Connection id. - * @param aConnectionMonitor RConnectionMonitor - * @param aValue On completion, contains the requested packaged attribute. - */ - void StartGetConnTime( TInt const aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonTimeBuf& aValue ); - - /** - * Starts the active object and gets the value for a TInt attribute - * for the used Bearer type. - * @param aConnectionId Connection id. - * @param aConnectionMonitor RConnectionMonitor - * @param aAttribute Identifies the attribute to be retrived. - * @param aValue On completion, contains the requested TInt attribute. - */ - void StartGetBearerType( TInt const aConnectionId, - RConnectionMonitor& aConnectionMonitor, - TUint const aAttribute, - TInt& aValue ); - - /** - * Starts the active object and gathers information on - * currently active connections. - * @param aConnectionCount On completion, contains the number of active connections. - * @param aConnectionMonitor RConnectionMonitor - */ - void StartGetConnectionCount( TUint& aConnectionCount, - RConnectionMonitor& aConnectionMonitor ); - - public: // Functions from base classes (CActive) - - void DoCancel(); - void RunL(); - - private: - - /** - * C++ default constructor. - */ - CActiveWrapper(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - private: // data - - /** - * Own: sync. helper in async. requests - */ - CActiveSchedulerWait iWait; - }; - -#endif // __ACTIVE_WRAPPER_H__ - - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/inc/ConnectionArray.h --- a/connectionmonitoring/connectionmonitorui/inc/ConnectionArray.h Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,153 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Contains and handles CConnectionInfo instances -* -* -*/ - - -#ifndef CONNECTIONARRAY_H_INCLUDED -#define CONNECTIONARRAY_H_INCLUDED - -// INCLUDES -#include "ConnectionInfoBase.h" - - -// CONSTANTS - -// FORWARD DECLARATIONS - -// CLASS DECLARATION -/** -* Contains and handles CConnectionInfo instances. -*/ -class CConnectionArray : public CBase, public MDesCArray - { - public: - /** - * Constructor. - */ - CConnectionArray(); - - /** - * Destructor. - */ - virtual ~CConnectionArray(); - - /** - * Contructs dynamic data members - */ - virtual void ConstructL(); - - public: // from MDesCArray - /** - * Returns the number of descriptor elements in a descriptor array. - * @return The number of descriptor elements in a descriptor array. - */ - virtual TInt MdcaCount() const; - - /** - * Indexes into a descriptor array. - * @param aIndex The position of the descriptor element within a - * descriptor array. - * The position is relative to zero; i.e. zero implies the first - * descriptor element in a descriptor array. - * @return A non-modifiable pointer descriptor representing - * the descriptor element located at position aIndex within a - * descriptor array. - */ - virtual TPtrC MdcaPoint( TInt aIndex ) const; - - public: - - /** - * Give back a copy of connectionarray. - */ - virtual CConnectionArray* DeepCopyL(); - - /** - * Returns the index of the given connection - * @param aConnectionId connection id - * @return index value of connection in the array, or -1 if there - * is no connection the given Id - */ - TInt GetArrayIndex( TUint aConnectionId ) const; - - /** - * Returns the index of the given connection - * @param aConnection connection - * @return index value of connection in the array, or -1 if there - * is no the given connection - */ - TInt GetArrayIndex( CConnectionInfoBase* aConnection ) const; - - /** - * Add only new connection to the array - * @param aConnection the connection to be added to the array - */ - void AppendL( CConnectionInfoBase* aConnection ); - - /** - * Delete connection from the array - * @param aConnectionId id of connection to be removed from the array - */ - void Delete( TUint aConnectionId ); - - /** - * Delete connection from the array - * @param aConnection the connection to be removed from the array - */ - void Delete( CConnectionInfoBase* aConnection ); - - /** - * Destroys the connection array - */ - void Reset(); - - /** - * Returns info object of connection given by index value in the array - * @param aIndex index value of connection in the array - * @return CConnectionInfo* pointer to the connection info object - */ - CConnectionInfoBase* operator[]( TUint aIndex ) const; - - /** - * Returns info object of connection given by index value in the array - * Checks the boundaries of array. - * @param aIndex index value of connection in the array - * @return CConnectionInfoBase* pointer to the connection info object if - * the given index is valid, NULL otherwise - */ - CConnectionInfoBase* At( TInt aIndex ) const; - - /** - * Gives back the number of active connections (created or suspended) - * @return the number of active connections - */ - TInt NumberOfActiveConnections() const; - - /** - * Gives back the number of suspended connections - * @return the number of suspended connections - */ - TInt NumberOfSuspendedConnections() const; - - protected: - /** - * Contains the connections. - */ - CArrayPtrFlat* iConnectionArray; ///< Owned. - }; - -#endif // CONNECTIONARRAY_H_INCLUDED \ No newline at end of file diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/inc/ConnectionInfoBase.h --- a/connectionmonitoring/connectionmonitorui/inc/ConnectionInfoBase.h Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,486 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Represents a connection -* -* -*/ - - -#ifndef CONNECTIONINFOBASE_H_INCLUDED -#define CONNECTIONINFOBASE_H_INCLUDED - -// INCLUDES -#include -#include -#include -#include -#include - -// CONSTANTS -LOCAL_D const TUint KConnectionListItemText = 64; -LOCAL_D const TUint KDetailsListItemText = 64; - -_LIT( KConnectonListItemTextFormat, "%o\t%S\t%S" ); -_LIT( KDetailsListItemTextFormat, "%S\t%S" ); - -// FORWARD DECLARATIONS - -class CActiveWrapper; - -// CLASS DECLARATION - -enum TConnectionStatus - { - EConnectionUninitialized, - EConnectionCreating, - EConnectionCreated, - EConnectionSuspended, - EConnectionClosing, - EConnectionClosed - }; - -/** -* Order of icons in icon array of containers -*/ -enum TIconsOrder - { - EGprs = 0, - ECsd, - EHscsd, - EEmpty, - ESuspended, - EWlan - }; - - -/** -* Represents a connection. -*/ -class CConnectionInfoBase : public CBase - { - public: // Constructors, Desturctor - - /** - * Destructor - */ - virtual ~CConnectionInfoBase(); - - protected: - /** - * Constructor - * @param aConnectionId The id of the given connection. - * @param aConnectionMonitor for refreshing details - * @param aConnectionBearerType the bearer type of connection - * @param aActiveWrapper the for refreshing - */ - CConnectionInfoBase( TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - CActiveWrapper* aActiveWrapper ); - - /** - * Second phase construction - */ - void ConstructL(); - - public: // New functions - - /** - * Give back a copy of connection. - */ - virtual CConnectionInfoBase* DeepCopyL() = 0; - - - /** - * Refresh required details of connection. - */ - virtual void RefreshDetailsL() = 0; - - /** - * Refresh iListBoxItemText text, connection ListBox has a reference to - * this text. - */ - virtual void RefreshConnectionListBoxItemTextL() = 0; - - /** - * Refresh details array of connection. DetailsListBox has a reference - * to this array. - */ - virtual void RefreshDetailsArrayL() = 0; - - /** - * Called, if the status of connection is changed. - */ - void StatusChangedL(); - - /** - * Gives back the connection is alive or not. - * @return ETrue if connection is created or suspended, - * EFalse otherwise - */ - TBool IsAlive() const; - - /** - * Gives back the connection is suspended or not. - * @return ETrue if connection is suspended, - * EFalse otherwise - */ - TBool IsSuspended() const; - - /** - * @return ETrue if deletion of connection started form CMUI, - * EFalse otherwise - */ - TBool GetDeletedFromCMUI() const; - - /** - * Sets status of connection to EConnectionClosing - */ - void SetAllDeletedFromCMUI(); - - /** - * Sets iDeletedFromCMUI to ETrue, means dletion of connection - * was established from CMUI - */ - void SetDeletedFromCMUI(); - - /** - * Gives back a pointer to the DetailsArray of connection. - * @return CDesCArraySeg* iDetailsArray of connection - */ - CDesCArrayFlat* GetDetailsArray() const; - - /** - * Gives back the id of connection - * @return the id of connection. - */ - TUint GetConnectionId() const; - - /** - * Gives back the icon id of connection - * @return the icon id of connection - */ - virtual TUint GetIconId() const = 0; - - /** - * Gives back the connection is EasyWLAN or not. - * @return ETrue if the selected conenction EasyWLAN, - * EFalse otherwise - */ - virtual TBool IsEasyWLAN() const { return EFalse; }; - - /** - * Gives back current Name of Network ( SSID ) - * @return iNetworkName - */ - virtual HBufC* GetWlanNetworkNameLC() const { return NULL; }; - - /** - * Gives back the status of connection - * @return the status of connection - */ - TConnectionStatus GetStatus() const; - - /** - * Refresh status of connection - * @param aConnectionStatus new status of connection - */ - void RefreshConnectionStatus( - const TInt aConnectionStatus ); - - /** - * Gives back the name of connection - * @return the name of connection - */ - HBufC* GetNameLC() const; - - /** - * Gives back the bearertype of connection - * @return the bearertype of connection - */ - TConnMonBearerType GetBearerType() const; - - /** - * Gives back a pointer the iListBoxItemText of connection - * @return the iListBoxItemText of connection - */ - TPtrC GetConnectionListBoxItemText() const; - - /** - * Check if connection name is starts with "mRouter" string or not. - * ( if this connection is not IR/BT ) - * @retrun ETrue if starts wiht "mRouter", EFalse otherwise. - */ - TBool CheckMrouterIap(); - - protected: - /** - * Creates a string for DetailsListBoxItem, title came from resource - * and value from aValueText - * @param aResourceId a resource id - * @param aValueText the value of text - * @retrun a string consist of resource and value text - */ - HBufC* ToDetailsListBoxItemTextL( const TUint aResourceId, - const HBufC* aValueText ) const; - - /** - * Creates a string for DetailsListBoxItem, title came from resource - * and value from aValueText, and Appends to iDetailsArray - * @param aResourceId a resource id - * @param aValueText the value of text - */ - void ToDetailsListBoxItemTextWithAppendL( const TUint aResourceId, - const HBufC* aValueText ); - - /** - * Creates a string for DetailsListBoxItem, title came from resource - * and value from aValueText, and Replaces the given element with it - * @param aResourceId a resource id - * @param aValueText the value of text - */ - void ToDetailsListBoxItemTextWithReplaceL( const TUint aResourceId, - const HBufC* aValueText, - TInt aIndex ); - - - /** - * Creates an array with requrired details of connection to - * the listbox which visulaize details of connection. This member - * is called at initialization. - */ - virtual void ToArrayDetailsL() = 0; - - /** - * Refresh status of connection - */ - void RefreshConnectionStatus(); - - /** - * Refresh amount of sent and received data of connection - */ - void RefreshSentReceivedDataL(); - - /** - * Refresh the value of transfer speeds (Up/Down) of connection - */ - void RefreshTransferSpeedsL(); - - /** - * Refresh the duration of connection. - */ - void RefreshDuration(); - - /** - * Refresh the applications names which uses the connection - * @return the count of applications use connection - * (from the user point of view) - */ - TInt RefreshAppNamesL(); - - - public: // New functions - - /** - * Creates a string from bearer of connection - * @return string representation of bearer of connection. - */ - HBufC* ToStringBearerLC() const; - - /** - * Creates a string from status of connection - * @param aIsDetailsView is ETrue then get localised resources - * to details view otherwise to connections view - * @return string representation of status of connection. - */ - HBufC* ToStringStatusLC( TBool aIsDetailsView = ETrue ) const; - - /** - * Creates a string from amount of received data - * and sent data combined/summarized. - * @return string representation of summarized of - * Received and Sent data. - */ - HBufC* ToStringTotalTransmittedDataLC() const; - - /** - * Creates a string from amount of Sent data - * @param aToBeThreeDigit the shown digits numbers limited to three - * @return string representation of Sent data. - */ - HBufC* ToStringSentDataLC( TBool aToBeThreeDigit = EFalse ) const; - - /** - * Creates a string from amount of Received data - * @param aToBeThreeDigit the shown digits numbers limited to three - * @return string representation of Received data. - */ - HBufC* ToStringReceivedDataLC( TBool aToBeThreeDigit = EFalse ) const; - - /** - * Creates a string from transfer speed Up of connection - * @return string representation of transfer speed Up of - * connection. - */ - HBufC* ToStringTransferSpeedUpLC() const; - - /** - * Creates a string from transfer speed Down of connection - * @return string representation of transfer speed Down of - * connection. - */ - HBufC* ToStringTransferSpeedDownLC() const; - - /** - * Creates a string from duraion of the connection. - * @return string representation duraion of the connection. - */ - HBufC* ToStringDurationLC() const; - - /** - * Remove directional markers from a string. - * @param aStringHolder the string which markers has to remove. - */ - void StringMarkerRemoval( HBufC* aStringHolder ); - - /** - * Remove directional markers from a string. - * @param aAppIndex the index of Applicaions names array. - * @return string representation of used app. name - */ - HBufC* ToStringAppNameLC( TInt aAppIndex ); - - - private: - /** - * Creates a string from aLoadedData, extended with measure - * @param aLoadedData the data is converted to string - * @param aToBeThreeDigit the shown digits numbers limited to three - * @param aArrowChar the character representation of arrow (Up/Down) - * @return string representation of loaded data - */ - HBufC* ToStringLoadedDataLC( TUint aLoadedData, - TBool aToBeThreeDigit = EFalse, - const TUint aArrowChar = 0 ) const; - - - /** - * Creates a string from transfer speed of connection - * @param aSpeed the speed is converted to string - * @param aArrowChar the character representation of arrow (Up/Down) - * @return string representation of transfer speed of - * connection, extended with measure - */ - HBufC* ToStringTransferSpeedLC( div_t aSpeed, - const TUint aArrowChar ) const; - - /** - * Called if iConnectionStatus is changed to created. Initializes - * changable details of connection. - */ - void InitializeConnectionInfoL(); - - - protected: - - /** - * Used for refreshing details of connection. - */ - RConnectionMonitor* const iConnectionMonitor; - - /** - * The id of connection, given by RConnectionMonitor. - */ - TUint iConnectionId; - - /** - * The name of connection - */ - TName iConnectionName; // IAPName - - /** - * BearerType of connection - */ - TConnMonBearerType iConnectionBearerType; - - /** - * The status of connection - */ - TConnectionStatus iConnectionStatus; - - /** - * The amount of Uploaded data - */ - TUint iUploaded; - - /** - * The amount of Downloaded data - */ - TUint iDownloaded; - - /** - * The start time of connection - */ - TTime iStartTime; - - /** - * The duration of connection - */ - TTime iDuration; - - /** - * Used for calculating speed data - */ - TTime iLastSpeedUpdate; - - /** - * The speed of transferring Uploaded data - */ - div_t iUpSpeed; - - /** - * The speed of transferring Downloaded data - */ - div_t iDownSpeed; - - /** - * The text of list item. - */ - TBuf iListBoxItemText; - - /** - * Descriptor array, contains details of connection. Owned. - */ - CDesCArrayFlat* iDetailsArray; - - /** - * ETrue if deletion of connection started form CMUI, EFalse otherwise - */ - TBool iDeletedFromCMUI; - - /** - * The names of applications use connection.Owned. - */ - CDesCArrayFlat* iAppNames; - - /** - * The active object for info. refreshing. NOT Owned. - */ - CActiveWrapper* iActiveWrapper; - }; - - -#endif //CONNECTIONINFOBASE_H_INCLUDED - -// End of File \ No newline at end of file diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUi.hrh --- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUi.hrh Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: resource header file -* -* -*/ - - -#ifndef CONNECTIONMONITORUI_HRH -#define CONNECTIONMONITORUI_HRH - -// Command ID-s for Option menu items -enum TConnectionMonitorUiCommandIds - { - EConnectionMonitorUiCmdAppDetails = 1, - EConnectionMonitorUiCmdAppEndConn, - EConnectionMonitorUiCmdAppEndAll - }; - -// Tab view Id-s -enum TConnectionMonitorUiTabViewId - { - EConnectionMonitorUiMainViewTab = 2, - EConnectionMonitorUiDetailsViewTab - }; - - -#endif // CONNECTIONMONITORUI_HRH diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiApp.h --- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiApp.h Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CConnectionMonitorUiApp application class -* -* -*/ - - -#ifndef CONNECTIONMONITORUIAPP_H -#define CONNECTIONMONITORUIAPP_H - -// INCLUDES -#include - -// CONSTANTS -// UID of the application -const TUid KUidConnectionMonitorUi = { 0x101F84D0 }; - -const TInt KErrUnknownConnectionState = -50000; -const TInt KErrCorruptedBearerType = -50001; - -/** -* Global panic function -*/ -extern void Panic( TInt aReason ); - -// CLASS DECLARATION - -/** -* CConnectionMonitorUiApp application class. -* Provides factory to create concrete document object. -* -*/ -class CConnectionMonitorUiApp : public CAknApplication - { - public: - - public: // Functions from base classes - - private: - - /** - * From CApaApplication, creates CConnectionMonitorUiDocument - * @return A pointer to the created document object. - */ - CApaDocument* CreateDocumentL(); - - /** - * From CApaApplication, returns application's UID - * @return The value of KUidConnectionMonitorUi. - */ - TUid AppDllUid() const; - - }; - -#endif // CONNECTIONMONITORUIAPP_H - -// End of File - diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiAppUi.h --- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiAppUi.h Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,312 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Application UI class -* -* -*/ - - -#ifndef CONNECTIONMONITORUIAPPUI_H -#define CONNECTIONMONITORUIAPPUI_H - -// INCLUDES -#include -#include -#include - -#include "ConnectionMonitorUiLogger.h" - -// FORWARD DECLARATIONS -class CConnectionMonitorUiContainer; -class CConnectionArray; -class CConnectionInfoBase; - -class CFeatureManagerWrapper; -class CActiveWrapper; - -// CONSTANTS - -/** -* For iPeriodic Timer. The interval between events generated -* after the initial delay, in microseconds. -*/ -LOCAL_D const TInt KTickInterval = 1000000; - - -// CLASS DECLARATION - -/** -* -*/ -class MActiveEventObserverInterface - { - public: - /** - * Called if MConnectionMonitorObserver is raised EventL event. - * @param aConnMonEvent The event information. - * @param aIndex The index of connection in the iConnectionArray. - */ - virtual void OnEventL( const CConnMonEventBase& aConnMonEvent, - const TInt aIndex ) = 0; - - /** - * Called by iPeriodic. It refreshes details of connections. - */ - virtual void OnTimerEventL() = 0; - }; - -/** -* -*/ -class MTimerExpiredObserverInterface - { - public: - /** - * Called by iPeriodic. - */ - virtual void OnTimerExpiredL() = 0; - - /** - * Gives back Timer interval. - */ - virtual TInt GetTickInerval() const = 0; - }; - -/** -* Application UI class. -* Provides support for the following features: -* - EIKON control architecture -* - view architecture -* - status pane -* -*/ -class CConnectionMonitorUiAppUi : public CAknViewAppUi, - public MConnectionMonitorObserver, - public MTimerExpiredObserverInterface - { - public: // Constructors and destructor - /** - * EPOC default constructor. - */ - void ConstructL(); - - /** - * Destructor. - */ - ~CConnectionMonitorUiAppUi(); - - public: - /** - * Returns pointer to AppUi object. - */ - static CConnectionMonitorUiAppUi* Static(); - - /** - * from MConnectionMonitorObserver - */ - void EventL( const CConnMonEventBase &aConnMonEvent ); - - public: - /** - * Register and start connection monitor engine callback notification, - * and starts periodic timer. - * @param aObserver Observer object - */ - void StartConnEventNotification( - MActiveEventObserverInterface* aObserver ); - - /** - * Stops connection monitor notification and periodic timer - * @param aObserver Observer object - */ - void StopConnEventNotification( - MActiveEventObserverInterface* aObserver ); - - /** - * Starts iPeriodic. - * @param aInterval Refresh interval - */ - void StartTimerL( const TInt aInterval = KTickInterval ); - - /** - * Stops iPeriodic. - */ - void StopTimer(); - - /** - * Timer callback of iPeridoc. - */ - static TInt Tick( TAny* aObject ); - - /** - * called by Tick( TAny* aObject ). - */ - TInt Tick(); - - /** - * Delete and remove a connection from the View - * @param aConnId the id of the currect selected connection - * @param aConnInfo pointer to the current selected connection - */ - void DeleteDetailsView( - TInt aConnId, CConnectionInfoBase* aConnInfo ); - -#ifdef RD_CONTROL_PANEL - - /** - * This function is used for querying whether the application - * is launched in embedded mode or not. - * @return ETrue: The application is launched in embedded mode. - * EFalse: The application is launched in standalone mode. - */ - TBool IsEmbedded() const; - -#endif // RD_CONTROL_PANEL - - protected: - /** - * from CCoeAppUi, for icon skinning - */ - void HandleForegroundEventL( TBool aForeground ); - - private: - /** - * From MEikMenuObserver - */ - void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); - - /** - * From CEikAppUi, takes care of command handling. - * @param aCommand command to be handled - */ - void HandleCommandL( TInt aCommand ); - - /** - * From CEikAppUi, handles key events. - * @param aKeyEvent Event to handled. - * @param aType Type of the key event. - * @return Response code ( EKeyWasConsumed, EKeyWasNotConsumed ). - */ - virtual TKeyResponse HandleKeyEventL( - const TKeyEvent& aKeyEvent, TEventCode aType ); - - /** - * Called by Tick. - */ - void OnTimerExpiredL( ); - - /** - * Gives back Timer interval. - */ - TInt GetTickInerval() const; - - /** - * Call one after the other RefreshDetails() function of connections - * which are contained by iConnectionArray. - */ - void RefreshAllConnectionsL(); - - /** - * Creates a CConnectionInfBase class, the given connection id. - * The Dynamic type of the returned class depends on the bearer type - * of the connection. - * @params aConnectionId the id of the connection - * @params aBearerType the bearer type of the connection - * @return CConnectionInfBase instance, The Dynamic type of the returned - * class depends on the bearer type of the connection. - */ - CConnectionInfoBase* CreateConnectionInfoL( TUint aConnectionId, TConnMonBearerType aBearerType ); - - /** - * Initialize connection array - */ - void InitializeConnectionArrayL(); - - /** - * Gets the IAP of Easy Wlan access point - */ - void GetEasyWlanIAPNameL(); - - /** - * Shows connection summary note. - * @param aConnection - */ - void ShowConnectionSummaryInformationNoteL( - const CConnectionInfoBase* aConnection ); - private: // Data - - /** - * For refresh details of connections. - */ - RConnectionMonitor iMonitor; - - /** - * Contains CConnectionInfoBase instances, which are represents - * the connections in the system. - */ - CConnectionArray* iConnectionArray; // Owned - - /** - * Timer, to refresh details of connections - */ - CPeriodic* iPeriodic; // Owned - - /** - * Actual observer instance. This observer handles refreshing details - * of connection on the screen. - */ - MActiveEventObserverInterface* iObserver; // Not owned - - /** - * CFeatureManagerWrapper wraps FeatureManager to eliminate maintenance - * of existance of FeatureManager. - * Owned. - */ - CFeatureManagerWrapper* iFeatureManagerWrapper; - - /** - * The active object for info. refreshing. Owned. - */ - CActiveWrapper* iActiveWrapper; - - /** - * the name of Easy Wlan access point it there is, otherwise NULL - */ - HBufC* iEasyWlanIAPName; - - /** - * A pointer to actual timer observer instance - */ - MTimerExpiredObserverInterface* iTimerObserver; - - /** - * Should the Main View be activeted during HandleForegroundEventL() method - */ - TBool activateMainView; - - /** - * An array to hold the connectionIds in situations when creating - * connectionInfo object fails - */ - RArray iNewConnectionIdArray; - - /** - * Connections waiting for first event - */ - RArray iConnectionsWaitingFirstEvent; - }; - -#endif // CONNECTIONMONITORUIAPPUI_H - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiContainer.h --- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiContainer.h Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,207 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: container control class -* -* -*/ - - -#ifndef CONNECTIONMONITORUICONTAINER_H -#define CONNECTIONMONITORUICONTAINER_H - -// INCLUDES -#include -#include "ConnectionMonitorUiAppUi.h" - -// FORWARD DECLARATIONS -class CConnectionArray; -class RConnectionMonitor; -class CAknNavigationDecorator; -class CAknNavigationControlContainer; -class CActiveWrapper; - -// CLASS DECLARATION -/** -* CConnectionMonitorUiContainer container control class. -*/ -class CConnectionMonitorUiContainer : public CCoeControl, - public MActiveEventObserverInterface - { - public: // Constructors and destructor - /** - * Constructor - * @param aConnectionArray array contains connection infos - * @param aMonitor to handlin connection details - * @param aActiveWrapper the for refreshing - */ - CConnectionMonitorUiContainer( - CConnectionArray* const aConnectionArray, - RConnectionMonitor* aMonitor, - CActiveWrapper* aActiveWrapper ); - - /** - * Second phase constructor. - * @param aSelectedItem index of selected item in the list - * @param aRect Frame rectangle for container. - */ - void ConstructL( TInt aSelectedItem, const TRect& aRect ); - - /** - * Destructor. - */ - ~CConnectionMonitorUiContainer(); - - public: // Functions from base classes - - /** - * From CCoeControl, gets the control's help context. - * @param aContext help context. - */ - virtual void GetHelpContext( TCoeHelpContext& aContext ) const; - - /** - * From CoeControl OfferKeyEventL. - */ - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, - TEventCode aType ); - - /** - * From CoeControl,CountComponentControls. - */ - TInt CountComponentControls() const; - - /** - * From CCoeControl, ComponentControl. - */ - CCoeControl* ComponentControl( TInt aIndex ) const; - - /** - * From CCoeControl - */ - void HandleResourceChange( TInt aType ) ; - - public: - /** - * from MActiveEventObserverInterface - */ - void OnEventL( const CConnMonEventBase& aConnMonEvent, - const TInt aIndex ); - /** - * from MActiveEventObserverInterface - */ - void OnTimerEventL(); - - /** - * Returns the item index of selected connection - * @return index of selected connection - */ - TInt SelectedConnection(); - - /** - * Close the selected connection. - */ - void EndConnectionL(); - - /** - * Close all connection - */ - void EndAllConnectionL(); - - /** - * Returns pointer to the listbox. - * @return pointer to the listbox. - */ - CAknDoubleGraphicStyleListBox* ListBox() const; - - /** - * Refresh the content of Navi pane and - * Push it to stack. Called by View DoActivateL() - */ - void PushAndRefreshNaviPaneL(); - - /** - * Pop and destroy the NaviPane from stack. - * Called by View DoDeactivateL() - */ - void PopNaviPane(); - - /** - * Called by HandleForegroundEventL, draw all item of list box. - */ - void DrawFirstAllListBoxItem(); - - protected: - /** - * From CoeControl,SizeChanged. - */ - void SizeChanged(); - - /** - * From CoeControl,SizeChanged. - */ - virtual void FocusChanged(TDrawNow aDrawNow); - - protected: // New functions - /** - * Sets the icons of listbox - */ - void SetIconsL(); - - /** - * Gets the title panes. - */ - void GetPanesL(); - - protected: // data - /** - * List box contains connection items - */ - CAknDoubleGraphicStyleListBox* iListBox; - - /** - * To handling details of connections - */ - RConnectionMonitor* iMonitor; - - /** - * Contins connections info - */ - CConnectionArray* const iConnectionArray; - - /** - * Owned. For NaviPane. - */ - CAknNavigationDecorator* iNaviDecorator; - - /** - * Not Owned. For NaviPane. - */ - CAknNavigationControlContainer* iNaviPane; - - private: // data - - /** - * ETrue if Wlan connection is supported, EFalse otherwise. - */ - TBool isWlanSupported; - - /** - * The active object for info. refreshing. NOT Owned. - */ - CActiveWrapper* iActiveWrapper; - }; - -#endif // CONNECTIONMONITORUICONTAINER_H - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiDetailsContainer.h --- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiDetailsContainer.h Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,201 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: container control class -* -* -*/ - -#ifndef CONNECTIONMONITORUIDETAILSCONTAINER_H -#define CONNECTIONMONITORUIDETAILSCONTAINER_H - -// INCLUDES -#include -#include "ConnectionMonitorUiAppUi.h" - -// FORWARD DECLARATIONS -class CConnectionArray; -class CAknNavigationDecorator; -class CAknNavigationControlContainer; -class CConnectionMonitorUiDetailsView; - -// CLASS DECLARATION -/** -* CConnectionMonitorUiDetailsContainer container control class. -*/ -class CConnectionMonitorUiDetailsContainer : - public CCoeControl, - public MActiveEventObserverInterface, - public MAknNaviDecoratorObserver - { - public: // Constructors and destructor - /** - * Constructor - * @param aConnectionArray array containing connection list - */ - CConnectionMonitorUiDetailsContainer( - const CConnectionArray* const aConnectionArray ); - - /** - * EPOC second-phase constructor. - * @param aRect Frame rectangle for container. - * @param aParentView ParentView of the container - */ - void ConstructL( const TRect& aRect, - CConnectionMonitorUiDetailsView* aParentView ); - - /** - * Destructor. - */ - ~CConnectionMonitorUiDetailsContainer(); - - public: // New functions - /** - * Sets iConnectionInfo and iConnectionId to the selected - * connection - * @param aConnectionIndex the index of selected connection - */ - void SetSelectedConnectionL( TUint aConnectionIndex ); - - /** - * Returns pointer to the listbox. - * @return pointer to the listbox. - */ - CAknSingleHeadingStyleListBox* ListBox() const; - - /** - * Refresh the content of Navi pane and - * Push it to stack. Called by View DoActivateL() - */ - void PushAndRefreshNaviPaneL(); - - /** - * Pop the NaviPane from stack. Called by View DoDeactivateL() - */ - void PopNaviPane(); - - - public: - /** - * Handler for pointer events, when the Navi Pane arrows have been tapped (from MAknNaviDecoratorObserver) - * - * @param aEventID The enum indicating wether right or left arrow was tapped - */ - void HandleNaviDecoratorEventL( TInt aEventID ); - - /** - * from MActiveEventObserverInterface - */ - virtual void OnEventL( const CConnMonEventBase& aConnMonEvent, - const TInt aIndex ); - - /** - * from MActiveEventObserverInterface - */ - void OnTimerEventL(); - - /** - * From CCoeControl - */ - TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, - TEventCode aType ); - - /** - * Called by HandleForegroundEventL, draw all item of list box. - */ - void DrawFirstAllListBoxItem(); - - /** - * From CCoeControl,ComponentControl. - */ - CCoeControl* ComponentControl( TInt aIndex ) const; - - /** - * From CCoeControl, used for sclable ui and landscape support. - */ - void HandleResourceChange( TInt aType ); - - /** - * Gets index of the selected item - * @return the index of selected item - */ - TInt GetIndexOfSelectedItem(); - - /** - * Gets iConnectionInfo of the selected connection - * @return CConnectionInfoBase* pointer to the connection info object - */ - CConnectionInfoBase* GetSelectedConnectionInfo() const; - - protected: - /** - * Gets the title panes. - */ - void GetPanesL(); - - private: // Functions from base classes - /** - * From CoeControl,SizeChanged. - */ - void SizeChanged(); - - /** - * From CoeControl,CountComponentControls. - */ - TInt CountComponentControls() const; - - /** - * From CoeControl,SizeChanged. - */ - virtual void FocusChanged(TDrawNow aDrawNow); - - protected: // data - /** - * Listbox contains details a connection - */ - CAknSingleHeadingStyleListBox* iListBox; - - /** - * Refers to the current selected connection - */ - CConnectionInfoBase* iConnectionInfo; // Not Owned. - - /** - * The index of selected connection - */ - TUint iConnectionIndex; - - /** - * A pointer to connections array - */ - const CConnectionArray* const iConnectionArray; // Not Owned. - - /** - * Owned. For NaviPane. - */ - CAknNavigationDecorator* iNaviDecorator; - - /** - * Not Owned. For NaviPane. - */ - CAknNavigationControlContainer* iNaviPane; - - /** - * Not Owned. A pointer to DetailsView - */ - CConnectionMonitorUiDetailsView* iParentView; // Not Owned. - }; - -#endif - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiDetailsView.h --- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiDetailsView.h Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,154 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: view class -* -* -*/ - - -#ifndef CONNECTIONMONITORUIDETAILSVIEW_H -#define CONNECTIONMONITORUIDETAILSVIEW_H - -// INCLUDES -#include -#include - -// CONSTANTS - -/** -* UID of view -*/ -const TUid KDetailsViewId = {3}; - -// FORWARD DECLARATIONS -class CConnectionMonitorUiDetailsContainer; -class CConnectionInfo; -class CConnectionInfoBase; -class CConnectionArray; - -// CLASS DECLARATION -/** -* CConnectionMonitorUiDetailsView view class. -*/ -class CConnectionMonitorUiDetailsView : public CAknView, - public MEikListBoxObserver - { - public: // Constructors and destructor - /** - * Constructor - * @param aConnectionArray array containing connection list - */ - CConnectionMonitorUiDetailsView( - CConnectionArray* const aConnectionArray ); - - /** - * EPOC second phase constructor. - */ - void ConstructL(); - - /** - * Destructor. - */ - ~CConnectionMonitorUiDetailsView(); - - public: // Functions from base classes - /** - * From CAknView - */ - TUid Id() const; - - /** - * From CAknView - */ - void HandleCommandL( TInt aCommand ); - - public: // New functions - /** - * Call SetSelectedConnection function of iContrainer - * @param aIndex index of connection in the connection array - */ - void SetSelectedConnection( TUint aIndex ); - - /** - * Returns index of selected connection - * @return index of selected connection in the connection array - */ - TUint GetSelectedConnection(); - - /** - * Returns ETrue if the refreshing stopped for the View - * @return the staus of View refreshing - */ - TBool GetViewRefreshState(); - - /** - * Set the View the refreshing status. Stopped or not - * @param aViewRefreshState staus of View refreshing - */ - void SetViewRefreshState( TBool aViewRefreshState ); - - /** - * Closes the Details View. - */ - void CloseViewL(); - - /** - * Activate the Main View - */ - void ActivateMainViewL(); - - protected: - /** - * From AknView - */ - void DoActivateL( const TVwsViewId& aPrevViewId, - TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - - /** - * From AknView - */ - void DoDeactivate(); - - /** - * From MEikListBoxObserver - */ - void HandleListBoxEventL( CEikListBox* aListBox, - TListBoxEvent aEventType ); - - private: // Data - /** - * Container of View - */ - CConnectionMonitorUiDetailsContainer* iContainer; - - /** - * Array contains connections - */ - CConnectionArray* const iConnectionArray; // Not Owned. - - /** - * The index of selected connection - */ - TUint iConnectionId; - - /** - * Staus of View refreshing. If the refreshing stopped its ETrue - */ - TBool iViewRefreshState; - }; - -#endif // CONNECTIONMONITORUIDETAILSVIEW_H - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiDocument.h --- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiDocument.h Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: application class -* -* -*/ - - -#ifndef CONNECTIONMONITORUIDOCUMENT_H -#define CONNECTIONMONITORUIDOCUMENT_H - -// INCLUDES -#include - -// CONSTANTS - -// FORWARD DECLARATIONS -class CEikAppUi; - -// CLASS DECLARATION - -/** -* CConnectionMonitorUiDocument application class. -*/ -class CConnectionMonitorUiDocument : public CAknDocument - { - public: // Constructors and destructor - /** - * Two-phased constructor. - * @param aApp Eikon Application - */ - static CConnectionMonitorUiDocument* NewL(CEikApplication& aApp); - - /** - * Destructor. - */ - virtual ~CConnectionMonitorUiDocument(); - - public: // New functions - - private: - - /** - * EPOC default constructor. - * @param aApp Eikon Application - */ - CConnectionMonitorUiDocument(CEikApplication& aApp); - void ConstructL(); - - private: - - /** - * From CEikDocument, create CConnectionMonitorUiAppUi "App UI" object. - */ - CEikAppUi* CreateAppUiL(); - }; - -#endif // CONNECTIONMONITORUIDOCUMENT_H - -// End of File - diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiLogger.h --- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiLogger.h Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Logging support for R&D purposes -* -* -*/ - - -#ifndef CONNECTIONMONITORUILOGGER_H_INCLUDED -#define CONNECTIONMONITORUILOGGER_H_INCLUDED - -// ========== INCLUDE FILES ================================ - -#include -#include - -// ========== CONSTANTS ==================================== - -#ifdef _DEBUG - -_LIT( KCMUILogDir, "CMUI"); -_LIT( KCMUILogFile, "CMUI.txt"); -_LIT(KCMUILogBanner, "CMUI 0.1.0"); -_LIT(KCMUILogEnterFn, "CMUI: -> %S"); -_LIT(KCMUILogLeaveFn, "CMUI: <- %S"); -_LIT(KCMUILogExit, "CMUI: Application exit"); -_LIT( KCMUILogTimeFormatString, "%H:%T:%S:%*C2"); - -// ========== MACROS ======================================= - -#define CMUILOGGER_CREATE {FCreate();} -#define CMUILOGGER_DELETE {RFileLogger::Write(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, KCMUILogExit);} -#define CMUILOGGER_ENTERFN(a) {_LIT(temp, a); RFileLogger::WriteFormat(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, KCMUILogEnterFn, &temp);} -#define CMUILOGGER_LEAVEFN(a) {_LIT(temp, a); RFileLogger::WriteFormat(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, KCMUILogLeaveFn, &temp);} -#define CMUILOGGER_WRITE(a) {_LIT(temp, a); RFileLogger::Write(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, temp);} -#define CMUILOGGER_WRITE_F(a, b) {_LIT(temp, a); RFileLogger::WriteFormat(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, temp, b);} -#define CMUILOGGER_WRITE_TIMESTAMP(a) {_LIT(temp, a); TTime time; time.HomeTime(); TBuf<256> buffer; time.FormatL( buffer, KCMUILogTimeFormatString ); buffer.Insert(0, temp); RFileLogger::Write(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, buffer); } -#define CMUILOGGER_WRITEF FPrint - - -inline void FPrint(const TRefByValue aFmt, ...) - { - VA_LIST list; - VA_START(list,aFmt); - RFileLogger::WriteFormat(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, aFmt, list); - } - -inline void FPrint(const TDesC& aDes) - { - RFileLogger::WriteFormat(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, aDes); - } - -inline void FHex(const TUint8* aPtr, TInt aLen) - { - RFileLogger::HexDump(KCMUILogDir, KCMUILogFile, EFileLoggingModeAppend, 0, 0, aPtr, aLen); - } - -inline void FHex(const TDesC8& aDes) - { - FHex(aDes.Ptr(), aDes.Length()); - } - -inline void FCreate() - { - TFileName path(_L("c:\\logs\\")); - path.Append(KCMUILogDir); - path.Append(_L("\\")); - RFs& fs = CEikonEnv::Static()->FsSession(); - fs.MkDirAll(path); - RFileLogger::WriteFormat(KCMUILogDir, KCMUILogFile, EFileLoggingModeOverwrite, KCMUILogBanner); - } - -#else // ! _DEBUG - -inline void FPrint(const TRefByValue /*aFmt*/, ...) { }; - -#define CMUILOGGER_CREATE -#define CMUILOGGER_DELETE -#define CMUILOGGER_ENTERFN(a) -#define CMUILOGGER_LEAVEFN(a) -#define CMUILOGGER_WRITE(a) -#define CMUILOGGER_WRITE_F(a, b) -#define CMUILOGGER_WRITEF 1 ? ((void)0) : FPrint -#define CMUILOGGER_WRITE_TIMESTAMP(a) - -#endif // _DEBUG - -// ========== DATA TYPES =================================== - -// ========== FUNCTION PROTOTYPES ========================== - -// ========== FORWARD DECLARATIONS ========================= - -// ========== CLASS DECLARATION ============================ - -#endif // CONNECTIONMONITORUILOGGER_H_INCLUDED \ No newline at end of file diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiView.h --- a/connectionmonitoring/connectionmonitorui/inc/ConnectionMonitorUiView.h Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,177 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: view class -* -* -*/ - - -#ifndef CONNECTIONMONITORUI_VIEW_H -#define CONNECTIONMONITORUI_VIEW_H - -// INCLUDES -#include -#include - -// CONSTANTS - -// UID of view -const TUid KConnectionsViewId = {2}; - -// FORWARD DECLARATIONS -class CConnectionMonitorUiContainer; -class CConnectionArray; -class CActiveWrapper; - -// CLASS DECLARATION -/** -* CConnectionMonitorUiView view class. -*/ -class CConnectionMonitorUiView : public CAknView, public MEikListBoxObserver - { - public: // Constructors and destructor - /** - * Constructor - * @param aConnectionArray array contains connection infos - * @param aMonitor Connection Monitor engine session - * @param aActiveWrapper the for refreshing - */ -#ifdef RD_CONTROL_PANEL - CConnectionMonitorUiView( CConnectionArray* const aConnectionArray, - RConnectionMonitor* aMonitor, - TBool aIsEmbedded, - CActiveWrapper* aActiveWrapper ); -#else - CConnectionMonitorUiView( CConnectionArray* const aConnectionArray, - RConnectionMonitor* aMonitor, - CActiveWrapper* aActiveWrapper ); -#endif // RD_CONTROL_PANEL - - /** - * EPOC default constructor. - */ - void ConstructL(); - - /** - * Destructor. - */ - ~CConnectionMonitorUiView(); - - public: // Functions from base classes - /** - * From AknView - */ - TUid Id() const; - - /** - * From AknView - */ - void HandleCommandL( TInt aCommand ); - - /** - * From MEikMenuObserver - * Dynamic handling of menus. - */ - virtual void DynInitMenuPaneL( TInt aResourceId, - CEikMenuPane* aMenuPane ); - - /** - * Observe the connection stat and set the right Soft Keys. - */ - void ConnectionKeyObserver() const; - - protected: - /** - * from MEikListBoxObserver - */ - void HandleListBoxEventL( CEikListBox* aListBox, - TListBoxEvent aEventType ); - - protected: - /** - * From AknView - */ - void DoActivateL( const TVwsViewId& aPrevViewId, - TUid aCustomMessageId, - const TDesC8& aCustomMessage ); - - /** - * From AknView - */ - void DoDeactivate(); - - /** - * Sets the tile pane to the given resource. - * @param aResourceId the id of resource string - */ - void SetTitlePaneTextL( TInt aResourceId ); - - private: - /** - * Brings up details view. - */ - void BringupDetailsViewL(); - - /** - * Check if selecred connection is Alilve or not - * @return if the selected connection is alive ETrue, oterwise EFalse - */ - TBool IsSelectedConnectionAlive() const; - - /** - * Check if selecred connection is Suspended or not - * @return if the selected connection is alive ETrue, oterwise EFalse - */ - TBool IsSelectedConnectionSuspended() const; - - private: // Data - /** - * Continer instance of view. - */ - CConnectionMonitorUiContainer* iContainer; // Owned - - /** - * Constant pointe to array of connections. - */ - CConnectionArray* const iConnectionArray; // Not Owned - - /** - * Pointer to RConnectionMonitor for deleting connection(s). - */ - RConnectionMonitor* iMonitor; // Not Owned - - /** - * ETrue if Help is supported, EFalse otherwise. - */ - TBool isHelpSupported; - -#ifdef RD_CONTROL_PANEL - - /** - * ETrue: The application is launched in embedded mode. - * EFalse: The application is launched in standalone mode. - */ - TBool iIsEmbedded; - -#endif // RD_CONTROL_PANEL - - /** - * The active object for info. refreshing. NOT Owned. - */ - CActiveWrapper* iActiveWrapper; - }; - -#endif // CONNECTIONMONITORUI_VIEW_H - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/inc/CsdConnectionInfo.h --- a/connectionmonitoring/connectionmonitorui/inc/CsdConnectionInfo.h Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,129 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Represents a connection -* -* -*/ - - -#ifndef CSDCONNECTIONINFO_H_INCLUDED -#define CSDCONNECTIONINFO_H_INCLUDED - -// INCLUDES -#include -#include -#include "ConnectionInfoBase.h" - -// CONSTANTS - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* Represents a connection. -*/ -class CCsdConnectionInfo : public CConnectionInfoBase - { - public: - /** - * Static constructor - * @param aConnectionId The id of the given connection. - * @param aMonitor for refreshing details - * @param aConnectionBearerType the bearer type of connection - * @param aActiveWrapper the for refreshing - */ - static CCsdConnectionInfo* NewL( TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - CActiveWrapper* aActiveWrapper ); - - /** - * Destructor - */ - virtual ~CCsdConnectionInfo(); - public: - - /** - * Give back a copy of connection. - */ - virtual CConnectionInfoBase* DeepCopyL(); - - /** - * Refresh required details of connection. - */ - virtual void RefreshDetailsL(); - - /** - * Refresh iListBoxItemText text, connection ListBox has a reference to - * this text. - */ - virtual void RefreshConnectionListBoxItemTextL(); - - /** - * Refresh details array of connection. DetailsListBox has a reference - * to this array. - */ - virtual void RefreshDetailsArrayL(); - - /** - * Gives back the icon id of connection type - * @return the icon id of connection type - */ - virtual TUint GetIconId() const; - - protected: - /** - * Constructor - * @param aConnectionId The id of the given connection. - * @param aMonitor for refreshing details - * @param aConnectionBearerType the bearer type of connection - * @param aActiveWrapper the for refreshing - */ - CCsdConnectionInfo( TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - CActiveWrapper* aActiveWrapper ); - - /** - * Second phase construction - */ - void ConstructL(); - - protected: - /** - * Creates an array with requrired details of connection to - * the listbox which visulaize details of connection. This member - * is called at initialization. - */ - virtual void ToArrayDetailsL(); - - /** - * Creates a string from dialup number of the connection. - * @return string representation count of sharigs of the connection. - */ - HBufC* ToStringDialupNumberLC() const; - - private: - - protected: // Data members - - TBuf iDialupNumber; ///< DialupNumber of connection - - }; - - -#endif // CSDCONNECTIONINFO_H_INCLUDED - -// Enf of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/inc/EasyWLANConnectionInfo.h --- a/connectionmonitoring/connectionmonitorui/inc/EasyWLANConnectionInfo.h Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Represents a WLAN connection -* -* -*/ - - -#ifndef EASYWLANCONNECTIONINFO_H_INCLUDED -#define EASYWLANCONNECTIONINFO_H_INCLUDED - -// INCLUDES -#include "WlanConnectionInfo.h" - -// CONSTANTS - -// FORWARD DECLARATIONS -class RConnectionMonitor; - -// CLASS DECLARATION -/** -* Represents a WLAN connection. -*/ -class CEasyWlanConnectionInfo : public CWlanConnectionInfo - { - public: - /** - * Static constructor - * @param aConnectionId The id of the given connection. - * @param aMonitor for refreshing details - * @param aConnectionBearerType the bearer type of connection - * @param aActiveWrapper the for refreshing - */ - static CEasyWlanConnectionInfo* NewL( TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - CActiveWrapper* aActiveWrapper ); - - /** - * Destructor - */ - virtual ~CEasyWlanConnectionInfo(); - - public: - /** - * Give back a copy of connection. - */ - virtual CConnectionInfoBase* DeepCopyL(); - - /** - * Refresh iListBoxItemText text, connection ListBox has a - * reference to this text. - */ - virtual void RefreshConnectionListBoxItemTextL(); - - /** - * Refresh details array of connection. - * DetailsListBox has a reference to this array. - */ - virtual void RefreshDetailsArrayL(); - - protected: // Constructors - /** - * Constructor - * @param aConnectionId The id of the given connection. - * @param aMonitor for refreshing details - * @param aConnectionBearerType the bearer type of connection - * @param aActiveWrapper the for refreshing - */ - CEasyWlanConnectionInfo( TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - CActiveWrapper* aActiveWrapper ); - - /** - * Second phase construction - */ - void ConstructL(); - - protected: - /** - * Creates an array with requrired details of connection to - * the listbox which visulaize details of connection. This member - * is called at initialization. - */ - virtual void ToArrayDetailsL(); - - }; - -#endif // EASYWLANCONNECTIONINFO_H_INCLUDED -//End of File. \ No newline at end of file diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/inc/FeatureManagerWrapper.h --- a/connectionmonitoring/connectionmonitorui/inc/FeatureManagerWrapper.h Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of class CFeatureManagerWrapper. -* -*/ - - -#ifndef FEATURE_MANAGER_WRAPPER_H -#define FEATURE_MANAGER_WRAPPER_H - -// INCLUDE FILES -#include //CBase -#include - -// CLASS DECLARATION - -/** -* CFeatureManagerWrapper wraps FeatureManager to ease its usage -*/ -class CFeatureManagerWrapper : public CBase - { - - public: - - /** - * Destructor. Uninitalize FeatureManager. - */ - virtual ~CFeatureManagerWrapper(); - - /** - * Static constructor. - */ - static CFeatureManagerWrapper* NewL(); - - protected: - - /** - * Default constructor. - */ - CFeatureManagerWrapper(); - - /** - * Second-phase constructor. Initialize FeatureManager - */ - void ConstructL(); - - private: - - /** - * Indicates Featuremanger is initialized or not. - */ - TBool iIsFeatureMgrInitialized; - - }; - -#endif - -// End of file diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/inc/GprsConnectionInfo.h --- a/connectionmonitoring/connectionmonitorui/inc/GprsConnectionInfo.h Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Represents a connection -* -* -*/ - - -#ifndef GPRSCONNECTIONINFO_H_INCLUDED -#define GPRSCONNECTIONINFO_H_INCLUDED - -// INCLUDES -#include -#include -#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS -#include -#else -#include -#include -#endif -#include "ConnectionInfoBase.h" - -// CONSTANTS - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* Represents a connection. -*/ -class CGprsConnectionInfo : public CConnectionInfoBase - { - public: - /** - * Static constructor - * @param aConnectionId The id of the given connection. - * @param aMonitor for refreshing details - * @param aConnectionBearerType the bearer type of connection - * @param aActiveWrapper the for refreshing - */ - static CGprsConnectionInfo* NewL( TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - CActiveWrapper* aActiveWrapper ); - - /** - * Destructor - */ - virtual ~CGprsConnectionInfo(); - public: - /** - * Give back a copy of connection. - */ - virtual CConnectionInfoBase* DeepCopyL(); - - /** - * Refresh required details of connection. - */ - virtual void RefreshDetailsL(); - - /** - * Refresh iListBoxItemText text, connection ListBox has a reference to - * this text. - */ - virtual void RefreshConnectionListBoxItemTextL(); - - /** - * Refresh details array of connection. DetailsListBox has a reference - * to this array. - */ - virtual void RefreshDetailsArrayL(); - - /** - * Gives back the icon id of connection type - * @return the icon id of connection type - */ - virtual TUint GetIconId() const; - - protected: - /** - * Constructor - * @param aConnectionId The id of the given connection. - * @param aMonitor for refreshing details - * @param aConnectionBearerType the bearer type of connection - * @param aActiveWrapper the for refreshing - */ - CGprsConnectionInfo( TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - CActiveWrapper* aActiveWrapper ); - - /** - * Second phase construction - */ - void ConstructL(); - - protected: - /** - * Creates an array with requrired details of connection to - * the listbox which visulaize details of connection. This member - * is called at initialization. - */ - virtual void ToArrayDetailsL(); - - /** - * Creates a string from Access Point name of the connection. - * @return string representation count of Access Point name of - * the connection. - */ - HBufC* ToStringApNameLC() const; - - private: - - protected: // Data members - - TBuf iApName; ///< Used AccessPoint name - - }; - - -#endif // GPRSCONNECTIONINFO_H_INCLUDED - -// Enf of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/inc/WlanConnectionInfo.h --- a/connectionmonitoring/connectionmonitorui/inc/WlanConnectionInfo.h Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,272 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Represents a WLAN connection -* -* -*/ - - -#ifndef WLANCONNECTIONINFO_H_INCLUDED -#define WLANCONNECTIONINFO_H_INCLUDED - -// INCLUDES -#include "ConnectionInfoBase.h" - -// CONSTANTS - -// FORWARD DECLARATIONS -class RConnectionMonitor; - -// Calibration of WLAN signal strength -enum TWlanSignalStrength - { - EWlanSignalStrengthMax = 60, - EWlanSignalStrengthGood = 74, - EWlanSignalStrengthLow = 87, - EWlanSignalStrengthMin = 100, - EWlanSignalUnavailable = 9999 - }; - -// WLAN Network modes -enum TWlanNetworkMode - { - EWlanNetworkModeInfrastructure = 0, - EWlanNetworkModeAdHoc, - EWlanNetworkModeSecInfrastructure, - EWlanNetworkModeUnavailable - }; - -// WLAN security modes -enum TWlanSecurityMode - { - EWlanSecurityModeOpenNetwork = 0, - EWlanSecurityModeWEP, - EWlanSecurityMode8021x, - EWlanSecurityModeWPA, - EWlanSecurityWpaPsk, - EWlanSecurityModeUnavailable - }; - -// CONSTANTS - -const TReal32 KDiffOfWlanSignalStrength = - EWlanSignalStrengthMin - EWlanSignalStrengthMax; - - -// CLASS DECLARATION -/** -* Represents a WLAN connection. -*/ -class CWlanConnectionInfo : public CConnectionInfoBase - { - public: - /** - * Static constructor - * @param aConnectionId The id of the given connection. - * @param aMonitor for refreshing details - * @param aConnectionBearerType the bearer type of connection - * @param aEasyWlanIAPName Name of the Easy WLAN access point - * @param aActiveWrapper the for refreshing - */ - static CWlanConnectionInfo* NewL( TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - const HBufC* aEasyWlanIAPName, - CActiveWrapper* aActiveWrapper ); - - /** - * Destructor - */ - virtual ~CWlanConnectionInfo(); - - public: - /** - * Give back a copy of connection. - */ - virtual CConnectionInfoBase* DeepCopyL(); - - /** - * Refreshing all details of connection. Leaves if refreshing - * any of detais is failed. - */ - virtual void RefreshDetailsL(); - - /** - * Refresh iListBoxItemText text, connection ListBox has a - * reference to this text. - */ - virtual void RefreshConnectionListBoxItemTextL(); - - /** - * Refresh details array of connection. DetailsListBox has a - * reference to this array. - */ - virtual void RefreshDetailsArrayL(); - - /** - * Gives back the icon id of connection - * @return the icon id of connection - */ - virtual TUint GetIconId() const; - - /** - * Gives back the connection is EasyWLAN or not. - * @return ETrue if the selected conenction EasyWLAN, - * EFalse otherwise - */ - virtual TBool IsEasyWLAN() const; - - /** - * Gives back current Name of Network ( SSID ) - * @return iNetworkName - */ - virtual HBufC* GetWlanNetworkNameLC() const; - - /** - * Gives back current SignalStrength - * @return iSignalStrength - */ - TWlanSignalStrength GetWlanSignalStrength() const; - - /** - * Gives back current NetworkMode - * @return iNetworkMode - */ - TWlanNetworkMode GetWlanNetworkMode() const; - - /** - * Gives back current SecurityMode - * @return iSecurityMode - */ - TWlanSecurityMode GetWlanSecurityMode() const; - - /** - * Gives back current TxPower - * @return iTxPower - */ - TUint GetWlanTxPower() const; - - protected: // Constructors - /** - * Constructor - * @param aConnectionId The id of the given connection. - * @param aMonitor for refreshing details - * @param aConnectionBearerType the bearer type of connection - * @param aActiveWrapper the for refreshing - */ - CWlanConnectionInfo( TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - CActiveWrapper* aActiveWrapper ); - - /** - * Second phase construction - */ - void ConstructL(); - - protected: - /** - * Creates an array with requrired details of connection to - * the listbox which visulaize details of connection. This member - * is called at initialization. - */ - virtual void ToArrayDetailsL(); - - /** - * Refreshing NetworkName. Leaves if did not get valid data from - * ConnectionMonitor. - */ - void RefreshNetworkNameL(); - - /** - * Refreshing SignalStrength. Leaves if did not get valid data from - * ConnectionMonitor. - */ - void RefreshSignalStrength(); - - /** - * Refreshing NetworkMode. Leaves if did not get valid data from - * ConnectionMonitor. - */ - void RefreshNetworkMode(); - - /** - * Refreshing SecurityMode. Leaves if did not get valid data from - * ConnectionMonitor. - */ - void RefreshSecurityMode(); - - /** - * Refreshing TxPower. Leaves if did not get valid data from - * ConnectionMonitor. - */ - void RefreshTxPowerL(); - - /** - * Gives back the string representation of SignalStrength. - */ - HBufC* ToStringSignalStrengthLC() const; - - /** - * Gives back the string representation of Mode. - */ - HBufC* ToStringNetworkModeLC() const; - - /** - * Gives back the string representation of Security. - */ - HBufC* ToStringSecurityModeLC() const; - - /** - * Gives back the string representation of TxPower. - */ - HBufC* ToStringTxPowerLC() const; - - private: - - protected: - - /** - * The name of network (SSID) - */ - TName iWlanNetworkName; - - /** - * Signale strength of WLAN connection - */ - TWlanSignalStrength iSignalStrength; - - /** - * Network mode of WLAN conenction - */ - TWlanNetworkMode iNetworkMode; - - /** - * Security mode of WLAN conenction - */ - TWlanSecurityMode iSecurityMode; - - /** - * TxPower of WLAN conenction - */ - TUint iTxPower; - - /** - * ETrue if the selected conenction EasyWLAN - */ - TBool iEasyWlan; - }; - -#endif // WLANCONNECTIONINFO_H_INCLUDED -//End of File. \ No newline at end of file diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/loc/connectionmonitorui.loc --- a/connectionmonitoring/connectionmonitorui/loc/connectionmonitorui.loc Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,762 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Localization texts for ConnectionMonitorUi -* -* -*/ - - - -// LOCALISATION STRINGS -//d:Title pane text in main view -//l:title_pane_t2/opt9 -//w: -//r:1.0 -// - -#define qtn_cmon_title "Conn. Manager" - -//d:No active connection in main view -//l:main_list_empty_pane -//w: -//r:1.0 -// - -#define qtn_cmon_no_active_connections "(no active connections)" - -//d:Title pane text in main view. -//l:navi_navi_text_pane_t1 -//w: -//r:1.0 -// - -#define qtn_cmon_navi_one_active_conn "1 active connection" - -//d:Title pane text in main view. -//l:navi_navi_text_pane_t1 -//w: -//r:1.0 -// - -#define qtn_cmon_navi_many_active_conns "%N active connections" - -//d:downloaded / uploaded data amounts with two decimal -//d:digits (for GPRS connections) -//l:list_double_graphic_pane_t2 -//w: -//r:1.0 -// - -#define qtn_cmon_ul_dl_data_amounts "%0U / %1U" - -//d:duration of the connection over 24h (for CSD and HSCSD connections) -//l:list_single_heading_pane_t1 -//w: -//r:1.0 -// - -#define qtn_cmon_duration_over_24h "%0Ud %1U" - -//d:Connection status (main view) -//l:list_double_graphic_pane_t2 -//w: -//r:1.0 -// - -#define qtn_cmon_status_creating "Creating connection" - -//d:Connection status (main view) -//l:list_double_graphic_pane_t2 -//w: -//r:1.0 -// - -#define qtn_cmon_status_idle "Idle" - -//d:Connection status (main view) -//l:list_double_graphic_pane_t2 -//w: -//r:1.0 -// - -#define qtn_cmon_status_active "Active" - -//d:Connection status (main view) -//l:list_double_graphic_pane_t2 -//w: -//r:1.0 -// - -#define qtn_cmon_status_suspended "On hold" - -//d:Connection status (main view) -//l:list_double_graphic_pane_t2 -//w: -//r:1.0 -// - -#define qtn_cmon_status_closing "Closing connection" - -//d:Connection status (main view) -//l:list_double_graphic_pane_t2 -//w: -//r:1.0 -// - -#define qtn_cmon_status_closed "Closed" - -//d:Connection status (details view) -//l:list_single_heading_pane_t1 -//w: -//r:1.0 -// - -#define qtn_cmon_status_details_creating "Creating connection" - -//d:Connection status (details view) -//l:list_single_heading_pane_t1 -//w: -//r:1.0 -// - -#define qtn_cmon_status_details_idle "Idle" - -//d:Connection status (details view) -//l:list_single_heading_pane_t1 -//w: -//r:1.0 -// - -#define qtn_cmon_status_details_active "Active" - -//d:Connection status (details view) -//l:list_single_heading_pane_t1 -//w: -//r:1.0 -// - -#define qtn_cmon_status_details_suspended "On hold" - -//d:Connection status (details view) -//l:list_single_heading_pane_t1 -//w: -//r:1.0 -// - -#define qtn_cmon_status_details_closing "Closing connection" - -//d:Connection status (details view) -//l:list_single_heading_pane_t1 -//w: -//r:1.0 -// - -#define qtn_cmon_status_details_closed "Closed" - -//d:The navi pane displays the “serial number” (%1N) of the -//d:connection in question and the total amount of the -//d:connections. -//l:navi_navi_text_pane_t1 -//w: -//r:1.0 -// - -#define qtn_cmon_navi_nof_connection "%0N/%1N" - -//d: -//l:list_single_heading_pane_t2 -//w: -//r:1.0 -// - -#define qtn_cmon_heading_conn_name "Name" - -//d: -//l:list_single_heading_pane_t2 -//w: -//r:1.0 -// - -#define qtn_cmon_heading_bearer "Bearer" - -//d: -//l:list_single_heading_pane_t2 -//w: -//r:1.0 -// - -#define qtn_cmon_heading_status "Status" - -//d: -//l:list_single_heading_pane_t2 -//w: -//r:1.0 -// - -#define qtn_cmon_heading_data_received "Received" - -//d: -//l:list_single_heading_pane_t2 -//w: -//r:1.0 -// - -#define qtn_cmon_heading_data_sent "Sent" - -//d: -//l:list_single_heading_pane_t2 -//w: -//r:1.0 -// - -#define qtn_cmon_heading_duration "Duration" - -//d: -//l:list_single_heading_pane_t2 -//w: -//r:1.0 -// - -#define qtn_cmon_heading_speed "Speed" - -//d: -//l:list_single_heading_pane_t2 -//w: -//r:1.0 -// - -#define qtn_cmon_heading_csd_number "Dial-up no." - -//d: -//l:list_single_heading_pane_t2 -//w: -//r:1.0 -// - -#define qtn_cmon_heading_gprs_apn "APN" - -//d: -//l:list_single_heading_pane_t2 -//w: -//r:1.0 -// - -#define qtn_cmon_heading_sharing_info "Sharing" - -//d: -//l:list_single_heading_pane_t1 -//w: -//r:1.0 -// - -#define qtn_set_bearer_data_call "Data call" - -//d: -//l:list_single_heading_pane_t1 -//w: -//r:1.0 -// - -#define qtn_set_bearer_packet_data "Packet data" - -//d: -//l:list_single_heading_pane_t1 -//w: -//r:1.0 -// - -#define qtn_cmon_bearer_hscsd "High speed GSM" - -//d: -//l:list_single_heading_pane_t1 -//w: -//r:1.0 -// - -#define qtn_log_gprs_amount_b "%U B" - -//d: -//l:list_single_heading_pane_t1 -//w: -//r:1.0 -// - -#define qtn_log_gprs_amount_kb "%U kB" - -//d: -//l:list_single_heading_pane_t1 -//w: -//r:1.0 -// - -#define qtn_log_gprs_amount_mb "%U MB" - -//d: -//l:list_single_heading_pane_t1 -//w: -//r:1.0 -// - -#define qtn_log_gprs_amount_gb "%U GB" - -//d: -//l:list_double_number_pane_t3 -//w: -//r:1.0 -// - -#define qtn_cmon_data_transf_rate_dl "%U kB/s" - -//d: -//l:list_single_heading_pane_t1 -//w: -//r:1.0 -// - -#define qtn_cmon_sharing_information "Between %N instances" - -//d:Confirmation query to close selected connection -//l:popup_note_window -//w: -//r:1.0 -// - -#define qtn_cmon_conf_end_single_conn "End connection ’%U’?" - -//d:Confirmation query to close all connections -//l:popup_note_window -//w: -//r:1.0 -// - -#define qtn_cmon_conf_end_all_conns "%N connections active. End all connections?" - -//d:Main view menu item -//l:list_single_pane_t1_cp2 -//w: -//r:1.0 -// - -#define qtn_cmon_list_options_details "Details" - -//d:Main view menu item -//l:list_single_pane_t1_cp2 -//w: -//r:1.0 -// - -#define qtn_cmon_list_options_end_conn "End connection" - -//d:Main view menu item -//l:list_single_pane_t1_cp2 -//w: -//r:1.0 -// - -#define qtn_cmon_list_options_end_all "End all connections" - -//d:Application name -//l:list_single_large_graphic_pane_t1 -//w: -//r:1.0 -// - -#define qtn_apps_cmon_list "Conn. manager" - -//d:Application name -//l:cell_app_pane_t1 -//w: -//r:1.0 -// - -#define qtn_apps_cmon_grid "Conn. manager" - -//d:Transferred KBytes -//l:list_single_heading_pane_t1 -//w: -//r:1.0 -// - -#define qtn_cmon_data_transf_rate_ul "%U kB/s" - -//d: -//l:list_single_heading_pane_t1 -//w: -//r:1.0 -// - -#define qtn_cmon_item_conn_name_modem "Modem connection" - -//d:Confirmation query to close modem connection -//l:popup_note_window -//w: -//r:1.0 -// - -#define qtn_cmon_conf_end_modem_conn "End modem connection?" - -//d:when user rejects the query, an information note -//l:popup_note_window -//w: -//r:1.0 -// - -#define qtn_cmon_info_conn_already_end "Connection was already closed." - -//d:Connection Manager’s Active connections main view -//l:list_double2_large_graphic_pane -//w: -//r:3.0 -// -#define qtn_cmon_active_data_connections "Active data connections" - -//d:Connection Manager’s Available WLAN networks main view -//l:list_double2_large_graphic_pane -//w: -//r:3.0 -// -#define qtn_cmon_available_wlan_networks "Available WLAN networks" - -//d: WLAN network mode value text,mode, terminal is connected to another terminal or multiple -//d:terminals (point-to-multipoint) without utilising any physical access points. -//l:list_single_heading_pane_t1 -//w: -//r:3.1 -// -#define qtn_cmon_wlan_newtwork_mode_adhoc "Ad-hoc" - -//d: WLAN network mode value text, the terminal is connected over WLAN to a physical WLAN access point. -//l:list_single_heading_pane_t1 -//w: -//r:3.1 -// -#define qtn_cmon_wlan_newtwork_mode_infra "Infrastructure" - - -//d: WLAN network security mode value text, this is the abbrevation of a kind of security mode -//l:list_single_heading_pane_t1 -//w: -//r:3.1 -// -#define qtn_cmon_wlan_security_mode_wep "WEP" - -//d: WLAN network security mode value text, this is the abbrevation of a kind of security mode -//l:list_single_heading_pane_t1 -//w: -//r:3.1 -// -#define qtn_cmon_wlan_security_mode_802_1x "802.1x" - -//d: WLAN network security mode value text, this is the abbrevation of a kind of security mode -//l:list_single_heading_pane_t1 -//w: -//r:3.1 -// -#define qtn_cmon_wlan_security_mode_wpa "WPA/WPA2" - -//d:Title of Active connections main view -//l:title_pane_t2/opt9 -//w: -//r:3.0 -// -#define qtn_cmon_title_active_conns "Active data connections" - -//d: Title of Available WLAN networks main view -//l:title_pane_t2/opt9 -//w: -//r:3.0 -// -#define qtn_cmon_title_available_wlan "Available WLAN networks" - -//d: WLAN network bearer type value text -//l:list_single_heading_pane_t1 -//w: -//r:3.0 -// -#define qtn_wlan_sett_bearer_wlan "Wireless LAN" - -//d: WLAN network security mode value text -//l:list_single_heading_pane_t1 -//w: -//r:3.1 -// -#define qtn_cmon_wlan_security_mode_open "Open network" - -//d: WLAN network name (SSID) detail of the network -//l:list_single_heading_pane_t2 -//w: -//r:3.0 -// -#define qtn_cmon_heading_wlan_network_name "Network" - -//d: WLAN network signal strength detail of the network -//l:list_single_heading_pane_t2 -//w: -//r:3.0 -// -#define qtn_cmon_heading_wlan_signal_strength "Signal" - -//d: WLAN network mode detail of the network -//l:list_single_heading_pane_t2 -//w: -//r:3.0 -// -#define qtn_cmon_heading_wlan_network_mode "Mode" - -//d:WLAN network Security mode used by the WLAN network detail of the network -//l:list_single_heading_pane_t2 -//w: -//r:3.0 -// -#define qtn_cmon_heading_wlan_security_mode "Security" - -//d:WLAN network Current transmit (TX) power level detail of the network -//l:list_single_heading_pane_t2 -//w: -//r:3.0 -// -#define qtn_cmon_heading_wlan_tx_power "TX power" - -//d:WLAN network Amount of physical WLAN access points detail of the network -//l:list_single_heading_pane_t2 -//w: -//r:3.0 -// -#define qtn_cmon_heading_wlan_nw_ap_amount "Coverage" - -//d:WLAN network Maximum data rate detail of the network -//l:list_single_heading_pane_t2 -//w: -//r:3.0 -// -#define qtn_cmon_heading_wlan_nw_max_rate "Max. rate" - -//d:WLAN network Amount of physical WLAN access points (AP) in range, if a single AP is in range -//l:list_single_heading_pane_t1 -//w: -//r:3.0 -// -#define qtn_cmon_wlan_ap_amount_in_range "1 access point" - -//d:WLAN network Amount of physical WLAN access points (AP) in range, if multiple APs in range (%N is the amount) -//l:list_single_heading_pane_t1 -//w: -//r:3.0 -// -#define qtn_cmon_wlan_ap_amount_in_range_many "%N access points" - -//d:WLAN network Current transmit (TX) power level in milliwatts (mW -//l:list_single_heading_pane_t1 -//w: -//r:3.0 -// -#define qtn_cmon_wlan_tx_power_level "%N mW" - -//d:WLAN network Maximum data rate in network (of best AP in range) -//d:in megabits per secondin -//l:list_single_heading_pane_t1 -//w: -//r:3.0 -// -#define qtn_cmon_wlan_max_data_rate "%U Mbit/s" - -//d: WLAN network signal strength value text -//l:list_single_heading_pane_t1 -//w: -//r:3.0 -// -#define qtn_cmon_wlan_singal_strength_low "Low (%N%)" - -//d: WLAN network signal strength value text -//l:list_single_heading_pane_t1 -//w: -//r:3.0 -// -#define qtn_cmon_wlan_singal_strength_medium "Medium (%N%)" - -//d: WLAN network signal strength value text -//l:list_single_heading_pane_t1 -//w: -//r:3.0 -// -#define qtn_cmon_wlan_singal_strength_good "Good (%N%)" - -//d: WLAN network signal strength text if the network in question becomes unavailable while -//d:in details view, -//l:list_single_heading_pane_t1 -//w: -//r:3.0 -// -#define qtn_cmon_wlan_signal_strength_no_signal "No signal" - -//d:Navi pane text in Available WLAN networks main view, if only one network is available. -//l:navi_navi_text_pane_t1 -//w: -//r:3.0 -// -#define qtn_cmon_navi_one_wlan_nw_available "1 network available" - -//d:Navi pane text in Available WLAN networks main view, if more than one network is available -//d:(%N is the amount of networks). -//l:navi_navi_text_pane_t1 -//w: -//r:3.0 -// -#define qtn_cmon_navi_many_wlan_nws_available "%N networks available" - -//d:Navi pane text in Available WLAN networks details view. -//d:The navi pane displays the “serial number” (%0N) of the -//d:network in question and the total amount of the connections -//d:(%1N) using the navigation text component: %0N/%1N -//l:navi_navi_text_pane_t1 -//w: -//r:3.0 -// -#define qtn_cmon_navi_nof_wlan_network "%0N/%1N" - -//d:Available WLAN networks main view — No networks available -//l:main_list_empty_pane -//w: -//r:3.0 -// -#define qtn_cmon_no_wlan_networks_available "(no available WLAN networks)" - -//d:Available WLAN networks main view options menu item. -//l:list_single_pane_t1_cp2 -//w: -//r:3.0 -// -#define qtn_cmon_options_create_wlan_iap "Create internet access point" - -//d:Available WLAN networks main view options menu - create internet access point item -//d:was selected this confirmation query note is displayed. -//l:popup_note_window -//w: -//r:3.0 -// -#define qtn_cmon_quest_create_wlan_iap "Create internet access point for WLAN network '%U'?" - -//d:Available WLAN networks main view options menu - create internet access point item -//d:and secure network was selected this information note is poped up. -//l:popup_note_window -//w: -//r:3.0 -// -#define qtn_cmon_info_wlan_secure_nw_iap_create "You can create an internet access point for a secure WLAN network via Connection settings, Access points." - -//d:Available WLAN networks main view — One or more networks available, options menu item -//l:list_single_pane_t1_cp2 -//w: -//r:3.0 -// -#define qtn_cmon_options_refresh "Refresh" - - -//d: Unavailable attribute (details view) -//l:list_single_heading_pane_t1 -//w: -//r:3.0 -// -#define qtn_cmon_parameter_unavailable "(unavailable)" - -//d: -//l:list_single_heading_pane_t2 -//w: -//r:3.0 -// -#define qtn_cmon_heading_data_total "Total" - - -//d:"Connection summary note" note- info text -//l:heading_pane_t1 -//w: -//r:3.1 -// -#define qtn_cmon_summary_heading "Connection summary" - -//d:First line topic of "Connection summary note" note -//d:displays the total transferred data amount (received and sent summarized) -//l:heading_pane_t1 -//w: -//r:3.1 -// -#define qtn_cmon_summary_transferred "Transferred data:" - -//d:Third line topic of "Connection summary note" note, -//d:displays the duration of the connection -//l:heading_pane_t1 -//w: -//r:3.1 -// -#define qtn_cmon_summary_duration "Duration:" - -//d:Available WLAN networks main view options menu - create internet access point item -//d:final confirmation note is poped up when access point item has been created successfully -//l:popup_note_window -//w: -//r:3.1 -// -#define qtn_cmon_conf_wlan_iap_created "Internet access point defined for WLAN network '%U'." - -//d:Text in middle soft key (opens a view for detailed information) -//l:control_pane_t3/opt7 -//w: -//r:3.2 -// -#define qtn_msk_cmon_details "Details" - -//d:The name of the application which uses the connection (MessagingServer) -//l:list_single_heading_pane_t1 -//w: -//r:3.2 -// -#define qtn_cmon_sharing_app_msg_server "Messaging" - -//d:The name of the application which uses the connection (DownaloadMgrServer) -//l:list_single_heading_pane_t1 -//w: -//r:3.2 -// -#define qtn_cmon_sharing_app_dl_mg "Downloads" - -//d:The name of the application which uses the connection (Feeds Server) -//l:list_single_heading_pane_t1 -//w: -//r:3.2 -// -#define qtn_cmon_sharing_app_rss_server "Web Feeds" - -//d:The name of the application which uses the connection (Java MIDlets) -//l:list_single_heading_pane_t1 -//w: -//r:3.2 -// -#define qtn_cmon_sharing_app_java_midlet "Application" - -//d:The name of the application which uses the connection (Unknown instance) -//l:list_single_heading_pane_t1 -//w: -//r:3.2 -// -#define qtn_cmon_sharing_app_unknown "(unknown)" - -//d:The name of the application which uses the connection -//d:(SUPL (Secure User Plane Location) server) -//l:list_single_heading_pane_t1 -//w: -//r:3.2 -// -#define qtn_cmon_sharing_app_supl "Positioning server" - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/sis/ConnectionMonitorUI.pkg --- a/connectionmonitoring/connectionmonitorui/sis/ConnectionMonitorUI.pkg Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -; -; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -; All rights reserved. -; This component and the accompanying materials are made available -; under the terms of "Eclipse Public License v1.0" -; which accompanies this distribution, and is available -; at the URL "http://www.eclipse.org/legal/epl-v10.html". -; -; Initial Contributors: -; Nokia Corporation - initial contribution. -; -; Contributors: -; -; Description: ; Installation file for ConnectionMonitorUi application -; -; Installation file for ConnectionMonitorUi application -; Installation file for ConnectionMonitorUi application - -;Languages -&EN - -; Package header -#{"ConnectionMonitorUi"},(0x101F84D0),0,2,0,TYPE=SA - -%{"some vendor"} -; Unique Vendor name -:"Unique Vendor NameXXXX" - -;Key and certificate -*"rd-key.pem","rd.cer" - - -; Entries - files to install - -"\Epoc32\release\armv5\udeb\CONNECTIONMONITORUI.exe" -"!:\sys\bin\CONNECTIONMONITORUI.exe" -"\epoc32\data\Z\Resource\apps\CONNECTIONMONITORUI.rsc" -"!:\resource\apps\CONNECTIONMONITORUI.rsc" -"\epoc32\data\Z\private\10003a3f\apps\CONNECTIONMONITORUI_reg.rsc" -"!:\private\10003a3f\import\apps\CONNECTIONMONITORUI_reg.rsc" diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/src/ActiveWrapper.cpp --- a/connectionmonitoring/connectionmonitorui/src/ActiveWrapper.cpp Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,355 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CActiveWrapper implementation file -* -*/ - - -#include - -#include "ActiveWrapper.h" -#include "ConnectionMonitorUiLogger.h" - -// LOCAL CONSTANTS AND MACROS - -// --------------------------------------------------------- -// CActiveWrapper::NewL -// -// Two-phased constructor. -// --------------------------------------------------------- -// -CActiveWrapper* CActiveWrapper::NewL() - { - CMUILOGGER_ENTERFN( "CActiveWrapper::NewL()" ); - - CActiveWrapper* self = new ( ELeave ) CActiveWrapper(); - CleanupStack::PushL( self ); - - self->ConstructL(); - - CleanupStack::Pop( self ); - - CMUILOGGER_LEAVEFN( "CActiveWrapper::NewL()" ); - return self; - } - -// --------------------------------------------------------- -// CActiveWrapper::ConstructL -// -// Symbian OS default constructor can leave. -// --------------------------------------------------------- -// -void CActiveWrapper::ConstructL() - { - CMUILOGGER_ENTERFN( "CActiveWrapper::ConstructL()" ); - - CActiveScheduler::Add( this ); - - CMUILOGGER_LEAVEFN( "CActiveWrapper::ConstructL()" ); - } - - -// --------------------------------------------------------- -// CActiveWrapper::CActiveWrapper -// -// C++ constructor can NOT contain any code, that -// might leave. -// --------------------------------------------------------- -// -CActiveWrapper::CActiveWrapper() : CActive( CActive::EPriorityStandard ) - { - } - - -// --------------------------------------------------------- -// CActiveWrapper::~CActiveWrapper -// -// Destructor -// --------------------------------------------------------- -// -CActiveWrapper::~CActiveWrapper() - { - CMUILOGGER_ENTERFN( "CActiveWrapper::~CActiveWrapper()" ); - - Cancel(); - - CMUILOGGER_WRITE( "CActiveWrapper::~CActiveWrapper Canceled" ); - - CMUILOGGER_LEAVEFN( "CActiveWrapper::~CActiveWrapper()" ); - } - - -// --------------------------------------------------------- -// CActiveWrapper::RunL -// -// From active object framework -// --------------------------------------------------------- -// -void CActiveWrapper::RunL() - { - CMUILOGGER_ENTERFN( "CActiveWrapper::RunL()" ); - - if ( iWait.IsStarted() ) - { - CMUILOGGER_WRITE( "AsyncStop" ); - - iWait.AsyncStop(); - } - - CMUILOGGER_LEAVEFN( "CActiveWrapper::RunL()" ); - } - - -// --------------------------------------------------------- -// CActiveWrapper::DoCancel -// -// From active object framework -// --------------------------------------------------------- -// -void CActiveWrapper::DoCancel() - { - CMUILOGGER_ENTERFN( "CActiveWrapper::DoCancel()" ); - - if ( iWait.IsStarted() ) - { - CMUILOGGER_WRITE( "AsyncStop" ); - - iWait.AsyncStop(); - } - - CMUILOGGER_LEAVEFN( "CActiveWrapper::DoCancel()" ); - } - - -// --------------------------------------------------------- -// CActiveWrapper::StartGetStringAttribute -// -// Starts the active object -// --------------------------------------------------------- -// -void CActiveWrapper::StartGetStringAttribute( TInt const aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TUint const aAttribute, - TDes& aValue ) - { - CMUILOGGER_ENTERFN( "CActiveWrapper::StartGetStringAttribute()" ); - - if ( IsActive() == EFalse ) - { - CMUILOGGER_WRITE( "NOT active" ); - aConnectionMonitor->GetStringAttribute( aConnectionId, 0, aAttribute, - aValue, iStatus ); - SetActive(); - iWait.Start(); - } - else - { - CMUILOGGER_WRITE( "Already active" ); - } - - CMUILOGGER_LEAVEFN( "CActiveWrapper::StartGetStringAttribute()" ); - } - - -// --------------------------------------------------------- -// CActiveWrapper::StartGetIntAttribute -// -// Starts the active object -// --------------------------------------------------------- -// -void CActiveWrapper::StartGetIntAttribute( TInt const aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TUint const aAttribute, - TInt& aValue ) - { - CMUILOGGER_ENTERFN( "CActiveWrapper::StartGetIntAttribute()" ); - - if ( IsActive() == EFalse ) - { - CMUILOGGER_WRITE( "NOT active" ); - aConnectionMonitor->GetIntAttribute( aConnectionId, - 0, - aAttribute, - aValue, - iStatus ); - SetActive(); - iWait.Start(); - } - else - { - CMUILOGGER_WRITE( "Already active" ); - } - - CMUILOGGER_LEAVEFN( "CActiveWrapper::StartGetIntAttribute()" ); - } - - -// --------------------------------------------------------- -// CActiveWrapper::StartGetUintAttribute -// -// Starts the active object -// --------------------------------------------------------- -// -void CActiveWrapper::StartGetUintAttribute( TInt const aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TUint const aAttribute, - TUint& aValue ) - { - CMUILOGGER_ENTERFN( "CActiveWrapper::StartGetUintAttribute()" ); - - if ( IsActive() == EFalse ) - { - CMUILOGGER_WRITE( "NOT active" ); - aConnectionMonitor->GetUintAttribute( aConnectionId, - 0, - aAttribute, - aValue, - iStatus ); - SetActive(); - iWait.Start(); - } - else - { - CMUILOGGER_WRITE( "Already active" ); - } - - CMUILOGGER_LEAVEFN( "CActiveWrapper::StartGetUintAttribute()" ); - } - - -// --------------------------------------------------------- -// CActiveWrapper::StartGetConnSharings -// -// Starts the active object -// --------------------------------------------------------- -// -void CActiveWrapper::StartGetConnSharings( TInt const aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonClientEnumBuf& aValue ) - { - CMUILOGGER_ENTERFN( "CActiveWrapper::StartGetConnSharings()" ); - - if ( IsActive() == EFalse ) - { - CMUILOGGER_WRITE( "NOT active" ); - aConnectionMonitor->GetPckgAttribute( aConnectionId, - 0, - KClientInfo, - aValue, - iStatus ); - SetActive(); - iWait.Start(); - } - else - { - CMUILOGGER_WRITE( "Already active" ); - } - - CMUILOGGER_LEAVEFN( "CActiveWrapper::StartGetConnSharings()" ); - } - - -// --------------------------------------------------------- -// CActiveWrapper::StartGetConnTime -// -// Starts the active object -// --------------------------------------------------------- -// -void CActiveWrapper::StartGetConnTime( TInt const aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonTimeBuf& aValue ) - { - CMUILOGGER_ENTERFN( "CActiveWrapper::StartGetConnTime()" ); - - if ( IsActive() == EFalse ) - { - CMUILOGGER_WRITE( "NOT active" ); - aConnectionMonitor->GetPckgAttribute( aConnectionId, - 0, - KStartTime, - aValue, - iStatus ); - SetActive(); - iWait.Start(); - } - else - { - CMUILOGGER_WRITE( "Already active" ); - } - - CMUILOGGER_LEAVEFN( "CActiveWrapper::StartGetConnTime()" ); - } - - -// --------------------------------------------------------- -// CActiveWrapper::StartGetBearerType -// -// Starts the active object -// --------------------------------------------------------- -// -void CActiveWrapper::StartGetBearerType( TInt const aConnectionId, - RConnectionMonitor& aConnectionMonitor, - TUint const aAttribute, - TInt& aValue ) - { - CMUILOGGER_ENTERFN( "CActiveWrapper::StartGetBearerType()" ); - - if ( IsActive() == EFalse ) - { - CMUILOGGER_WRITE( "NOT active" ); - aConnectionMonitor.GetIntAttribute( aConnectionId, - 0, - aAttribute, - aValue, - iStatus ); - SetActive(); - iWait.Start(); - } - else - { - CMUILOGGER_WRITE( "Already active" ); - } - - CMUILOGGER_LEAVEFN( "CActiveWrapper::StartGetBearerType()" ); - } - - -// --------------------------------------------------------- -// CActiveWrapper::StartGetConnectionCount -// -// Starts the active object -// --------------------------------------------------------- -// -void CActiveWrapper::StartGetConnectionCount( TUint& aConnectionCount, - RConnectionMonitor& aConnectionMonitor ) - { - CMUILOGGER_ENTERFN( "CActiveWrapper::StartGetConnectionCount()" ); - - if ( IsActive() == EFalse ) - { - CMUILOGGER_WRITE( "NOT active" ); - aConnectionMonitor.GetConnectionCount( aConnectionCount, iStatus ); - SetActive(); - iWait.Start(); - } - else - { - CMUILOGGER_WRITE( "Already active" ); - } - - CMUILOGGER_LEAVEFN( "CActiveWrapper::StartGetConnectionCount()" ); - } - - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/src/ConnectionArray.cpp --- a/connectionmonitoring/connectionmonitorui/src/ConnectionArray.cpp Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,333 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Contains and handles CConnectionInfo instances -* -* -*/ - - -// INCLUDE FILES - -#include "ConnectionArray.h" -#include "ConnectionMonitorUiLogger.h" - -// CONSTANTS -/** -* Count of allowed connections. -*/ -const TUint KConnArrayGranuality = KConnMonMaxClientUids; - - -// ================= MEMBER FUNCTIONS ======================= -// --------------------------------------------------------- -// CConnectionArray::~CConnectionArray -// --------------------------------------------------------- -// -CConnectionArray::~CConnectionArray() - { - if ( iConnectionArray ) - { - iConnectionArray->ResetAndDestroy(); - } - delete iConnectionArray; - } - - -// --------------------------------------------------------- -// CConnectionArray::CConnectionArray -// --------------------------------------------------------- -// -CConnectionArray::CConnectionArray() - { - } - - -// --------------------------------------------------------- -// CConnectionArray::ConstructL -// --------------------------------------------------------- -// -void CConnectionArray::ConstructL() - { - iConnectionArray = new ( ELeave ) - CArrayPtrFlat( KConnArrayGranuality ); - } - - -// --------------------------------------------------------- -// CConnectionArray::MdcaCount -// --------------------------------------------------------- -// -TInt CConnectionArray::MdcaCount() const - { - return iConnectionArray->Count(); - } - - -// --------------------------------------------------------- -// CConnectionArray::MdcaPoint -// --------------------------------------------------------- -// -TPtrC CConnectionArray::MdcaPoint( TInt aIndex ) const - { - return ( *iConnectionArray )[aIndex]->GetConnectionListBoxItemText(); - } - - -// --------------------------------------------------------- -// CConnectionArray::DeepCopyL -// --------------------------------------------------------- -// -CConnectionArray* CConnectionArray::DeepCopyL() - { - CConnectionArray* temp = new ( ELeave ) CConnectionArray(); - CleanupStack::PushL( temp ); - temp->ConstructL(); - TInt count = iConnectionArray->Count(); - CConnectionInfoBase* tempConnInfo = NULL; - for ( TInt i = 0; i < count; ++i ) - { - tempConnInfo = ( *iConnectionArray )[i]->DeepCopyL(); - CleanupStack::PushL( tempConnInfo ); - temp->AppendL( tempConnInfo ); - CleanupStack::Pop( tempConnInfo ); - } - CleanupStack::Pop( temp ); - return temp; - } - -// --------------------------------------------------------- -// CConnectionArray::GetArrayIndex -// --------------------------------------------------------- -// -TInt CConnectionArray::GetArrayIndex( TUint aConnectionId ) const - { - CMUILOGGER_WRITE_F( "GetArrayIndex: %d", aConnectionId ); - TBool found( EFalse ); - TInt index( 0 ); - TInt count = iConnectionArray->Count(); - TUint connectionId( 0 ); - - while ( ( index < count ) && !found ) - { - connectionId = ( *iConnectionArray )[index]->GetConnectionId(); - if ( connectionId == aConnectionId ) - { - found = ETrue; - } - else - { - ++index; - } - } - - CMUILOGGER_WRITE_F( "Found: %d", found ); - - return ( found ? index : KErrNotFound ); - } - - -// --------------------------------------------------------- -// CConnectionArray::GetArrayIndex -// --------------------------------------------------------- -// -TInt CConnectionArray::GetArrayIndex( CConnectionInfoBase* aConnection ) const - { - CMUILOGGER_WRITE_F( "GetArrayIndex: %d", - aConnection->GetConnectionId() ); - TBool found( EFalse ); - TInt index( 0 ); - TInt count = iConnectionArray->Count(); - - while ( ( index < count ) && !found ) - { - if ( ( *iConnectionArray )[index] == aConnection ) - { - found = ETrue; - } - else - { - ++index; - } - } - - CMUILOGGER_WRITE_F( "Found: %d", found ); - - return ( found ? index : KErrNotFound ); - } - - -// --------------------------------------------------------- -// CConnectionArray::AppendL -// --------------------------------------------------------- -// -void CConnectionArray::AppendL( CConnectionInfoBase* aConnection ) - { - CMUILOGGER_ENTERFN( "CConnectionArray::AppendL" ); - if ( aConnection ) - { - TUint connectionId = aConnection->GetConnectionId(); - TInt index = GetArrayIndex( connectionId ); - - if ( index == KErrNotFound ) - { - if ( aConnection->GetStatus() != EConnectionClosed && - aConnection->GetStatus() != EConnectionUninitialized ) - { - iConnectionArray->AppendL( aConnection ); - } - } - } - - CMUILOGGER_LEAVEFN( "CConnectionArray::AppendL" ); - } - - -// --------------------------------------------------------- -// CConnectionArray::Delete -// --------------------------------------------------------- -// -void CConnectionArray::Delete( TUint aConnectionId ) - { - CMUILOGGER_WRITE_F( "Deleting connection: %d", aConnectionId ); - TInt count = iConnectionArray->Count(); - TUint connectionId( 0 ); - TBool deleted( EFalse ); - for ( TInt i = 0; (i < count) && !deleted; ++i ) - { - connectionId = ( *iConnectionArray )[i]->GetConnectionId(); - if ( connectionId == aConnectionId ) - { - delete ( *iConnectionArray )[i]; - iConnectionArray->Delete( i ); - iConnectionArray->Compress(); - deleted = ETrue; - } - } - CMUILOGGER_WRITE_F( "Found and deleted: %b", deleted ); - } - - -// --------------------------------------------------------- -// CConnectionArray::Delete -// --------------------------------------------------------- -// -void CConnectionArray::Delete( CConnectionInfoBase* aConnection ) - { - CMUILOGGER_WRITE_F( "Deleting connection: %d", - aConnection->GetConnectionId() ); - TInt count = iConnectionArray->Count(); - TBool deleted( EFalse ); - for ( TInt i = 0; (i < count) && !deleted; ++i ) - { - if ( ( *iConnectionArray )[i] == aConnection ) - { - delete ( *iConnectionArray )[i]; - iConnectionArray->Delete( i ); - iConnectionArray->Compress(); - deleted = ETrue; - } - } - CMUILOGGER_WRITE_F( "Found and deleted: %b", deleted ); - } - - -// --------------------------------------------------------- -// CConnectionArray::Reset -// --------------------------------------------------------- -// -void CConnectionArray::Reset() - { - iConnectionArray->ResetAndDestroy(); - } - -// --------------------------------------------------------- -// CConnectionArray::operator[] -// --------------------------------------------------------- -// -CConnectionInfoBase* CConnectionArray::operator[]( TUint aIndex ) const - { - return ( *iConnectionArray )[aIndex]; - } - -// --------------------------------------------------------- -// CConnectionArray::At -// --------------------------------------------------------- -// -CConnectionInfoBase* CConnectionArray::At( TInt aIndex ) const - { - CMUILOGGER_ENTERFN( "CConnectionArray::At()" ); - CConnectionInfoBase* temp( NULL ); - TInt count = iConnectionArray->Count(); - CMUILOGGER_WRITE_F( "count %d", count ); - - if ( count && ( aIndex < count ) ) - { - temp = ( *iConnectionArray )[aIndex]; - } - - CMUILOGGER_LEAVEFN( "CConnectionArray::At()" ); - return temp; - } - -// --------------------------------------------------------- -// CConnectionArray::NumberOfActiveConnections -// --------------------------------------------------------- -// -TInt CConnectionArray::NumberOfActiveConnections() const - { - TInt count( 0 ); - - CMUILOGGER_WRITE_F( - "NumberOfActiveConnections: all in array: [%d]\n", - MdcaCount() ); - - // we need to count all and only the open connection - for ( TInt i = 0; i < MdcaCount(); ++i ) - { - if ( ( *iConnectionArray )[i]->IsAlive() ) - { - ++count; - } - } - - CMUILOGGER_WRITE_F( "Active connections: [%d]\n", count ); - return count; - } - -// --------------------------------------------------------- -// CConnectionArray::NumberOfSuspendedConnections -// --------------------------------------------------------- -// -TInt CConnectionArray::NumberOfSuspendedConnections() const - { - TInt count( 0 ); - - CMUILOGGER_WRITE_F( - "Number of all connection in array: [%d]\n", MdcaCount() ); - - // we need to count all and only the open connection - for ( TInt i = 0; i < MdcaCount(); ++i ) - { - if ( ( *iConnectionArray )[i]->IsSuspended() ) - { - ++count; - } - } - - CMUILOGGER_WRITE_F( "Suspended connections: [%d]\n", count ); - return count; - } - - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/src/ConnectionInfoBase.cpp --- a/connectionmonitoring/connectionmonitorui/src/ConnectionInfoBase.cpp Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1201 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Represents a connection -* -* -*/ - - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include -#include - -#include "ConnectionMonitorUiLogger.h" -#include "ConnectionInfoBase.h" -#include "ActiveWrapper.h" - -// CONSTANTS - -const TUint KUpArrowChar = 0x2191; ///< ASCII code of UpArrow -const TUint KDownArrowChar = 0x2193; ///< ASCII code of DownArrow -const TUint KBannedServerUID = 0x101fd9c5; // Banned DHCP server UID - -const TInt KFeedsServerUid = 0x1020728E; -const TInt KDownloadMgrServerUid = 0x10008D60; -const TInt KMessagingServerUid = 0x1000484b; -const TInt KJavaVMUid = 0x102033E6; -const TInt KSUPLServerUid = 0x102073CA; - -LOCAL_D const TInt KStringsGranularity = 5; - -_LIT( KMrouterName, "mRouter"); ///< see CheckMrouteIap -_LIT( KEmpty, ""); ///< Empty string - - - - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CConnectionInfoBase::~CConnectionInfoBase -// --------------------------------------------------------- -// -CConnectionInfoBase::~CConnectionInfoBase() - { - delete iDetailsArray; - delete iAppNames; - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::CConnectionInfoBase -// --------------------------------------------------------- -// -CConnectionInfoBase::CConnectionInfoBase( - TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - CActiveWrapper* aActiveWrapper ) : - iConnectionMonitor( aConnectionMonitor ), - iStartTime( NULL ), - iDeletedFromCMUI( EFalse ), - iActiveWrapper( aActiveWrapper ) - { - CMUILOGGER_WRITE( "CConnectionInfoBase constuctor - start " ); - iConnectionStatus = EConnectionUninitialized; - iConnectionId = aConnectionId; - iConnectionBearerType = aConnectionBearerType; - iLastSpeedUpdate.UniversalTime(); - CMUILOGGER_WRITE( "CConnectionInfoBase constuctor - end " ); - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::ConstructL -// --------------------------------------------------------- -// -void CConnectionInfoBase::ConstructL() - { - CMUILOGGER_ENTERFN( "CConnectionInfoBase::ConstructL() start" ); - - if ( iConnectionBearerType >= EBearerExternalCSD ) - { - StringLoader::Load( iConnectionName, - R_QTN_CMON_ITEM_CONN_NAME_MODEM ); - } - else - { - iActiveWrapper->StartGetStringAttribute( iConnectionId, - iConnectionMonitor, - KIAPName, - iConnectionName ); - TInt err( iActiveWrapper->iStatus.Int() ); - CMUILOGGER_WRITE_F( "CConnectionInfoBase::ConstructL() status: %d", - err ); - CMUILOGGER_WRITE_F( "iConnectionName : %S", &iConnectionName ); - CMUILOGGER_WRITE_F( "iConnectionId : %d", iConnectionId ); - CMUILOGGER_WRITE_F( "iConnectionBearerType : %d", - ( TInt )iConnectionBearerType ); - if ( err != KErrNone ) - { - User::Leave( err ); - } - } - - if ( !iAppNames ) - { - iAppNames = new( ELeave ) CDesCArrayFlat( KStringsGranularity ); - } - - StatusChangedL(); - if ( GetStatus() == EConnectionSuspended ) - { - InitializeConnectionInfoL(); - } - CMUILOGGER_LEAVEFN( "CConnectionInfoBase::ConstructL() end" ); - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::StatusChangedL -// --------------------------------------------------------- -// -void CConnectionInfoBase::StatusChangedL() - { - CMUILOGGER_WRITE( "CConnectionInfoBase::StatusChangedL() start" ); - - RefreshConnectionStatus(); - - switch ( iConnectionStatus ) - { - case EConnectionCreated: - { - InitializeConnectionInfoL(); - break; - } - case EConnectionSuspended: - { - RefreshDetailsL(); - if ( !iDetailsArray ) - { - ToArrayDetailsL(); - } - RefreshDetailsArrayL(); - break; - } - case EConnectionClosing: - case EConnectionClosed: - case EConnectionUninitialized: - { - if ( iDetailsArray ) // if there is details array - { - RefreshDetailsArrayL(); - } - break; - } - case EConnectionCreating: - default : - { - break; - } - } - - RefreshConnectionListBoxItemTextL(); - - CMUILOGGER_WRITE( "CConnectionInfoBase::StatusChangedL() end" ); - } - -// --------------------------------------------------------- -// CConnectionInfoBase::IsAlive -// --------------------------------------------------------- -// -TBool CConnectionInfoBase::IsAlive() const - { - TBool alive( EFalse ); - if ( ( iConnectionStatus == EConnectionSuspended ) || - ( iConnectionStatus == EConnectionCreated ) ) - { - alive = ETrue; - } - return alive; - } - -// --------------------------------------------------------- -// CConnectionInfoBase::IsSuspended -// --------------------------------------------------------- -// -TBool CConnectionInfoBase::IsSuspended() const - { - TBool suspended( EFalse ); - if ( iConnectionStatus == EConnectionSuspended ) - { - suspended = ETrue; - } - return suspended; - } - -// --------------------------------------------------------- -// CConnectionInfoBase::GetConnectionId -// --------------------------------------------------------- -// -CDesCArrayFlat* CConnectionInfoBase::GetDetailsArray() const - { - return iDetailsArray; - } - -// --------------------------------------------------------- -// CConnectionInfoBase::GetConnectionId -// --------------------------------------------------------- -// -TUint CConnectionInfoBase::GetConnectionId() const - { - return iConnectionId; - } - -// --------------------------------------------------------- -// CConnectionInfoBase::GetStatus -// --------------------------------------------------------- -// -TConnectionStatus CConnectionInfoBase::GetStatus() const - { - return iConnectionStatus; - } - -// --------------------------------------------------------- -// CConnectionInfoBase::GetName -// --------------------------------------------------------- -// -HBufC* CConnectionInfoBase::GetNameLC() const - { - HBufC* name = iConnectionName.AllocLC(); - return name; - } - -// --------------------------------------------------------- -// CConnectionInfoBase::GetBearerType -// --------------------------------------------------------- -// -TConnMonBearerType CConnectionInfoBase::GetBearerType() const - { - return iConnectionBearerType; - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::GetConnectionListBoxItemText -// --------------------------------------------------------- -// -TPtrC CConnectionInfoBase::GetConnectionListBoxItemText() const - { - return iListBoxItemText; - } - -// --------------------------------------------------------- -// CConnectionInfoBase::RefreshConnectionStatus -// --------------------------------------------------------- -// -void CConnectionInfoBase::RefreshConnectionStatus() - { - TConnectionStatus connStatus( EConnectionUninitialized ); - iActiveWrapper->StartGetIntAttribute( iConnectionId, - iConnectionMonitor, - KConnectionStatus, - ( ( TInt& )( connStatus ) ) ); - TInt err( iActiveWrapper->iStatus.Int() ); - CMUILOGGER_WRITE_F( "RefreshConnectionStatus status : %d", - err ); - if ( err == KErrNone ) - { - RefreshConnectionStatus( connStatus ); - } - else - { - iActiveWrapper->Cancel(); - } - } - -// --------------------------------------------------------- -// CConnectionInfoBase::RefreshConnectionStatus -// --------------------------------------------------------- -// -void CConnectionInfoBase::RefreshConnectionStatus( - const TInt aConnectionStatus ) - { - CMUILOGGER_ENTERFN( "RefreshConnectionStatus" ); - CMUILOGGER_WRITE_F( "RefreshConnectionStatus aConnectionStatus %d", - ( TInt )aConnectionStatus ); - CMUILOGGER_WRITE_F( "iConnectionStatus before %d", - ( TInt )iConnectionStatus ); - - - if ( ( aConnectionStatus == KLinkLayerOpen ) || - ( ( aConnectionStatus == KConnectionOpen ) && - ( iConnectionBearerType >= EBearerExternalCSD ) ) ) - { - CMUILOGGER_WRITE("1"); - iConnectionStatus = EConnectionCreated; - } - else if ( ( aConnectionStatus == KConnectionClosed ) || - ( aConnectionStatus == KLinkLayerClosed ) ) - { - CMUILOGGER_WRITE("2"); - iConnectionStatus = EConnectionClosed; - } - else if ( ( ( aConnectionStatus >= KMinAgtProgress ) && - ( aConnectionStatus <= KConnectionOpen ) ) || - ( aConnectionStatus == KStartingSelection ) || - ( aConnectionStatus == KFinishedSelection ) || - ( aConnectionStatus == KConfigDaemonStartingRegistration ) || - ( aConnectionStatus == KConfigDaemonFinishedRegistration ) ) - // creating - { - CMUILOGGER_WRITE("5"); - iConnectionStatus = EConnectionCreating; - } - else if ( aConnectionStatus == KDataTransferTemporarilyBlocked ) - { - CMUILOGGER_WRITE("6"); - iConnectionStatus = EConnectionSuspended; - } - else if ( ( iConnectionStatus == EConnectionCreated ) && - ( ( aConnectionStatus >= KConnectionStartingClose ) && - ( aConnectionStatus < KConnectionClosed ) || - ( aConnectionStatus == KConfigDaemonFinishedDeregistrationStop ) || - ( aConnectionStatus == KConfigDaemonStartingDeregistration ) || - ( aConnectionStatus == KLinkLayerClosed ) || - ( aConnectionStatus == KConnectionUninitialised ) - ) ) - // closing - { - CMUILOGGER_WRITE("7"); - iConnectionStatus = EConnectionClosing; - } - else if ( ( aConnectionStatus == KConnectionUninitialised ) && - ( iConnectionStatus == EConnectionSuspended ) ) - { // Back to created from suspended - CMUILOGGER_WRITE("4"); - iConnectionStatus = EConnectionCreated; - } - else if ( aConnectionStatus == KConnectionUninitialised ) - { - CMUILOGGER_WRITE("3"); - iConnectionStatus = EConnectionUninitialized; - } - - else - { - CMUILOGGER_WRITE_F( " else iConnectionStatus %d", - ( TInt )iConnectionStatus ); - CMUILOGGER_WRITE_F( "else aConnectionStatus %d", - ( TInt )aConnectionStatus ); - - CMUILOGGER_WRITE("else"); - } - - - CMUILOGGER_WRITE_F( "iConnectionStatus after %d", - ( TInt )iConnectionStatus ); - CMUILOGGER_LEAVEFN( "RefreshConnectionStatus" ); - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::RefreshSentReceivedDataL -// --------------------------------------------------------- -// -void CConnectionInfoBase::RefreshSentReceivedDataL() - { - CMUILOGGER_ENTERFN( "CConnectionInfoBase::RefreshSentReceivedDataL" ); - // Downloaded - CMUILOGGER_WRITE("Downloaded before"); - iActiveWrapper->StartGetUintAttribute( iConnectionId, - iConnectionMonitor, - KDownlinkData, - iDownloaded ); - TInt errDownload( iActiveWrapper->iStatus.Int() ); - CMUILOGGER_WRITE_F( "Download status: %d", errDownload ); - if ( errDownload != KErrNone ) - { - iActiveWrapper->Cancel(); - User::Leave( errDownload ); - } - CMUILOGGER_WRITE("Downloaded after"); - // Uploaded - CMUILOGGER_WRITE("Uploaded before"); - iActiveWrapper->StartGetUintAttribute( iConnectionId, - iConnectionMonitor, - KUplinkData, - iUploaded ); - TInt errUpload( iActiveWrapper->iStatus.Int() ); - CMUILOGGER_WRITE_F( "Upload status: %d", errUpload ); - if ( errUpload != KErrNone ) - { - iActiveWrapper->Cancel(); - User::Leave( errUpload ); - } - CMUILOGGER_WRITE("Uploaded after"); - - CMUILOGGER_LEAVEFN( "CConnectionInfoBase::RefreshSentReceivedDataL" ); - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::RefreshTransferSpeedsL -// --------------------------------------------------------- -// -void CConnectionInfoBase::RefreshTransferSpeedsL() - { - CMUILOGGER_ENTERFN( "CConnectionInfoBase::RefreshTransferSpeedsL" ); - TUint up = iUploaded; - TUint down = iDownloaded; - - RefreshSentReceivedDataL(); - - TTime now; - now.UniversalTime(); - - // 100 * 1/1000sec - const TUint KOnesec = 1000; - TUint diffTime = I64LOW( now.MicroSecondsFrom( iLastSpeedUpdate ).Int64() / - TInt64( 1000 ) ); - - if ( iLastSpeedUpdate.Int64() == 0 ) - { - iLastSpeedUpdate = now; - - // speed cannot be calculated at the first time - iUpSpeed.quot = 0; - iUpSpeed.rem = 0; - iDownSpeed.quot = 0; - iDownSpeed.rem = 0; - } - else if ( diffTime > 500 ) - // at least 1/2sec passed - { - // bytes/sec - div_t upSpeed = div( ( iUploaded - up ) * KOnesec, diffTime ); - div_t downSpeed = div( ( iDownloaded - down ) * KOnesec, diffTime ); - // kbytes/sec - iUpSpeed = div( upSpeed.quot, 1024 ); - iDownSpeed = div( downSpeed.quot, 1024 ); - - iLastSpeedUpdate = now; - } - CMUILOGGER_LEAVEFN( "CConnectionInfoBase::RefreshTransferSpeedsL" ); - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::RefreshDuration -// --------------------------------------------------------- -// -void CConnectionInfoBase::RefreshDuration() - { - CMUILOGGER_ENTERFN( "CConnectionInfoBase::RefreshDuration" ); - TTime now; - now.UniversalTime(); - - // passed time since connection established. - iDuration = now.MicroSecondsFrom( iStartTime ).Int64(); - CMUILOGGER_LEAVEFN( "CConnectionInfoBase::RefreshDuration" ); - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::RefreshAppNamesL -// --------------------------------------------------------- -// -TInt CConnectionInfoBase::RefreshAppNamesL() - { - CMUILOGGER_ENTERFN( "CConnectionInfoBase::RefreshAppNamesL" ); - - TInt sharings( 0 ); - -if ( IsAlive() ) - { - if ( iAppNames ) - { - iAppNames->Reset(); - HBufC* actAppName = NULL; - // Check whether it is an internal or external (modem) connection - // External (modem) connections does not need application name - if ( iConnectionBearerType < EBearerExternalCSD ) - { - TInt count( 0 ); - TConnMonClientEnumBuf clientBuf; - iActiveWrapper->StartGetConnSharings( iConnectionId, - iConnectionMonitor, - clientBuf ); - - TInt err( iActiveWrapper->iStatus.Int() ); - CMUILOGGER_WRITE_F( "RefreshSharings status: %d", err ); - - if ( !err ) - { - count = clientBuf().iCount; - } - - CMUILOGGER_WRITE_F( "clientBuf().iCount: %d", count ); - -#ifndef __WINS__ // Appl. uid is always zero in emulator - - RApaLsSession appSess; - TApaAppInfo appInfo; - - // The connection could be shared by several applications - User::LeaveIfError( appSess.Connect() ); - - TUint i; - for ( i = 0; i < count; i++ ) - { - actAppName = NULL; - appInfo.iCaption.Zero(); - - TInt result = appSess.GetAppInfo( appInfo, - clientBuf().iUid[i] ); - - //================================ - CMUILOGGER_WRITE_F( "result: %d", result ); - CMUILOGGER_WRITE_F( "iClientInfo.iUid[i].iUid: %x", - clientBuf().iUid[i].iUid ); - - if ( result != KErrNone ) - { - TInt resId = 0; - switch ( clientBuf().iUid[i].iUid ) - { - case KMessagingServerUid: // Messaging - { - resId = R_QTN_CMON_SHARING_APP_MSG_SERVER; - break; - } - case KDownloadMgrServerUid: // Downloads - { - resId = R_QTN_CMON_SHARING_APP_DL_MG; - break; - } - case KFeedsServerUid: // Web Feeds - { - resId = R_QTN_CMON_SHARING_APP_RSS_SERVER; - break; - } - case KJavaVMUid: // Application - { - resId = R_QTN_CMON_SHARING_APP_JAVA_MIDLET; - break; - } - case KBannedServerUID: - { // Forget about DHCP server! - break; - } - case KSUPLServerUid: - { - resId = R_QTN_CMON_SHARING_APP_SUPL; - break; - } - default: // (unknown) - { - resId = R_QTN_CMON_SHARING_APP_UNKNOWN; - break; - } - } - - if ( resId ) - { - actAppName = StringLoader::LoadL( resId ); - } - } - else - { - actAppName = HBufC::NewL( appInfo.iCaption.Length() ); - TPtr actAppNameBuf = actAppName->Des(); - actAppNameBuf.Append( appInfo.iCaption ); - } - - if ( actAppName ) - { - iAppNames->AppendL( actAppName->Des() ); - delete actAppName; - } - } - - iAppNames->Sort(); - appSess.Close(); -#else - TInt countBan( 0 ); - - if ( !err ) - { - // remove the DHCP server is not actually - // an owner of the connection - for ( TUint tmp = 0; tmp < count; ++tmp ) - { - TUid uid = clientBuf().iUid[tmp]; - - if ( uid.iUid == KBannedServerUID ) - { - ++countBan; - } - } // end - } - - _LIT( KStrApplication, "Application" ); - // Give a dummy name of the application - for ( TInt i = 0; i < ( count - countBan ); i++ ) - { - iAppNames->AppendL( KStrApplication ); - } - -#endif // __WINS__ - - } - /* modem connections does not need application name - else - { - } - */ - sharings = iAppNames->Count(); - } - } - - CMUILOGGER_LEAVEFN( "CConnectionInfoBase::RefreshAppNamesL" ); - return sharings; - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::ToDetailsListBoxItemTextL -// --------------------------------------------------------- -// -HBufC* CConnectionInfoBase::ToDetailsListBoxItemTextL( - const TUint aResourceId, - const HBufC* aValueText ) const - { - CMUILOGGER_ENTERFN( "CConnectionInfoBase::ToDetailsListBoxItemTextL" ); - - HBufC* columnName = NULL; - if ( aResourceId ) - { - columnName = StringLoader::LoadLC( aResourceId ); - } - else - { - columnName = KEmpty().AllocLC(); - } - - HBufC* listBoxItemText = HBufC::NewL( KDetailsListItemText ); - - TPtr ptrToListBoxItemText = listBoxItemText->Des(); - - ptrToListBoxItemText.Format( KDetailsListItemTextFormat, - columnName, aValueText ); - CleanupStack::PopAndDestroy( columnName ); - - - CMUILOGGER_LEAVEFN( "CConnectionInfoBase::ToDetailsListBoxItemTextL" ); - - return listBoxItemText; - } - -// --------------------------------------------------------- -// CConnectionInfoBase::ToDetailsListBoxItemTextWithAppendL -// --------------------------------------------------------- -// -void CConnectionInfoBase::ToDetailsListBoxItemTextWithAppendL( - const TUint aResourceId, - const HBufC* aValueText ) - { - HBufC* listBoxItemText = ToDetailsListBoxItemTextL( aResourceId, - aValueText ); - CleanupStack::PushL( listBoxItemText ); - CMUILOGGER_WRITE_F( "LISTBOXITEM: %S", listBoxItemText ); - iDetailsArray->AppendL( *listBoxItemText ); - CleanupStack::PopAndDestroy( listBoxItemText ); - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::ToDetailsListBoxItemTextWithReplaceL -// --------------------------------------------------------- -// -void CConnectionInfoBase::ToDetailsListBoxItemTextWithReplaceL( - const TUint aResourceId, - const HBufC* aValueText, - TInt aIndex ) - { - CMUILOGGER_ENTERFN - ( "CConnectionInfoBase::ToDetailsListBoxItemTextWithReplaceL" ); - CMUILOGGER_WRITE_F( "aValueText: %S", aValueText ); - - if ( /*( iDetailsArray ) && */ - ( aIndex < iDetailsArray->Count() ) && - ( aIndex > KErrNotFound ) ) - { - HBufC* listBoxItemText = ToDetailsListBoxItemTextL( aResourceId, - aValueText ); - iDetailsArray->Delete( aIndex ); - CleanupStack::PushL( listBoxItemText ); - iDetailsArray->InsertL( aIndex, *listBoxItemText ); - CleanupStack::PopAndDestroy( listBoxItemText ); - iDetailsArray->Compress(); - } - CMUILOGGER_LEAVEFN - ( "CConnectionInfoBase::ToDetailsListBoxItemTextWithReplaceL" ); - - } - -// --------------------------------------------------------- -// CConnectionInfoBase::ToStringBearerLC -// --------------------------------------------------------- -// -HBufC* CConnectionInfoBase::ToStringBearerLC() const - { - HBufC* bearer = NULL; - TUint resourceId( 0 ); - - // Bearer type - if ( iConnectionBearerType == EBearerHSCSD || - iConnectionBearerType == EBearerExternalHSCSD ) - { - resourceId = R_QTN_CMON_BEARER_HSCSD; - - } - else if ( iConnectionBearerType == EBearerCSD || - iConnectionBearerType == EBearerExternalCSD || - iConnectionBearerType == EBearerWcdmaCSD || - iConnectionBearerType == EBearerExternalWcdmaCSD ) - { - resourceId = R_QTN_SET_BEARER_DATA_CALL; - } - else if ( iConnectionBearerType == EBearerWLAN ) - { - resourceId = R_QTN_WLAN_SETT_BEARER_WLAN; - } - else - { - resourceId = R_QTN_SET_BEARER_PACKET_DATA; - } - - bearer = StringLoader::LoadLC( resourceId ); - - return bearer; - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::ToStringStatusLC -// --------------------------------------------------------- -// -HBufC* CConnectionInfoBase::ToStringStatusLC( TBool aIsDetailsView ) const - { - HBufC* status = NULL; - TUint resourceId( 0 ); - switch ( iConnectionStatus ) - { - case EConnectionCreated: - { - if ( iUpSpeed.quot || iUpSpeed.rem || - iDownSpeed.quot || iDownSpeed.rem ) - { - resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_ACTIVE - : R_QTN_CMON_STATUS_ACTIVE; - } - else - { - resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_IDLE - : R_QTN_CMON_STATUS_IDLE; - } - break; - } - case EConnectionUninitialized: - case EConnectionClosed: - { - resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_CLOSED - : R_QTN_CMON_STATUS_CLOSED; - break; - } - case EConnectionClosing: - { - resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_CLOSING - : R_QTN_CMON_STATUS_CLOSING; - break; - } - case EConnectionSuspended: - { - resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_SUSPENDED - : R_QTN_CMON_STATUS_SUSPENDED; - break; - } - case EConnectionCreating: - default : - { - resourceId = aIsDetailsView ? R_QTN_CMON_STATUS_DETAILS_CREATING - : R_QTN_CMON_STATUS_CREATING; - break; - } - } - - status = StringLoader::LoadLC( resourceId ); - - return status; - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::ToStringTotalTransmittedDataLC -// --------------------------------------------------------- -// -HBufC* CConnectionInfoBase::ToStringTotalTransmittedDataLC() const - { - TUint total = iUploaded + iDownloaded; - CMUILOGGER_WRITE_F( "iUploaded : %d", iUploaded ); - CMUILOGGER_WRITE_F( "iDownloaded : %d", iDownloaded ); - CMUILOGGER_WRITE_F( "total : %d", total ); - - return ToStringLoadedDataLC( total ); - } - -// --------------------------------------------------------- -// CConnectionInfoBase::ToStringSentDataLC -// --------------------------------------------------------- -// -HBufC* CConnectionInfoBase::ToStringSentDataLC( TBool aToBeThreeDigit ) const - { - return ToStringLoadedDataLC( iUploaded, aToBeThreeDigit, KUpArrowChar ); - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::ToStringReceivedDataLC -// --------------------------------------------------------- -// -HBufC* CConnectionInfoBase::ToStringReceivedDataLC( TBool aToBeThreeDigit ) const - { - return ToStringLoadedDataLC( iDownloaded, aToBeThreeDigit, KDownArrowChar ); - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::ToStringTransferSpeedUpLC -// --------------------------------------------------------- -// -HBufC* CConnectionInfoBase::ToStringTransferSpeedUpLC() const - { - return ToStringTransferSpeedLC( iUpSpeed, KUpArrowChar ); - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::ToStringTransferSpeedDownLC -// --------------------------------------------------------- -// -HBufC* CConnectionInfoBase::ToStringTransferSpeedDownLC() const - { - return ToStringTransferSpeedLC( iDownSpeed, KDownArrowChar ); - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::ToStringDurationLC -// --------------------------------------------------------- -// -HBufC* CConnectionInfoBase::ToStringDurationLC() const - { - const TUint KTimeStringLength = 64; - const TUint KTimeFormatBuf = 16; - const TUint KDateFormatBuf = 16; - _LIT( KDayFormat, "%d" ); - - - TTime now; - now.UniversalTime(); - HBufC* timeString = NULL; - - TTimeIntervalDays days = NULL; - - if ( iStartTime != NULL ) - { - // calculate days passed since connection started - days = now.DaysFrom( iStartTime ); - CMUILOGGER_WRITEF( _L( "ToStringDurationLC days before: %d" ), - days.Int() ); - } - - // passed time since connection established. - if ( days.Int() <= 0 ) - // it's still within 1 day - { - timeString = HBufC::NewLC( KTimeStringLength ); - TPtr16 tempBuf( timeString->Des() ); - - HBufC* temp = StringLoader::LoadLC( R_QTN_TIME_DURAT_LONG_WITH_ZERO ); - - iDuration.FormatL( tempBuf, *temp ); - CleanupStack::PopAndDestroy( temp ); - } - else - // more than 1 day - { - CMUILOGGER_WRITEF( _L( "ToStringDurationLC days after: %d" ), - days.Int() ); - - TBuf dayFormat; - dayFormat.Format( KDayFormat, days.Int() ); - - // format time format string - HBufC* tempFormat = StringLoader::LoadLC( - R_QTN_TIME_DURAT_SHORT_WITH_ZERO ); - TBuf tempBuf; - - // format hours:mins - iDuration.FormatL( tempBuf, *tempFormat ); - - CDesCArrayFlat* strings = new( ELeave ) CDesCArrayFlat( 2 ); - CleanupStack::PushL( strings ); - - strings->AppendL( dayFormat ); - strings->AppendL( tempBuf ); - - timeString = StringLoader::LoadL( R_QTN_CMON_DURATION_OVER_24H, - *strings ); - - CleanupStack::PopAndDestroy( strings ); - CleanupStack::PopAndDestroy( tempFormat ); - CleanupStack::PushL( timeString ); - } - - CMUILOGGER_WRITE_F( "duration time1: %S", timeString ); - - TPtr temp( timeString->Des() ); - AknTextUtils::DisplayTextLanguageSpecificNumberConversion( temp ); - CMUILOGGER_WRITE_F( "duration temp: %S", &temp ); - - CMUILOGGER_WRITE_F( "duration time2: %S", timeString ); - - - return timeString; - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::CheckMrouterIap -// --------------------------------------------------------- -// -TBool CConnectionInfoBase::CheckMrouterIap() - { - CMUILOGGER_ENTERFN( "CheckMrouterIap" ); - TBool result( ETrue ); - - CMUILOGGER_WRITE_F( "IAP name: %S", &iConnectionName ); - iConnectionName.Trim(); - if ( iConnectionName.Left( - KMrouterName().Length() ).CompareF( KMrouterName ) ) - { - result = EFalse; - } - CMUILOGGER_LEAVEFN( "CheckMrouterIap" ); - return result; - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::ToStringLoadedDataLC -// --------------------------------------------------------- -// -HBufC* CConnectionInfoBase::ToStringLoadedDataLC( TUint aLoadedData, - TBool aToBeThreeDigit, - const TUint aArrowChar ) const - { - const TUint KTransferedBytesFormatBuf = 16; - const TUint KTransferedBytesWidth = 10; - TUint transferedBytesDecimalPlaces(2); - TUint resId; - HBufC* loadedTxt = NULL; - - TBuf buf; - - if ( aLoadedData < 1000 ) // bytes - { - if ( aToBeThreeDigit ) // added arrow to listbox - { - _LIT( KUdLinkFormatBytes, "%c%d" ); - - buf.Format( KUdLinkFormatBytes, aArrowChar, aLoadedData ); - } - else - { - _LIT( KUdLinkFormatBytes, "%d" ); - - buf.Format( KUdLinkFormatBytes, aLoadedData ); - } - resId = R_QTN_LOG_GPRS_AMOUNT_B; - } - else - { // KB, MB, GB - TUint denom; - - if ( aLoadedData < 1000 * 1024 ) - { - denom = 1024; - resId = R_QTN_LOG_GPRS_AMOUNT_KB; - } - else if ( aLoadedData < 1000 * 1024 * 1024 ) - { - denom = 1024 * 1024; - resId = R_QTN_LOG_GPRS_AMOUNT_MB; - } - else - { - denom = 1024 * 1024 * 1024; - resId = R_QTN_LOG_GPRS_AMOUNT_GB; - } - - TReal value = STATIC_CAST( TReal, aLoadedData ) / - STATIC_CAST( TReal, denom ); - - if ( aToBeThreeDigit ) - { - if ( value < 10 ) // number of decimal places - { - transferedBytesDecimalPlaces = 2; - } - else if ( value < 100 ) - { - transferedBytesDecimalPlaces = 1; - } - else - { - transferedBytesDecimalPlaces = 0; - } - } - - TRealFormat Format( KTransferedBytesWidth, - transferedBytesDecimalPlaces ); - - HBufC* number = HBufC::NewLC( KTransferedBytesWidth ); - number->Des().Num( value, Format ); - - if ( aToBeThreeDigit ) // added arrow to listbox - { - _LIT( KUdFormatLarge, "%c%S" ); - buf.Format( KUdFormatLarge, aArrowChar, number ); - } - else - { - _LIT( KUdFormatLarge, "%S" ); - buf.Format( KUdFormatLarge, number ); - } - CleanupStack::PopAndDestroy( number ); - } - - loadedTxt = StringLoader::LoadLC( resId, buf ); - - TPtr temp( loadedTxt->Des() ); - AknTextUtils::DisplayTextLanguageSpecificNumberConversion( temp ); - - return loadedTxt; - } - - -// --------------------------------------------------------- -// CConnectionInfoBase::ToStringTransferSpeedLC -// --------------------------------------------------------- -// -HBufC* CConnectionInfoBase::ToStringTransferSpeedLC( div_t aSpeed, - const TUint aArrowChar ) const - { - const TUint KUpDownSpeedBufSize = 16; - _LIT( KUdSpeedFmt, "%c%d%S%02d" ); - - TBuf buf; - TInt resId; - - HBufC* decSep = StringLoader::LoadLC( R_TEXT_CALC_DECIMAL_SEPARATOR ); - - resId = R_QTN_CMON_DATA_TRANSF_RATE_UL; - buf.Format( KUdSpeedFmt, aArrowChar, aSpeed.quot, decSep, aSpeed.rem ); - - CleanupStack::PopAndDestroy( decSep ); - - HBufC* speedTxt = StringLoader::LoadLC( resId, buf ); - - TPtr temp( speedTxt->Des() ); - AknTextUtils::DisplayTextLanguageSpecificNumberConversion( temp ); - - return speedTxt; - } - -// --------------------------------------------------------- -// CConnectionInfoBase::InitializeConnectionInfoL -// --------------------------------------------------------- -// -void CConnectionInfoBase::InitializeConnectionInfoL() - { - CMUILOGGER_WRITE( "InitializeConnectionInfoL - start " ); - TConnMonTimeBuf timeBuf; - iActiveWrapper->StartGetConnTime( iConnectionId, - iConnectionMonitor, - timeBuf ); - TInt err( iActiveWrapper->iStatus.Int() ); - CMUILOGGER_WRITE_F( "IntiConnectionInfo() status: %d", err ); - if ( err != KErrNone ) - { - User::Leave( err ); - } - - iStartTime = timeBuf(); - TDateTime dt = iStartTime.DateTime(); - CMUILOGGER_WRITE_F( "Day : %d", dt.Day() ); - CMUILOGGER_WRITE_F( "Hour : %d", dt.Hour() ); - CMUILOGGER_WRITE_F( "Minute : %d", dt.Minute() ); - CMUILOGGER_WRITE_F( "Second : %d", dt.Second() ); - - - RefreshDetailsL(); - if ( !iDetailsArray ) - { - ToArrayDetailsL(); - } - CMUILOGGER_WRITE( "InitializeConnectionInfoL - end " ); - } - -// --------------------------------------------------------- -// CConnectionInfoBase::StringMarkerRemoval -// --------------------------------------------------------- -// -void CConnectionInfoBase::StringMarkerRemoval( HBufC* aStringHolder ) - { - TPtr bufPtr = aStringHolder->Des(); - - const TText KLRMarker = 0x200E; - const TText KRLMarker = 0x200F; - - TBuf<2> markers; - markers.Append( KLRMarker ); - markers.Append( KRLMarker ); - - // This function is requested to remove directional markers, because they - // cause a display error in languages such Hebrew. Directional markers will - // be correctly added later, when the one or two parts of the time string - // are merged, again with StringLoader functions. - AknTextUtils::StripCharacters( bufPtr, markers ); - } - -// --------------------------------------------------------- -// CConnectionInfoBase::ToStringAppNameLC -// --------------------------------------------------------- -// -HBufC* CConnectionInfoBase::ToStringAppNameLC( TInt aAppIndex ) - { - HBufC* appName = ( iAppNames->MdcaPoint( aAppIndex ) ).AllocLC(); - - return appName; - } - -// --------------------------------------------------------- -// CConnectionInfoBase::GetDeletedFromCMUI -// --------------------------------------------------------- -// -TBool CConnectionInfoBase::GetDeletedFromCMUI() const - { - return iDeletedFromCMUI; - } - -// --------------------------------------------------------- -// CConnectionInfoBase::SetAllDeletedFromCMUI -// --------------------------------------------------------- -// -void CConnectionInfoBase::SetAllDeletedFromCMUI() - { - iConnectionStatus = EConnectionClosing; - } - -// --------------------------------------------------------- -// CConnectionInfoBase::SetDeletedFromCMUI -// --------------------------------------------------------- -// -void CConnectionInfoBase::SetDeletedFromCMUI() - { - iConnectionStatus = EConnectionClosing; - - iDeletedFromCMUI = ETrue; - } - - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiApp.cpp --- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiApp.cpp Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CConnectionMonitorUiApp application class -* -* -*/ - - -// INCLUDE FILES -#include -#include "ConnectionMonitorUiApp.h" -#include "ConnectionMonitorUiDocument.h" - -// --------------------------------------------------------- -// Panic -// --------------------------------------------------------- -// -void Panic( TInt aReason ) - { - _LIT( KAppName, "Conn. Monitor" ); - User::Panic( KAppName, aReason ); - } - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CConnectionMonitorUiApp::AppDllUid() -// Returns application UID -// --------------------------------------------------------- -// -TUid CConnectionMonitorUiApp::AppDllUid() const - { - return KUidConnectionMonitorUi; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiApp::CreateDocumentL() -// Creates CConnectionMonitorUiDocument object -// --------------------------------------------------------- -// -CApaDocument* CConnectionMonitorUiApp::CreateDocumentL() - { - return CConnectionMonitorUiDocument::NewL( *this ); - } - -// ================= OTHER EXPORTED FUNCTIONS ============== - - -LOCAL_C CApaApplication* NewApplication() - { - return new CConnectionMonitorUiApp; - } - -GLDEF_C TInt E32Main() - { - return EikStart::RunApplication( NewApplication ); - } - - -// End of File - diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiAppUi.cpp --- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiAppUi.cpp Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,972 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Application UI class -* -* -*/ - - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include -#include "ConnectionMonitorUi.hrh" -#include "ConnectionMonitorUiAppUi.h" -#include "ConnectionMonitorUiView.h" -#include "ConnectionMonitorUiDetailsView.h" -#include "ConnectionArray.h" -#include "CsdConnectionInfo.h" -#include "GprsConnectionInfo.h" -#include "WlanConnectionInfo.h" -#include "EasyWLANConnectionInfo.h" -#include "FeatureManagerWrapper.h" -#include "ActiveWrapper.h" - - -// CONSTANTS - -// ================= MEMBER FUNCTIONS ======================= - -// ---------------------------------------------------------- -// CConnectionMonitorUiAppUi::ConstructL() -// ---------------------------------------------------------- -// -void CConnectionMonitorUiAppUi::ConstructL() - { - CMUILOGGER_CREATE; - - CMUILOGGER_WRITE( "Constructing CConnectionMonitorUiAppUi" ); - - BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible); - -#ifdef RD_CONTROL_PANEL - - TBool isEmbeddedApp = IsEmbedded(); - CMUILOGGER_WRITE_F( "IsEmbedded(): %d", isEmbeddedApp ); - -#endif // RD_CONTROL_PANEL - - iFeatureManagerWrapper = CFeatureManagerWrapper::NewL(); - TBool isWlanSupported = FeatureManager::FeatureSupported( - KFeatureIdProtocolWlan ); - - CMUILOGGER_WRITE_F( "isWlanSupported: %b", isWlanSupported ); - - // connect to connection monitor engine - CMUILOGGER_WRITE( "Connection monitor engine" ); - iMonitor.ConnectL(); - CMUILOGGER_WRITE( "Connected" ); - - CMUILOGGER_WRITE( "Creating connection array" ); - iConnectionArray = new ( ELeave ) CConnectionArray(); - iConnectionArray->ConstructL(); - - iActiveWrapper = CActiveWrapper::NewL(); // start ActiveWrapper - - if ( isWlanSupported ) - { - GetEasyWlanIAPNameL(); - } - - InitializeConnectionArrayL(); - - CMUILOGGER_WRITE( "Created" ); - - CMUILOGGER_WRITE( "Creating main view" ); - -#ifdef RD_CONTROL_PANEL - CConnectionMonitorUiView* mainView = - new ( ELeave ) CConnectionMonitorUiView( iConnectionArray, - &iMonitor, - isEmbeddedApp, - iActiveWrapper ); -#else - CConnectionMonitorUiView* mainView = - new ( ELeave ) CConnectionMonitorUiView( iConnectionArray, - &iMonitor, - iActiveWrapper ); -#endif // RD_CONTROL_PANEL - - CleanupStack::PushL( mainView ); - CMUILOGGER_WRITE( "Constructing main view" ); - mainView->ConstructL(); - CMUILOGGER_WRITE( "Adding main view" ); - AddViewL( mainView ); // transfer ownership to CAknViewAppUi - - SetDefaultViewL( *mainView ); - iTimerObserver = this; - - CleanupStack::Pop( mainView ); - CMUILOGGER_WRITE( "Done" ); - - CMUILOGGER_WRITE( "Creating details view" ); - CConnectionMonitorUiDetailsView* detailsView = - new ( ELeave ) CConnectionMonitorUiDetailsView( iConnectionArray ); - CleanupStack::PushL( detailsView ); - CMUILOGGER_WRITE( "Constructing details view" ); - detailsView->ConstructL(); - CMUILOGGER_WRITE( "Adding details view" ); - AddViewL( detailsView ); // transfer ownership to CAknViewAppUi - CleanupStack::Pop( detailsView ); - CMUILOGGER_WRITE( "Done" ); - - // from this point we can listen to events of RConnectionMonitor server - iMonitor.NotifyEventL( *this ); - - activateMainView = EFalse; - } - -// ---------------------------------------------------- -// CConnectionMonitorUiAppUi::~CConnectionMonitorUiAppUi() -// Destructor -// Frees reserved resources -// ---------------------------------------------------- -// -CConnectionMonitorUiAppUi::~CConnectionMonitorUiAppUi() - { - CMUILOGGER_ENTERFN( "~CConnectionMonitorUiAppUi" ); - - StopTimer(); - delete iConnectionArray; - delete iEasyWlanIAPName; - delete iActiveWrapper; - delete iFeatureManagerWrapper; - - // it's needed because views are still active here - // and a call from handleforegroundevent from them - // can cause exception in StopConnEventNotificationL - iMonitor.CancelNotifications(); - iMonitor.Close(); - iNewConnectionIdArray.Close(); - iConnectionsWaitingFirstEvent.Close(); - CMUILOGGER_LEAVEFN( "~CConnectionMonitorUiAppUi" ); - - CMUILOGGER_DELETE; - } - -// --------------------------------------------------------------------------- -// CConnectionMonitorUiAppUi::InitializeConnectionArrayL -// --------------------------------------------------------------------------- -// -void CConnectionMonitorUiAppUi::InitializeConnectionArrayL() - { - CMUILOGGER_ENTERFN( "InitializeConnectionArrayL" ); - - CConnectionInfoBase* connectionInfo = NULL; - TUint connectionNumber( 0 ); - TUint connectionId( 0 ); - TUint subConnectionCount; - - TUint wlanConnectionCounter( 0 ); - TUint wlanConnectionId( 0 ); - TConnMonBearerType bearerType( EBearerUnknown ); - RArray connIds; - RArray bearers; - CleanupClosePushL( connIds ); - CleanupClosePushL( bearers ); - - iActiveWrapper->StartGetConnectionCount( connectionNumber, iMonitor ); - - if ( !iActiveWrapper->iStatus.Int() ) - { - CMUILOGGER_WRITE_F( "Number of connections: %d", - connectionNumber ); - - for ( TUint i = 1; i <= connectionNumber; ++i ) - { - iMonitor.GetConnectionInfo( i, connectionId, subConnectionCount ); - connIds.AppendL( connectionId ); - - iActiveWrapper->StartGetBearerType( connectionId, - iMonitor, - KBearer, - ( TInt& )bearerType ); - CMUILOGGER_WRITE_F( "status.Int(): %d", - iActiveWrapper->iStatus.Int() ); - CMUILOGGER_WRITE_F( "bearerType: %d", ( TInt )bearerType ); - bearers.AppendL( (TInt)bearerType ); - - if ( bearerType == EBearerWLAN ) - { - wlanConnectionCounter++; - wlanConnectionId = connectionId; - } - } - - for ( TInt i = 0; i < connectionNumber; i++ ) - { - if ( bearers[i] != EBearerWLAN || wlanConnectionCounter < 2 || connIds[i] == wlanConnectionId ) - { - TInt err; - TRAP(err, connectionInfo = CreateConnectionInfoL( connIds[i], (TConnMonBearerType)bearers[i] )); - - if ( !err && connectionInfo ) - { - CleanupStack::PushL( connectionInfo ); - iConnectionArray->AppendL( connectionInfo ); - CleanupStack::Pop( connectionInfo ); - } - else - { - iNewConnectionIdArray.Append( connIds[i] ); - } - } - else - { - CMUILOGGER_WRITE( "Fake WLAN connection, skipping" ); - } - } - } - else - { - CMUILOGGER_WRITE_F( "GetConnectionCount status: %d", - iActiveWrapper->iStatus.Int() ); - } - - CleanupStack::Pop( &bearers ); - bearers.Close(); - CleanupStack::Pop( &connIds ); - connIds.Close(); - - CMUILOGGER_LEAVEFN( "InitializeConnectionArrayL Done" ); - } - -// --------------------------------------------------------------------------- -// CConnectionMonitorUiAppUi::EventL -// --------------------------------------------------------------------------- -// -void CConnectionMonitorUiAppUi::EventL( - const CConnMonEventBase &aConnMonEvent ) - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiAppUi::EventL" ); - - CMUILOGGER_WRITE_F( "EventL type: %d", aConnMonEvent.EventType() ); - - CConnectionInfoBase* connectionInfo = NULL; - TInt index( 0 ); - TConnMonEvent event = ( TConnMonEvent ) aConnMonEvent.EventType(); - TInt connectionId = aConnMonEvent.ConnectionId(); - - CMUILOGGER_WRITE_F( "Connection Id: %d", connectionId ); - - switch ( event ) - { - case EConnMonCreateConnection: - { - CMUILOGGER_WRITE( "EConnMonCreateConnection" ); - - if ( connectionId > 0 ) - { - iConnectionsWaitingFirstEvent.AppendL( connectionId ); - } - break; - } - case EConnMonDeleteConnection: - { - CMUILOGGER_WRITE( "EConnMonDeleteConnection" ); - TInt count = iNewConnectionIdArray.Count(); - TInt i = 0; - TBool newConn = EFalse; - - for ( TInt cindex = 0; cindex < iConnectionsWaitingFirstEvent.Count(); cindex++ ) - { - if ( iConnectionsWaitingFirstEvent[cindex] == connectionId ) - { - newConn = ETrue; - iConnectionsWaitingFirstEvent.Remove(cindex); - break; - } - } - - if ( newConn ) - { - // Job done - break; - } - - while ( i < count ) - { - if ( iNewConnectionIdArray[i] == connectionId ) - { - iNewConnectionIdArray.Remove( i ); - CMUILOGGER_WRITE_F( "Removed id %d from array", ( TUint )connectionId ); - count--; - } - else - { - i++; - } - } - - index = iConnectionArray->GetArrayIndex( connectionId ); - if ( index >= 0 ) - { - connectionInfo = ( *iConnectionArray )[index]; - - if ( iView->Id() == KDetailsViewId ) - { - // Mark the connection as closed and refresh details view. - // It will change the status there. - connectionInfo->RefreshConnectionStatus( KConnectionClosed ); - connectionInfo->RefreshDetailsArrayL(); - } - else // MainView - { - TBool deleting = connectionInfo->GetDeletedFromCMUI(); - if ( deleting ) - { - ShowConnectionSummaryInformationNoteL( connectionInfo ); - } - // Mark the connection as closed. When the timer ticks the next - // time the marked connection is deleted and removed from the main view. - connectionInfo->RefreshConnectionStatus( KConnectionClosed ); - } - CMUILOGGER_WRITE_F( "Deleted: %d", connectionId ); - } - break; - } - case EConnMonConnectionStatusChange: - { - CMUILOGGER_WRITE( "EConnMonConnectionStatusChange" ); - - TBool newConn = EFalse; - - for ( TInt cindex = 0; cindex < iConnectionsWaitingFirstEvent.Count(); cindex++ ) - { - if ( iConnectionsWaitingFirstEvent[cindex] == connectionId ) - { - newConn = ETrue; - iConnectionsWaitingFirstEvent.Remove(cindex); - break; - } - } - - index = iConnectionArray->GetArrayIndex( connectionId ); - - if ( newConn || ( index < 0 ) ) - { - if ( connectionId > 0) - { - TConnMonBearerType bearerType( EBearerUnknown ); - iActiveWrapper->StartGetBearerType( connectionId, - iMonitor, - KBearer, - ( TInt& )bearerType ); - CMUILOGGER_WRITE_F( "status.Int(): %d", - iActiveWrapper->iStatus.Int() ); - CMUILOGGER_WRITE_F( "bearerType: %d", ( TInt )bearerType ); - if ( bearerType == 0 ) - { - if ( connectionId ) - { - iNewConnectionIdArray.AppendL( connectionId ); - CMUILOGGER_WRITE_F( "id %d added to array", ( TUint )connectionId ); - break; - } - } - - connectionInfo = CreateConnectionInfoL( connectionId, bearerType ); - } - - if ( connectionInfo ) - { - CleanupStack::PushL( connectionInfo ); - iConnectionArray->AppendL( connectionInfo ); - CleanupStack::Pop( connectionInfo ); - } - } - - index = iConnectionArray->GetArrayIndex( connectionId ); - CMUILOGGER_WRITE_F( "Found index : %d", index ); - - if ( index >= 0 ) - { - ( *iConnectionArray )[index]->StatusChangedL(); - } - break; - } - case EConnMonCreateSubConnection: - case EConnMonDeleteSubConnection: - { - CMUILOGGER_WRITE( "SubConnection" ); - index = iConnectionArray->GetArrayIndex( connectionId ); - if ( index >= 0) - { - ( *iConnectionArray )[index]->RefreshDetailsL(); - } - break; - } - default: - { - CMUILOGGER_WRITE( "On event default" ); - break; - } - } - - if ( iObserver && ( index >= 0 ) ) - { - CMUILOGGER_WRITE( "EventL calls observer" ); - iObserver->OnEventL( aConnMonEvent, index ); - } - - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiAppUi::EventL" ); - } - -// --------------------------------------------------------------------------- -// CConnectionMonitorUiAppUi::Static -// --------------------------------------------------------------------------- -// -CConnectionMonitorUiAppUi* CConnectionMonitorUiAppUi::Static() - { - return REINTERPRET_CAST( CConnectionMonitorUiAppUi*, - CEikonEnv::Static()->EikAppUi() ); - } - -// --------------------------------------------------------------------------- -// CConnectionMonitorUiAppUi::::DynInitMenuPaneL( TInt aResourceId, -// CEikMenuPane* aMenuPane ) -// This function is called by the EIKON framework just before it displays -// a menu pane. Its default implementation is empty, and by overriding it, -// the application can set the state of menu items dynamically according -// to the state of application data. -// --------------------------------------------------------------------------- -// -void CConnectionMonitorUiAppUi::DynInitMenuPaneL( - TInt /*aResourceId*/, CEikMenuPane* /*aMenuPane*/ ) - { - } - -// ---------------------------------------------------- -// CConnectionMonitorUiAppUi::HandleKeyEventL( -// const TKeyEvent& aKeyEvent, TEventCode /*aType*/ ) -// ---------------------------------------------------- -// -TKeyResponse CConnectionMonitorUiAppUi::HandleKeyEventL( - const TKeyEvent& /*aKeyEvent*/, TEventCode /*aType*/ ) - { - return EKeyWasNotConsumed; - } - -// ---------------------------------------------------- -// CConnectionMonitorUiAppUi::HandleCommandL( TInt aCommand ) -// ---------------------------------------------------- -// -void CConnectionMonitorUiAppUi::HandleCommandL( TInt aCommand ) - { - switch ( aCommand ) - { - case EEikCmdExit: - case EAknCmdExit: - case EAknSoftkeyExit: - { - Exit(); - break; - } - default: - break; - } - } - -// --------------------------------------------------------- -// CConnectionMonitorUiAppUi::StartConnEventNotification -// --------------------------------------------------------- -// -void CConnectionMonitorUiAppUi::StartConnEventNotification( - MActiveEventObserverInterface* aObserver ) - { - CMUILOGGER_ENTERFN - ( "CConnectionMonitorUiAppUi::StartConnEventNotification" ); - - iObserver = aObserver; - - CMUILOGGER_LEAVEFN - ( "CConnectionMonitorUiAppUi::StartConnEventNotification" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiAppUi::StopConnEventNotification -// --------------------------------------------------------- -// -void CConnectionMonitorUiAppUi::StopConnEventNotification( - MActiveEventObserverInterface* aObserver ) - { - CMUILOGGER_ENTERFN - ( "CConnectionMonitorUiAppUi::StopConnEventNotification" ); - - if ( iObserver == aObserver ) - { - iObserver = NULL; - } - - CMUILOGGER_LEAVEFN - ( "CConnectionMonitorUiAppUi::StopConnEventNotification" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiAppUi::StartTimerL -// --------------------------------------------------------- -// -void CConnectionMonitorUiAppUi::StartTimerL( const TInt aInterval ) - { - CMUILOGGER_WRITE( "Starting timer" ); - - if ( !iPeriodic ) - { - iPeriodic = CPeriodic::NewL( CActive::EPriorityStandard ); - CMUILOGGER_WRITE_F( "aInterval : %d", aInterval ); - - iPeriodic->Start( aInterval, aInterval, - TCallBack( Tick, this ) ); - } - - CMUILOGGER_WRITE( "Timer started" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiAppUi::StopTimer -// --------------------------------------------------------- -// -void CConnectionMonitorUiAppUi::StopTimer() - { - CMUILOGGER_WRITE( "Stopping timer" ); - if ( iPeriodic ) - { - CMUILOGGER_WRITE( "Timer existing" ); - iPeriodic->Cancel(); - delete iPeriodic; - iPeriodic = NULL; - } - - CMUILOGGER_WRITE( "Timer stopped" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiAppUi::Tick -// --------------------------------------------------------- -// -TInt CConnectionMonitorUiAppUi::Tick( TAny* aObject ) - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiAppUi::Tick(TAny* aObject)" ); - - CConnectionMonitorUiAppUi* myself = - static_cast( aObject ); - myself->Tick(); - - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiAppUi::Tick(TAny* aObject)" ); - return 1; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiAppUi::Tick -// --------------------------------------------------------- -// -TInt CConnectionMonitorUiAppUi::Tick() - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiAppUi::Tick()" ); - - if ( iTimerObserver ) - { - TInt error( KErrNone ); - - TRAP( error, iTimerObserver->OnTimerExpiredL() ); - CMUILOGGER_WRITE_F( "OnTimerExpiredL error id : %d", error ); - - // refresh listboxes - if ( !error && ( iObserver ) ) - { - CMUILOGGER_WRITE( "Tick !error && ( iObserver )" ); - TRAP( error, iObserver->OnTimerEventL() ); - } - CMUILOGGER_WRITE( "after Tick !error && ( iObserver )" ); - } - - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiAppUi::Tick()" ); - return 1; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiAppUi::OnTimerExpiredL -// --------------------------------------------------------- -// -void CConnectionMonitorUiAppUi::OnTimerExpiredL() - { - CMUILOGGER_WRITE_F( "MdcaCount: %d", iConnectionArray->MdcaCount()); - // First check if there are connections that need to be deleted. - // The conditions for deletion are: - // 1. Connection status must be closed - // 2. Main view must be active (details view should be shown also for closed connections) - // 3. There must not be active request ongoing (otherwise deletion might cause crash) - for(TUint i = 0; i < iConnectionArray->MdcaCount(); i++) - { - CMUILOGGER_WRITE_F( "i: %d", i ); - CMUILOGGER_WRITE_F( "Status: %d", (*iConnectionArray)[i]->GetStatus() ); - CMUILOGGER_WRITE_F( "active: %d", iActiveWrapper->IsActive() ); - if( (*iConnectionArray)[i]->GetStatus() == EConnectionClosed - && !iActiveWrapper->IsActive() - && iView->Id() != KDetailsViewId) - { - CMUILOGGER_WRITE_F( "Delete conn id: %d", (*iConnectionArray)[i]->GetConnectionId() ); - iConnectionArray->Delete( (*iConnectionArray)[i]->GetConnectionId() ); - i--; - } - } - - - TInt count = iNewConnectionIdArray.Count(); - if ( count > 0 ) - { - for ( TInt i = 0; i < count; i++ ) - { - TConnMonBearerType bearerType( EBearerUnknown ); - iActiveWrapper->StartGetBearerType( iNewConnectionIdArray[i], - iMonitor, - KBearer, - ( TInt& )bearerType ); - CMUILOGGER_WRITE_F( "status.Int(): %d", - iActiveWrapper->iStatus.Int() ); - CMUILOGGER_WRITE_F( "bearerType: %d", ( TInt )bearerType ); - if ( bearerType == 0 ) - { - continue; - } - CConnectionInfoBase* connectionInfo = NULL; - TInt err; - TRAP(err, connectionInfo = CreateConnectionInfoL( iNewConnectionIdArray[i], bearerType )); - if ( err ) - { - continue; - } - - - if ( connectionInfo ) - { - CleanupStack::PushL( connectionInfo ); - iConnectionArray->AppendL( connectionInfo ); - CleanupStack::Pop( connectionInfo ); - - iNewConnectionIdArray.Remove( i ); - count--; - i--; - CMUILOGGER_WRITE_F( "Removed index %d from array", ( TInt )i ); - } - - } - } - RefreshAllConnectionsL(); - if ( iView ) - { - CMUILOGGER_WRITE_F( "iView->Id() %d", iView->Id() ); - if ( iView->Id() == KConnectionsViewId ) - { - CConnectionMonitorUiView* view = - ( CConnectionMonitorUiView* )iView; - view->ConnectionKeyObserver(); - } - } - } - -// --------------------------------------------------------- -// CConnectionMonitorUiAppUi::GetTickInerval -// --------------------------------------------------------- -// -TInt CConnectionMonitorUiAppUi::GetTickInerval() const - { - return KTickInterval; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiAppUi::RefreshAllConnectionsL -// --------------------------------------------------------- -// -void CConnectionMonitorUiAppUi::RefreshAllConnectionsL() - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiAppUi::RefreshAllConnectionsL" ); - TUint index( 0 ); - CConnectionInfoBase* connection = NULL; - if ( iConnectionArray ) - { - TUint count = iConnectionArray->MdcaCount(); - while ( index < count ) - { - connection = ( *iConnectionArray )[index]; - // MainView Refresh - if ( ( connection->IsAlive() ) && - ( !connection->IsSuspended() ) ) - { - CMUILOGGER_WRITE( "MainView Refresh" ); - CMUILOGGER_WRITE_F( "RefreshAllConnectionsL index: %d", - index ); - CMUILOGGER_WRITE_F( "RefreshAllConnectionsL connId: %d", - connection->GetConnectionId() ); - connection->RefreshDetailsL(); - } - // DetailsView Refresh - if ( ( connection->IsAlive() && - ( iView->Id() == KDetailsViewId ) ) ) - { - CMUILOGGER_WRITE( "DetailsView Refresh" ); - connection->RefreshDetailsArrayL(); - } - connection->RefreshConnectionListBoxItemTextL(); - count = iConnectionArray->MdcaCount(); - ++index; - } - } - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiAppUi::RefreshAllConnectionsL" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiAppUi::HandleForegroundEventL -// --------------------------------------------------------- -// -void CConnectionMonitorUiAppUi::HandleForegroundEventL( TBool aForeground ) - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiAppUi::HandleForegroundEventL" ); - - CAknViewAppUi::HandleForegroundEventL( aForeground ); - if ( aForeground ) - { - CMUILOGGER_WRITE( "Foreground" ); - if ( activateMainView && iView != NULL && iView->Id() == KDetailsViewId ) - { - ((CConnectionMonitorUiDetailsView*) iView)->ActivateMainViewL(); - activateMainView = EFalse; - } - - TInt interval( KTickInterval ); - if ( iTimerObserver ) - { - interval = iTimerObserver->GetTickInerval(); - } - StartTimerL( interval ); - } - else - { - CMUILOGGER_WRITE( "Background" ); - StopTimer(); - activateMainView = EFalse; - } - - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiAppUi::HandleForegroundEventL" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiAppUi::CreateConnectionInfoL -// --------------------------------------------------------- -// -CConnectionInfoBase* CConnectionMonitorUiAppUi::CreateConnectionInfoL( - TUint aConnectionId, - TConnMonBearerType aBearerType ) - { - CMUILOGGER_ENTERFN( "CreateConnectionInfoL - start " ); - - CConnectionInfoBase* connection = NULL; - - if ( aConnectionId > 0 ) - { - -#ifdef __WINS__ - if ( aBearerType == EBearerLAN ) - { - aBearerType = EBearerGPRS; - } -#endif - switch ( aBearerType ) - { - case EBearerGPRS: - case EBearerWCDMA: - case EBearerEdgeGPRS: - case EBearerExternalGPRS: - case EBearerExternalWCDMA: - case EBearerExternalEdgeGPRS: - { - CMUILOGGER_WRITE( "CGprsConnectionInfo" ); - - connection = CGprsConnectionInfo::NewL( - aConnectionId, - &iMonitor, - aBearerType, - iActiveWrapper ); - break; - } - case EBearerCSD: - case EBearerHSCSD: - case EBearerWcdmaCSD: - case EBearerExternalCSD: - case EBearerExternalHSCSD: - case EBearerExternalWcdmaCSD: - { - CMUILOGGER_WRITE( "CCsdConnectionInfo" ); - - connection = CCsdConnectionInfo::NewL( - aConnectionId, - &iMonitor, - aBearerType, - iActiveWrapper ); - break; - } - case EBearerWLAN: - //case EBearerExternalWLAN: - { - CMUILOGGER_WRITE( "CWlanConnectionInfo" ); - - connection = CWlanConnectionInfo::NewL( - aConnectionId, - &iMonitor, - aBearerType, - iEasyWlanIAPName, - iActiveWrapper ); - break; - } - default : - { - CMUILOGGER_WRITE( "CreateConnectionInfoL, default" ); - break; - } - } - CMUILOGGER_WRITE_F( "Connection created: %d", aConnectionId ); - - if ( connection && connection->CheckMrouterIap() ) - { - CMUILOGGER_WRITE_F( "Connection deleted: %d", aConnectionId ); - delete connection; - connection = NULL; - } - } - else - { - CMUILOGGER_WRITE( "Connection id is invalid" ); - } - - CMUILOGGER_LEAVEFN( "CreateConnectionInfoL - end " ); - - return connection; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiAppUi::GetEasyWlanIAPNameL -// --------------------------------------------------------- -// -void CConnectionMonitorUiAppUi::GetEasyWlanIAPNameL() - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiAppUi::GetEasyWlanIAPNameL" ); - - delete iEasyWlanIAPName; - iEasyWlanIAPName = NULL; - - RCmManagerExt cmManagerExt; - cmManagerExt.OpenL(); - CleanupClosePushL( cmManagerExt ); - - TUint32 easyWlanId = cmManagerExt.EasyWlanIdL(); - if ( easyWlanId ) - { - CMUILOGGER_WRITE_F( "easyWlanId %d", easyWlanId ); - iEasyWlanIAPName = cmManagerExt - .GetConnectionMethodInfoStringL( - easyWlanId, - CMManager::ECmName ); - CMUILOGGER_WRITE_F( "iEasyWlanIAPName: %S", iEasyWlanIAPName ); - } - - CleanupStack::PopAndDestroy( &cmManagerExt ); - - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiAppUi::GetEasyWlanIAPNameL" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiAppUi::ShowConnectionSummaryInformationNoteL -// --------------------------------------------------------- -// -void CConnectionMonitorUiAppUi::ShowConnectionSummaryInformationNoteL( - const CConnectionInfoBase* aConnection ) - { - CMUILOGGER_ENTERFN( - "CConnectionMonitorUiContainer::ShowConnectionSummaryInformationNoteL" ); - - HBufC* total = aConnection->ToStringTotalTransmittedDataLC(); - HBufC* duration = aConnection->ToStringDurationLC(); - - CMUILOGGER_WRITE_F( "total: %S", total ); - CMUILOGGER_WRITE_F( "duration: %S", duration ); - - CDesCArrayFlat* strings = new( ELeave ) CDesCArrayFlat( 2 ); - CleanupStack::PushL( strings ); - - strings->AppendL( *total ); - strings->AppendL( *duration ); - - HBufC* informationText; - informationText = StringLoader::LoadLC( R_QTN_CMON_CONNECTION_SUMMARY_NOTE_TEXT, - *strings ); - - CAknNoteDialog* dlg = new ( ELeave ) CAknNoteDialog( - CAknNoteDialog::ENoTone, - CAknNoteDialog::TTimeout( 5000000 ) ); - dlg->PrepareLC( R_QTN_CMON_CONNECTION_SUMMARY_NOTE ); - dlg->SetTextWrapping( EFalse ); - - TPtr temp( informationText->Des() ); - AknTextUtils::DisplayTextLanguageSpecificNumberConversion( temp ); - - dlg->SetCurrentLabelL( EGeneralNote, temp ); //SetTextL - - dlg->RunDlgLD(); - - CleanupStack::PopAndDestroy( informationText ); - CleanupStack::PopAndDestroy( strings ); - CleanupStack::PopAndDestroy( duration ); - CleanupStack::PopAndDestroy( total ); - - CMUILOGGER_LEAVEFN( - "CConnectionMonitorUiContainer::ShowConnectionSummaryInformationNoteL" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiAppUi::DeleteDetailsView -// --------------------------------------------------------- -// -void CConnectionMonitorUiAppUi::DeleteDetailsView( - TInt aConnId, - CConnectionInfoBase* aConnInfo ) - { - CMUILOGGER_WRITE( "CConnectionMonitorUiAppUi::DeleteDetailsView Start" ); - CMUILOGGER_WRITE_F( "aConnInfo: %d", aConnInfo ); - CMUILOGGER_WRITE_F( "aConnId: %d", aConnId ); - - TBool deleting = aConnInfo->GetDeletedFromCMUI(); - iConnectionArray->Delete( aConnId ); - - CMUILOGGER_WRITE_F( "Deleted: %d", aConnId ); - CMUILOGGER_WRITE( "CConnectionMonitorUiAppUi::DeleteDetailsView End" ); - } - -#ifdef RD_CONTROL_PANEL - -// ----------------------------------------------------------------------------- -// CConnectionMonitorUiAppUi::IsEmbedded -// ----------------------------------------------------------------------------- -// -TBool CConnectionMonitorUiAppUi::IsEmbedded() const - { - return iEikonEnv->StartedAsServerApp(); - } - -#endif // RD_CONTROL_PANEL - - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiContainer.cpp --- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiContainer.cpp Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,757 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: container control class -* -* -*/ - - -// INCLUDE FILES -#include //for CNaviPane -#include //for CAknNavigationDecorator - -#include -#include -#include -#include -#include -#include - -#include "ConnectionArray.h" -#include "ConnectionMonitorUiContainer.h" -#include "FeatureManagerWrapper.h" -#include "ActiveWrapper.h" - -#include -#include -#include - -#include -#include - -// CONSTANTS -/** -* UID of ConnectionMonitorUi App. -*/ -LOCAL_D const TUid KUidConnMonUI = { 0x101F84D0 }; - - -// CONSTANTS -// Granularity of the model array. -/** -* Granularity of icon array -*/ -LOCAL_D const TInt KGranularity = 5; - - -_LIT( KEmpty, ""); ///< Empty string - -// ROM folder -_LIT( KDriveZ, "z:" ); - -// Name of the MBM file containing bitmaps -_LIT( KConnectionMonitorUiMBMFile, "ConnectionMonitorUi.mbm" ); - -// ================= MEMBER FUNCTIONS ======================= -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::CConnectionMonitorUiContainer -// --------------------------------------------------------- -// -CConnectionMonitorUiContainer::CConnectionMonitorUiContainer( - CConnectionArray* const aConnectionArray, - RConnectionMonitor* aMonitor, - CActiveWrapper* aActiveWrapper ) - : CCoeControl(), - iMonitor( aMonitor ), - iConnectionArray( aConnectionArray ), - isWlanSupported( EFalse ), - iActiveWrapper( aActiveWrapper ) - { - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::ConstructL -// EPOC two phased constructor -// --------------------------------------------------------- -// -void CConnectionMonitorUiContainer::ConstructL( TInt aSelectedItem, const TRect& aRect ) - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiContainer::ConstructL" ); - - CreateWindowL(); - - iListBox = new( ELeave ) CAknDoubleGraphicStyleListBox; - TInt flags( EAknGenericListBoxFlags ); - iListBox->ConstructL( this, flags ); - iListBox->CreateScrollBarFrameL( ETrue ); - iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( - CEikScrollBarFrame::EOff, - CEikScrollBarFrame::EAuto ); - iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray - /*ELbmDoesNotOwnItemArray*/ ); - iListBox->Model()->SetItemTextArray( iConnectionArray ); - iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray ); - - TInt actCount = iConnectionArray->MdcaCount() - 1; - - if ( actCount > KErrNotFound ) - { - iListBox->SetCurrentItemIndex( aSelectedItem > actCount ? actCount : aSelectedItem ); - } - - SetIconsL(); - - HBufC* noConn = StringLoader::LoadLC( R_QTN_CMON_NO_ACTIVE_CONNECTIONS, - iEikonEnv ); - - CListBoxView *lbview = iListBox->View(); - lbview->SetListEmptyTextL( *noConn ); - CleanupStack::PopAndDestroy( noConn ); - - GetPanesL(); - SetRect( aRect ); - ActivateL(); - - isWlanSupported = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ); - - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiContainer::ConstructL" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::OfferKeyEventL -// --------------------------------------------------------- -// -TKeyResponse CConnectionMonitorUiContainer::OfferKeyEventL( - const TKeyEvent& aKeyEvent, - TEventCode aType ) - { - TKeyResponse result( EKeyWasNotConsumed ); - if ( aType == EEventKey ) - { - TInt index = iListBox->CurrentItemIndex(); - if ( ( aKeyEvent.iCode == EKeyBackspace ) && ( index != -1 ) ) - { - if ( !( *iConnectionArray )[index]->IsSuspended() ) - { - EndConnectionL(); - result = EKeyWasConsumed; - } - } - else - { - result = iListBox->OfferKeyEventL( aKeyEvent, aType ); - } - } - return result; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::~CConnectionMonitorUiContainer -// --------------------------------------------------------- -// -CConnectionMonitorUiContainer::~CConnectionMonitorUiContainer() - { - delete iListBox; - delete iNaviDecorator; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::SizeChanged() -// Called by framework when the view size is changed -// --------------------------------------------------------- -// -void CConnectionMonitorUiContainer::SizeChanged() - { - iListBox->SetRect( Rect() ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::CountComponentControls -// --------------------------------------------------------- -// -TInt CConnectionMonitorUiContainer::CountComponentControls() const - { - return 1; // only iListBox - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::ComponentControl( TInt aIndex ) const -// --------------------------------------------------------- -// -CCoeControl* CConnectionMonitorUiContainer::ComponentControl( - TInt aIndex ) const - { - switch ( aIndex ) - { - case 0: - return iListBox; - default: - return NULL; - } - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::OnEventL -// --------------------------------------------------------- -// -void CConnectionMonitorUiContainer::OnEventL( - const CConnMonEventBase& aConnMonEvent, - const TInt aIndex ) - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiContainer::OnEventL" ); - CMUILOGGER_WRITE_F( "OnEventL type: %d", aConnMonEvent.EventType() ); - CMUILOGGER_WRITE_F( "OnEventL index: %d", aIndex ); - - TBool validIndex =( iListBox->Model()->NumberOfItems() > KErrNotFound ) && - ( aIndex > KErrNotFound ) && - ( iListBox->Model()->NumberOfItems() >= aIndex ); - - if ( aConnMonEvent.ConnectionId() ) - { - switch ( aConnMonEvent.EventType() ) - { - case EConnMonCreateConnection: - { - CMUILOGGER_WRITE( "OnEventL EConnMonCreateConnection" ); - iListBox->HandleItemAdditionL(); - break; - } - case EConnMonDeleteConnection: - { - CMUILOGGER_WRITE( "OnEventL EConnMonDeleteConnection" ); - CMUILOGGER_WRITE_F( "validIndex: %b", validIndex ); - - if ( validIndex ) - { - TBool current - ( aIndex == ( TUint )iListBox->CurrentItemIndex() ); - AknListBoxUtils::HandleItemRemovalAndPositionHighlightL( - iListBox, aIndex, ETrue ); - } - iListBox->UpdateScrollBarsL(); - break; - } - case EConnMonConnectionStatusChange: - case EConnMonCreateSubConnection: - case EConnMonDeleteSubConnection: - { - CMUILOGGER_WRITE( "OnEventL StatusChange SubConnection" ); - if ( validIndex ) - { - iListBox->DrawItem( aIndex ); - } - break; - } - default: - { - CMUILOGGER_WRITE( "OnEventL default" ); - break; - } - } - } - PushAndRefreshNaviPaneL(); - - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiContainer::OnEventL" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::OnTimerEventL -// --------------------------------------------------------- -// -void CConnectionMonitorUiContainer::OnTimerEventL() - { - iListBox->DrawNow(); - PushAndRefreshNaviPaneL(); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::DrawFirstAllListBoxItem -// --------------------------------------------------------- -// -void CConnectionMonitorUiContainer::DrawFirstAllListBoxItem() - { - TInt count = iListBox->Model()->NumberOfItems() - 1; - for ( TInt i = count; i > -1; --i ) - { - iListBox->DrawItem( i ); - } - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::SelectedConnection -// --------------------------------------------------------- -// -TInt CConnectionMonitorUiContainer::SelectedConnection() - { - return iListBox->CurrentItemIndex(); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::EndConnectionL -// --------------------------------------------------------- -// -void CConnectionMonitorUiContainer::EndConnectionL() - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiContainer::EndConnectionL " ); - TInt index = iListBox->CurrentItemIndex(); - if ( ( index >= 0 ) && ( index < iConnectionArray->MdcaCount() ) ) - { - CConnectionInfoBase* connection = ( *iConnectionArray )[index]; - TUint connectionId = connection->GetConnectionId(); - HBufC* connectionName = NULL; - HBufC* promptConnectionName = NULL; - - // Get the bearertype of a single connection - TConnMonBearerType bearer; - bearer = connection->GetBearerType(); - - if ( isWlanSupported ) // WLAN ON - { - if ( ( bearer == EBearerWLAN ) && connection->IsEasyWLAN() ) - { - /* check and load the SSID for EasyWLAN */ - connectionName = connection->GetWlanNetworkNameLC(); - CMUILOGGER_WRITE_F( "GetWlanNetworkNameLC: %S", - connectionName ); - } - else - { - connectionName = connection->GetNameLC(); - CMUILOGGER_WRITE_F( "GetNameLC: %S", connectionName ); - } - } - else // WLAN OFF - { - connectionName = connection->GetNameLC(); - CMUILOGGER_WRITE_F( "GetNameLC: %S", connectionName ); - } - - if ( bearer >= EBearerExternalCSD ) - { - CMUILOGGER_WRITE( "R_QTN_CMON_CONF_END_MODEM_CONN" ); - promptConnectionName = StringLoader::LoadLC( - R_QTN_CMON_CONF_END_MODEM_CONN ); - } - else - { - CMUILOGGER_WRITE( "R_QTN_CMON_CONF_END_SINGLE_CONN" ); - promptConnectionName = StringLoader::LoadLC( - R_QTN_CMON_CONF_END_SINGLE_CONN, - *connectionName ); - } - - CAknQueryDialog* dlg = CAknQueryDialog::NewL(); - TInt ret = dlg->ExecuteLD( R_END_CONN_CONFIRMATION_QUERY, - *promptConnectionName ); - - CleanupStack::PopAndDestroy( promptConnectionName ); - CleanupStack::PopAndDestroy( connectionName ); - - TInt connStatus; - iActiveWrapper->StartGetIntAttribute( connectionId, - iMonitor, - KConnectionStatus, - ( ( TInt& )( connStatus ) ) ); - CMUILOGGER_WRITE_F( "KConnectionStatus status.Int(): %d", - iActiveWrapper->iStatus.Int() ); - CMUILOGGER_WRITE_F( "KConnectionStatus connStatus: %d", - connStatus ); - CMUILOGGER_WRITE_F( "ret ret: %d", ret ); - - if ( ( ret == EAknSoftkeyOk ) || ( ret == EAknSoftkeyYes ) ) - { - if ( KErrNone == iActiveWrapper->iStatus.Int() ) - { - connection->SetDeletedFromCMUI(); - - connection->RefreshConnectionListBoxItemTextL(); - DrawFirstAllListBoxItem(); - - iMonitor->SetBoolAttribute( connectionId, 0, - KConnectionStop, ETrue ); - CMUILOGGER_WRITE( "after SetBoolAttribute" ); - } - } - else - { - if ( KErrNotFound == iActiveWrapper->iStatus.Int() ) - { - /* It is already closed */ - /* An information note must be displayed */ - CAknGlobalNote * note = CAknGlobalNote::NewL(); - CleanupStack::PushL( note ); - HBufC* informationText = - StringLoader::LoadLC( R_QTN_CMON_INFO_CONN_ALREADY_END ); - - note->ShowNoteL(EAknGlobalInformationNote, *informationText ); - CleanupStack::PopAndDestroy( informationText ); - CleanupStack::PopAndDestroy( note ); - CMUILOGGER_WRITE( "It is already closed" ); - } - } - } - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiContainer::EndConnectionL " ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::EndAllConnectionL -// --------------------------------------------------------- -// -void CConnectionMonitorUiContainer::EndAllConnectionL() - { - CMUILOGGER_ENTERFN( "EndAllConnectionL - start" ); - - const TInt KOnlyOneConnection = 1; - const TInt KFirstConnection = 0; - CConnectionArray* tempConnArray = iConnectionArray->DeepCopyL(); - CleanupStack::PushL( tempConnArray ); - - TInt connectionCount = tempConnArray->MdcaCount(); - HBufC* promptTxt = NULL; - if ( connectionCount == KOnlyOneConnection ) - { - HBufC* temp = ( *tempConnArray )[KFirstConnection]->GetNameLC(); - TName iapName = *temp; - CleanupStack::PopAndDestroy( temp ); - promptTxt = StringLoader::LoadLC( R_QTN_CMON_CONF_END_SINGLE_CONN, - iapName ); - } - else - { - promptTxt = StringLoader::LoadLC( R_QTN_CMON_CONF_END_ALL_CONNS, - connectionCount ); - TPtr temp( promptTxt->Des() ); - AknTextUtils::DisplayTextLanguageSpecificNumberConversion( temp ); - - } - CAknQueryDialog* dlg = CAknQueryDialog::NewL(); - TInt ret = dlg->ExecuteLD( R_END_CONN_CONFIRMATION_QUERY, *promptTxt ); - CleanupStack::PopAndDestroy( promptTxt ); - - CConnectionInfoBase* connection = NULL; - TUint connectionId( 0 ); - - CMUILOGGER_WRITE_F( "ret: %d", ret ); - - /* End connections one by one, First CSD, after GPRS and WLAN. */ - if ( ( ret == EAknSoftkeyOk ) || ( ret == EAknSoftkeyYes ) ) - { - for ( TUint i = 0; i < iConnectionArray->MdcaCount(); ++i ) - { - connection = ( *iConnectionArray )[i]; - connection->SetAllDeletedFromCMUI(); - connection->RefreshConnectionListBoxItemTextL(); - } - - DrawFirstAllListBoxItem(); - - TConnMonBearerType bearer; - for ( TUint i = 0; i < connectionCount; ++i ) - { - CMUILOGGER_WRITE_F( "i: %d", i ); - - connection = ( *tempConnArray )[i]; - - bearer = connection->GetBearerType(); - switch ( bearer ) - { - case EBearerCSD: - case EBearerExternalCSD: - case EBearerWcdmaCSD: - case EBearerExternalWcdmaCSD: - case EBearerHSCSD: - case EBearerExternalHSCSD: - { - connectionId = connection->GetConnectionId(); - iMonitor->SetBoolAttribute( connectionId, 0, - KConnectionStop, ETrue ); - CMUILOGGER_WRITE_F( "CSD i: %d", i ); - CMUILOGGER_WRITE_F( "connectionId: %d", connectionId ); - break; - } - default : - { - break; - } - } - } - - for ( TUint i = 0; i < connectionCount; ++i ) - { - CMUILOGGER_WRITE_F( "i: %d", i ); - - connection = ( *tempConnArray )[i]; - - bearer = connection->GetBearerType(); - switch ( bearer ) - { - case EBearerGPRS: - case EBearerWCDMA: - case EBearerEdgeGPRS: - case EBearerExternalGPRS: - case EBearerExternalWCDMA: - case EBearerExternalEdgeGPRS: - case EBearerWLAN: - { - connectionId = connection->GetConnectionId(); - iMonitor->SetBoolAttribute( connectionId, 0, - KConnectionStop, ETrue ); - CMUILOGGER_WRITE_F( "GPRS i: %d", i ); - CMUILOGGER_WRITE_F( "connectionId: %d", connectionId ); - break; - } - default : - { - break; - } - } - } - } - else - { - for ( TUint i = 0; - ( ( i < connectionCount ) && - ( KErrNotFound != iActiveWrapper->iStatus.Int() ) ); ++i ) - { - connection = ( *tempConnArray )[i]; - connectionId = connection->GetConnectionId(); - TInt connStatus; - iActiveWrapper->StartGetIntAttribute( connectionId, - iMonitor, - KConnectionStatus, - ( ( TInt& )( connStatus ) ) ); - } - - if ( KErrNotFound == iActiveWrapper->iStatus.Int() ) - { - /* It is already closed */ - /* An information note must be displayed */ - CAknGlobalNote * note = CAknGlobalNote::NewL(); - CleanupStack::PushL( note ); - HBufC* informationText = - StringLoader::LoadLC( R_QTN_CMON_INFO_CONN_ALREADY_END ); - - note->ShowNoteL(EAknGlobalInformationNote, *informationText ); - CleanupStack::PopAndDestroy( informationText ); - CleanupStack::PopAndDestroy( note ); - CMUILOGGER_WRITE( "It is already closed in All" ); - } - } - - CleanupStack::PopAndDestroy( tempConnArray ); - - CMUILOGGER_LEAVEFN( "EndAllConnectionL - end" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::ListBox -// --------------------------------------------------------- -// -CAknDoubleGraphicStyleListBox* CConnectionMonitorUiContainer::ListBox() const - { - return iListBox; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::SetIconsL() -// --------------------------------------------------------- -// -void CConnectionMonitorUiContainer::SetIconsL() - { - CMUILOGGER_ENTERFN( "SetIconsL" ); - - TFileName iconsFileName; - - iconsFileName.Append( KDriveZ ); - - iconsFileName.Append( KDC_APP_BITMAP_DIR ); - - iconsFileName.Append( KConnectionMonitorUiMBMFile ); - - CArrayPtr< CGulIcon >* icons = new( ELeave ) CAknIconArray( KGranularity ); - CleanupStack::PushL( icons ); - - MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); - - icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, - KAknsIIDQgnPropWmlGprs, - iconsFileName, - EMbmConnectionmonitoruiQgn_prop_wml_gprs, - EMbmConnectionmonitoruiQgn_prop_wml_gprs_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, - KAknsIIDQgnPropWmlCsd, - iconsFileName, - EMbmConnectionmonitoruiQgn_prop_wml_csd, - EMbmConnectionmonitoruiQgn_prop_wml_csd_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, - KAknsIIDQgnPropWmlHscsd, - iconsFileName, - EMbmConnectionmonitoruiQgn_prop_wml_hscsd, - EMbmConnectionmonitoruiQgn_prop_wml_hscsd_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, - KAknsIIDQgnPropEmpty, - iconsFileName, - EMbmConnectionmonitoruiQgn_prop_empty, - EMbmConnectionmonitoruiQgn_prop_empty_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, - KAknsIIDQgnPropWmlSms, - iconsFileName, - EMbmConnectionmonitoruiQgn_prop_cmon_gprs_suspended, - EMbmConnectionmonitoruiQgn_prop_cmon_gprs_suspended_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, - KAknsIIDQgnPropWlanBearer, - iconsFileName, - EMbmConnectionmonitoruiQgn_prop_wlan_bearer, - EMbmConnectionmonitoruiQgn_prop_wlan_bearer_mask ) ); - - iListBox->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons ); - CleanupStack::Pop( icons ); // icons - CMUILOGGER_LEAVEFN( "SetIconsL" ); - - } - -// --------------------------------------------------------------------------- -// void CConnectionMonitorUiContainer::HandleResourceChange( TInt aType ) -// Handle resource change events. -// --------------------------------------------------------------------------- -// -void CConnectionMonitorUiContainer::HandleResourceChange( TInt aType ) - { - CMUILOGGER_ENTERFN( "HandleResourceChange" ); - CMUILOGGER_WRITE_F( "aType: %d", aType ); - - CCoeControl::HandleResourceChange( aType ); - - if ( aType == KAknsMessageSkinChange ) - { - TInt error( KErrNone ); - TRAP( error, SetIconsL() ); - CMUILOGGER_WRITE_F( "KAknsMessageSkinChange error: %d", error ); - SizeChanged(); - } - - if ( aType == KEikDynamicLayoutVariantSwitch ) - { - TRect mainPaneRect; - AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, - mainPaneRect ); - SetRect( mainPaneRect ); - DrawNow(); - } - CMUILOGGER_LEAVEFN( "HandleResourceChange" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::GetPanesL -// --------------------------------------------------------- -// -void CConnectionMonitorUiContainer::GetPanesL() - { - CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); - - iNaviPane = STATIC_CAST( CAknNavigationControlContainer*, - statusPane->ControlL( TUid::Uid(EEikStatusPaneUidNavi ) ) ); - - PushAndRefreshNaviPaneL(); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::PushAndRefreshNaviPaneL -// --------------------------------------------------------- -// -void CConnectionMonitorUiContainer::PushAndRefreshNaviPaneL() - { - CMUILOGGER_ENTERFN( "PushAndRefreshNaviPaneL - start" ); - - HBufC* textOfNaviPane = NULL; - TUint countOfConnection = iConnectionArray->NumberOfActiveConnections(); - CMUILOGGER_WRITE_F( "countOfConnection: %d", countOfConnection ); - - if ( iNaviDecorator ) - { - PopNaviPane(); - } - - if ( countOfConnection ) - { - if ( countOfConnection == 1 ) - { - textOfNaviPane = StringLoader::LoadLC( - R_QTN_CMON_NAVI_ONE_ACTIVE_CONN ); - } - else - { - textOfNaviPane = StringLoader::LoadLC( - R_QTN_CMON_NAVI_MANY_ACTIVE_CONNS, - countOfConnection ); - } - } - else - { - textOfNaviPane = KEmpty().AllocLC(); - } - - TPtr temp( textOfNaviPane->Des() ); - AknTextUtils::DisplayTextLanguageSpecificNumberConversion( temp ); - - iNaviDecorator = iNaviPane->CreateNavigationLabelL( *textOfNaviPane ); - CleanupStack::PopAndDestroy( textOfNaviPane ); - - iNaviPane->PushL( *iNaviDecorator ); - CMUILOGGER_LEAVEFN( "PushAndRefreshNaviPaneL - end" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::PopNaviPane -// --------------------------------------------------------- -// -void CConnectionMonitorUiContainer::PopNaviPane() - { - iNaviPane->Pop( iNaviDecorator ); - delete iNaviDecorator; - iNaviDecorator = NULL; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::FocusChanged -// --------------------------------------------------------- -// -void CConnectionMonitorUiContainer::FocusChanged( TDrawNow aDrawNow ) - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiContainer::FocusChanged" ); - CCoeControl::FocusChanged( aDrawNow ); - if ( iListBox ) - { - iListBox->SetFocus( IsFocused() ); - } - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiContainer::FocusChanged" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::GetHelpContext() -// --------------------------------------------------------- -// -void CConnectionMonitorUiContainer::GetHelpContext( TCoeHelpContext& aContext) const - { - aContext.iMajor = KUidConnMonUI; - aContext.iContext = KCMON_HLP_CMON_MAIN_VIEW; - } - - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiDetailsContainer.cpp --- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiDetailsContainer.cpp Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,584 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: container control class -* -* -*/ - -// INCLUDE FILES -#include "ConnectionMonitorUiDetailsContainer.h" - -#include //for CNaviPane -#include //for CAknNavigationDecorator -#include -#include - -#include "ConnectionArray.h" -#include "ConnectionMonitorUiLogger.h" -#include "ConnectionMonitorUiDetailsView.h" -#include "ConnectionMonitorUi.hrh" - -// CONSTANTS - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::ConstructL( const TRect& aRect ) -// EPOC two phased constructor -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsContainer::ConstructL( const TRect& aRect, - CConnectionMonitorUiDetailsView* aParentView ) - { - CMUILOGGER_WRITE( "CConnectionMonitorUiDetailsContainer::ConstructL" ); - CreateWindowL(); - - iParentView = aParentView; - iListBox = new( ELeave ) CAknSingleHeadingStyleListBox; - iListBox->SetContainerWindowL( *this ); - TInt flags = 0; - flags |= EAknListBoxViewerFlags | EAknListBoxDisableItemSpecificMenu; - iListBox->ConstructL( this, flags ); - iListBox->CreateScrollBarFrameL( ETrue ); - iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( - CEikScrollBarFrame::EOff, - CEikScrollBarFrame::EAuto ); - - CMUILOGGER_WRITE( "Creating connection details array" ); - - iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray ); - - SetRect( aRect ); - - HBufC* noConn = StringLoader::LoadLC( R_QTN_CMON_NO_ACTIVE_CONNECTIONS, - iEikonEnv ); - CListBoxView *lbview = iListBox->View(); - lbview->SetListEmptyTextL( *noConn ); - CleanupStack::PopAndDestroy( noConn ); - - - GetPanesL(); - - ActivateL(); - CMUILOGGER_WRITE( "CConnectionMonitorUiDetailsContainer::ConstructL" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::SetSelectedConnectionL -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsContainer::SetSelectedConnectionL( - TUint aConnectionIndex ) - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsContainer::SetSelectedConnectionL" ); - CMUILOGGER_WRITE_F( "aConnectionIndex : %d", &aConnectionIndex ); - CMUILOGGER_WRITE_F( "iConnectionArray->MdcaCount() : %d", - iConnectionArray->MdcaCount() ); - - CConnectionInfoBase* temp = ( *iConnectionArray ).At( aConnectionIndex ); - CDesCArrayFlat* tempArray = temp ? temp->GetDetailsArray() : NULL ; - if ( tempArray ) - { - iConnectionIndex = aConnectionIndex; - iConnectionInfo = temp; - iListBox->Model()->SetItemTextArray( tempArray ); - iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray ); - iListBox->Reset(); - iListBox->UpdateScrollBarsL(); - } - - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiDetailsContainer::SetSelectedConnectionL" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::~CConnectionMonitorUiDetailsContainer -// --------------------------------------------------------- -// -CConnectionMonitorUiDetailsContainer::~CConnectionMonitorUiDetailsContainer() - { - delete iListBox; - delete iNaviDecorator; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiContainer::CConnectionMonitorUiContainer -// --------------------------------------------------------- -// -CConnectionMonitorUiDetailsContainer::CConnectionMonitorUiDetailsContainer( - const CConnectionArray* const aConnectionArray ) - : iConnectionArray( aConnectionArray ) - { - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::SizeChanged() -// Called by framework when the view size is changed -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsContainer::SizeChanged() - { - iListBox->SetRect( Rect() ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::CountComponentControls() const -// --------------------------------------------------------- -// -TInt CConnectionMonitorUiDetailsContainer::CountComponentControls() const - { - return 1; // return nbr of controls inside this container - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::ComponentControl( TInt aIndex ) const -// --------------------------------------------------------- -// -CCoeControl* CConnectionMonitorUiDetailsContainer::ComponentControl( - TInt aIndex ) const - { - switch ( aIndex ) - { - case 0: - return iListBox; - default: - return NULL; - } - } - -// ---------------------------------------------------------------------------- -// CLogsDetailView::HandleNaviDecoratorEventL -// Handler for pointer events, when the Navi Pane arrows have been tapped -// ---------------------------------------------------------------------------- -// -void CConnectionMonitorUiDetailsContainer::HandleNaviDecoratorEventL( TInt aEventID ) - { - switch (aEventID) - { - case MAknNaviDecoratorObserver::EAknNaviDecoratorEventRightTabArrow: - if ( iConnectionIndex < (iConnectionArray->MdcaCount() - 1) ) { - SetSelectedConnectionL(iConnectionIndex + 1); - } - break; - - case MAknNaviDecoratorObserver::EAknNaviDecoratorEventLeftTabArrow: - if ( iConnectionIndex > 0 ) { - SetSelectedConnectionL(iConnectionIndex - 1); - } - break; - - default: - return; - } - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::OfferKeyEventL -// --------------------------------------------------------- -// -TKeyResponse CConnectionMonitorUiDetailsContainer::OfferKeyEventL( - const TKeyEvent& aKeyEvent, - TEventCode aType ) - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsContainer::OfferKeyEventL" ); - - TKeyResponse result( EKeyWasNotConsumed ); - TInt index = iConnectionIndex; - TInt index_closed = iConnectionIndex; - CConnectionInfoBase* connection = NULL; - if ( aType == EEventKey ) - { - if ( ( aKeyEvent.iCode == EKeyLeftArrow ) || - ( aKeyEvent.iCode == EKeyRightArrow ) ) - { - - TInt dir = 0; - switch (aKeyEvent.iCode) - { - case EKeyLeftArrow: - { - dir = -1; - break; - } - case EKeyRightArrow: - { - dir = 1; - break; - } - } - // Handle mirrored layout by negating the directionality - if (AknLayoutUtils::LayoutMirrored()) - { - dir = -1 * dir; - } - - index += dir; - - TBool step( EFalse ); - - CMUILOGGER_WRITE_F( "OfferKeyEventL index: %d", index ); - - while ( ( index > -1 ) && ( index < iConnectionArray->MdcaCount() - && !step ) ) - { - connection = ( *iConnectionArray )[index]; - TBool alive = connection->IsAlive(); - CMUILOGGER_WRITE_F( "OfferKeyEventL alive: %b", alive ); - - if ( alive ) - { - if ( ( index_closed > -1 ) && - ( index_closed < iConnectionArray->MdcaCount() ) ) - { - CConnectionInfoBase* connection_closed - = ( *iConnectionArray )[index_closed]; - - if ( iParentView->GetViewRefreshState() ) - { - step = ETrue; - CConnectionMonitorUiAppUi* appUi = - (CConnectionMonitorUiAppUi*) - iEikonEnv->EikAppUi(); - appUi->DeleteDetailsView( - GetSelectedConnectionInfo() - ->GetConnectionId(), - GetSelectedConnectionInfo() ); - appUi->StartTimerL(); - iParentView->SetViewRefreshState( EFalse ); - if ( index_closed > index ) - { - iConnectionInfo = connection; - iConnectionIndex = index; - } - iListBox->Model()->SetItemTextArray( - connection->GetDetailsArray() ); - iListBox->DrawNow(); - iListBox->UpdateScrollBarsL(); - PushAndRefreshNaviPaneL(); - } - else - { - step = ETrue; - iConnectionInfo = connection; - iConnectionIndex = index; - iListBox->Model()->SetItemTextArray( - connection->GetDetailsArray() ); - iListBox->DrawNow(); - iListBox->UpdateScrollBarsL(); - PushAndRefreshNaviPaneL(); - } - } - } - else - { - index += dir; - } - } - result = iListBox->OfferKeyEventL( aKeyEvent, aType ); - } - else if ( aKeyEvent.iCode == EKeyDevice3 ) - // selection key press -> go back to main view - { - CConnectionMonitorUiAppUi::Static()->ActivateLocalViewL( - TUid::Uid( EConnectionMonitorUiMainViewTab ) ); - result = EKeyWasConsumed; - } - else - { - result = iListBox->OfferKeyEventL( aKeyEvent, aType ); - } - } - - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiDetailsContainer::OfferKeyEventL" ); - - return result; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::OnEventL -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsContainer::OnEventL( - const CConnMonEventBase& aConnMonEvent, - const TInt aIndex ) - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsContainer::OnEventL()" ); - CMUILOGGER_WRITE_F( "aIndex : %d", aIndex ); - - switch ( aConnMonEvent.EventType() ) - { - case EConnMonDeleteConnection: - { - // Do nothing - } - break; - case EConnMonCreateConnection: - { - CMUILOGGER_WRITE_F( "iConnectionInfo : %d", iConnectionInfo ); - - if ( !iConnectionInfo ) - { - SetSelectedConnectionL( 0 ); - } - break; - } - default: - { - if ( !iConnectionInfo ) - { - SetSelectedConnectionL( 0 ); - } - else if ( ( aIndex == iConnectionIndex ) && ( iConnectionArray->MdcaCount() ) ) - { - iListBox->DrawNow(); - iListBox->UpdateScrollBarsL(); - } - break; - } - } - PushAndRefreshNaviPaneL(); - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiDetailsContainer::OnEventL()" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::OnTimerEventL -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsContainer::OnTimerEventL() - { - if ( iConnectionArray->MdcaCount() ) - { - iListBox->DrawNow(); - - CMUILOGGER_WRITE_F( "CMUIDW GetStatus() before: %d", - iConnectionInfo->GetStatus() ); - if ( iConnectionInfo->GetStatus() == EConnectionClosing ) - { - CConnectionMonitorUiAppUi* tempApUi = - CConnectionMonitorUiAppUi::Static(); - iConnectionInfo->StatusChangedL(); - } - CMUILOGGER_WRITE_F( "CMUIDW GetStatus() after: %d", - iConnectionInfo->GetStatus() ); - } - PushAndRefreshNaviPaneL(); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::DrawFirstAllListBoxItem -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsContainer::DrawFirstAllListBoxItem() - { - TInt count = iListBox->Model()->NumberOfItems() - 1; - for ( TInt i = count; i > -1; --i ) - { - iListBox->DrawItem( i ); - } - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::ListBox -// --------------------------------------------------------- -// -CAknSingleHeadingStyleListBox* - CConnectionMonitorUiDetailsContainer::ListBox() const - { - return iListBox; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::GetPanesL -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsContainer::GetPanesL() - { - CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); - - iNaviPane = STATIC_CAST( CAknNavigationControlContainer*, - statusPane->ControlL( TUid::Uid(EEikStatusPaneUidNavi ) ) ); - - PushAndRefreshNaviPaneL(); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::PushAndRefreshNaviPaneL -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsContainer::PushAndRefreshNaviPaneL() - { - TUint countOfConnection = iConnectionArray->MdcaCount(); - - CMUILOGGER_WRITE_F( "countOfConnection : %d", countOfConnection ); - - if ( ( iConnectionIndex > countOfConnection ) && // spec. index update - ( countOfConnection == 0 ) ) - { - iConnectionIndex = iConnectionArray-> - GetArrayIndex( - GetSelectedConnectionInfo() - ->GetConnectionId() ); - } - - CMUILOGGER_WRITE_F( "iConnectionIndex : %d", iConnectionIndex ); - - if ( iNaviDecorator ) - { - PopNaviPane(); - } - - if ( iParentView->GetViewRefreshState() ) // connection closed - { - iNaviDecorator = iNaviPane->CreateNavigationLabelL( KNullDesC ); - } - else // connection alive - { - HBufC* textOfNaviPane = NULL; - - CArrayFixFlat* array = new( ELeave ) CArrayFixFlat( 2 ); - CleanupStack::PushL( array ); - - if ( ( countOfConnection == 1 ) && - ( iConnectionIndex + 1 >= countOfConnection ) ) - { - array->AppendL( countOfConnection ); - } - else - { - array->AppendL( countOfConnection ? iConnectionIndex + 1 : 0 ); - } - - array->AppendL( countOfConnection ); - textOfNaviPane = StringLoader::LoadLC( - R_QTN_CMON_NAVI_NOF_CONNECTION, - *array ); - - iNaviDecorator = iNaviPane->CreateNavigationLabelL( - *textOfNaviPane ); - - CleanupStack::PopAndDestroy( textOfNaviPane ); - CleanupStack::PopAndDestroy( array ); - } - - iNaviDecorator->MakeScrollButtonVisible( ETrue ); - - CAknNavigationDecorator::TScrollButton left = CAknNavigationDecorator::ELeftButton; - CAknNavigationDecorator::TScrollButton right = CAknNavigationDecorator::ERightButton; - if ( AknLayoutUtils::LayoutMirrored() ) - { - left = CAknNavigationDecorator::ERightButton; - right = CAknNavigationDecorator::ELeftButton; - } - - if ( iParentView->GetViewRefreshState() ) - { - iNaviDecorator->SetScrollButtonDimmed( left, - ( ( iConnectionIndex == 0 ) || - ( countOfConnection == 0 ) ) ); - } - else - { - iNaviDecorator->SetScrollButtonDimmed( - left, - ( ( iConnectionIndex == 0 ) || - ( countOfConnection == 0 ) || - ( ( countOfConnection == 1 ) && - ( iConnectionIndex + 1 >= - countOfConnection ) ) ) ); - } - - if ( iParentView->GetViewRefreshState() ) - { - iNaviDecorator->SetScrollButtonDimmed( right, - iConnectionIndex >= countOfConnection ); - } - else - { - iNaviDecorator->SetScrollButtonDimmed( right, - iConnectionIndex + 1 >= countOfConnection ); - } - - iNaviDecorator->SetNaviDecoratorObserver( this ); - - iNaviPane->PushL( *iNaviDecorator ); - } - - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::PopNaviPane -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsContainer::PopNaviPane() - { - iNaviPane->Pop( iNaviDecorator ); - delete iNaviDecorator; - iNaviDecorator = NULL; - } - - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::HandleResourceChange -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsContainer::HandleResourceChange( TInt aType ) - { - CCoeControl::HandleResourceChange( aType ); - if ( aType == KEikDynamicLayoutVariantSwitch ) - { - TRect mainPaneRect; - AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, - mainPaneRect ); - SetRect( mainPaneRect ); - DrawNow(); - } - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::FocusChanged -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsContainer::FocusChanged( TDrawNow aDrawNow ) - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsContainer::FocusChanged" ); - CCoeControl::FocusChanged( aDrawNow ); - if ( iListBox ) - { - iListBox->SetFocus( IsFocused() ); - } - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiDetailsContainer::FocusChanged" ); - } - - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::GetIndexOfSelectedItem -// --------------------------------------------------------- -// -TInt CConnectionMonitorUiDetailsContainer::GetIndexOfSelectedItem() - { - CMUILOGGER_WRITE_F( - "CMUIDetailsContainer::GetIndexOfSelectedItem iConnectionIndex: %d", - iConnectionIndex ); - - return iConnectionIndex; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsContainer::GetSelectedConnectionInfo() -// --------------------------------------------------------- -// - CConnectionInfoBase* CConnectionMonitorUiDetailsContainer:: - GetSelectedConnectionInfo() const - { - return iConnectionInfo; - } - - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiDetailsView.cpp --- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiDetailsView.cpp Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,238 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: view class -* -* -*/ - - -// INCLUDE FILES -#include -#include "ConnectionMonitorUiDetailsView.h" -#include "ConnectionMonitorUiDetailsContainer.h" -#include "ConnectionMonitorUi.hrh" -#include "ConnectionArray.h" - -// ================= MEMBER FUNCTIONS ======================= -// --------------------------------------------------------- -// ConnectionMonitorUiDetailsView::ConnectionMonitorUiDetailsView( -// const CConnectionArray* aConnectionArray ) -// --------------------------------------------------------- -// -CConnectionMonitorUiDetailsView::CConnectionMonitorUiDetailsView( - CConnectionArray* const aConnectionArray ) - : CAknView(), - iConnectionArray( aConnectionArray ), - iViewRefreshState( EFalse ) - {} - -// --------------------------------------------------------- -// ConnectionMonitorUiDetailsView::ConstructL() -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsView::ConstructL() - { - BaseConstructL( R_CONNECTIONMONITORUI_DETAILSVIEW ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsView::~CConnectionMonitorUiDetailsView() -// --------------------------------------------------------- -// -CConnectionMonitorUiDetailsView::~CConnectionMonitorUiDetailsView() - { - delete iContainer; - } - -// --------------------------------------------------------- -// TUid CConnectionMonitorUiDetailsView::Id() -// ?implementation_description -// --------------------------------------------------------- -// -TUid CConnectionMonitorUiDetailsView::Id() const - { - return KDetailsViewId; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsView::HandleCommandL( TInt aCommand ) -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsView::HandleCommandL( TInt aCommand ) - { - switch ( aCommand ) - { - case EAknSoftkeyOk: - { - CloseViewL(); - ActivateMainViewL(); - break; - } - default: - { - AppUi()->HandleCommandL( aCommand ); - break; - } - } - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsView::CloseViewL() -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsView::CloseViewL() - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsView::CloseViewL" ); - - if ( GetViewRefreshState() ) - { - // Now delete this view - CConnectionMonitorUiAppUi* appUi = - (CConnectionMonitorUiAppUi*)AppUi(); - appUi->StartTimerL(); - SetViewRefreshState( EFalse ); - } - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiDetailsView::CloseViewL" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsView::SetSelectedConnectionId -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsView::SetSelectedConnection( TUint aIndex ) - { - iConnectionId = aIndex; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsView::GetSelectedConnection -// --------------------------------------------------------- -// -TUint CConnectionMonitorUiDetailsView::GetSelectedConnection() - { - TUint result( KErrNone ); - if ( iContainer ) - { - result = iContainer->GetIndexOfSelectedItem(); - } - return result; - } - - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsView::DoActivateL(...) -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsView::DoActivateL( - const TVwsViewId& /*aPrevViewId*/, TUid /*aCustomMessageId*/, - const TDesC8& /*aCustomMessage*/ ) - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsView::DoActivateL" ); - - if ( !iContainer ) - { - iContainer = new ( ELeave ) CConnectionMonitorUiDetailsContainer( - iConnectionArray ); - iContainer->SetMopParent( this ); - iContainer->ConstructL( ClientRect(), this ); - iContainer->SetSelectedConnectionL( iConnectionId ); - CConnectionMonitorUiAppUi::Static()->StartConnEventNotification( - iContainer ); - iContainer->DrawFirstAllListBoxItem(); - - iContainer->PushAndRefreshNaviPaneL(); - iContainer->MakeVisible( ETrue ); - AppUi()->AddToViewStackL( *this, iContainer ); - } - - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiDetailsView::DoActivateL" ); - - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsView::DoDeactivate -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsView::DoDeactivate() - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiDetailsView::DoDeactivate" ); - - if ( iContainer ) - { - AppUi()->RemoveFromViewStack( *this, iContainer ); - CConnectionMonitorUiAppUi::Static()->StopConnEventNotification( - iContainer ); - iContainer->PopNaviPane(); - iContainer->MakeVisible( EFalse ); - - delete iContainer; - iContainer = NULL; - } - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsView::HandleListBoxEventL -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsView::HandleListBoxEventL( - CEikListBox* /*aListBox*/, - TListBoxEvent aEventType ) - { - switch ( aEventType ) - { - case EEventEnterKeyPressed: - //case EEventItemDoubleClicked: - case EEventItemSingleClicked: - { - AppUi()->ActivateLocalViewL( - TUid::Uid( EConnectionMonitorUiMainViewTab ) ); - } - break; - - default: - break; - } - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsView::GetViewRefreshState -// --------------------------------------------------------- -// -TBool CConnectionMonitorUiDetailsView::GetViewRefreshState() - { - return iViewRefreshState; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsView::SetViewRefreshState -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsView::SetViewRefreshState( - TBool aViewRefreshState ) - { - iViewRefreshState = aViewRefreshState; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiDetailsView::ActivateMainViewL() -// --------------------------------------------------------- -// -void CConnectionMonitorUiDetailsView::ActivateMainViewL() - { - AppUi()->ActivateLocalViewL( TUid::Uid( EConnectionMonitorUiMainViewTab ) ); - } - - -// End of File - diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiDocument.cpp --- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiDocument.cpp Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: application class -* -* -*/ - - -// INCLUDE FILES -#include "ConnectionMonitorUiDocument.h" -#include "ConnectionMonitorUiAppUi.h" - -// ================= MEMBER FUNCTIONS ======================= - -// constructor -CConnectionMonitorUiDocument::CConnectionMonitorUiDocument - ( - CEikApplication& aApp - ) -: CAknDocument(aApp) - { - } - -// destructor -CConnectionMonitorUiDocument::~CConnectionMonitorUiDocument() - { - } - -// EPOC default constructor can leave. -void CConnectionMonitorUiDocument::ConstructL() - { - } - -// Two-phased constructor. -CConnectionMonitorUiDocument* CConnectionMonitorUiDocument::NewL( - CEikApplication& aApp) // CConnectionMonitorUiApp reference - { - CConnectionMonitorUiDocument* myself = - new (ELeave) CConnectionMonitorUiDocument( aApp ); - CleanupStack::PushL( myself ); - myself->ConstructL(); - CleanupStack::Pop( myself ); - - return myself; - } - -// ---------------------------------------------------- -// CConnectionMonitorUiDocument::CreateAppUiL() -// constructs CConnectionMonitorUiAppUi -// ---------------------------------------------------- -// -CEikAppUi* CConnectionMonitorUiDocument::CreateAppUiL() - { - return new (ELeave) CConnectionMonitorUiAppUi; - } - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiView.cpp --- a/connectionmonitoring/connectionmonitorui/src/ConnectionMonitorUiView.cpp Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,421 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: view class -* -* -*/ - - -// INCLUDE FILES -#include -#include //for CAknTitlePane -#include -#include - -#include -#include - - -#include "ConnectionMonitorUiDetailsView.h" -#include "ConnectionMonitorUi.hrh" -#include "ConnectionMonitorUiAppUi.h" -#include "ConnectionMonitorUiView.h" -#include "ConnectionMonitorUiContainer.h" -#include "ConnectionArray.h" -#include "FeatureManagerWrapper.h" - - -// CONSTANTS - -// ================= MEMBER FUNCTIONS ======================= -// --------------------------------------------------------- -// CConnectionMonitorUiView::CConnectionMonitorUiView -// --------------------------------------------------------- -// -#ifdef RD_CONTROL_PANEL -CConnectionMonitorUiView::CConnectionMonitorUiView( - CConnectionArray* const aConnectionArray, - RConnectionMonitor* aMonitor, - TBool aIsEmbedded, - CActiveWrapper* aActiveWrapper ) - : CAknView(), - iConnectionArray( aConnectionArray ), - iMonitor( aMonitor ), - isHelpSupported( EFalse ), - iIsEmbedded( EFalse ), - iActiveWrapper( aActiveWrapper ) - { - iIsEmbedded = aIsEmbedded; - } -#else -CConnectionMonitorUiView::CConnectionMonitorUiView( - CConnectionArray* const aConnectionArray, - RConnectionMonitor* aMonitor, - CActiveWrapper* aActiveWrapper ) - : CAknView(), - iConnectionArray( aConnectionArray ), - iMonitor( aMonitor ), - isHelpSupported( EFalse ), - iActiveWrapper( aActiveWrapper ) - { - } -#endif // RD_CONTROL_PANEL - -// --------------------------------------------------------- -// CConnectionMonitorUiView::ConstructL -// --------------------------------------------------------- -// -void CConnectionMonitorUiView::ConstructL() - { - isHelpSupported = FeatureManager::FeatureSupported( KFeatureIdHelp ); - - TInt actView( NULL ); - -#ifdef RD_CONTROL_PANEL - if ( iIsEmbedded ) - { - actView = R_CP_CONNECTIONMONITORUI_VIEW; - } - else - { - actView = R_CONNECTIONMONITORUI_VIEW; - } -#else - actView = R_CONNECTIONMONITORUI_VIEW; -#endif // RD_CONTROL_PANEL - - BaseConstructL( actView ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiView::~CConnectionMonitorUiView() -// --------------------------------------------------------- -// -CConnectionMonitorUiView::~CConnectionMonitorUiView() - { - delete iContainer; - } - -// --------------------------------------------------------- -// TUid CConnectionMonitorUiView::Id() -// --------------------------------------------------------- -// -TUid CConnectionMonitorUiView::Id() const - { - return KConnectionsViewId; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiView::HandleCommandL( TInt aCommand ) -// --------------------------------------------------------- -// -void CConnectionMonitorUiView::HandleCommandL( TInt aCommand ) - { - switch ( aCommand ) - { - case EAknSoftkeyDetails: - { - if ( IsSelectedConnectionAlive() ) - { - BringupDetailsViewL(); - } - break; - } - case EConnectionMonitorUiCmdAppDetails: - { - BringupDetailsViewL(); - break; - } - case EConnectionMonitorUiCmdAppEndConn: - { - iContainer->EndConnectionL(); - break; - } - case EConnectionMonitorUiCmdAppEndAll: - { - iContainer->EndAllConnectionL(); - break; - } - case EAknCmdHelp: - { - if ( isHelpSupported ) - { - HlpLauncher::LaunchHelpApplicationL( - CEikonEnv::Static()->WsSession(), - CEikonEnv::Static()->EikAppUi()->AppHelpContextL() ); - } - break; - } - default: - { - AppUi()->HandleCommandL( aCommand ); - break; - } - } - } - -// --------------------------------------------------------- -// CConnectionMonitorUiView::DynInitMenuPaneL() -// --------------------------------------------------------- -// -void CConnectionMonitorUiView::DynInitMenuPaneL( TInt aResourceId, - CEikMenuPane* aMenuPane ) - { - MEikMenuObserver::DynInitMenuPaneL( aResourceId, aMenuPane ); - // This is a security measure to prevent menu pane updates when - // the main view is not active. This should not happen but - // just to be safe it is checked. - if ( !iContainer ) - { - return; - } - switch ( aResourceId ) - { - case R_CONNECTIONMONITORUI_VIEW_MENU: - { - if ( !iConnectionArray->MdcaCount() ) - { - aMenuPane->DeleteMenuItem( - EConnectionMonitorUiCmdAppDetails ); - aMenuPane->DeleteMenuItem( - EConnectionMonitorUiCmdAppEndConn ); - aMenuPane->DeleteMenuItem( - EConnectionMonitorUiCmdAppEndAll ); - } - else if ( iConnectionArray->MdcaCount() == 1 ) - { - aMenuPane->DeleteMenuItem( - EConnectionMonitorUiCmdAppEndAll ); - if ( !IsSelectedConnectionAlive() ) - { - aMenuPane->DeleteMenuItem( - EConnectionMonitorUiCmdAppDetails ); - } - else if ( IsSelectedConnectionSuspended() ) - { - aMenuPane->DeleteMenuItem( - EConnectionMonitorUiCmdAppEndConn ); - } - } - else if ( iConnectionArray->NumberOfSuspendedConnections() >= 1 ) - { - aMenuPane->DeleteMenuItem( - EConnectionMonitorUiCmdAppEndAll ); - if ( IsSelectedConnectionSuspended() ) - { - aMenuPane->DeleteMenuItem( - EConnectionMonitorUiCmdAppEndConn ); - } - } - else - { - if ( !IsSelectedConnectionAlive() ) - { - aMenuPane->DeleteMenuItem( - EConnectionMonitorUiCmdAppDetails ); - aMenuPane->DeleteMenuItem( - EConnectionMonitorUiCmdAppEndConn ); - } - } - break; - } - case R_CONNECTIONMONITORUI_APP_MENU: - { - if ( !isHelpSupported ) - { - aMenuPane->DeleteMenuItem( EAknCmdHelp ); - } - break; - } - default: - { - break; - } - } - } - -// --------------------------------------------------------- -// CConnectionMonitorUiView::HandleListBoxEventL -// --------------------------------------------------------- -// -void CConnectionMonitorUiView::HandleListBoxEventL( CEikListBox* /*aListBox*/, - TListBoxEvent aEventType ) - { - switch ( aEventType ) - { - case EEventEnterKeyPressed: - //case EEventItemDoubleClicked: - case EEventItemSingleClicked: - { - if ( IsSelectedConnectionAlive() ) - { - BringupDetailsViewL(); - } - } - break; - default: - break; - } - } - -// --------------------------------------------------------- -// CConnectionMonitorUiView::DoActivateL -// --------------------------------------------------------- -// -void CConnectionMonitorUiView::DoActivateL( - const TVwsViewId& /*aPrevViewId*/, - TUid /*aCustomMessageId*/, - const TDesC8& /*aCustomMessage*/ ) - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiView::DoActivateL" ); - - if ( !iContainer ) - { - iContainer = new( ELeave ) CConnectionMonitorUiContainer( - iConnectionArray, - iMonitor, - iActiveWrapper ); - iContainer->SetMopParent( this ); - - - CConnectionMonitorUiDetailsView* view = - STATIC_CAST( CConnectionMonitorUiDetailsView*, - AppUi()->View( TUid::Uid( EConnectionMonitorUiDetailsViewTab ) ) ); - - TInt index = view->GetSelectedConnection(); - CMUILOGGER_WRITE_F( "index: %d", index ); - - iContainer->ConstructL( index, ClientRect() ); - iContainer->ListBox()->SetListBoxObserver( this ); - - CConnectionMonitorUiAppUi::Static()->StartConnEventNotification( - iContainer ); - iContainer->PushAndRefreshNaviPaneL(); - AppUi()->AddToViewStackL( *this, iContainer ); - ConnectionKeyObserver(); - } - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiView::DoActivateL" ); - - } - -// --------------------------------------------------------- -// CConnectionMonitorUiView::DoDeactivate -// --------------------------------------------------------- -// -void CConnectionMonitorUiView::DoDeactivate() - { - CMUILOGGER_ENTERFN( "CConnectionMonitorUiView::DoDeactivate" ); - - if ( iContainer ) - { - AppUi()->RemoveFromViewStack( *this, iContainer ); - CConnectionMonitorUiAppUi::Static()->StopConnEventNotification( - iContainer ); - iContainer->PopNaviPane(); - delete iContainer; - iContainer = NULL; - } - CMUILOGGER_LEAVEFN( "CConnectionMonitorUiView::DoDeactivate" ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiView::SetTitlePaneTextL -// --------------------------------------------------------- -// -void CConnectionMonitorUiView::SetTitlePaneTextL( TInt aResourceId ) - { - CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); - CAknTitlePane* titlePane = - ( CAknTitlePane* )statusPane->ControlL( - TUid::Uid( EEikStatusPaneUidTitle ) ); - HBufC* text = iEikonEnv->AllocReadResourceLC( aResourceId ); - titlePane->SetTextL( text->Des() ); - CleanupStack::PopAndDestroy( text ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiView::BringupDetailsViewL -// --------------------------------------------------------- -// -void CConnectionMonitorUiView::BringupDetailsViewL() - { - CConnectionMonitorUiDetailsView* view = - STATIC_CAST( CConnectionMonitorUiDetailsView*, - AppUi()->View( TUid::Uid( - EConnectionMonitorUiDetailsViewTab ) ) ); - - TInt selIndex = iContainer->SelectedConnection(); - view->SetSelectedConnection( selIndex ); - AppUi()->ActivateLocalViewL( - TUid::Uid( EConnectionMonitorUiDetailsViewTab ) ); - } - -// --------------------------------------------------------- -// CConnectionMonitorUiView::IsSelectedConnectionAlive -// --------------------------------------------------------- -// -TBool CConnectionMonitorUiView::IsSelectedConnectionAlive() const - { - TInt selIndex = iContainer->SelectedConnection(); - TBool result( EFalse ); - if ( selIndex > -1 ) - { - result = ( *iConnectionArray )[selIndex]->IsAlive(); - } - - return result; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiView::IsSelectedConnectionSuspended -// --------------------------------------------------------- -// -TBool CConnectionMonitorUiView::IsSelectedConnectionSuspended() const - { - TInt selIndex = iContainer->SelectedConnection(); - TBool result( EFalse ); - if ( selIndex > -1 ) - { - result = ( *iConnectionArray )[selIndex]->IsSuspended(); - } - - return result; - } - -// --------------------------------------------------------- -// CConnectionMonitorUiView::ConnectionKeyObserver -// --------------------------------------------------------- -// -void CConnectionMonitorUiView::ConnectionKeyObserver() const - { - if ( !( iConnectionArray->MdcaCount() ) ) - { - Cba()->MakeCommandVisible( EAknSoftkeyDetails,EFalse ); - } - else - { - if ( iConnectionArray->NumberOfActiveConnections() ) - { - Cba()->MakeCommandVisible( EAknSoftkeyDetails,ETrue ); - } - else - { - Cba()->MakeCommandVisible( EAknSoftkeyDetails,EFalse ); - } - } - } - - - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/src/CsdConnectionInfo.cpp --- a/connectionmonitoring/connectionmonitorui/src/CsdConnectionInfo.cpp Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,444 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Represents a connection -* -* -*/ - - -// INCLUDE FILES -//#include -#include -#include -#include -#include - -#include "ConnectionMonitorUiLogger.h" -#include "CsdConnectionInfo.h" -#include "ActiveWrapper.h" - -// CONSTANTS - -LOCAL_D const TUint KDetailsArrayGranularityInternal = 9; -LOCAL_D const TUint KDetailsArrayGranularityExternal = 4; - -// ================= MEMBER FUNCTIONS ======================= -// --------------------------------------------------------- -// CCsdConnectionInfo::NewL -// --------------------------------------------------------- -// -CCsdConnectionInfo* CCsdConnectionInfo::NewL( TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - CActiveWrapper* aActiveWrapper ) - { - CMUILOGGER_WRITE( "NewL, CCsdsConnectionInfo - start " ); - - CCsdConnectionInfo* self = new ( ELeave ) CCsdConnectionInfo( - aConnectionId, - aConnectionMonitor, - aConnectionBearerType, - aActiveWrapper ); - CMUILOGGER_WRITE( "NewL, CCsdsConnectionInfo - created " ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - CMUILOGGER_WRITE( "NewL, CCsdsConnectionInfo - end " ); - return self; - } - - -// --------------------------------------------------------- -// CCsdConnectionInfo::~CCsdConnectionInfo -// --------------------------------------------------------- -// -CCsdConnectionInfo::~CCsdConnectionInfo() - { - } - - -// --------------------------------------------------------- -// CCsdConnectionInfo::CCsdConnectionInfo -// --------------------------------------------------------- -// -CCsdConnectionInfo::CCsdConnectionInfo( TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - CActiveWrapper* aActiveWrapper ) : - CConnectionInfoBase( aConnectionId, - aConnectionMonitor, - aConnectionBearerType, - aActiveWrapper ) - { - CMUILOGGER_WRITE( "CCsdConnectionInfo constuctor" ); - } - - -// --------------------------------------------------------- -// CCsdConnectionInfo::ConstructL -// --------------------------------------------------------- -// -void CCsdConnectionInfo::ConstructL() - { - CMUILOGGER_WRITE( "CCsdConnectionInfo::ConstructL() start" ); - - iActiveWrapper->StartGetStringAttribute( iConnectionId, - iConnectionMonitor, - KTelNumber, - iDialupNumber ); - TInt err( iActiveWrapper->iStatus.Int() ); - CMUILOGGER_WRITE_F( "CCsdConnectionInfo::ConstructL() status: %d", - err ); - if ( err != KErrNone ) - { - User::Leave( err ); - } - - CConnectionInfoBase::ConstructL(); - CMUILOGGER_WRITE( "CCsdConnectionInfo::ConstructL() end" ); - } - - -// --------------------------------------------------------- -// CCsdConnectionInfo::DeepCopyL -// --------------------------------------------------------- -// -CConnectionInfoBase* CCsdConnectionInfo::DeepCopyL() - { - CCsdConnectionInfo* temp = new ( ELeave ) CCsdConnectionInfo( - iConnectionId, - iConnectionMonitor, - iConnectionBearerType, - iActiveWrapper ); - - temp->iConnectionName = iConnectionName; - temp->iConnectionStatus = iConnectionStatus; - temp->iUploaded = iUploaded; - temp->iDownloaded = iDownloaded; - temp->iStartTime = iStartTime; - temp->iDuration = iDuration; - temp->iLastSpeedUpdate = iLastSpeedUpdate; - temp->iUpSpeed = iUpSpeed; - temp->iDownSpeed = iDownSpeed; - temp->iListBoxItemText = iListBoxItemText; - - temp->iDialupNumber = iDialupNumber; - - if ( iDetailsArray ) - { - CleanupStack::PushL( temp ); - temp->ToArrayDetailsL(); - CleanupStack::Pop( temp ); - } - - return temp; - } - - -// --------------------------------------------------------- -// CCsdConnectionInfo::GetIconId -// --------------------------------------------------------- -// -TUint CCsdConnectionInfo::GetIconId() const - { - TUint iconId = ECsd; - if ( ( iConnectionBearerType == EBearerHSCSD ) || - ( iConnectionBearerType == EBearerExternalHSCSD ) ) - { - iconId = EHscsd; - } - return iconId; - } - -// --------------------------------------------------------- -// CCsdConnectionInfo::RefreshDetailsL -// --------------------------------------------------------- -// -void CCsdConnectionInfo::RefreshDetailsL() - { - CMUILOGGER_WRITE( "CCsdConnectionInfo::RefreshDetailsL start" ); - - CMUILOGGER_WRITE_F( "before iConnectionBearerType: %d", - ( TInt )iConnectionBearerType ); - - TConnMonBearerType bearerType; - - iActiveWrapper->StartGetIntAttribute( iConnectionId, - iConnectionMonitor, - KBearer, - ( TInt& )bearerType ); - - if ( !iActiveWrapper->iStatus.Int() ) - { - iConnectionBearerType = bearerType; - } - - CMUILOGGER_WRITE_F( "status.Int(): %d", iActiveWrapper->iStatus.Int() ); - CMUILOGGER_WRITE_F( "bearerType: %d", ( TInt )bearerType ); - CMUILOGGER_WRITE_F( "after iConnectionBearerType: %d", ( TInt )iConnectionBearerType ); - - if ( iConnectionBearerType < EBearerExternalCSD ) - { - RefreshTransferSpeedsL(); - } - RefreshDuration(); - CMUILOGGER_WRITE( "CCsdConnectionInfo::RefreshDetailsL end" ); - } - -// --------------------------------------------------------- -// CCsdConnectionInfo::ToStringDialupNumberLC -// --------------------------------------------------------- -// -HBufC* CCsdConnectionInfo::ToStringDialupNumberLC() const - { - HBufC* dialupNumber = iDialupNumber.AllocLC(); - TPtr temp( dialupNumber->Des() ); - AknTextUtils::DisplayTextLanguageSpecificNumberConversion( temp ); - - return dialupNumber; - } - - -// --------------------------------------------------------- -// CCsdConnectionInfo::RefreshConnectionListBoxItemTextL -// --------------------------------------------------------- -// -void CCsdConnectionInfo::RefreshConnectionListBoxItemTextL() - { - CMUILOGGER_WRITE( - "CCsdConnectionInfo::RefreshConnectionListBoxItemTextL start" ); - - TUint iconId; - HBufC* secondRow = NULL; - - iconId = GetIconId(); - - if ( iConnectionStatus == EConnectionCreated ) - { - secondRow = ToStringDurationLC(); - } - else // if connection has not created yet gives back the status of its. - { - secondRow = ToStringStatusLC( EFalse ); - } - - iListBoxItemText.Format( KConnectonListItemTextFormat, iconId, - &iConnectionName, secondRow ); - CleanupStack::PopAndDestroy( secondRow ); - CMUILOGGER_WRITE( - "CCsdConnectionInfo::RefreshConnectionListBoxItemTextL end" ); - } - - -// --------------------------------------------------------- -// CCsdConnectionInfo::RefreshDetailsArrayL -// --------------------------------------------------------- -// -void CCsdConnectionInfo::RefreshDetailsArrayL() - { - CMUILOGGER_WRITE( "CCsdConnectionInfo::RefreshDetailsArrayL start" ); - if ( iDetailsArray ) - { - TBool internal = iConnectionBearerType < EBearerExternalCSD ; - HBufC* temp = NULL; - - if ( internal ) - { - temp = ToStringStatusLC(); - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_STATUS, - temp, 2 ); - - ToDetailsListBoxItemTextWithReplaceL - ( - R_QTN_CMON_HEADING_DATA_TOTAL, - ToStringTotalTransmittedDataLC(), - 3 - ); - - ToDetailsListBoxItemTextWithReplaceL - ( - R_QTN_CMON_HEADING_DATA_RECEIVED, - ToStringReceivedDataLC(), - 4 - ); - - ToDetailsListBoxItemTextWithReplaceL - ( - R_QTN_CMON_HEADING_DATA_SENT, - ToStringSentDataLC(), - 5 - ); - - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DURATION, - ToStringDurationLC(), 6 ); - - ToDetailsListBoxItemTextWithReplaceL - ( - R_QTN_CMON_HEADING_SPEED, - ToStringTransferSpeedDownLC(), - 7 - ); - - ToDetailsListBoxItemTextWithReplaceL - ( - 0, - ToStringTransferSpeedUpLC(), - 8 - ); - - CleanupStack::PopAndDestroy( 7, temp ); // ToString...LC() - - TInt sharing = RefreshAppNamesL(); - - if ( sharing > 1 ) - { - if ( iDetailsArray->Count() > 10 ) - { - iDetailsArray->Delete( 10, - iDetailsArray->Count() - 10 ); - iDetailsArray->Compress(); - } - - for ( TInt i = 0; i < sharing; i++ ) - { - if ( i == 0 ) - { - ToDetailsListBoxItemTextWithAppendL( - R_QTN_CMON_HEADING_SHARING_INFO, - ToStringAppNameLC( i ) ); - } - else - { - ToDetailsListBoxItemTextWithAppendL( 0, - ToStringAppNameLC( i ) ); - } - } - CleanupStack::PopAndDestroy( sharing ); - // ToStringAppNameLC() - } - else - { - if ( iDetailsArray->Count() > 10 ) - { - iDetailsArray->Delete( 10, iDetailsArray->Count() - 10 ); - iDetailsArray->Compress(); - } - } - } - else - { - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DURATION, - ToStringDurationLC(), 2 ); - CleanupStack::PopAndDestroy( 1 ); // ToStringDurationLC() - } - } - CMUILOGGER_WRITE( "CCsdConnectionInfo::RefreshDetailsArrayL end" ); - } - - -// --------------------------------------------------------- -// CCsdConnectionInfo::ToArrayDetailsL -// --------------------------------------------------------- -// -void CCsdConnectionInfo::ToArrayDetailsL() - { - CMUILOGGER_ENTERFN("CCsdConnectionInfo::ToArrayDetailsL"); - TBool internal = iConnectionBearerType < EBearerExternalCSD ; - TUint granularity = KDetailsArrayGranularityExternal; - HBufC* temp = NULL; - - if ( internal ) - { - granularity = KDetailsArrayGranularityInternal; - } - delete iDetailsArray; - iDetailsArray = NULL; - iDetailsArray = new ( ELeave ) CDesCArrayFlat( granularity ); - - temp = iConnectionName.AllocLC(); - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_CONN_NAME, - temp ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_BEARER, - ToStringBearerLC() ); - CleanupStack::PopAndDestroy( 2, temp ); // ToString...LC() - - - if ( internal ) - { - temp = ToStringStatusLC(); - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_STATUS, - temp ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_TOTAL, - ToStringTotalTransmittedDataLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_RECEIVED, - ToStringReceivedDataLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_SENT, - ToStringSentDataLC() ); - CleanupStack::PopAndDestroy( 4, temp ); // ToString...LC() - } - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DURATION, - ToStringDurationLC() ); - CleanupStack::PopAndDestroy( 1 ); // ToStringDurationLC() - - if ( internal ) - { - temp = ToStringTransferSpeedDownLC(); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_SPEED, - temp ); - - ToDetailsListBoxItemTextWithAppendL( 0, - ToStringTransferSpeedUpLC() ); - CleanupStack::PopAndDestroy( 2, temp ); // ToString...LC() - } - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_CSD_NUMBER, - ToStringDialupNumberLC() ); - CleanupStack::PopAndDestroy( 1 ); // ToStringDialupNumberLC() - - if ( internal ) - { - TInt sharing = RefreshAppNamesL(); - - if ( sharing > 1 ) - { - for ( TInt i = 0; i < sharing; i++ ) - { - if ( i == 0 ) - { - ToDetailsListBoxItemTextWithAppendL( - R_QTN_CMON_HEADING_SHARING_INFO, - ToStringAppNameLC( i ) ); - } - else - { - ToDetailsListBoxItemTextWithAppendL( 0, - ToStringAppNameLC( i ) ); - } - } - CleanupStack::PopAndDestroy( sharing ); - // ToStringAppNameLC() - } - } - CMUILOGGER_LEAVEFN("CCsdConnectionInfo::ToArrayDetailsL"); - } - - - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/src/EasyWLANConnectionInfo.cpp --- a/connectionmonitoring/connectionmonitorui/src/EasyWLANConnectionInfo.cpp Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,371 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Represents a WLAN connection -* -* -*/ - - -// INCLUDE FILES -#include -#include - -#include "EasyWLANConnectionInfo.h" -#include "ConnectionArray.h" -#include - -#include "ConnectionMonitorUiLogger.h" - - -// CONSTANTS -/** -* Count of details of WLAN connection -*/ -LOCAL_D const TUint KMaxNumOfListBoxItems = 14; - - -// ================= MEMBER FUNCTIONS ======================= -// --------------------------------------------------------- -// CEasyWlanConnectionInfo::NewL -// --------------------------------------------------------- -// -CEasyWlanConnectionInfo* CEasyWlanConnectionInfo::NewL( TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - CActiveWrapper* aActiveWrapper ) - { - CMUILOGGER_ENTERFN( - "CEasyWlanConnectionInfo* CEasyWlanConnectionInfo::NewL" ); - CEasyWlanConnectionInfo* self = new ( ELeave ) CEasyWlanConnectionInfo( - aConnectionId, - aConnectionMonitor, - aConnectionBearerType, - aActiveWrapper ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - CMUILOGGER_LEAVEFN( - "CEasyWlanConnectionInfo* CEasyWlanConnectionInfo::NewL" ); - return self; - } - -// --------------------------------------------------------- -// CEasyWlanConnectionInfo::CEasyWlanConnectionInfo -// --------------------------------------------------------- -// -CEasyWlanConnectionInfo::CEasyWlanConnectionInfo( TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - CActiveWrapper* aActiveWrapper ) - : CWlanConnectionInfo( aConnectionId, - aConnectionMonitor, - aConnectionBearerType, - aActiveWrapper ) - { - iEasyWlan= ETrue; - } - -// --------------------------------------------------------- -// CEasyWlanConnectionInfo::ConstructL -// --------------------------------------------------------- -// -void CEasyWlanConnectionInfo::ConstructL() - { - CMUILOGGER_ENTERFN( "void CEasyWlanConnectionInfo::ConstructL()" ); - - CWlanConnectionInfo::ConstructL(); - - CMUILOGGER_LEAVEFN( "void CEasyWlanConnectionInfo::ConstructL()" ); - } - - -// --------------------------------------------------------- -// CEasyWlanConnectionInfo::~CEasyWlanConnectionInfo -// --------------------------------------------------------- -// -CEasyWlanConnectionInfo::~CEasyWlanConnectionInfo() - { - } - -// --------------------------------------------------------- -// CEasyWlanConnectionInfo::DeepCopyL -// --------------------------------------------------------- -// -CConnectionInfoBase* CEasyWlanConnectionInfo::DeepCopyL() - { - CEasyWlanConnectionInfo* temp = new ( ELeave ) CEasyWlanConnectionInfo( - iConnectionId, - iConnectionMonitor, - iConnectionBearerType, - iActiveWrapper ); - - temp->iConnectionName = iConnectionName; - temp->iConnectionStatus = iConnectionStatus; - temp->iUploaded = iUploaded; - temp->iDownloaded = iDownloaded; - temp->iStartTime = iStartTime; - temp->iDuration = iDuration; - temp->iLastSpeedUpdate = iLastSpeedUpdate; - temp->iUpSpeed = iUpSpeed; - temp->iDownSpeed = iDownSpeed; - temp->iListBoxItemText = iListBoxItemText; - - temp->iWlanNetworkName = iWlanNetworkName; - temp->iSignalStrength = iSignalStrength; - temp->iNetworkMode = iNetworkMode; - temp->iSecurityMode = iSecurityMode; - temp->iTxPower = iTxPower; - - if ( iDetailsArray ) - { - CleanupStack::PushL( temp ); - temp->ToArrayDetailsL(); - CleanupStack::Pop( temp ); - } - - return temp; - } - -// --------------------------------------------------------- -// CEasyWlanConnectionInfo::ToArrayDetailsL -// --------------------------------------------------------- -// -void CEasyWlanConnectionInfo::ToArrayDetailsL() - { - CMUILOGGER_ENTERFN( "void CEasyWlanConnectionInfo::ToArrayDetailsL()" ); - - HBufC* temp = NULL; - delete iDetailsArray; - iDetailsArray = NULL; - - iDetailsArray = new ( ELeave ) CDesCArrayFlat - ( KMaxNumOfListBoxItems ); - - temp = ToStringBearerLC(); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_BEARER, - temp ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_STATUS, - ToStringStatusLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_WLAN_NETWORK_NAME, - GetWlanNetworkNameLC() ); - - ToDetailsListBoxItemTextWithAppendL - ( - R_QTN_CMON_HEADING_WLAN_SIGNAL_STRENGTH, - ToStringSignalStrengthLC() - ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_WLAN_NETWORK_MODE, - ToStringNetworkModeLC() ); - - ToDetailsListBoxItemTextWithAppendL - ( - R_QTN_CMON_HEADING_WLAN_SECURITY_MODE, - ToStringSecurityModeLC() - ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_WLAN_TX_POWER, - ToStringTxPowerLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_TOTAL, - ToStringTotalTransmittedDataLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_RECEIVED, - ToStringReceivedDataLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_SENT, - ToStringSentDataLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DURATION, - ToStringDurationLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_SPEED, - ToStringTransferSpeedDownLC() ); - - ToDetailsListBoxItemTextWithAppendL( 0, - ToStringTransferSpeedUpLC() ); - - CleanupStack::PopAndDestroy - ( - KMaxNumOfListBoxItems - 1, - temp - ); - - CMUILOGGER_WRITE_F( "KMaxNumOfListBoxItems + cCXSupported : %d", - KMaxNumOfListBoxItems ); - - TInt sharing = RefreshAppNamesL(); - - if ( sharing > 1 ) - { - for ( TInt i = 0; i < ( sharing ); i++ ) - { - if ( i == 0 ) - { - ToDetailsListBoxItemTextWithAppendL( - R_QTN_CMON_HEADING_SHARING_INFO, - ToStringAppNameLC( i ) ); - } - else - { - ToDetailsListBoxItemTextWithAppendL( 0, - ToStringAppNameLC( i ) ); - } - } - CleanupStack::PopAndDestroy( sharing ); // ToStringAppNameLC() - } - - CMUILOGGER_LEAVEFN( "void CEasyWlanConnectionInfo::ToArrayDetailsL()" ); - } - -// --------------------------------------------------------- -// CEasyWlanConnectionInfo::RefreshDetailsArrayL -// --------------------------------------------------------- -// -void CEasyWlanConnectionInfo::RefreshDetailsArrayL() - { - CMUILOGGER_ENTERFN( "CEasyWlanConnectionInfo::RefreshDetailsArrayL()" ); - - HBufC* temp = NULL; - - temp = ToStringStatusLC(); - - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_STATUS, - temp, 1 ); - - ToDetailsListBoxItemTextWithReplaceL - ( - R_QTN_CMON_HEADING_WLAN_SIGNAL_STRENGTH, - ToStringSignalStrengthLC(), - 3 - ); - - ToDetailsListBoxItemTextWithReplaceL - ( - R_QTN_CMON_HEADING_WLAN_TX_POWER, - ToStringTxPowerLC(), - 6 - ); - - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DATA_TOTAL, - ToStringTotalTransmittedDataLC(), - 7 ); - - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DATA_RECEIVED, - ToStringReceivedDataLC(), - 8 ); - - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DATA_SENT, - ToStringSentDataLC(), - 9 ); - - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DURATION, - ToStringDurationLC(), - 10 ); - - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_SPEED, - ToStringTransferSpeedDownLC(), - 11 ); - - ToDetailsListBoxItemTextWithReplaceL( 0, - ToStringTransferSpeedUpLC(), - 12 ); - - CleanupStack::PopAndDestroy( 9, temp ); - - TInt count = iDetailsArray->Count(); - TInt realElementsMaxCount = KMaxNumOfListBoxItems; - - CMUILOGGER_WRITE_F( "count : %d", count ); - CMUILOGGER_WRITE_F( "realElementsMaxCount : %d", - realElementsMaxCount ); - - TInt sharing = RefreshAppNamesL(); - - if ( sharing > 1 ) - { - if ( count >= realElementsMaxCount ) - { - iDetailsArray->Delete( realElementsMaxCount - 1, - iDetailsArray->Count() - 13 ); - iDetailsArray->Compress(); - } - - for ( TInt i = 0; i < sharing; i++ ) - { - if ( i == 0 ) - { - ToDetailsListBoxItemTextWithAppendL( - R_QTN_CMON_HEADING_SHARING_INFO, - ToStringAppNameLC( i ) ); - } - else - { - ToDetailsListBoxItemTextWithAppendL( 0, - ToStringAppNameLC( i ) ); - } - } - CleanupStack::PopAndDestroy( sharing ); // ToStringAppNameLC() - } - else - { - if ( count >= realElementsMaxCount ) - { - iDetailsArray->Delete( realElementsMaxCount - 1, - iDetailsArray->Count() - 13 ); - iDetailsArray->Compress(); - } - } - - CMUILOGGER_LEAVEFN( - "void CEasyWlanConnectionInfo::RefreshDetailsArrayL()" ); - } - -// --------------------------------------------------------- -// CEasyWlanConnectionInfo::RefreshConnectionListBoxItemTextL -// --------------------------------------------------------- -// -void CEasyWlanConnectionInfo::RefreshConnectionListBoxItemTextL() - { - CMUILOGGER_ENTERFN( - "void CEasyWlanConnectionInfo::RefreshConnectionListBoxItemTextL()" ); - - TUint iconId; - HBufC* secondRow = NULL; - - iconId = GetIconId(); - - if ( iConnectionStatus == EConnectionCreated ) - { - secondRow = ToStringDurationLC(); - } - else // if connection has not created yet gives back the status of its. - { - secondRow = ToStringStatusLC( EFalse ); - } - - iListBoxItemText.Format( KConnectonListItemTextFormat, iconId, - &iWlanNetworkName, secondRow ); - CleanupStack::PopAndDestroy( secondRow ); - - CMUILOGGER_LEAVEFN( - "void CEasyWlanConnectionInfo::RefreshConnectionListBoxItemTextL()" ); - } - - - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/src/FeatureManagerWrapper.cpp --- a/connectionmonitoring/connectionmonitorui/src/FeatureManagerWrapper.cpp Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of CFeatureManagerWrapper. -* -*/ - - -// INCLUDE FILES -#include "FeatureManagerWrapper.h" - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CFeatureManagerWrapper::CFeatureManagerWrapper -// --------------------------------------------------------- -// -CFeatureManagerWrapper::CFeatureManagerWrapper() : CBase() - { - } - -// --------------------------------------------------------- -// CFeatureManagerWrapper::~CFeatureManagerWrapper -// --------------------------------------------------------- -// -CFeatureManagerWrapper::~CFeatureManagerWrapper() - { - if ( iIsFeatureMgrInitialized ) - { - FeatureManager::UnInitializeLib(); - } - } - -// --------------------------------------------------------- -// CFeatureManagerWrapper::ConstructL -// --------------------------------------------------------- -// -void CFeatureManagerWrapper::ConstructL() - { - FeatureManager::InitializeLibL(); - iIsFeatureMgrInitialized = ETrue ; - } - -// --------------------------------------------------------- -// CFeatureManagerWrapper::NewL -// --------------------------------------------------------- -// -CFeatureManagerWrapper* CFeatureManagerWrapper::NewL() - { - CFeatureManagerWrapper* self = new ( ELeave ) CFeatureManagerWrapper; - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop( self ); - - return self; - } - -//End of file. - diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/src/GprsConnectionInfo.cpp --- a/connectionmonitoring/connectionmonitorui/src/GprsConnectionInfo.cpp Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,426 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Represents a GPRS connection -* -* -*/ - - -// INCLUDE FILES -//#include -#include -#include -#include -//#include - -#include "ConnectionMonitorUiLogger.h" -#include "GprsConnectionInfo.h" -#include "ActiveWrapper.h" - -// CONSTANTS -LOCAL_D const TUint KDetailsArrayGranularityInternal = 11; -LOCAL_D const TUint KDetailsArrayGranularityExternal = 10; - - -// ================= MEMBER FUNCTIONS ======================= -// --------------------------------------------------------- -// CGprsConnectionInfo::NewL -// --------------------------------------------------------- -// -CGprsConnectionInfo* CGprsConnectionInfo::NewL( TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - CActiveWrapper* aActiveWrapper ) - { - CGprsConnectionInfo* self = new ( ELeave ) CGprsConnectionInfo( - aConnectionId, - aConnectionMonitor, - aConnectionBearerType, - aActiveWrapper ); - CleanupStack::PushL( self ); - self->ConstructL(); // Have to call this ConstructL at first, - CleanupStack::Pop( self ); - CMUILOGGER_WRITE( "NewL, CGprsConnectionInfo" ); - return self; - } - - -// --------------------------------------------------------- -// CGprsConnectionInfo::~CGprsConnectionInfo -// --------------------------------------------------------- -// -CGprsConnectionInfo::~CGprsConnectionInfo() - { - } - - -// --------------------------------------------------------- -// CGprsConnectionInfo::CGprsConnectionInfo -// --------------------------------------------------------- -// -CGprsConnectionInfo::CGprsConnectionInfo( TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - CActiveWrapper* aActiveWrapper ) : - CConnectionInfoBase( aConnectionId, - aConnectionMonitor, - aConnectionBearerType, - aActiveWrapper ) - { - CMUILOGGER_WRITE( "CGprsConnectionInfo constuctor" ); - } - - -// --------------------------------------------------------- -// CGprsConnectionInfo::ConstructL -// --------------------------------------------------------- -// -void CGprsConnectionInfo::ConstructL() - { - CMUILOGGER_ENTERFN( "CGprsConnectionInfo::ConstructL() start" ); - - iActiveWrapper->StartGetStringAttribute( iConnectionId, - iConnectionMonitor, - KAccessPointName, - iApName ); -#ifdef __WINS__ - iApName = _L( "LAN" ); -#else - TInt err( iActiveWrapper->iStatus.Int() ); - CMUILOGGER_WRITE_F( "CGprsConnectionInfo::ConstructL status: %d", err ); - if ( err != KErrNone ) - { - User::Leave( err ); - } -#endif - CMUILOGGER_WRITE_F( "iApName Connection name: %S", &iApName ); - - CConnectionInfoBase::ConstructL(); // and base class ConstructL next. - CMUILOGGER_WRITE( "CGprsConnectionInfo::ConstructL() end" ); - } - -// --------------------------------------------------------- -// CGprsConnectionInfo::DeepCopyL -// --------------------------------------------------------- -// -CConnectionInfoBase* CGprsConnectionInfo::DeepCopyL() - { - CGprsConnectionInfo* temp = new ( ELeave ) CGprsConnectionInfo( - iConnectionId, - iConnectionMonitor, - iConnectionBearerType, - iActiveWrapper ); - - temp->iConnectionName = iConnectionName; - temp->iConnectionStatus = iConnectionStatus; - temp->iUploaded = iUploaded; - temp->iDownloaded = iDownloaded; - temp->iStartTime = iStartTime; - temp->iDuration = iDuration; - temp->iLastSpeedUpdate = iLastSpeedUpdate; - temp->iUpSpeed = iUpSpeed; - temp->iDownSpeed = iDownSpeed; - temp->iListBoxItemText = iListBoxItemText; - - temp->iApName = iApName; - - if ( iDetailsArray ) - { - CleanupStack::PushL( temp ); - temp->ToArrayDetailsL(); - CleanupStack::Pop( temp ); - } - - return temp; - } - - -// --------------------------------------------------------- -// CGprsConnectionInfo::GetIconId -// --------------------------------------------------------- -// -TUint CGprsConnectionInfo::GetIconId() const - { - TUint iconId = EGprs; - if ( iConnectionStatus == EConnectionSuspended ) - { - iconId = ESuspended; - } - return iconId; - } - -// --------------------------------------------------------- -// CGprsConnectionInfo::RefreshDetailsL -// --------------------------------------------------------- -// -void CGprsConnectionInfo::RefreshDetailsL() - { - CMUILOGGER_WRITE( "CGprsConnectionInfo::RefreshDetailsL start" ); - - iActiveWrapper->StartGetStringAttribute( iConnectionId, - iConnectionMonitor, - KAccessPointName, - iApName ); -#ifdef __WINS__ - iActiveWrapper->Cancel(); - iApName = _L( "LAN" ); -#else - TInt err( iActiveWrapper->iStatus.Int() ); - CMUILOGGER_WRITE_F( "CGprsConnectionInfo::RefreshDetailsL status: %d", - err ); - if ( err != KErrNone ) - { - User::Leave( err ); - } -#endif - CMUILOGGER_WRITE_F( "iApName Connection name: %S", &iApName ); - - RefreshTransferSpeedsL(); - RefreshDuration(); - CMUILOGGER_WRITE( "CGprsConnectionInfo::RefreshDetailsL end" ); - } - -// --------------------------------------------------------- -// CGprsConnectionInfo::ToStringApNameLC -// --------------------------------------------------------- -// -HBufC* CGprsConnectionInfo::ToStringApNameLC() const - { - HBufC* apName = iApName.AllocLC(); - return apName; - } - - -// --------------------------------------------------------- -// CGprsConnectionInfo::RefreshConnectionListBoxItemTextL -// --------------------------------------------------------- -// -void CGprsConnectionInfo::RefreshConnectionListBoxItemTextL() - { - CMUILOGGER_WRITE( - "CGprsConnectionInfo::RefreshConnectionListBoxItemTextL start" ); - - TUint iconId; - HBufC* secondRow = NULL; - - iconId = GetIconId(); - - if ( iConnectionStatus == EConnectionCreated ) - { - CDesCArrayFlat* array = new (ELeave) CDesCArrayFlat(2); - CleanupStack::PushL( array ); - - HBufC* stringReceivedData = ToStringReceivedDataLC( ETrue ); - HBufC* stringSentData = ToStringSentDataLC( ETrue ); - - StringMarkerRemoval( stringReceivedData ); - StringMarkerRemoval( stringSentData ); - - array->AppendL( *stringReceivedData ); - array->AppendL( *stringSentData ); - - secondRow = StringLoader::LoadL( R_QTN_CMON_UL_DL_DATA_AMOUNTS, - *array ); - - CleanupStack::PopAndDestroy( stringSentData ); - CleanupStack::PopAndDestroy( stringReceivedData ); - CleanupStack::PopAndDestroy( array ); - } - else // if connection has not created yet gives back the status of its. - { - secondRow = ToStringStatusLC( EFalse ); - CleanupStack::Pop( secondRow ); - } - - iListBoxItemText.Format( KConnectonListItemTextFormat, iconId, - &iConnectionName, secondRow ); - delete secondRow; - CMUILOGGER_WRITE( - "CGprsConnectionInfo::RefreshConnectionListBoxItemTextL end" ); - } - -// --------------------------------------------------------- -// CGprsConnectionInfo::RefreshDetailsArrayL -// --------------------------------------------------------- -// -void CGprsConnectionInfo::RefreshDetailsArrayL() - { - CMUILOGGER_WRITE( "CGprsConnectionInfo::RefreshDetailsArrayL start" ); - if ( iDetailsArray ) - { - TBool internal = iConnectionBearerType < EBearerExternalCSD ; - HBufC* temp = NULL; - - temp = ToStringStatusLC(); - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_STATUS, - temp, 2 ); - - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DATA_TOTAL, - ToStringTotalTransmittedDataLC(), - 3 ); - ToDetailsListBoxItemTextWithReplaceL - ( - R_QTN_CMON_HEADING_DATA_RECEIVED, - ToStringReceivedDataLC(), - 4 - ); - - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DATA_SENT, - ToStringSentDataLC(), 5 ); - - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DURATION, - ToStringDurationLC(), 6 ); - - ToDetailsListBoxItemTextWithReplaceL - ( - R_QTN_CMON_HEADING_SPEED, - ToStringTransferSpeedDownLC(), - 7 - ); - - ToDetailsListBoxItemTextWithReplaceL - ( - 0, - ToStringTransferSpeedUpLC(), - 8 - ); - - CleanupStack::PopAndDestroy( 7, temp ); // ToString...LC() - - if ( internal ) - { - TInt sharing = RefreshAppNamesL(); - - if ( sharing > 1 ) - { - if ( iDetailsArray->Count() > 10 ) - { - iDetailsArray->Delete( 10, - iDetailsArray->Count() - 10 ); - iDetailsArray->Compress(); - } - - for ( TInt i = 0; i < sharing; i++ ) - { - if ( i == 0 ) - { - ToDetailsListBoxItemTextWithAppendL( - R_QTN_CMON_HEADING_SHARING_INFO, - ToStringAppNameLC( i ) ); - } - else - { - ToDetailsListBoxItemTextWithAppendL( 0, - ToStringAppNameLC( i ) ); - } - } - CleanupStack::PopAndDestroy( sharing ); - // ToStringAppNameLC() - } - else - { - if ( iDetailsArray->Count() > 10 ) - { - iDetailsArray->Delete( 10, iDetailsArray->Count() - 10 ); - iDetailsArray->Compress(); - } - } - } - } - CMUILOGGER_WRITE( "CGprsConnectionInfo::RefreshDetailsArrayL end" ); - } - - -// --------------------------------------------------------- -// CGprsConnectionInfo::ToArrayDetailsL -// --------------------------------------------------------- -// -void CGprsConnectionInfo::ToArrayDetailsL() - { - CMUILOGGER_ENTERFN("CGprsConnectionInfo::ToArrayDetailsL"); - TBool internal = iConnectionBearerType < EBearerExternalCSD ; - TUint granularity = KDetailsArrayGranularityExternal; - HBufC* temp = NULL; - - - if ( internal ) - { - granularity = KDetailsArrayGranularityInternal; - } - delete iDetailsArray; - iDetailsArray = NULL; - iDetailsArray = new ( ELeave ) CDesCArrayFlat( granularity ); - - temp = iConnectionName.AllocLC(); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_CONN_NAME, - temp ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_BEARER, - ToStringBearerLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_STATUS, - ToStringStatusLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_TOTAL, - ToStringTotalTransmittedDataLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_RECEIVED, - ToStringReceivedDataLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_SENT, - ToStringSentDataLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DURATION, - ToStringDurationLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_SPEED, - ToStringTransferSpeedDownLC() ); - - ToDetailsListBoxItemTextWithAppendL( 0, - ToStringTransferSpeedUpLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_GPRS_APN, - ToStringApNameLC() ); - CleanupStack::PopAndDestroy( 10, temp ); // ToString...LC() - - if ( internal ) - { - TInt sharing = RefreshAppNamesL(); - - if ( sharing > 1 ) - { - for ( TInt i = 0; i < sharing; i++ ) - { - if ( i == 0 ) - { - ToDetailsListBoxItemTextWithAppendL( - R_QTN_CMON_HEADING_SHARING_INFO, - ToStringAppNameLC( i ) ); - } - else - { - ToDetailsListBoxItemTextWithAppendL( 0, - ToStringAppNameLC( i ) ); - } - } - CleanupStack::PopAndDestroy( sharing ); - // ToStringAppNameLC() - } - } - CMUILOGGER_LEAVEFN("CGprsConnectionInfo::ToArrayDetailsL"); - } - - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connectionmonitorui/src/WlanConnectionInfo.cpp --- a/connectionmonitoring/connectionmonitorui/src/WlanConnectionInfo.cpp Wed Aug 18 10:10:23 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,851 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Represents a WLAN connection -* -* -*/ - - -// INCLUDE FILES -#include -#include - -#include "ConnectionArray.h" -#include "WlanConnectionInfo.h" -#include "EasyWLANConnectionInfo.h" -#include "ActiveWrapper.h" - -#include - -#include "ConnectionMonitorUiLogger.h" - -// CONSTANTS - -/** -* Count of details of WLAN connection -*/ -LOCAL_D const TUint KDetailsArrayMaxGranularityCCX = 15; - -// ================= MEMBER FUNCTIONS ======================= -// --------------------------------------------------------- -// CWlanConnectionInfo::NewL -// --------------------------------------------------------- -// -CWlanConnectionInfo* CWlanConnectionInfo::NewL( TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - const HBufC* aEasyWlanIAPName, - CActiveWrapper* aActiveWrapper ) - { - CMUILOGGER_ENTERFN( "CWlanConnectionInfo* CWlanConnectionInfo::NewL" ); - - CWlanConnectionInfo* self = new ( ELeave ) CWlanConnectionInfo( - aConnectionId, - aConnectionMonitor, - aConnectionBearerType, - aActiveWrapper ); - CleanupStack::PushL( self ); - self->ConstructL(); - - if ( aEasyWlanIAPName ) - { - if ( self->iConnectionName.Compare( *aEasyWlanIAPName ) ) - { - CleanupStack::Pop( self ); - } - else - { - CEasyWlanConnectionInfo* temp = CEasyWlanConnectionInfo::NewL( - aConnectionId, - aConnectionMonitor, - aConnectionBearerType, - aActiveWrapper ); - CleanupStack::PopAndDestroy( self ); - self = temp; - } - } - else - { - CleanupStack::Pop( self ); - } - - - - CMUILOGGER_LEAVEFN( "CWlanConnectionInfo* CWlanConnectionInfo::NewL" ); - - return self; - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::CWlanConnectionInfo -// --------------------------------------------------------- -// -CWlanConnectionInfo::CWlanConnectionInfo( TInt aConnectionId, - RConnectionMonitor* const aConnectionMonitor, - TConnMonBearerType aConnectionBearerType, - CActiveWrapper* aActiveWrapper ) - : CConnectionInfoBase( aConnectionId, - aConnectionMonitor, - aConnectionBearerType, - aActiveWrapper ), iEasyWlan( EFalse ) - { - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::ConstructL -// --------------------------------------------------------- -// -void CWlanConnectionInfo::ConstructL() - { - CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::ConstructL()" ); - - RefreshNetworkNameL(); - RefreshSignalStrength(); - RefreshSecurityMode(); - RefreshNetworkMode(); - RefreshTxPowerL(); - - CConnectionInfoBase::ConstructL(); // and base class ConstructL next. - - CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::ConstructL()" ); - } - - -// --------------------------------------------------------- -// CWlanConnectionInfo::~CWlanConnectionInfo -// --------------------------------------------------------- -// -CWlanConnectionInfo::~CWlanConnectionInfo() - { - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::DeepCopyL -// --------------------------------------------------------- -// -CConnectionInfoBase* CWlanConnectionInfo::DeepCopyL() - { - CWlanConnectionInfo* temp = new ( ELeave ) CWlanConnectionInfo( - iConnectionId, - iConnectionMonitor, - iConnectionBearerType, - iActiveWrapper ); - - temp->iConnectionName = iConnectionName; - temp->iConnectionStatus = iConnectionStatus; - temp->iUploaded = iUploaded; - temp->iDownloaded = iDownloaded; - temp->iStartTime = iStartTime; - temp->iDuration = iDuration; - temp->iLastSpeedUpdate = iLastSpeedUpdate; - temp->iUpSpeed = iUpSpeed; - temp->iDownSpeed = iDownSpeed; - temp->iListBoxItemText = iListBoxItemText; - - temp->iWlanNetworkName = iWlanNetworkName; - temp->iSignalStrength = iSignalStrength; - temp->iNetworkMode = iNetworkMode; - temp->iSecurityMode = iSecurityMode; - temp->iTxPower = iTxPower; - - if ( iDetailsArray ) - { - CleanupStack::PushL( temp ); - temp->ToArrayDetailsL(); - CleanupStack::Pop( temp ); - } - - return temp; - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::GetIconId -// --------------------------------------------------------- -// -TUint CWlanConnectionInfo::GetIconId() const - { - CMUILOGGER_ENTERFN( "TUint CWlanConnectionInfo::GetIconId() const" ); - - TUint iconId = EWlan; - - CMUILOGGER_LEAVEFN( "TUint CWlanConnectionInfo::GetIconId() const" ); - - return iconId; - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::IsEasyWLAN -// --------------------------------------------------------- -// -TBool CWlanConnectionInfo::IsEasyWLAN() const - { - return iEasyWlan; - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::GetWlanNetworkNameLC -// --------------------------------------------------------- -// -HBufC* CWlanConnectionInfo::GetWlanNetworkNameLC() const - { - CMUILOGGER_ENTERFN( "CWlanConnectionInfo::GetWlanNetworkNameLC()" ); - - HBufC* name = iWlanNetworkName.AllocLC(); - - CMUILOGGER_LEAVEFN( "CWlanConnectionInfo::GetWlanNetworkNameLC()" ); - - return name; - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::GetWlanSignalStrength -// --------------------------------------------------------- -// -TWlanSignalStrength CWlanConnectionInfo::GetWlanSignalStrength() const - { - return iSignalStrength; - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::GetWlanNetworkMode -// --------------------------------------------------------- -// -TWlanNetworkMode CWlanConnectionInfo::GetWlanNetworkMode() const - { - return iNetworkMode; - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::GetWlanSecurityMode -// --------------------------------------------------------- -// -TWlanSecurityMode CWlanConnectionInfo::GetWlanSecurityMode() const - { - return iSecurityMode; - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::GetWlanTxPower -// --------------------------------------------------------- -// -TUint CWlanConnectionInfo::GetWlanTxPower() const - { - return iTxPower; - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::RefreshDetailsL -// --------------------------------------------------------- -// -void CWlanConnectionInfo::RefreshDetailsL() - { - CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::RefreshDetailsL()" ); - - if ( IsAlive() ) - { - RefreshNetworkNameL(); - } - - if ( IsAlive() ) - { - RefreshNetworkMode(); - } - - if ( IsAlive() ) - { - RefreshSecurityMode(); - } - - if ( IsAlive() ) - { - RefreshTransferSpeedsL(); - } - - if ( IsAlive() ) - { - RefreshDuration(); - } - - if ( IsAlive() ) - { - RefreshSignalStrength(); - } - - if ( IsAlive() ) - { - RefreshTxPowerL(); - } - - CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::RefreshDetailsL()" ); - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::RefreshNetworkNameL -// --------------------------------------------------------- -// -void CWlanConnectionInfo::RefreshNetworkNameL() - { - CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::RefreshNetworkNameL()" ); - - iActiveWrapper->StartGetStringAttribute( iConnectionId, - iConnectionMonitor, - KNetworkName, - iWlanNetworkName ); - - CMUILOGGER_WRITE_F( "RefreshNetworkName status : %d", - iActiveWrapper->iStatus.Int() ); - - if ( iActiveWrapper->iStatus.Int() ) - { - if ( KErrNotFound == iActiveWrapper->iStatus.Int() ) - { - iConnectionStatus = EConnectionClosed; - } - HBufC* temp = StringLoader::LoadL( R_QTN_CMON_PARAMETER_UNAVAILABLE ); - iWlanNetworkName = *temp; - delete temp; - } - - CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::RefreshNetworkNameL()" ); - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::RefreshSignalStrength -// --------------------------------------------------------- -// -void CWlanConnectionInfo::RefreshSignalStrength() - { - CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::RefreshSignalStrength()" ); - - iActiveWrapper->StartGetIntAttribute( iConnectionId, - iConnectionMonitor, - KSignalStrength, - ( TInt& )iSignalStrength ); - - CMUILOGGER_WRITE_F( "RefreshSignalStrengthL status : %d", - iActiveWrapper->iStatus.Int() ); - CMUILOGGER_WRITE_F( "iSignalStrength : %d", ( TInt )iSignalStrength ); - - if ( iActiveWrapper->iStatus.Int() ) - { - if ( KErrNotFound == iActiveWrapper->iStatus.Int() ) - { - iConnectionStatus = EConnectionClosed; - } - iSignalStrength = EWlanSignalUnavailable; - } - - CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::RefreshSignalStrength()" ); - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::RefreshSecurityMode -// --------------------------------------------------------- -// -void CWlanConnectionInfo::RefreshSecurityMode() - { - CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::RefreshSecurityMode()" ); - - iActiveWrapper->StartGetIntAttribute( iConnectionId, - iConnectionMonitor, - KSecurityMode, - ( TInt& )iSecurityMode ); - - CMUILOGGER_WRITE_F( "RefreshSecurityMode status: %d", - iActiveWrapper->iStatus.Int() ); - - if ( iActiveWrapper->iStatus.Int() ) - { - if ( KErrNotFound == iActiveWrapper->iStatus.Int() ) - { - iConnectionStatus = EConnectionClosed; - } - iSecurityMode = EWlanSecurityModeUnavailable; - } - - CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::RefreshSecurityMode()" ); - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::RefreshNetworkMode -// --------------------------------------------------------- -// -void CWlanConnectionInfo::RefreshNetworkMode() - { - CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::RefreshNetworkMode()" ); - - iActiveWrapper->StartGetIntAttribute( iConnectionId, - iConnectionMonitor, - KNetworkMode, - ( TInt& )iNetworkMode ); - - CMUILOGGER_WRITE_F( "RefreshNetworkMode status : %d", - iActiveWrapper->iStatus.Int() ); - - if ( iActiveWrapper->iStatus.Int() ) - { - if ( KErrNotFound == iActiveWrapper->iStatus.Int() ) - { - iConnectionStatus = EConnectionClosed; - } - iNetworkMode = EWlanNetworkModeUnavailable; - } - - CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::RefreshNetworkMode()" ); - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::RefreshTxPowerL -// --------------------------------------------------------- -// -void CWlanConnectionInfo::RefreshTxPowerL() - { - CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::RefreshTxPowerL()" ); - - iActiveWrapper->StartGetUintAttribute( iConnectionId, - iConnectionMonitor, - KTransmitPower, - iTxPower ); - - if ( iActiveWrapper->iStatus.Int() ) - { - if ( KErrNotFound == iActiveWrapper->iStatus.Int() ) - { - iConnectionStatus = EConnectionClosed; - } - iSignalStrength = EWlanSignalUnavailable; - } - - CMUILOGGER_WRITE_F( "iTxPower : %d", iTxPower ); - TInt err( iActiveWrapper->iStatus.Int() ); - CMUILOGGER_WRITE_F( "RefreshTxPowerL status: %d", err ); - - CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::RefreshTxPowerL()" ); - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::ToStringSignalStrengthLC -// --------------------------------------------------------- -// -HBufC* CWlanConnectionInfo::ToStringSignalStrengthLC() const - { - CMUILOGGER_ENTERFN( "CWlanConnectionInfo::ToStringSignalStrengthLC()" ); - - HBufC* signalStrength = NULL; - TInt resourceId( 0 ); - - if ( iSignalStrength == EWlanSignalUnavailable ) - { - resourceId = R_QTN_CMON_WLAN_SIGNAL_STRENGTH_NO_SIGNAL; - signalStrength = StringLoader::LoadLC( resourceId ); - } - else if ( iSignalStrength < EWlanSignalStrengthGood ) - { - resourceId = R_QTN_CMON_WLAN_SINGAL_STRENGTH_GOOD; - } - else if ( iSignalStrength > EWlanSignalStrengthLow ) - { - resourceId = R_QTN_CMON_WLAN_SINGAL_STRENGTH_LOW; - } - else - { - resourceId = R_QTN_CMON_WLAN_SINGAL_STRENGTH_MEDIUM; - } - - TInt signalInPercent( 0 ); - if ( iSignalStrength <= EWlanSignalStrengthMax ) - { - signalInPercent = 100; - } - else if ( iSignalStrength >= EWlanSignalStrengthMin ) - { - signalInPercent = 0; - } - else - { - TInt diff = EWlanSignalStrengthMin - iSignalStrength; - signalInPercent = diff * 100 / KDiffOfWlanSignalStrength; - } - - if ( !signalStrength ) // there is connection to network - { - CMUILOGGER_WRITE_F( "signalInPercent : %d", signalInPercent ); - - signalStrength = StringLoader::LoadLC( resourceId, - signalInPercent ); - } - - CMUILOGGER_LEAVEFN( "CWlanConnectionInfo::ToStringSignalStrengthLC()" ); - - return signalStrength; - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::ToStringNetworkModeLC -// --------------------------------------------------------- -// -HBufC* CWlanConnectionInfo::ToStringNetworkModeLC() const - { - CMUILOGGER_ENTERFN( "CWlanConnectionInfo::ToStringNetworkModeLC()" ); - - HBufC* networkMode = NULL; - TInt resourceId( 0 ); - - switch ( iNetworkMode ) - { - case EWlanNetworkModeInfrastructure: - case EWlanNetworkModeSecInfrastructure: - { - resourceId = R_QTN_CMON_WLAN_NEWTWORK_MODE_INFRA; - break; - } - case EWlanNetworkModeAdHoc: - { - resourceId = R_QTN_CMON_WLAN_NEWTWORK_MODE_ADHOC; - break; - } - case EWlanNetworkModeUnavailable: - default: - { - resourceId = R_QTN_CMON_PARAMETER_UNAVAILABLE; - break; - } - } - - networkMode = StringLoader::LoadLC( resourceId ); - - CMUILOGGER_LEAVEFN( "CWlanConnectionInfo::ToStringNetworkModeLC()" ); - - return networkMode; - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::ToStringSecurityModeLC -// --------------------------------------------------------- -// -HBufC* CWlanConnectionInfo::ToStringSecurityModeLC() const - { - CMUILOGGER_ENTERFN( "CWlanConnectionInfo::ToStringSecurityModeLC()" ); - - HBufC* securityMode = NULL; - TInt resourceId( 0 ); - - switch ( iSecurityMode ) - { - case EWlanSecurityModeOpenNetwork: - { - resourceId = R_QTN_CMON_WLAN_SECURITY_MODE_OPEN; - break; - } - case EWlanSecurityModeWEP: - { - resourceId = R_QTN_CMON_WLAN_SECURITY_MODE_WEP; - break; - } - case EWlanSecurityMode8021x: - { - resourceId = R_QTN_CMON_WLAN_SECURITY_MODE_802_1X; - break; - } - case EWlanSecurityModeWPA: - { - resourceId = R_QTN_CMON_WLAN_SECURITY_MODE_WPA; - break; - } - case EWlanSecurityWpaPsk: - { - resourceId = R_QTN_CMON_WLAN_SECURITY_MODE_WPA; - break; - } - case EWlanSecurityModeUnavailable: - default: - { - resourceId = R_QTN_CMON_PARAMETER_UNAVAILABLE; - break; - } - } - - securityMode = StringLoader::LoadLC( resourceId ); - - CMUILOGGER_LEAVEFN( "CWlanConnectionInfo::ToStringSecurityModeLC()" ); - - return securityMode; - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::ToStringTxPowerLC -// --------------------------------------------------------- -// -HBufC* CWlanConnectionInfo::ToStringTxPowerLC() const - { - CMUILOGGER_ENTERFN( "CWlanConnectionInfo::ToStringTxPowerLC()" ); - - HBufC* txPower = StringLoader::LoadLC( R_QTN_CMON_WLAN_TX_POWER_LEVEL, - iTxPower ); - - CMUILOGGER_LEAVEFN( "CWlanConnectionInfo::ToStringTxPowerLC()" ); - - return txPower; - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::ToArrayDetailsL -// --------------------------------------------------------- -// -void CWlanConnectionInfo::ToArrayDetailsL() - { - CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::ToArrayDetailsL()" ); - - HBufC* temp = NULL; - delete iDetailsArray; - iDetailsArray = NULL; - iDetailsArray = new ( ELeave ) CDesCArrayFlat - ( KDetailsArrayMaxGranularityCCX ); - - temp = iConnectionName.AllocLC(); - - ToDetailsListBoxItemTextWithAppendL - ( - R_QTN_CMON_HEADING_CONN_NAME, - temp ); - - ToDetailsListBoxItemTextWithAppendL - ( - R_QTN_CMON_HEADING_BEARER, - ToStringBearerLC() - ); - - ToDetailsListBoxItemTextWithAppendL - ( - R_QTN_CMON_HEADING_STATUS, - ToStringStatusLC() - ); - - ToDetailsListBoxItemTextWithAppendL - ( - R_QTN_CMON_HEADING_WLAN_NETWORK_NAME, - GetWlanNetworkNameLC() - ); - - ToDetailsListBoxItemTextWithAppendL - ( - R_QTN_CMON_HEADING_WLAN_SIGNAL_STRENGTH, - ToStringSignalStrengthLC() - ); - - ToDetailsListBoxItemTextWithAppendL - ( - R_QTN_CMON_HEADING_WLAN_NETWORK_MODE, - ToStringNetworkModeLC() - ); - - ToDetailsListBoxItemTextWithAppendL - ( - R_QTN_CMON_HEADING_WLAN_SECURITY_MODE, - ToStringSecurityModeLC() - ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_WLAN_TX_POWER, - ToStringTxPowerLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_TOTAL, - ToStringTotalTransmittedDataLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_RECEIVED, - ToStringReceivedDataLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DATA_SENT, - ToStringSentDataLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_DURATION, - ToStringDurationLC() ); - - ToDetailsListBoxItemTextWithAppendL( R_QTN_CMON_HEADING_SPEED, - ToStringTransferSpeedDownLC() ); - - ToDetailsListBoxItemTextWithAppendL( 0, - ToStringTransferSpeedUpLC() ); - - - CleanupStack::PopAndDestroy - ( - KDetailsArrayMaxGranularityCCX - 1, - temp ); - - TInt sharing = RefreshAppNamesL(); - - if ( sharing > 1 ) - { - for ( TInt i = 0; i < sharing; i++ ) - { - if ( i == 0 ) - { - ToDetailsListBoxItemTextWithAppendL( - R_QTN_CMON_HEADING_SHARING_INFO, - ToStringAppNameLC( i ) ); - } - else - { - ToDetailsListBoxItemTextWithAppendL( 0, - ToStringAppNameLC( i ) ); - } - } - CleanupStack::PopAndDestroy( sharing ); // ToStringAppNameLC() - } - - CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::ToArrayDetailsL()" ); - } - -// --------------------------------------------------------- -// CWlanConnectionInfo::RefreshDetailsArrayL -// --------------------------------------------------------- -// -void CWlanConnectionInfo::RefreshDetailsArrayL() - { - CMUILOGGER_ENTERFN( "void CWlanConnectionInfo::RefreshDetailsArrayL()" ); - - HBufC* temp = NULL; - - temp = ToStringStatusLC(); - - ToDetailsListBoxItemTextWithReplaceL - ( - R_QTN_CMON_HEADING_STATUS, - temp, - 2 - ); - - ToDetailsListBoxItemTextWithReplaceL - ( - R_QTN_CMON_HEADING_WLAN_SIGNAL_STRENGTH, - ToStringSignalStrengthLC(), - 4 - ); - - ToDetailsListBoxItemTextWithReplaceL - ( - R_QTN_CMON_HEADING_WLAN_TX_POWER, - ToStringTxPowerLC(), - 7 - ); - - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DATA_TOTAL, - ToStringTotalTransmittedDataLC(), - 8 ); - - - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DATA_RECEIVED, - ToStringReceivedDataLC(), - 9 ); - - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DATA_SENT, - ToStringSentDataLC(), - 10 ); - - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_DURATION, - ToStringDurationLC(), - 11 ); - - ToDetailsListBoxItemTextWithReplaceL( R_QTN_CMON_HEADING_SPEED, - ToStringTransferSpeedDownLC(), - 12 ); - - ToDetailsListBoxItemTextWithReplaceL( 0, - ToStringTransferSpeedUpLC(), - 13 ); - - CleanupStack::PopAndDestroy( 9, temp ); - - - TInt count = iDetailsArray->Count(); - TInt realElementsMaxCount = KDetailsArrayMaxGranularityCCX; - - CMUILOGGER_WRITE_F( "count : %d", count ); - CMUILOGGER_WRITE_F( "realElementsMaxCount : %d", realElementsMaxCount ); - - TInt sharing = RefreshAppNamesL(); - - if ( sharing > 1 ) - { - if ( count >= realElementsMaxCount ) // 15 - { - iDetailsArray->Delete( realElementsMaxCount - 1, - iDetailsArray->Count() - 14 ); - iDetailsArray->Compress(); - } - - for ( TInt i = 0; i < sharing; i++ ) - { - if ( i == 0 ) - { - ToDetailsListBoxItemTextWithAppendL( - R_QTN_CMON_HEADING_SHARING_INFO, - ToStringAppNameLC( i ) ); - } - else - { - ToDetailsListBoxItemTextWithAppendL( 0, - ToStringAppNameLC( i ) ); - } - } - CleanupStack::PopAndDestroy( sharing ); // ToStringAppNameLC() - } - else - { - if ( count >= realElementsMaxCount ) - { - iDetailsArray->Delete( realElementsMaxCount - 1, - iDetailsArray->Count() - 14 ); - iDetailsArray->Compress(); - } - } - - CMUILOGGER_LEAVEFN( "void CWlanConnectionInfo::RefreshDetailsArrayL()" ); - } - - -// --------------------------------------------------------- -// CWlanConnectionInfo::RefreshConnectionListBoxItemTextL -// --------------------------------------------------------- -// -void CWlanConnectionInfo::RefreshConnectionListBoxItemTextL() - { - CMUILOGGER_ENTERFN( - "void CWlanConnectionInfo::RefreshConnectionListBoxItemTextL()" ); - - TUint iconId; - HBufC* secondRow = NULL; - - iconId = GetIconId(); - - if ( iConnectionStatus == EConnectionCreated ) - { - secondRow = ToStringDurationLC(); - } - else // if connection has not created yet gives back the status of itself. - { - secondRow = ToStringStatusLC( EFalse ); - } - - iListBoxItemText.Format( KConnectonListItemTextFormat, iconId, - &iConnectionName, secondRow ); - CleanupStack::PopAndDestroy( secondRow ); - - CMUILOGGER_LEAVEFN( - "void CWlanConnectionInfo::RefreshConnectionListBoxItemTextL()" ); - } - - - -// End of File diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connmon/connectionmonitor/src/connmoncommsdatcache.cpp --- a/connectionmonitoring/connmon/connectionmonitor/src/connmoncommsdatcache.cpp Wed Aug 18 10:10:23 2010 +0300 +++ b/connectionmonitoring/connmon/connectionmonitor/src/connmoncommsdatcache.cpp Thu Sep 02 20:50:05 2010 +0300 @@ -524,7 +524,9 @@ TInt err( KErrNone ); TBool availabilityEventsEnabled( EFalse ); - if ( ( aBearerId == EBearerIdAll ) || ( aBearerId == EBearerIdVirtualVPN ) ) + if ( ( aBearerId == EBearerIdAll ) || + ( aBearerId == EBearerIdVirtualVPN ) || + ( aBearerId == EBearerIdWLAN ) ) { // If WLAN background scanning is on, and client is asking IAP // availability for all- or virtual IAPs, send IAP availability changed diff -r 4af712113915 -r a9c709db68db connectionmonitoring/connmon/dataconnectionlogger/inc/dclevent.h --- a/connectionmonitoring/connmon/dataconnectionlogger/inc/dclevent.h Wed Aug 18 10:10:23 2010 +0300 +++ b/connectionmonitoring/connmon/dataconnectionlogger/inc/dclevent.h Thu Sep 02 20:50:05 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2003-2004 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -11,14 +11,13 @@ * * Contributors: * -* Description: Data Connection Logger. -* +* Description: +* Data Connection Logger. */ #ifndef DCLEVENT_H #define DCLEVENT_H -#include #include #include diff -r 4af712113915 -r a9c709db68db connectionmonitoring/group/bld.inf --- a/connectionmonitoring/group/bld.inf Wed Aug 18 10:10:23 2010 +0300 +++ b/connectionmonitoring/group/bld.inf Thu Sep 02 20:50:05 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -11,9 +11,8 @@ * * Contributors: * -* Description: Build information file for all projects in connectionmonitoring -* subsystem. -* +* Description: +* Build information file for all projects in connectionmonitoring subsystem. */ PRJ_PLATFORMS @@ -22,7 +21,6 @@ PRJ_EXPORTS PRJ_MMPFILES -#include "../connectionmonitorui/group/bld.inf" #include "../connmon/connectionmonitor/group/bld.inf" #include "../connmon/dataconnectionlogger/group/bld.inf" #include "../connmonext/group/bld.inf" diff -r 4af712113915 -r a9c709db68db connectionutilities/confirmqueries/confirmqueries.pro --- a/connectionutilities/confirmqueries/confirmqueries.pro Wed Aug 18 10:10:23 2010 +0300 +++ b/connectionutilities/confirmqueries/confirmqueries.pro Thu Sep 02 20:50:05 2010 +0300 @@ -45,4 +45,8 @@ } TRANSLATIONS = cellularpromptdialog.ts -RESOURCES += res/promptdialog.qrc \ No newline at end of file +RESOURCES += res/promptdialog.qrc + +DOCML += \ + res/prompt_home.docml \ + res/prompt_abroad.docml \ No newline at end of file diff -r 4af712113915 -r a9c709db68db connectionutilities/confirmqueries/res/promptdialog.qrc --- a/connectionutilities/confirmqueries/res/promptdialog.qrc Wed Aug 18 10:10:23 2010 +0300 +++ b/connectionutilities/confirmqueries/res/promptdialog.qrc Thu Sep 02 20:50:05 2010 +0300 @@ -1,6 +1,6 @@ - prompt_home.docml - prompt_abroad.docml + prompt_home.docml.bin + prompt_abroad.docml.bin \ No newline at end of file diff -r 4af712113915 -r a9c709db68db data/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/bld.inf Thu Sep 02 20:50:05 2010 +0300 @@ -0,0 +1,26 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Build info for ipconnmgmt package. +* +*/ + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS +// Export CommsDat to emulator +cccccc00_emulator.cre /epoc32/winscw/c/private/10202be9/persists/cccccc00.cre + +// Export default configuration options +../inc/meshpreface1.cfg /epoc32/release/winscw/udeb/z/system/data/meshpreface1.cfg diff -r 4af712113915 -r a9c709db68db dbcreator/commsdatcreator/Src/cdcreaderxml.cpp --- a/dbcreator/commsdatcreator/Src/cdcreaderxml.cpp Wed Aug 18 10:10:23 2010 +0300 +++ b/dbcreator/commsdatcreator/Src/cdcreaderxml.cpp Thu Sep 02 20:50:05 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -11,12 +11,9 @@ * * Contributors: * -* Description: Implementation of the class CReaderXML -* +* Description: +* Implementation of the class CReaderXML */ - - - // INCLUDE FILES @@ -1207,310 +1204,310 @@ _LIT16( sp5, "\'" ); ReplaceInString( aPtrTag, spXML5, sp5 ); _LIT16( spXML6, "¡" ); - _LIT16( sp6, "¡" ); + _LIT16( sp6, "\u00a1" ); ReplaceInString( aPtrTag, spXML6, sp6 ); _LIT16( spXML7, "¢" ); - _LIT16( sp7, "¢" ); + _LIT16( sp7, "\u00a2" ); ReplaceInString( aPtrTag, spXML7, sp7 ); _LIT16( spXML8, "£" ); - _LIT16( sp8, "£" ); + _LIT16( sp8, "\u00a3" ); ReplaceInString( aPtrTag, spXML8, sp8 ); _LIT16( spXML9, "¤" ); - _LIT16( sp9, "¤" ); + _LIT16( sp9, "\u00a4" ); ReplaceInString( aPtrTag, spXML9, sp9 ); _LIT16( spXML10, "¥" ); - _LIT16( sp10, "¥" ); + _LIT16( sp10, "\u00a5" ); ReplaceInString( aPtrTag, spXML10, sp10 ); _LIT16( spXML11, "¦" ); - _LIT16( sp11, "¦" ); + _LIT16( sp11, "\u00a6" ); ReplaceInString( aPtrTag, spXML11, sp11 ); _LIT16( spXML12, "§" ); - _LIT16( sp12, "§" ); + _LIT16( sp12, "\u00a7" ); ReplaceInString( aPtrTag, spXML12, sp12 ); _LIT16( spXML13, "¨" ); - _LIT16( sp13, "¨" ); + _LIT16( sp13, "\u00a8" ); ReplaceInString( aPtrTag, spXML13, sp13 ); _LIT16( spXML14, "©" ); - _LIT16( sp14, "©" ); + _LIT16( sp14, "\u00a9" ); ReplaceInString( aPtrTag, spXML14, sp14 ); _LIT16( spXML15, "ª" ); - _LIT16( sp15, "ª" ); + _LIT16( sp15, "\u00aa" ); ReplaceInString( aPtrTag, spXML15, sp15 ); _LIT16( spXML16, "«" ); - _LIT16( sp16, "«" ); + _LIT16( sp16, "\u00ab" ); ReplaceInString( aPtrTag, spXML16, sp16 ); _LIT16( spXML17, "¬" ); - _LIT16( sp17, "¬" ); + _LIT16( sp17, "\u00ac" ); ReplaceInString( aPtrTag, spXML17, sp17 ); _LIT16( spXML18, "®" ); - _LIT16( sp18, "®" ); + _LIT16( sp18, "\u00ae" ); ReplaceInString( aPtrTag, spXML18, sp18 ); _LIT16( spXML19, "¯" ); - _LIT16( sp19, "¯" ); + _LIT16( sp19, "\u00af" ); ReplaceInString( aPtrTag, spXML19, sp19 ); _LIT16( spXML20, "°" ); - _LIT16( sp20, "°" ); + _LIT16( sp20, "\u00b0" ); ReplaceInString( aPtrTag, spXML20, sp20 ); _LIT16( spXML21, "±" ); - _LIT16( sp21, "±" ); + _LIT16( sp21, "\u00b1" ); ReplaceInString( aPtrTag, spXML21, sp21 ); _LIT16( spXML22, "²" ); - _LIT16( sp22, "²" ); + _LIT16( sp22, "\u00b2" ); ReplaceInString( aPtrTag, spXML22, sp22 ); _LIT16( spXML23, "³" ); - _LIT16( sp23, "³" ); + _LIT16( sp23, "\u00b3" ); ReplaceInString( aPtrTag, spXML23, sp23 ); _LIT16( spXML24, "´" ); - _LIT16( sp24, "´" ); + _LIT16( sp24, "\u00b4" ); ReplaceInString( aPtrTag, spXML24, sp24 ); _LIT16( spXML25, "µ" ); - _LIT16( sp25, "µ" ); + _LIT16( sp25, "\u00b5" ); ReplaceInString( aPtrTag, spXML25, sp25 ); _LIT16( spXML26, "¶" ); - _LIT16( sp26, "¶" ); + _LIT16( sp26, "\u00b6" ); ReplaceInString( aPtrTag, spXML26, sp26 ); _LIT16( spXML27, "·" ); - _LIT16( sp27, "·" ); + _LIT16( sp27, "\u00b7" ); ReplaceInString( aPtrTag, spXML27, sp27 ); _LIT16( spXML28, "¸" ); - _LIT16( sp28, "¸" ); + _LIT16( sp28, "\u00b8" ); ReplaceInString( aPtrTag, spXML28, sp28 ); _LIT16( spXML29, "¹" ); - _LIT16( sp29, "¹" ); + _LIT16( sp29, "\u00b9" ); ReplaceInString( aPtrTag, spXML29, sp29 ); _LIT16( spXML30, "º" ); - _LIT16( sp30, "º" ); + _LIT16( sp30, "\u00ba" ); ReplaceInString( aPtrTag, spXML30, sp30 ); _LIT16( spXML31, "»" ); - _LIT16( sp31, "»" ); + _LIT16( sp31, "\u00bb" ); ReplaceInString( aPtrTag, spXML31, sp31 ); _LIT16( spXML32, "¼" ); - _LIT16( sp32, "¼" ); + _LIT16( sp32, "\u00bc" ); ReplaceInString( aPtrTag, spXML32, sp32 ); _LIT16( spXML33, "½" ); - _LIT16( sp33, "½" ); + _LIT16( sp33, "\u00bd" ); ReplaceInString( aPtrTag, spXML33, sp33 ); _LIT16( spXML34, "¾" ); - _LIT16( sp34, "¾" ); + _LIT16( sp34, "\u00be" ); ReplaceInString( aPtrTag, spXML34, sp34 ); _LIT16( spXML35, "¿" ); - _LIT16( sp35, "¿" ); + _LIT16( sp35, "\u00bf" ); ReplaceInString( aPtrTag, spXML35, sp35 ); _LIT16( spXML36, "À" ); - _LIT16( sp36, "À" ); + _LIT16( sp36, "\u00c0" ); ReplaceInString( aPtrTag, spXML36, sp36 ); _LIT16( spXML37, "Á" ); - _LIT16( sp37, "Á" ); + _LIT16( sp37, "\u00c1" ); ReplaceInString( aPtrTag, spXML37, sp37 ); _LIT16( spXML38, "Â" ); - _LIT16( sp38, "Â" ); + _LIT16( sp38, "\u00c2" ); ReplaceInString( aPtrTag, spXML38, sp38 ); _LIT16( spXML39, "Ã" ); - _LIT16( sp39, "Ã" ); + _LIT16( sp39, "\u00c3" ); ReplaceInString( aPtrTag, spXML39, sp39 ); _LIT16( spXML40, "Ä" ); - _LIT16( sp40, "Ä" ); + _LIT16( sp40, "\u00c4" ); ReplaceInString( aPtrTag, spXML40, sp40 ); _LIT16( spXML41, "Å" ); - _LIT16( sp41, "Å" ); + _LIT16( sp41, "\u00c5" ); ReplaceInString( aPtrTag, spXML41, sp41 ); _LIT16( spXML42, "Æ" ); - _LIT16( sp42, "Æ" ); + _LIT16( sp42, "\u00c6" ); ReplaceInString( aPtrTag, spXML42, sp42 ); _LIT16( spXML43, "Ç" ); - _LIT16( sp43, "Ç" ); + _LIT16( sp43, "\u00c7" ); ReplaceInString( aPtrTag, spXML43, sp43 ); _LIT16( spXML44, "È" ); - _LIT16( sp44, "È" ); + _LIT16( sp44, "\u00c8" ); ReplaceInString( aPtrTag, spXML44, sp44 ); _LIT16( spXML45, "É" ); - _LIT16( sp45, "É" ); + _LIT16( sp45, "\u00c9" ); ReplaceInString( aPtrTag, spXML45, sp45 ); _LIT16( spXML46, "Ê" ); - _LIT16( sp46, "Ê" ); + _LIT16( sp46, "\u00ca" ); ReplaceInString( aPtrTag, spXML46, sp46 ); _LIT16( spXML47, "Ë" ); - _LIT16( sp47, "Ë" ); + _LIT16( sp47, "\u00cb" ); ReplaceInString( aPtrTag, spXML47, sp47 ); _LIT16( spXML48, "Ì" ); - _LIT16( sp48, "Ì" ); + _LIT16( sp48, "\u00cc" ); ReplaceInString( aPtrTag, spXML48, sp48 ); _LIT16( spXML49, "Í" ); - _LIT16( sp49, "Í" ); + _LIT16( sp49, "\u00cd" ); ReplaceInString( aPtrTag, spXML49, sp49 ); _LIT16( spXML50, "Î" ); - _LIT16( sp50, "Î" ); + _LIT16( sp50, "\u00ce" ); ReplaceInString( aPtrTag, spXML50, sp50 ); _LIT16( spXML51, "Ï" ); - _LIT16( sp51, "Ï" ); + _LIT16( sp51, "\u00cf" ); ReplaceInString( aPtrTag, spXML51, sp51 ); _LIT16( spXML52, "Ð" ); - _LIT16( sp52, "Ð" ); + _LIT16( sp52, "\u00d0" ); ReplaceInString( aPtrTag, spXML52, sp52 ); _LIT16( spXML53, "Ñ" ); - _LIT16( sp53, "Ñ" ); + _LIT16( sp53, "\u00d1" ); ReplaceInString( aPtrTag, spXML53, sp53 ); _LIT16( spXML54, "Ò" ); - _LIT16( sp54, "Ò" ); + _LIT16( sp54, "\u00d2" ); ReplaceInString( aPtrTag, spXML54, sp54 ); _LIT16( spXML55, "Ó" ); - _LIT16( sp55, "Ó" ); + _LIT16( sp55, "\u00d3" ); ReplaceInString( aPtrTag, spXML55, sp55 ); _LIT16( spXML56, "Ô" ); - _LIT16( sp56, "Ô" ); + _LIT16( sp56, "\u00d4" ); ReplaceInString( aPtrTag, spXML56, sp56 ); _LIT16( spXML57, "Õ" ); - _LIT16( sp57, "Õ" ); + _LIT16( sp57, "\u00d5" ); ReplaceInString( aPtrTag, spXML57, sp57 ); _LIT16( spXML58, "Ö" ); - _LIT16( sp58, "Ö" ); + _LIT16( sp58, "\u00d6" ); ReplaceInString( aPtrTag, spXML58, sp58 ); _LIT16( spXML59, "×" ); - _LIT16( sp59, "×" ); + _LIT16( sp59, "\u00d7" ); ReplaceInString( aPtrTag, spXML59, sp59 ); _LIT16( spXML60, "Ø" ); - _LIT16( sp60, "Ø" ); + _LIT16( sp60, "\u00d8" ); ReplaceInString( aPtrTag, spXML60, sp60 ); _LIT16( spXML61, "Ù" ); - _LIT16( sp61, "Ù" ); + _LIT16( sp61, "\u00d9" ); ReplaceInString( aPtrTag, spXML61, sp61 ); _LIT16( spXML62, "Ú" ); - _LIT16( sp62, "Ú" ); + _LIT16( sp62, "\u00da" ); ReplaceInString( aPtrTag, spXML62, sp62 ); _LIT16( spXML63, "Û" ); - _LIT16( sp63, "Û" ); + _LIT16( sp63, "\u00db" ); ReplaceInString( aPtrTag, spXML63, sp63 ); _LIT16( spXML64, "Ü" ); - _LIT16( sp64, "Ü" ); + _LIT16( sp64, "\u00dc" ); ReplaceInString( aPtrTag, spXML64, sp64 ); _LIT16( spXML65, "Ý" ); - _LIT16( sp65, "Ý" ); + _LIT16( sp65, "\u00dd" ); ReplaceInString( aPtrTag, spXML65, sp65 ); _LIT16( spXML66, "Þ" ); - _LIT16( sp66, "Þ" ); + _LIT16( sp66, "\u00de" ); ReplaceInString( aPtrTag, spXML66, sp66 ); _LIT16( spXML67, "ß" ); - _LIT16( sp67, "ß" ); + _LIT16( sp67, "\u00df" ); ReplaceInString( aPtrTag, spXML67, sp67 ); _LIT16( spXML68, "à" ); - _LIT16( sp68, "à" ); + _LIT16( sp68, "\u00e0" ); ReplaceInString( aPtrTag, spXML68, sp68 ); _LIT16( spXML69, "á" ); - _LIT16( sp69, "á" ); + _LIT16( sp69, "\u00e1" ); ReplaceInString( aPtrTag, spXML69, sp69 ); _LIT16( spXML70, "â" ); - _LIT16( sp70, "â" ); + _LIT16( sp70, "\u00e2" ); ReplaceInString( aPtrTag, spXML70, sp70 ); _LIT16( spXML71, "ã" ); - _LIT16( sp71, "ã" ); + _LIT16( sp71, "\u00e3" ); ReplaceInString( aPtrTag, spXML71, sp71 ); _LIT16( spXML72, "ä"); - _LIT16( sp72, "ä" ); + _LIT16( sp72, "\u00e4" ); ReplaceInString( aPtrTag, spXML72, sp72 ); _LIT16( spXML73, "å" ); - _LIT16( sp73, "å" ); + _LIT16( sp73, "\u00e5" ); ReplaceInString( aPtrTag, spXML73, sp73 ); _LIT16( spXML74, "æ" ); - _LIT16( sp74, "æ" ); + _LIT16( sp74, "\u00e6" ); ReplaceInString( aPtrTag, spXML74, sp74 ); _LIT16( spXML75, "&acedil;" ); - _LIT16( sp75, "ç" ); + _LIT16( sp75, "\u00e7" ); ReplaceInString( aPtrTag, spXML75, sp75 ); _LIT16( spXML76, "è" ); - _LIT16( sp76, "è" ); + _LIT16( sp76, "\u00e8" ); ReplaceInString( aPtrTag, spXML76, sp76 ); _LIT16( spXML77, "é" ); - _LIT16( sp77, "é" ); + _LIT16( sp77, "\u00e9" ); ReplaceInString( aPtrTag, spXML77, sp77 ); _LIT16( spXML78, "ê" ); - _LIT16( sp78, "ê" ); + _LIT16( sp78, "\u00ea" ); ReplaceInString( aPtrTag, spXML78, sp78 ); _LIT16( spXML79, "ë" ); - _LIT16( sp79, "ë" ); + _LIT16( sp79, "\u00eb" ); ReplaceInString( aPtrTag, spXML79, sp79 ); _LIT16( spXML80, "ì" ); - _LIT16( sp80, "ì" ); + _LIT16( sp80, "\u00ec" ); ReplaceInString( aPtrTag, spXML80, sp80 ); _LIT16( spXML81, "í" ); - _LIT16( sp81, "í" ); + _LIT16( sp81, "\u00ed" ); ReplaceInString( aPtrTag, spXML81, sp81 ); _LIT16( spXML82, "î" ); - _LIT16( sp82, "î" ); + _LIT16( sp82, "\u00ee" ); ReplaceInString( aPtrTag, spXML82, sp82 ); _LIT16( spXML83, "ï" ); - _LIT16( sp83, "ï" ); + _LIT16( sp83, "\u00ef" ); ReplaceInString( aPtrTag, spXML83, sp83 ); _LIT16( spXML84, "ð" ); - _LIT16( sp84, "ð" ); + _LIT16( sp84, "\u00f0" ); ReplaceInString( aPtrTag, spXML84, sp84 ); _LIT16( spXML85, "ñ" ); - _LIT16( sp85, "ñ" ); + _LIT16( sp85, "\u00f1" ); ReplaceInString( aPtrTag, spXML85, sp85 ); _LIT16( spXML86, "ò" ); - _LIT16( sp86, "ò" ); + _LIT16( sp86, "\u00f2" ); ReplaceInString( aPtrTag, spXML86, sp86 ); _LIT16( spXML87, "ó" ); - _LIT16( sp87, "ó" ); + _LIT16( sp87, "\u00f3" ); ReplaceInString( aPtrTag, spXML87, sp87 ); _LIT16( spXML88, "ô" ); - _LIT16( sp88, "ô" ); + _LIT16( sp88, "\u00f4" ); ReplaceInString( aPtrTag, spXML88, sp88 ); _LIT16( spXML89, "õ" ); - _LIT16( sp89, "õ" ); + _LIT16( sp89, "\u00f5" ); ReplaceInString( aPtrTag, spXML89, sp89 ); _LIT16( spXML90, "ö" ); - _LIT16( sp90, "ö" ); + _LIT16( sp90, "\u00f6" ); ReplaceInString( aPtrTag, spXML90, sp90 ); _LIT16( spXML91, "÷" ); - _LIT16( sp91, "÷" ); + _LIT16( sp91, "\u00f7" ); ReplaceInString( aPtrTag, spXML91, sp91 ); _LIT16( spXML92, "ø" ); - _LIT16( sp92, "ø" ); + _LIT16( sp92, "\u00f8" ); ReplaceInString( aPtrTag, spXML92, sp92 ); _LIT16( spXML93, "ù" ); - _LIT16( sp93, "ù" ); + _LIT16( sp93, "\u00f9" ); ReplaceInString( aPtrTag, spXML93, sp93 ); _LIT16( spXML94, "ú" ); - _LIT16( sp94, "ú" ); + _LIT16( sp94, "\u00fa" ); ReplaceInString( aPtrTag, spXML94, sp94 ); _LIT16( spXML95, "û" ); - _LIT16( sp95, "û" ); + _LIT16( sp95, "\u00fb" ); ReplaceInString( aPtrTag, spXML95, sp95 ); _LIT16( spXML96, "ü" ); - _LIT16( sp96, "ü" ); + _LIT16( sp96, "\u00fc" ); ReplaceInString( aPtrTag, spXML96, sp96 ); _LIT16( spXML97, "ý" ); - _LIT16( sp97, "ý" ); + _LIT16( sp97, "\u00fd" ); ReplaceInString( aPtrTag, spXML97, sp97 ); _LIT16( spXML98, "þ" ); - _LIT16( sp98, "þ" ); + _LIT16( sp98, "\u00de" ); ReplaceInString( aPtrTag, spXML98, sp98 ); _LIT16( spXML99, "ÿ" ); - _LIT16( sp99, "ÿ" ); + _LIT16( sp99, "\u00ff" ); ReplaceInString( aPtrTag, spXML99, sp99 ); _LIT16( spXML100, "Œ" ); - _LIT16( sp100, "Œ" ); + _LIT16( sp100, "\u0152" ); ReplaceInString( aPtrTag, spXML100, sp100 ); _LIT16( spXML101, "œ" ); - _LIT16( sp101, "œ" ); + _LIT16( sp101, "\u0153" ); ReplaceInString( aPtrTag, spXML101, sp101 ); _LIT16( spXML102, "Š" ); - _LIT16( sp102, "Š" ); + _LIT16( sp102, "\u0160" ); ReplaceInString( aPtrTag, spXML102, sp102 ); _LIT16( spXML103, "š" ); - _LIT16( sp103, "š" ); + _LIT16( sp103, "\u0161" ); ReplaceInString( aPtrTag, spXML103, sp103 ); _LIT16( spXML104, "Ÿ" ); - _LIT16( sp104, "Ÿ" ); + _LIT16( sp104, "\u0178" ); ReplaceInString( aPtrTag, spXML104, sp104 ); _LIT16( spXML105, "ƒ" ); - _LIT16( sp105, "ƒ" ); + _LIT16( sp105, "\u0192" ); ReplaceInString( aPtrTag, spXML105, sp105 ); _LIT16( spXML106, "ˆ" ); - _LIT16( sp106, "ˆ" ); + _LIT16( sp106, "\u02c6" ); ReplaceInString( aPtrTag, spXML106, sp106 ); _LIT16( spXML107, "˜" ); - _LIT16( sp107, "˜" ); + _LIT16( sp107, "\u02dc" ); ReplaceInString( aPtrTag, spXML107, sp107 ); } @@ -1820,6 +1817,5 @@ iDNParams.Append( EInputParams( EDN_IAPName, KDN_IAPName9 ) ); iDNParams.Append( EInputParams( EDN_IAPName, KDN_IAPName10 ) ); }; - // End of File. diff -r 4af712113915 -r a9c709db68db dbcreator/commsdatcreator/group/cdccommsdatcreator.mmp --- a/dbcreator/commsdatcreator/group/cdccommsdatcreator.mmp Wed Aug 18 10:10:23 2010 +0300 +++ b/dbcreator/commsdatcreator/group/cdccommsdatcreator.mmp Thu Sep 02 20:50:05 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -11,12 +11,10 @@ * * Contributors: * -* Description: Project description file for commsdatcreator -* +* Description: +* Project description file for commsdatcreator */ - - #include TARGET commsdatcreator.dll @@ -30,7 +28,7 @@ LANG SC -SOURCEPATH ../Src +SOURCEPATH ../src SOURCE cdcreaderbase.cpp SOURCE cdcreaderxml.cpp @@ -50,7 +48,7 @@ // Component specific internal headers -USERINCLUDE ../Inc +USERINCLUDE ../inc USERINCLUDE ../../inc diff -r 4af712113915 -r a9c709db68db dbcreator/conf/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dbcreator/conf/bld.inf Thu Sep 02 20:50:05 2010 +0300 @@ -0,0 +1,28 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Build information for the DbCreator Config files and ROM +* +*/ + + +#include + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS +commsdatcreator.confml MW_LAYER_CONFML(commsdatcreator.confml) +commsdatcreator_01.gcfml MW_LAYER_GCFML(commsdatcreator_01.gcfml) +commsdatcreator.implml MW_LAYER_CRML(commsdatcreator.implml) +../rom/commsdatcreator.iby CORE_MW_LAYER_IBY_EXPORT_PATH(commsdatcreator.iby) diff -r 4af712113915 -r a9c709db68db package_definition.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package_definition.xml Thu Sep 02 20:50:05 2010 +0300 @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 4af712113915 -r a9c709db68db package_map.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package_map.xml Thu Sep 02 20:50:05 2010 +0300 @@ -0,0 +1,1 @@ +