commsconfig/cscsettingsui/inc/cscsettingsuimodel.h
branchRCL_3
changeset 21 f742655b05bf
parent 20 65a3ef1d5bd0
child 22 d38647835c2e
equal deleted inserted replaced
20:65a3ef1d5bd0 21:f742655b05bf
     1 /*
       
     2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Declarition of CSCSettingsUiModel
       
    15 *
       
    16 */
       
    17 
       
    18  
       
    19 #ifndef C_CSCSETTINGSUIMODEL_H
       
    20 #define C_CSCSETTINGSUIMODEL_H
       
    21 
       
    22 #include "mcscengcchobserver.h"
       
    23 #include "mcscengserviceobserver.h"
       
    24 #include "mcscengprovisioningobserver.h"
       
    25 
       
    26 class CCSCEngCCHHandler;
       
    27 class CCSCEngServiceHandler;
       
    28 class CCSCEngBrandingHandler;
       
    29 class CCSCEngDestinationsHandler;
       
    30 class MCSCSettingsUiModelObserver;
       
    31 class CCSCEngServicePluginHandler;
       
    32 class MCSCEngProvisioningObserver;
       
    33 
       
    34 /**
       
    35  *  CCSCSettingsUiModel class
       
    36  *  Declarition of CCSCSettingsUiModel.
       
    37  *
       
    38  *  @lib CSCSettingsUi.lib
       
    39  *  @since S60 v3.2
       
    40  */
       
    41 NONSHARABLE_CLASS( CCSCSettingsUiModel ) : public CBase,
       
    42                                            public MCSCEngCCHObserver,
       
    43                                            public MCSCEngServiceObserver,
       
    44                                            public MCSCEngProvisioningObserver
       
    45     {
       
    46 public: 
       
    47         
       
    48     /**
       
    49      * Two-phased constructor.
       
    50      * @param aObserver for settings ui observer
       
    51      * @param aEikEnv for Eikon environment
       
    52      */
       
    53     static CCSCSettingsUiModel* NewL(
       
    54         MCSCSettingsUiModelObserver& aObserver,
       
    55         CEikonEnv& aEikEnv );
       
    56 
       
    57 
       
    58     /**
       
    59      * Two-phased constructor.
       
    60      * @param aObserver for settings ui observer
       
    61      * @param aEikEnv for Eikon environment
       
    62      */
       
    63     static CCSCSettingsUiModel* NewLC(
       
    64         MCSCSettingsUiModelObserver& aObserver,
       
    65         CEikonEnv& aEikEnv );
       
    66 
       
    67     /**
       
    68      * Destructor.
       
    69      */
       
    70     virtual ~CCSCSettingsUiModel();
       
    71 
       
    72     /**
       
    73      * Returns reference to CSC's Service Provider Settings Handler.
       
    74      *
       
    75      * @since S60 v3.2
       
    76      * @return reference to SPS handle
       
    77      */
       
    78     CCSCEngServiceHandler& SettingsHandler() const;
       
    79 
       
    80     /**
       
    81      * Returns reference to CSC's Converged Connection Handler.
       
    82      *
       
    83      * @since S60 v3.2
       
    84      * @return reference to CCH handle
       
    85      */
       
    86     CCSCEngCCHHandler& CCHHandler() const;
       
    87 
       
    88     /**
       
    89      * Returns reference to CSC's Destinations Handler.
       
    90      *
       
    91      * @since S60 v3.2
       
    92      * @return reference to Destinations handle
       
    93      */
       
    94     CCSCEngDestinationsHandler& DestinationsHandler() const;
       
    95 
       
    96     /**
       
    97      * Returns reference to CSC's Branding Server Handler.
       
    98      *
       
    99      * @since S60 v3.2
       
   100      * @return reference to Branding Server handle
       
   101      */
       
   102     CCSCEngBrandingHandler& BSHandler() const;
       
   103 
       
   104     /**
       
   105      * Returns reference to CSC's Service Plugin Handler.
       
   106      *
       
   107      * @since S60 v5.2
       
   108      * @return Reference to Service Plugin Handler.
       
   109      */
       
   110     CCSCEngServicePluginHandler& ServicePluginHandler() const;
       
   111 
       
   112     /**
       
   113      * Stores initialization information.
       
   114      * Function leaves if given service doesn't exists.
       
   115      *
       
   116      * @since S60 v3.2
       
   117      * @param aViewId for view id to be activated when exiting
       
   118      * @param aServiceId for service settings entry id
       
   119      */
       
   120     void StoreInitializationDataL(
       
   121         const TUid& aViewId, 
       
   122         TUint aServiceId );
       
   123 
       
   124     /**
       
   125      * To notify when softkeys need to be changed.
       
   126      *
       
   127      * @since S60 v3.2
       
   128      */
       
   129     void UpdateSoftkeys();
       
   130 
       
   131     /**
       
   132      * Returns uid of the view where to be returned.
       
   133      *
       
   134      * @since S60 v3.2
       
   135      * @return uid of the return view
       
   136      */
       
   137     TUid ReturnViewId() const;
       
   138 
       
   139     /**
       
   140      * Returns currently selected service provider entry id.
       
   141      *
       
   142      * @since S60 v3.2
       
   143      * @return id of the currently selected service entry id
       
   144      */
       
   145     TUint CurrentSPEntryId() const;
       
   146 
       
   147 // from base class MCSCEngCCHObserver
       
   148 
       
   149     /**
       
   150      * From MCSCEngCCHObserver.
       
   151      */
       
   152     void ServiceStatusChanged(
       
   153         TUint aServiceId, 
       
   154         TCCHSubserviceType aType, 
       
   155         const TCchServiceStatus& aServiceStatus );       
       
   156 
       
   157 // from base class MCSCEngServiceObserver
       
   158 
       
   159     /**
       
   160      * From MCSCEngServiceObserver.
       
   161      */
       
   162     void NotifyServiceChange();
       
   163 
       
   164 // from base class MCSCProvisioningObserver
       
   165     
       
   166     /**
       
   167      * From MCSCProvisioningObserver
       
   168      * Notifies when configuring of service plug-in is done.
       
   169      *
       
   170      * @since S60 v3.2
       
   171      * @param aResponse plug-in response type
       
   172      * @param aIndex index
       
   173      * @param aPluginUid plugins uid
       
   174      */
       
   175     void NotifyServicePluginResponse( 
       
   176         const CCSCEngServicePluginHandler::TServicePluginResponse& aResponse, 
       
   177         const TInt aIndex, 
       
   178         const TUid& aPluginUid );
       
   179 
       
   180 private:
       
   181 
       
   182     CCSCSettingsUiModel( 
       
   183         MCSCSettingsUiModelObserver& aObserver,
       
   184         CEikonEnv& aEikEnv );
       
   185 
       
   186     void ConstructL();
       
   187 
       
   188 private: // data
       
   189 
       
   190     /**
       
   191      * Reference to settings ui model observer.
       
   192      */
       
   193     MCSCSettingsUiModelObserver& iObserver;
       
   194 
       
   195     /**
       
   196      * Reference to Eikon environment.
       
   197      */
       
   198     CEikonEnv& iEikEnv;
       
   199 
       
   200     /**
       
   201      * Handle to CSC's Service Provider Settings Handler.
       
   202      * Own.
       
   203      */
       
   204     CCSCEngServiceHandler* iSPSHandler;
       
   205 
       
   206     /**
       
   207      * Handle to CSC's Converged Connection Handler.
       
   208      * Own.
       
   209      */
       
   210     CCSCEngCCHHandler* iCCHHandler;
       
   211 
       
   212     /**
       
   213      * Handle to CSC's Destinations Handler.
       
   214      * Own.
       
   215      */
       
   216     CCSCEngDestinationsHandler* iDestinationsHandler;
       
   217 
       
   218     /**
       
   219      * Handle to CSC's Branding Server Handler.
       
   220      * Own.
       
   221      */
       
   222     CCSCEngBrandingHandler* iBSHandler;
       
   223 
       
   224     /**
       
   225      * CSC's Service Plugin Handler.
       
   226      * Own.
       
   227      */
       
   228     CCSCEngServicePluginHandler* iServicePluginHandler;
       
   229 
       
   230     /**
       
   231      * Initialization data: Customer application return view id.
       
   232      */
       
   233     TUid iViewId;
       
   234 
       
   235     /**
       
   236      * Initialization data: Service Provider Settings Entry id.
       
   237      */
       
   238     TUint iServiceId;      
       
   239     };
       
   240 
       
   241 #endif // C_CSCSETTINGSUIMODEL_H