1 /* |
1 /* |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
13 * |
13 * |
14 * Description: Declaration of CSsmLocaleObserverSup class. |
14 * Description: Declaration of CSsmLocaleObserverSup class. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #ifndef C_SSMLOCALEOBSERVERSUP_H |
18 #ifndef __SSMLOCALEOBSERVERSUP_H__ |
19 #define C_SSMLOCALEOBSERVERSUP_H |
19 #define __SSMLOCALEOBSERVERSUP_H__ |
20 |
20 |
|
21 #include "ssmcommonlocale.h" |
21 #include <e32base.h> |
22 #include <e32base.h> |
22 #include <e32property.h> |
23 #include <e32property.h> |
23 #include <f32file.h> |
24 #include <f32file.h> |
24 #include <ssm/ssmutility.h> |
25 #include <ssm/ssmutility.h> |
|
26 #include <e32hashtab.h> |
25 |
27 |
26 class CEnvironmentChangeNotifier; |
28 class CEnvironmentChangeNotifier; |
27 |
29 |
28 /** |
30 /** |
29 * SSM Utility plugin which stores locale data to file when it changes and |
31 * SSM Utility plugin which stores locale data to file when it changes and |
73 void Activate(); |
75 void Activate(); |
74 |
76 |
75 /** |
77 /** |
76 * Copied fron SysLocale. |
78 * Copied fron SysLocale. |
77 * SaveLocaleL saves TLocale class to the given directory |
79 * SaveLocaleL saves TLocale class to the given directory |
78 * and initiates missing independent data, if any. |
80 * |
79 * Note, that independent data is created only once and it is |
|
80 * shared by all the locales. Therefore, it is recommended |
|
81 * to call this method upon early boot phase of a device. |
|
82 * @param aPath Directory path containing locale data files. |
81 * @param aPath Directory path containing locale data files. |
83 * (e.g. "c:\dir" or c:\dir\") |
82 * (e.g. "c:\dir" or c:\dir\") |
84 */ |
83 */ |
85 void SaveLocaleL( const TDesC& aPath ); |
84 void SaveRegionL( const TDesC& aPath ); |
86 |
85 |
87 /** |
86 /** |
88 * Copied fron SysLocale. |
87 * Copied fron SysLocale. |
89 * LoadLocaleL restores TLocale class from the given directory. |
88 * LoadRegionL restores TLocale class from the given directory. |
90 * If locale independent data (see note) |
89 * |
91 * exists, its data overrides the restored TLocale data. |
|
92 * @param aPath Directory path containing locale data files |
90 * @param aPath Directory path containing locale data files |
93 * (e.g. "c:\dir" or c:\dir\") |
91 * (e.g. "c:\dir" or c:\dir\") |
94 */ |
92 */ |
95 void LoadLocaleL( const TDesC& aPath ); |
93 void LoadRegionL( const TDesC& aPath ); |
96 |
94 |
97 /** |
95 /** |
98 * Stores locale independent data. |
96 * Initialize the language region mapping |
|
97 * |
99 */ |
98 */ |
100 void SaveIndependentDataL( const TLocale& aLocale, const TDesC& aPath ); |
99 void InitializeRegionMappingL(); |
101 |
100 |
102 /** |
101 /** |
103 * Loads locale independent data. |
102 * Gets the associated region for the given language |
|
103 * |
104 */ |
104 */ |
105 void LoadIndependentDataL( TLocale& aLocale, const TDesC& aPath ); |
105 TInt MappedRegionL(const TInt aLanguage); |
106 |
106 |
107 private: // data |
107 private: // data |
108 |
108 |
109 /** |
109 /** |
110 * Publish & subscribe interface for KUidBackupRestoreKey key. |
110 * Publish & subscribe interface for KUidBackupRestoreKey key. |