sync with master
[platform/framework/native/appfw.git] / src / system / inc / FSys_SettingInfoImpl.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file                FSys_SettingInfoImpl.h
20  * @brief               This is the header file for _SettingInfoImpl class.
21  */
22
23 #ifndef _FSYSTEM_INTERNAL_SETTINGINFO_IMPL_H_
24 #define _FSYSTEM_INTERNAL_SETTINGINFO_IMPL_H_
25
26 #include <FSysSettingInfo.h>
27
28 namespace Tizen { namespace System
29 {
30
31 class _OSP_EXPORT_ _SettingInfoImpl
32         : public Tizen::Base::Object
33 {
34 public:
35         _SettingInfoImpl(void);
36         virtual ~_SettingInfoImpl(void);
37
38         static result GetValue(const Tizen::Base::String& key, Tizen::Base::String& value);
39         static result GetValue(const Tizen::Base::String& key, int& value);
40         static result GetValue(const Tizen::Base::String& key, long long& value);
41         static result GetValue(const Tizen::Base::String& key, double& value);
42         static result GetValue(const Tizen::Base::String& key, bool& value);
43         static result GetValue(const Tizen::Base::String& key, Tizen::Base::UuId& value);
44         static result SetSettingEventListener(ISettingEventListener* pListener);
45         static result AddSettingEventListenerForInternal(ISettingEventListener& listener);
46         static result RemoveSettingEventListenerForInternal(ISettingEventListener& listener);
47         static result AddSettingEventListener(ISettingEventListener& listener);
48         static result RemoveSettingEventListener(ISettingEventListener& listener);
49
50         static result SetWallpaper(const Tizen::Base::String& filePath);
51         static result SetRingtone(const Tizen::Base::String& filePath);
52         static result SetVolume(const Tizen::Base::String& soundCategory, int level);
53         static _SettingInfoImpl* GetInstance(SettingInfo& settinginfo);
54         static const _SettingInfoImpl* GetInstance(const SettingInfo& settinginfo);
55         
56         static bool HasKey(const Tizen::Base::String& key);
57
58         static result GetValueForPrivilegedKey(const Tizen::Base::String& key, bool& value);
59
60         static result SetValue(const Tizen::Base::String& key, bool value);
61         static result SetValue(const Tizen::Base::String& key, int value);
62         static result SetValue(const Tizen::Base::String& key, Tizen::Base::String value);
63         static result SetValueForPrivilegedKey(const Tizen::Base::String& key, bool value);
64         static result SetValueAsyncForPrivilegedKey(const Tizen::Base::String& key, bool value, ISettingInfoSetValueAsyncResultListener* listener);
65         static result SetValueForPrivilegedKey(const Tizen::Base::String& key, Tizen::Base::String value);
66
67         static result ResetToFactoryDefault(void);
68 private:
69         static void InitSettingClient(void);
70
71 };
72
73 } } // Tizen::Sys
74
75 #endif //_FSYSTEM_INTERNAL_SETTINGINFO_IMPL_H_