sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmregionobserversup.h
changeset 63 09d657f1ee00
parent 54 072a9626b290
child 65 8cf1a5cd9ade
child 69 dc67b94625c5
equal deleted inserted replaced
54:072a9626b290 63:09d657f1ee00
     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: Declaration of CSsmRegionObserver class.
       
    15 *
       
    16 */
       
    17 #ifndef __SSMREGIONOBSERVER_H__
       
    18 #define __SSMREGIONOBSERVER_H__
       
    19 
       
    20 #include <e32base.h>
       
    21 #include <ssm/ssmutility.h>
       
    22 #include <e32property.h>
       
    23 #include "trace.h"
       
    24 
       
    25 /**
       
    26 * SSM Utility plugin to observe the Region code changes and load the new Region
       
    27 * when it is changed.
       
    28 */
       
    29 NONSHARABLE_CLASS( CSsmRegionObserver ) : public CActive, public MSsmUtility
       
    30     {
       
    31 public:
       
    32     //From MSsmUtility
       
    33     void InitializeL();
       
    34     void StartL();
       
    35     void Release();
       
    36     
       
    37 public:
       
    38     /**
       
    39      * Two-phased constructor.
       
    40      */
       
    41     IMPORT_C static MSsmUtility* NewL();
       
    42 
       
    43 protected:
       
    44     // from base class CActive
       
    45 
       
    46     /**
       
    47      * Implements cancellation of an outstanding request.
       
    48      */
       
    49     void DoCancel();
       
    50 
       
    51     /**
       
    52      * Handles an active object’s request completion event.
       
    53      * This RunL will never leave, so RunError not needed.
       
    54      */
       
    55     void RunL();
       
    56 
       
    57 private:
       
    58     /**
       
    59     * Destructor.
       
    60     */
       
    61     ~CSsmRegionObserver();
       
    62     
       
    63     /**
       
    64      * C++ default constructor.
       
    65      */
       
    66     CSsmRegionObserver();
       
    67 
       
    68     /**
       
    69     * Activate the active object.
       
    70     */
       
    71     void Activate();
       
    72 
       
    73     /**
       
    74     * Loads the Region set in the PS key.
       
    75     */
       
    76     void LoadRegion();
       
    77     
       
    78     /**
       
    79     * Store the Region code to Central Repository.
       
    80     * @param aRegion The Region code to store.
       
    81     */
       
    82     void StoreRegionToCentRep( const TInt aRegion);
       
    83     
       
    84 private: // data
       
    85 
       
    86     /**
       
    87     * Used for observing Region code changes.
       
    88     */
       
    89     RProperty iRegionProperty;
       
    90     };
       
    91 #endif // __SSMREGIONOBSERVER_H__