commsconfig/cscsettingsui/src/cscsettingsuimodel.cpp
branchRCL_3
changeset 11 6134b5029079
parent 0 a4daefaec16c
equal deleted inserted replaced
10:ed1e38b404e5 11:6134b5029079
     1 /*
     1 /*
     2 * Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    29 #include "cscengservicehandler.h"
    29 #include "cscengservicehandler.h"
    30 #include "cscengbrandinghandler.h"
    30 #include "cscengbrandinghandler.h"
    31 #include "cscsettingsuiconstants.h"
    31 #include "cscsettingsuiconstants.h"
    32 #include "cscengdestinationshandler.h"
    32 #include "cscengdestinationshandler.h"
    33 #include "mcscsettingsuimodelobserver.h"
    33 #include "mcscsettingsuimodelobserver.h"
       
    34 #include "cscengservicepluginhandler.h"
    34 
    35 
    35 // ======== MEMBER FUNCTIONS ========
    36 // ======== MEMBER FUNCTIONS ========
    36 
    37 
    37 // ---------------------------------------------------------------------------
    38 // ---------------------------------------------------------------------------
    38 // ---------------------------------------------------------------------------
    39 // ---------------------------------------------------------------------------
    50 // ---------------------------------------------------------------------------
    51 // ---------------------------------------------------------------------------
    51 //
    52 //
    52 void CCSCSettingsUiModel::ConstructL()
    53 void CCSCSettingsUiModel::ConstructL()
    53     {
    54     {
    54     CSCSETUIDEBUG( "CCSCSettingsUiModel::ConstructL - begin" );
    55     CSCSETUIDEBUG( "CCSCSettingsUiModel::ConstructL - begin" );
    55     
    56 
    56     // Create handle to CSC's Service Provider Settings Handler.
    57     // Create handle to CSC's Service Provider Settings Handler.
    57     iSPSHandler = CCSCEngServiceHandler::NewL( this );
    58     iSPSHandler = CCSCEngServiceHandler::NewL( this );
    58     
    59 
    59     // Create handle to CSC's Converged Connection Handler.
    60     // Create handle to CSC's Converged Connection Handler.
    60     iCCHHandler = CCSCEngCCHHandler::NewL( *this );
    61     iCCHHandler = CCSCEngCCHHandler::NewL( *this );
    61     
    62 
    62     // Create handle to CSC's Destinations Handler.
    63     // Create handle to CSC's Destinations Handler.
    63     iDestinationsHandler = CCSCEngDestinationsHandler::NewL();
    64     iDestinationsHandler = CCSCEngDestinationsHandler::NewL();
    64     
    65 
    65     // Create handle to CSC's Branding Server Handler.
    66     // Create handle to CSC's Branding Server Handler.
    66     iBSHandler = CCSCEngBrandingHandler::NewL();
    67     iBSHandler = CCSCEngBrandingHandler::NewL();
    67     
    68 
       
    69     // Create CSC's Service Plugin Handler.
       
    70     iServicePluginHandler = CCSCEngServicePluginHandler::NewL( 
       
    71         iEikEnv, *this, *iSPSHandler );
       
    72 
    68     CSCSETUIDEBUG( "CCSCSettingsUiModel::ConstructL - end" );
    73     CSCSETUIDEBUG( "CCSCSettingsUiModel::ConstructL - end" );
    69     }
    74     }
    70 
    75 
    71 
    76 
    72 // ---------------------------------------------------------------------------
    77 // ---------------------------------------------------------------------------
   107     
   112     
   108     delete iBSHandler;
   113     delete iBSHandler;
   109     delete iSPSHandler;
   114     delete iSPSHandler;
   110     delete iCCHHandler;
   115     delete iCCHHandler;
   111     delete iDestinationsHandler;
   116     delete iDestinationsHandler;
       
   117     delete iServicePluginHandler;
   112     
   118     
   113     CSCSETUIDEBUG( "CCSCSettingsUiModel::~CCSCSettingsUiModel - end" );
   119     CSCSETUIDEBUG( "CCSCSettingsUiModel::~CCSCSettingsUiModel - end" );
   114     }
   120     }
   115 
   121 
   116 
   122 
   152 // ---------------------------------------------------------------------------
   158 // ---------------------------------------------------------------------------
   153 //
   159 //
   154 CCSCEngBrandingHandler& CCSCSettingsUiModel::BSHandler() const
   160 CCSCEngBrandingHandler& CCSCSettingsUiModel::BSHandler() const
   155     {
   161     {
   156     return *iBSHandler;
   162     return *iBSHandler;
       
   163     }
       
   164 
       
   165 // ---------------------------------------------------------------------------
       
   166 // CCSCSettingsUiModel::ServicePluginHandler
       
   167 // Returns reference to CSC's Service Plugin Handler.
       
   168 // ---------------------------------------------------------------------------
       
   169 //
       
   170 CCSCEngServicePluginHandler& CCSCSettingsUiModel::ServicePluginHandler() const
       
   171     {
       
   172     return *iServicePluginHandler;
   157     }
   173     }
   158 
   174 
   159 // ---------------------------------------------------------------------------
   175 // ---------------------------------------------------------------------------
   160 // CCSCSettingsUiModel::StoreInitializationDataL
   176 // CCSCSettingsUiModel::StoreInitializationDataL
   161 // Stores initialization information.
   177 // Stores initialization information.
   164 void CCSCSettingsUiModel::StoreInitializationDataL(
   180 void CCSCSettingsUiModel::StoreInitializationDataL(
   165     const TUid& aViewId,
   181     const TUid& aViewId,
   166     TUint aServiceId )
   182     TUint aServiceId )
   167     {
   183     {
   168     CSCSETUIDEBUG( "CCSCSettingsUiModel::StoreInitializationDataL - begin" );
   184     CSCSETUIDEBUG( "CCSCSettingsUiModel::StoreInitializationDataL - begin" );
   169     
   185 
   170     // View id for customer application return view id.
   186     // View id for customer application return view id.
   171     iViewId = aViewId;
   187     iViewId = aViewId;
   172     
   188 
   173     // Check that service exists in service table.
   189     // Check that service exists in service table.
   174     RArray<TUint> spEntryIds;
   190     RArray<TUint> spEntryIds;
   175     CleanupClosePushL( spEntryIds );
   191     CleanupClosePushL( spEntryIds );
   176     iSPSHandler->GetAllServiceIdsL( spEntryIds );
   192     iSPSHandler->GetAllServiceIdsL( spEntryIds );
   177     User::LeaveIfError( spEntryIds.Find( aServiceId ) );
   193     User::LeaveIfError( spEntryIds.Find( aServiceId ) );
   178     CleanupStack::PopAndDestroy( &spEntryIds );
   194     CleanupStack::PopAndDestroy( &spEntryIds );
   179     iServiceId = aServiceId;
   195     iServiceId = aServiceId;
   180     
   196 
   181     CSCSETUIDEBUG( "CCSCSettingsUiModel::StoreInitializationDataL - end" );
   197     CSCSETUIDEBUG( "CCSCSettingsUiModel::StoreInitializationDataL - end" );
   182     }
   198     }
   183 
   199 
   184 // ---------------------------------------------------------------------------
   200 // ---------------------------------------------------------------------------
   185 // CCSCSettingsUiModel::UpdateSoftkeys
   201 // CCSCSettingsUiModel::UpdateSoftkeys
   225 void CCSCSettingsUiModel::ServiceStatusChanged(
   241 void CCSCSettingsUiModel::ServiceStatusChanged(
   226     TUint /*aServiceId*/, 
   242     TUint /*aServiceId*/, 
   227     TCCHSubserviceType /*aType*/, 
   243     TCCHSubserviceType /*aType*/, 
   228     const TCchServiceStatus& /*aServiceStatus*/ )
   244     const TCchServiceStatus& /*aServiceStatus*/ )
   229     {
   245     {
   230     // not used
   246     // Not used.
   231     }
   247     }
   232 
   248 
   233 
   249 
   234 // ---------------------------------------------------------------------------
   250 // ---------------------------------------------------------------------------
   235 // From MCSCEngServiceObserver.
   251 // From MCSCEngServiceObserver.
   236 // CCSCSettingsUiModel::NotifyServiceChange
   252 // CCSCSettingsUiModel::NotifyServiceChange
   237 // ---------------------------------------------------------------------------
   253 // ---------------------------------------------------------------------------
   238 //
   254 //
   239 void CCSCSettingsUiModel::NotifyServiceChange()
   255 void CCSCSettingsUiModel::NotifyServiceChange()
   240     {
   256     {
   241     // not used
   257     // Not used.
   242     }
   258     }
   243     
   259 
       
   260 // ---------------------------------------------------------------------------
       
   261 // From MCSCProvisioningObserver.
       
   262 // CCSCSettingsUiModel::NotifyServicePluginResponse
       
   263 // ---------------------------------------------------------------------------
       
   264 //
       
   265 void CCSCSettingsUiModel::NotifyServicePluginResponse( 
       
   266     const CCSCEngServicePluginHandler::TServicePluginResponse& /*aResponse*/,
       
   267     const TInt /*aIndex*/, const TUid& /*aPluginUid*/ )
       
   268     {
       
   269     }