commsconfig/cscsettingsui/inc/cscsettingsuimodel.h
changeset 0 a4daefaec16c
child 11 6134b5029079
equal deleted inserted replaced
-1:000000000000 0:a4daefaec16c
       
     1 /*
       
     2 * Copyright (c) 2007-2007 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 
       
    25 class CCSCEngCCHHandler;
       
    26 class CCSCEngServiceHandler;
       
    27 class CCSCEngBrandingHandler;
       
    28 class CCSCEngDestinationsHandler;
       
    29 class MCSCSettingsUiModelObserver;
       
    30 
       
    31 /**
       
    32  *  CCSCSettingsUiModel class
       
    33  *  Declarition of CCSCSettingsUiModel.
       
    34  *
       
    35  *  @lib CSCSettingsUi.lib
       
    36  *  @since S60 v3.2
       
    37  */
       
    38 NONSHARABLE_CLASS( CCSCSettingsUiModel ) : public CBase,
       
    39                                            public MCSCEngCCHObserver,
       
    40                                            public MCSCEngServiceObserver
       
    41     {
       
    42     public: 
       
    43             
       
    44         /**
       
    45          * Two-phased constructor.
       
    46          * @param aObserver for settings ui observer
       
    47          * @param aEikEnv for Eikon environment
       
    48          */
       
    49         static CCSCSettingsUiModel* NewL(
       
    50             MCSCSettingsUiModelObserver& aObserver,
       
    51             CEikonEnv& aEikEnv );
       
    52 
       
    53 
       
    54         /**
       
    55          * Two-phased constructor.
       
    56          * @param aObserver for settings ui observer
       
    57          * @param aEikEnv for Eikon environment
       
    58          */
       
    59         static CCSCSettingsUiModel* NewLC(
       
    60             MCSCSettingsUiModelObserver& aObserver,
       
    61             CEikonEnv& aEikEnv );
       
    62         
       
    63         
       
    64         /**
       
    65          * Destructor.
       
    66          */
       
    67         virtual ~CCSCSettingsUiModel();
       
    68     
       
    69     
       
    70         /**
       
    71          * Returns reference to CSC's Service Provider Settings Handler.
       
    72          *
       
    73          * @since S60 v3.2
       
    74          * @return reference to SPS handle
       
    75          */
       
    76         CCSCEngServiceHandler& SettingsHandler() const;
       
    77     
       
    78     
       
    79         /**
       
    80          * Returns reference to CSC's Converged Connection Handler.
       
    81          *
       
    82          * @since S60 v3.2
       
    83          * @return reference to CCH handle
       
    84          */
       
    85         CCSCEngCCHHandler& CCHHandler() const;
       
    86     
       
    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         /**
       
    98          * Returns reference to CSC's Branding Server Handler.
       
    99          *
       
   100          * @since S60 v3.2
       
   101          * @return reference to Branding Server handle
       
   102          */
       
   103         CCSCEngBrandingHandler& BSHandler() const;
       
   104     
       
   105         
       
   106         /**
       
   107          * Stores initialization information.
       
   108          * Function leaves if given service doesn't exists.
       
   109          *
       
   110          * @since S60 v3.2
       
   111          * @param aViewId for view id to be activated when exiting
       
   112          * @param aServiceId for service settings entry id
       
   113          */
       
   114         void StoreInitializationDataL(
       
   115             const TUid& aViewId, 
       
   116             TUint aServiceId );
       
   117             
       
   118         
       
   119         /**
       
   120          * To notify when softkeys need to be changed.
       
   121          *
       
   122          * @since S60 v3.2
       
   123          */
       
   124         void UpdateSoftkeys();
       
   125     
       
   126     
       
   127         /**
       
   128          * Returns uid of the view where to be returned.
       
   129          *
       
   130          * @since S60 v3.2
       
   131          * @return uid of the return view
       
   132          */
       
   133         TUid ReturnViewId() const;
       
   134     
       
   135     
       
   136         /**
       
   137          * Returns currently selected service provider entry id.
       
   138          *
       
   139          * @since S60 v3.2
       
   140          * @return id of the currently selected service entry id
       
   141          */
       
   142         TUint CurrentSPEntryId() const;
       
   143         
       
   144         
       
   145         // from base class MCSCEngCCHObserver
       
   146 
       
   147         /**
       
   148          * From MCSCEngCCHObserver.
       
   149          */
       
   150         void ServiceStatusChanged(
       
   151             TUint aServiceId, 
       
   152             TCCHSubserviceType aType, 
       
   153             const TCchServiceStatus& aServiceStatus );       
       
   154         
       
   155         
       
   156         // from base class MCSCEngServiceObserver
       
   157 
       
   158         /**
       
   159          * From MCSCEngServiceObserver.
       
   160          */
       
   161         void NotifyServiceChange();
       
   162         
       
   163         
       
   164     private:
       
   165 
       
   166         CCSCSettingsUiModel( 
       
   167             MCSCSettingsUiModelObserver& aObserver,
       
   168             CEikonEnv& aEikEnv );
       
   169 
       
   170         void ConstructL();
       
   171 
       
   172     private: // data
       
   173         
       
   174         /**
       
   175          * Reference to settings ui model observer.
       
   176          */
       
   177         MCSCSettingsUiModelObserver& iObserver;
       
   178         
       
   179         /**
       
   180          * Reference to Eikon environment.
       
   181          */
       
   182         CEikonEnv& iEikEnv;
       
   183         
       
   184         /**
       
   185          * Handle to CSC's Service Provider Settings Handler.
       
   186          * Own.
       
   187          */
       
   188         CCSCEngServiceHandler* iSPSHandler;
       
   189         
       
   190         /**
       
   191          * Handle to CSC's Converged Connection Handler.
       
   192          * Own.
       
   193          */
       
   194         CCSCEngCCHHandler* iCCHHandler;
       
   195         
       
   196         /**
       
   197          * Handle to CSC's Destinations Handler.
       
   198          * Own.
       
   199          */
       
   200         CCSCEngDestinationsHandler* iDestinationsHandler;
       
   201         
       
   202         /**
       
   203          * Handle to CSC's Branding Server Handler.
       
   204          * Own.
       
   205          */
       
   206         CCSCEngBrandingHandler* iBSHandler;
       
   207         
       
   208         /**
       
   209          * Initialization data: Customer application return view id.
       
   210          */
       
   211         TUid iViewId;
       
   212 
       
   213         /**
       
   214          * Initialization data: Service Provider Settings Entry id.
       
   215          */
       
   216         TUint iServiceId;      
       
   217     };
       
   218 
       
   219 #endif // C_CSCSETTINGSUIMODEL_H