coreapplicationuis/SysAp/Src/gan/sysapganhandler.h
branchRCL_3
changeset 19 924385140d98
parent 18 0818dd463d41
child 20 c2c61fdca848
equal deleted inserted replaced
18:0818dd463d41 19:924385140d98
     1 /*
       
     2 * Copyright (c) 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:  CSysApGanHandler class definition.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef SYSAPGANHANDLER_H_
       
    19 #define SYSAPGANHANDLER_H_
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <e32property.h>
       
    23 #include "sysapganpropertylistener.h"
       
    24 
       
    25 class CSysApAppUi;
       
    26 
       
    27 /**
       
    28  *  Listen RProperty events from GAN server.
       
    29  */
       
    30 NONSHARABLE_CLASS( CSysApGanHandler ) : 
       
    31     public CBase, 
       
    32     private MSysApGanPropertyObserver    
       
    33     {
       
    34 public:
       
    35     /**
       
    36      * Static constructor.
       
    37      * @param aSysApUi Application UI.
       
    38      */
       
    39     static CSysApGanHandler* NewL( CSysApAppUi& aSysApAppUi );
       
    40     
       
    41     /**
       
    42      * Destructor.
       
    43      */
       
    44     ~CSysApGanHandler();
       
    45     
       
    46     /**
       
    47      * Tells if phone is in GAN mode.
       
    48      * @return ETrue if in GAN mode (not in GERAN)
       
    49      */
       
    50     TBool IsInGanMode();
       
    51     
       
    52     /**
       
    53      * Tells the signal bar level in GAN mode.
       
    54      * @return The number of signal bar blocks.
       
    55      */
       
    56     TInt GanSignalLevel();
       
    57 
       
    58 private: // from MSysApGanPropertyObserver
       
    59 
       
    60     /**
       
    61      * Receive RProperty notification. This same interface can receive 
       
    62      * notifications from multiple listeners.
       
    63      * @param aPropertyListener Property lister that received the notification.
       
    64      * @param aStatus Status of the notification.
       
    65      */
       
    66     void PropertyEvent(
       
    67         CSysApGanPropertyListener& aPropertyListener, TInt aStatus );
       
    68     
       
    69 private:
       
    70     /**
       
    71      * C++ constructor.
       
    72      * @param aSysApUi Application UI.
       
    73      */
       
    74     CSysApGanHandler( CSysApAppUi& aSysApAppUi );
       
    75     
       
    76     /**
       
    77      * Symbian 2nd phase constructor.
       
    78      */
       
    79     void ConstructL();
       
    80     
       
    81 
       
    82 protected: // Data
       
    83 
       
    84     /**
       
    85      * Application UI.
       
    86      */
       
    87     CSysApAppUi& iSysApAppUi;    
       
    88     
       
    89     /**
       
    90      * Current GAN mode. 
       
    91      */
       
    92     TCoreAppUIsGanMode iGanMode;
       
    93     
       
    94     /**
       
    95      * Current GAN signal level. 
       
    96      */
       
    97     TInt iGanSignalLevel;
       
    98     
       
    99     /**
       
   100      * GAN mode property. 
       
   101      */
       
   102     RProperty iPropertyGanMode;
       
   103         
       
   104     /**
       
   105      * Signal level property. 
       
   106      */
       
   107     RProperty iPropertySignalLevel;
       
   108     
       
   109     /**
       
   110      * Listener for GAN mode property. 
       
   111      */
       
   112     CSysApGanPropertyListener* iGanModeListener;
       
   113     
       
   114     /**
       
   115      * Listener for signal level property. 
       
   116      */
       
   117     CSysApGanPropertyListener* iSignalLevelListener;
       
   118     
       
   119     };
       
   120 
       
   121 #endif /* SYSAPGANHANDLER_H_ */