locationsystemui/locationsysui/locnotprefplugin/inc/locnotprefcorddisadapter.h
branchRCL_3
changeset 44 2b4ea9893b66
parent 42 02ba3f1733c6
child 45 6b6920c56e2f
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
     1 /*
       
     2 * Copyright (c) 2006 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:  Location Notation Preferences Plugin Co-ordinate display adapter
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_LOCNOTPREFCOORDINATEDISPLAYADAPTER_H_
       
    19 #define C_LOCNOTPREFCOORDINATEDISPLAYADAPTER_H_
       
    20 
       
    21 //  System Includes
       
    22 #include <e32base.h>
       
    23 
       
    24 // User Includes
       
    25 
       
    26 // Forward Declarations
       
    27 class MLocNotPrefAdapterObserver;
       
    28 class CRepository;
       
    29 
       
    30 // Constant Declarations
       
    31 
       
    32 // Class Definition
       
    33 
       
    34 /**
       
    35  * Adapter to the Co-ordinate Display settings storage
       
    36  */
       
    37 class CLocNotPrefCoordinateDisplayAdapter : public CActive
       
    38     {
       
    39     public:
       
    40         /**
       
    41          * Enumeration for the positon of the Co-ordinate display values in display order
       
    42          */         
       
    43         enum TCordDisSetListPosition
       
    44             {
       
    45             /**
       
    46              * Enumeration to denote Location information is to be displayed 
       
    47              * at postion 0
       
    48              */
       
    49             EPosDMSS = 0x00000000,
       
    50             
       
    51             /**
       
    52              * Enumeration to denote Location information is to be displayed
       
    53              * at postion 1
       
    54              */             
       
    55             EPosDMM,
       
    56             
       
    57             /**
       
    58              * Enumeration to denote Location information is to be displayed
       
    59              * at postion 2
       
    60              */ 
       
    61             EPosDD             
       
    62             };            
       
    63     public:
       
    64         /**
       
    65          * Creates new Co-ordinate display adapter
       
    66          *
       
    67          * @param  aAdapterObsrv                        Observer to the Settings adapter
       
    68          * @return CLocNotPrefCoordinateDisplayAdapter& Reference to the application view
       
    69          */                                                 
       
    70         static CLocNotPrefCoordinateDisplayAdapter* NewL( 
       
    71                             MLocNotPrefAdapterObserver& aAdapterObsrv );
       
    72 
       
    73 
       
    74         /**
       
    75          * Creates new Co-ordinate display adapter
       
    76          * Leaves the object on the Clean up stack         
       
    77          *
       
    78          * @param  aAdapterObsrv                        Observer to the Settings adapter
       
    79          * @return CLocNotPrefCoordinateDisplayAdapter& Reference to the application view
       
    80          */                                                 
       
    81         static CLocNotPrefCoordinateDisplayAdapter* NewLC( 
       
    82                             MLocNotPrefAdapterObserver& aAdapterObsrv );    
       
    83 
       
    84         
       
    85         /**
       
    86          * Destructor
       
    87          */
       
    88         ~CLocNotPrefCoordinateDisplayAdapter ();
       
    89         
       
    90         /**
       
    91          * Returns the position of the Co-ordinate display format settings value.
       
    92          *
       
    93          * @return TCordDisSetListPosition Current postion of the Co-ordinate display
       
    94          *                                 settings value.
       
    95          */
       
    96         TCordDisSetListPosition GetCurrentDisplayFormatL();
       
    97         
       
    98         /**
       
    99          * Sets the value of the Co-ordinate display format settings based on the 
       
   100          * display position.
       
   101          *
       
   102          * @param aSettingsPos  Position of the new Co-ordinate display settings value.
       
   103          */
       
   104         void SetCurrentDisplayFormatL( TCordDisSetListPosition aSettingsPos );
       
   105 
       
   106     protected:
       
   107         /**
       
   108          * Inherited from CActive
       
   109          */
       
   110         void RunL();
       
   111         
       
   112         /**
       
   113          * Inherited from CActive
       
   114          */
       
   115         void DoCancel();
       
   116                     
       
   117     private:
       
   118         /**
       
   119          * Constructor
       
   120          */
       
   121         CLocNotPrefCoordinateDisplayAdapter( MLocNotPrefAdapterObserver&    aAdapterObsrv );
       
   122 
       
   123         /**
       
   124          * Second Phase Constructor
       
   125          */
       
   126         void ConstructL();
       
   127         
       
   128         /**
       
   129          * Start notification from the Central repository server for any changes in the
       
   130          * Co-ordinate display format key value
       
   131          */
       
   132         void StartNotification();
       
   133         
       
   134     private:
       
   135         /**
       
   136          * Enumeration for Co-ordinate display values
       
   137          */
       
   138         enum TCoordinateDisplayValue
       
   139             {
       
   140             /**
       
   141              * Enumeration to denote Location information is to be displayed in
       
   142              * Degrees and Decimal Degrees
       
   143              */ 
       
   144             EDD = 0x00000000,
       
   145             /**
       
   146              * Enumeration to denote Location information is to be displayed in
       
   147              * Degrees, Minutes and Decimal Minutes
       
   148              */             
       
   149             EDMM,
       
   150             /**
       
   151              * Enumeration to denote Location information is to be displayed in
       
   152              * Degrees, Minutes, Seconds and Decimal Seconds
       
   153              */             
       
   154             EDMSS
       
   155             };
       
   156                 
       
   157         /**
       
   158          * Reference to the Adapter observer
       
   159          */
       
   160         MLocNotPrefAdapterObserver&     iObserver;
       
   161         
       
   162         /**
       
   163          * Reference to the Central repository object
       
   164          *
       
   165          * Owns
       
   166          */
       
   167         CRepository*                    iRepository; 
       
   168     };          
       
   169 
       
   170 #endif // C_LOCNOTPREFCOORDINATEDISPLAYADAPTER_H_
       
   171