Apply string localization for web
[platform/framework/native/appfw.git] / src / server / system / setting / providers / FSys_SettingLocaleProvider.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file        FSys_SettingLocaleProvider.h
19  * @brief       This is the header file for the %_SettingLocaleProvider class.
20  *
21  * This header file contains the declarations of the %_SettingLocaleProvider class.
22  */
23
24 #ifndef _FSYS_SETTING_LOCALE_PROVIDER_H_
25 #define _FSYS_SETTING_LOCALE_PROVIDER_H_
26
27 #include <vconf.h>
28 #include <runtime_info.h>
29
30 #include "FSys_ISettingProvider.h"
31 #include "FSys_Icu.h"
32
33 namespace Tizen { namespace System
34 {
35
36 class _SettingLocaleProvider
37         : virtual public Tizen::System::_ISettingProvider
38 {
39 public:
40         _SettingLocaleProvider();
41         virtual ~_SettingLocaleProvider();
42
43 public:
44         result GetValue(const Tizen::Base::String& key, bool& value);
45         result SetValue(const Tizen::Base::String& key, const bool value);
46
47         result GetValue(const Tizen::Base::String& key, Tizen::Base::String& value);
48         result SetValue(const Tizen::Base::String& key, const Tizen::Base::String value);
49
50         bool HasKey(const Tizen::Base::String& key);
51
52         bool IsValidLocaleString(const Tizen::Base::String& localeString, const icu::Locale& icuLocale);
53         bool IsSupportedDisplayLanguageLocale(const char* localeId);
54         bool IsSupportedRegionLocale(const char* localeId);
55 private:
56         _Icu    __icu;
57 private:
58         static void SettingEventRuntimeInfo(runtime_info_key_e key, void* userData);
59         static void SettingEventVConf(keynode_t* node, void* userData);
60 }; // _SettingLocaleProvider
61
62 }} // Tizen::System
63
64 #endif // _FSYS_ISETTING_LOCALE_PROVIDER_H_