convergedconnectionhandler/cchserver/inc/cchuihandler.h
branchRCL_3
changeset 22 d38647835c2e
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     1 /*
       
     2 * Copyright (c) 2006-2009 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:  CCchUIHandler declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CCHUIHANDLER_H
       
    20 #define C_CCHUIHANDLER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 #include "cchetelnetworkstatusobserver.h"
       
    26 #include "cchfeaturemanager.h"
       
    27 // CONSTANTS
       
    28 // None
       
    29 
       
    30 // MACROS
       
    31 // None
       
    32 
       
    33 // DATA TYPES
       
    34 // None
       
    35 
       
    36 // FUNCTION PROTOTYPES
       
    37 // None
       
    38 
       
    39 // FORWARD DECLARATIONS
       
    40 class CCCHServiceHandler;
       
    41 class CCCHServerBase;
       
    42 class CRepository;
       
    43 class CCchNoteHandler;
       
    44 class CCchEtelNetworkStatusNotifier; 
       
    45 class MCchEtelNetworkStatusObserver;
       
    46 
       
    47 // CLASS DECLARATION
       
    48 
       
    49 /**
       
    50  *  CCchUIHandler declaration
       
    51  *  Displays handles CCH's UI, emergency notes, small icons
       
    52  *  @lib cchserver.exe
       
    53  *  @since S60 3.2
       
    54  */
       
    55 class CCchUIHandler : public CActive, 
       
    56                       public MCchEtelNetworkStatusObserver
       
    57     {
       
    58 
       
    59 public: // Constructors and destructor
       
    60 
       
    61     /**
       
    62     * Two-phased constructor.
       
    63     */
       
    64     static CCchUIHandler* NewL( 
       
    65         CCCHServerBase& aServer,
       
    66         CCCHServiceHandler& aCCchServiceHandler );
       
    67 
       
    68     /**
       
    69      * Two-phased constructor.
       
    70      */
       
    71     static CCchUIHandler* NewLC( 
       
    72         CCCHServerBase& aServer,
       
    73         CCCHServiceHandler& aCCchServiceHandler );
       
    74 
       
    75     /**
       
    76      * Destructor.
       
    77      */
       
    78     virtual ~CCchUIHandler();
       
    79 
       
    80 public: // New functions
       
    81 
       
    82     /**
       
    83     * shows emergency warning note.
       
    84     * @param: TInt
       
    85     * @return void
       
    86     */
       
    87     void ShowEmergencyWarningNoteL( TBool aVoIPEnabledFirstTime );
       
    88     
       
    89     /**
       
    90     * Updates the user interface (e.g. voip small icon)
       
    91     * @param: TInt
       
    92     * @return void
       
    93     */
       
    94     void UpdateUI( );
       
    95     
       
    96     /**
       
    97     * Checks gprs first usage. If used first time shows 
       
    98     * gprs roaming cost warning note.
       
    99     * @return void
       
   100     */
       
   101     void CheckGprsFirstUsageL();
       
   102     
       
   103     /**
       
   104     * Return network connections allowed status.
       
   105     * @return ETrue if network connections are allowed
       
   106     */
       
   107     TBool NetworkConnectionsAllowed() const;
       
   108     
       
   109     /**
       
   110      * Waits one second to give enought time to end async requests
       
   111      */
       
   112     void Destroy();
       
   113     
       
   114     /**
       
   115      * Is cost warning already shown
       
   116      * @return TBool if cost warning already shown ETrue 
       
   117      */
       
   118     TBool IsCostWarningSeen() const;
       
   119 
       
   120 public: // From MCchEtelNetworkStatusObserver
       
   121 
       
   122     /**
       
   123     * This is a callback function which is called when CS 
       
   124     * has gone out of coverage 
       
   125     */
       
   126     void MobileNetworkNoService( );
       
   127 
       
   128     /**
       
   129     Implements cancellation of an outstanding request.
       
   130     @see CActive::Cancel
       
   131     */
       
   132     virtual void DoCancel();
       
   133 
       
   134 
       
   135     /**
       
   136     Handles an active object's request completion event.
       
   137     */
       
   138     virtual void RunL();
       
   139     
       
   140     /**
       
   141     Handles leaving of RunL.
       
   142     */
       
   143     virtual TInt RunError(TInt aError);
       
   144     
       
   145 private:
       
   146 
       
   147     /**
       
   148      * By default Symbian 2nd phase constructor is private.
       
   149      */
       
   150     void ConstructL();
       
   151 
       
   152     /**
       
   153      * C++ default constructor.
       
   154      */
       
   155     CCchUIHandler( 
       
   156         CCCHServerBase& aServer, 
       
   157         CCCHServiceHandler& aCCchServiceHandler );
       
   158     
       
   159     /**
       
   160     * Sets the indicator's aIndicator state to state aState.
       
   161     * @param TInt aIndicator 
       
   162     * @param TInt aState
       
   163     * @return void
       
   164     */
       
   165     void SetIndicatorStateL( TInt aIndicator, TInt aState ) const;
       
   166 
       
   167     /**
       
   168     * Called when VoIP status is changed
       
   169     * @param aStatus for VoIP status
       
   170     */
       
   171     void HandleVoipStateChanged( TBool aStatus );
       
   172     
       
   173     /**
       
   174     * Called (from HandleVoipStateChanged) when VoIP status is changed
       
   175     * @param aStatus for VoIP status
       
   176     */
       
   177     void HandleVoipStateChangedL( TBool aStatus );
       
   178     
       
   179     /**
       
   180      * Checks offline status from KCRUidCoreApplicationUIs cenrep
       
   181      * and starts to monitor changes in offline status
       
   182      */
       
   183     void MonitorOfflineStatusL();
       
   184 
       
   185 private: // data
       
   186 
       
   187     /**
       
   188      * Handle to server
       
   189      */
       
   190     CCCHServerBase& iServer;
       
   191 
       
   192     /**
       
   193      * Handle to service handler
       
   194      */
       
   195     CCCHServiceHandler& iCCchServiceHandler;
       
   196 
       
   197     /**
       
   198      * Note handler
       
   199      */
       
   200     CCchNoteHandler* iNoteHandler;
       
   201     
       
   202     /**
       
   203      * ETel observer
       
   204      */
       
   205     CCchEtelNetworkStatusNotifier* iCchEtelNetworkStatusNotifier;
       
   206     
       
   207     /**
       
   208      * Are we showing the VoIP small indicator?
       
   209      */    
       
   210     TBool iVoIPSmallIndicatorShown;
       
   211     
       
   212     /**
       
   213      * Cch's repository
       
   214      */ 
       
   215     CRepository* iCchRepository;
       
   216     
       
   217     /**
       
   218      * Repository for monitoring offline mode
       
   219      */ 
       
   220     CRepository* iOfflineRepository;
       
   221     
       
   222     /**
       
   223      * is the connection allowed
       
   224      */ 
       
   225     TInt iNetworkConnectionAllowed;
       
   226     
       
   227     /**
       
   228      * Reference to RTimer 
       
   229      */
       
   230     RTimer iTimer;
       
   231 
       
   232     /**
       
   233      * Should I commit suicide
       
   234      */
       
   235     TBool iDie;
       
   236     };
       
   237 
       
   238 #endif // C_CCHUIHANDLER_H
       
   239 
       
   240 // End of file