bd4f68454bf3c05683a26d47642e6437de4fb224
[framework/web/wrt-plugins-common.git] / src / modules / tizen / Profile / Desktop.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_DESKTOP_H_
21 #define WRTDEVICEAPIS_PROFILE_DESKTOP_H_
22
23 #include <API/Profile/IDesktop.h>
24 #include <VConf/Key.h>
25
26 namespace WrtDeviceApis {
27 namespace Profile {
28 typedef Commons::EventRequestReceiver< Profile::Api::EventSetWallpaper >
29 EventSetWallpaperReqReceiver;
30
31 class Manager;
32
33 class Desktop : public Profile::Api::IDesktop,
34     public EventSetWallpaperReqReceiver
35 {
36     friend class Manager;
37
38   public:
39     /**
40      * @see WrtPlugins::Profile::Api::IDesktop::getWallpaper()
41      */
42     Filesystem::Api::IPathPtr getWallpaper() const;
43
44     /**
45      * @see WrtPlugins::Profile::Api::IDesktop::setWallpaper()
46      */
47     void setWallpaper(const Filesystem::Api::IPathPtr& path);
48
49     /**
50      * @see WrtPlugins::Profile::Api::IDesktop::setWallpaper()
51      */
52     void setWallpaper(const Profile::Api::EventSetWallpaperPtr& event);
53
54   protected:
55     void OnRequestReceived(const Profile::Api::EventSetWallpaperPtr& event);
56
57   private:
58     Desktop();
59
60   private:
61     VConf::Key m_wallpaperKey;
62 };
63 typedef DPL::SharedPtr<Desktop> DesktopPtr;
64 } // Profile
65 } // WrtDeviceApis
66
67 #endif // WRTDEVICEAPIS_PROFILE_DESKTOP_H_