sysstatemgmt/ssmutilityplugins/ssmlocaleobserversup/inc/ssmuilanguageobserversup.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 CSsmUiLanguageObserver class.
       
    15 *
       
    16 */
       
    17 #ifndef __SSMUILANGUAGEOBSERVER_H__
       
    18 #define __SSMUILANGUAGEOBSERVER_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 UI Language code changes and load the new UI Language
       
    27 * when it is changed.
       
    28 */
       
    29 NONSHARABLE_CLASS( CSsmUiLanguageObserver ) : 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     ~CSsmUiLanguageObserver();
       
    62     
       
    63     /**
       
    64      * C++ default constructor.
       
    65      */
       
    66     CSsmUiLanguageObserver();
       
    67 
       
    68     /**
       
    69     * Activate the active object.
       
    70     */
       
    71     void Activate();
       
    72 
       
    73     /**
       
    74     * Loads the Language set in the PS key.
       
    75     */
       
    76     void LoadUILanguage();
       
    77 
       
    78     /**
       
    79     * Store the Language code to Central Repository.
       
    80     * @param aUILanguage The Language code to store.
       
    81     */
       
    82     void StoreUILanguageToCentRep( const TInt aUILanguage);
       
    83 	
       
    84 private: // data
       
    85 
       
    86     /**
       
    87     * Used for observing UI Language code changes.
       
    88     */
       
    89 	RProperty iUILanguageProperty;
       
    90     };
       
    91 #endif // __SSMUILANGUAGEOBSERVER_H__