tizen beta release
[framework/web/wrt-plugins-common.git] / src / modules / tizen / Profile / Manager.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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  * @author       Zbigniew Kostrzewa (z.kostrzewa@samsung.com)
18  */
19
20 #ifndef WRTDEVICEAPIS_PROFILE_MANAGER_H_
21 #define WRTDEVICEAPIS_PROFILE_MANAGER_H_
22
23 #include <map>
24 #include <API/Profile/IManager.h>
25 #include <VConf/Key.h>
26
27 namespace WrtDeviceApis {
28 namespace Profile {
29 class Manager : public Profile::Api::IManager
30 {
31   public:
32     static Manager& getInstance();
33
34   public:
35     ~Manager();
36
37     /**
38      * @ release singleton resource while singleton deconstructor is not invoked.
39      */
40     void Release() const;
41
42     /**
43      * @see WrtPlugins::Profile::Api::IManager::getDesktop()
44      */
45     Profile::Api::IDesktopPtr getDesktop(std::size_t index) const;
46
47     /**
48      * @see WrtPlugins::Profile::Api::IManager::getDesktopsCount()
49      */
50     std::size_t getDesktopCount() const;
51
52     /**
53      * @see WrtPlugins::Profile::Api::IManager::getRingtone()
54      */
55     Profile::Api::IRingtone* getRingtone(Profile::Api::RingtoneScope scope)
56     const;
57
58     /**
59      * @see WrtPlugins::Profile::Api::IManager::getProfileType()
60      */
61     Profile::Api::IManager::ProfileType getProfileType() const;
62
63     /**
64      * @see WrtPlugins::Profile::Api::IManager::getSystemVolume()
65      */
66     int getSystemVolume() const;
67
68     int getVibrateType() const;
69
70     // int getMsgAlertType() const;
71
72   private:
73     typedef std::map<Profile::Api::RingtoneScope,
74                      Profile::Api::IRingtone*> Ringtones;
75     typedef std::map<std::size_t, Profile::Api::IDesktopPtr> Desktops;
76
77   private:
78     Manager();
79     Profile::Api::IRingtone* getRingtone_(Profile::Api::RingtoneScope scope)
80     const;
81
82   private:
83     mutable Ringtones m_ringtones;
84     mutable Desktops m_desktops;
85     VConf::Key m_profileKey;
86     VConf::Key m_volumeKey;
87     VConf::Key m_vibrationKey;
88 };
89 } // Profile
90 } // WrtDeviceApis
91
92 #endif // WRTDEVICEAPIS_PROFILE_MANAGER_H_